Changeset 3551 for trunk/MagicSoft/Mars/mhist/MHCamera.cc
- Timestamp:
- 03/19/04 16:56:19 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r3528 r3551 594 594 TProfile *MHCamera::RadialProfileS(const TArrayI §or, const TArrayI &aidx, const char *name, const Int_t nbins) const 595 595 { 596 597 598 599 600 { 601 602 596 597 // Create the projection histogram 598 TString pname(name); 599 if (name=="_rad") 600 { 601 pname.Prepend(GetName()); 602 if (sector.GetSize()>0) 603 603 { 604 605 606 604 pname += ";"; 605 for (int i=0; i<sector.GetSize(); i++) 606 pname += sector[i]; 607 607 } 608 608 if (aidx.GetSize()>0) 609 609 { 610 611 612 610 pname += ";"; 611 for (int i=0; i<aidx.GetSize(); i++) 612 pname += aidx[i]; 613 613 } 614 614 } 615 616 617 618 619 620 621 622 623 624 625 626 { 627 615 616 TProfile *h1=0; 617 618 //check if histogram with identical name exist 619 TObject *h1obj = gROOT->FindObject(pname); 620 if (h1obj && h1obj->InheritsFrom("TProfile")) { 621 h1 = (TProfile*)h1obj; 622 h1->Reset(); 623 } 624 625 if (!h1) 626 { 627 628 628 Double_t min = 0.; 629 629 Double_t max = fGeomCam->GetMaxRadius(); … … 638 638 h1->SetYTitle(GetYaxis()->GetTitle()); 639 639 } 640 641 642 643 644 645 646 640 641 // Fill the projected histogram 642 for (Int_t idx=0; idx<fNcells-2; idx++) 643 if (IsUsed(idx) && MatchSector(idx, sector, aidx)) 644 h1->Fill(TMath::Hypot((*fGeomCam)[idx].GetX(),(*fGeomCam)[idx].GetY()), 645 GetBinContent(idx+1)); 646 return h1; 647 647 } 648 648
Note:
See TracChangeset
for help on using the changeset viewer.