Changeset 1967 for trunk/MagicSoft
- Timestamp:
- 04/20/03 15:39:13 (22 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r1966 r1967 2 2 3 3 2003/04/21: Thomas Bretz 4 5 * manalysis/MBlindPixels.h: 6 - IsBlind -> const 7 8 * mhist/HistLinkDef.h, mhist/Makefile: 9 - added MHBlindPixels 10 11 * mhist/MH.[h,cc]: 12 - changed the two DrawClone functions to one. 13 14 * mhist/MHHadronness.[h,cc]: 15 - changed to fit the requirements of MStatusDisplay 16 17 * mhist/MHMatrix.cc: 18 - SetDirectory(NULL) for all histograms created 19 20 * mhist/MHSigmaTheta.cc: 21 - removed fNpix (is already in MHHillas) 22 - removed fBlindId (--> MHBlindPixels) 23 24 * mhist/MHBlindPixels.[h,cc]: 25 - new 4 26 5 27 * macros/plot.C: … … 8 30 * macros/status.C: 9 31 - added MHNewImagePar 32 - added MHHadronness 10 33 11 34 * manalysis/MBlindPixelCalc.cc: -
trunk/MagicSoft/Mars/macros/status.C
r1966 r1967 80 80 81 81 // ------------- user change ----------------- 82 read.AddFile("data/Pro*.root"); 82 83 read.AddFile("data/Gam*.root"); 83 //read.AddFile("200*.root");84 84 85 85 MMcPedestalCopy pcopy; … … 94 94 MHillasSrcCalc scalc; // !!Preliminary!! Will be removed later! 95 95 MNewImageParCalc icalc; 96 MCT1SupercutsCalc calc1; 96 97 97 98 // ------------------------------------------- … … 103 104 MFillH hfill5("MHStarMap", "MHillas"); 104 105 MFillH hfill6("MHCerPhotEvt", "MCerPhotEvt"); 106 MFillH hfill7("MHHadronness", "MHadronness"); 105 107 106 108 tlist.AddToList(&read); … … 114 116 tlist.AddToList(&scalc); 115 117 tlist.AddToList(&icalc); 118 tlist.AddToList(&calc1); 119 tlist.AddToList(&hfill7); 116 120 tlist.AddToList(&hfill1); 117 121 tlist.AddToList(&hfill2); … … 140 144 { 141 145 // Save data in a postscriptfile (status.ps) 142 d->SaveAsPS();146 // d->SaveAsPS(); 143 147 /* 144 148 * ----------- Write status to a root file ------------ -
trunk/MagicSoft/Mars/manalysis/MBlindPixels.h
r1466 r1967 23 23 void Clear(Option_t *o="") { fPixels.Reset(); } 24 24 25 Bool_t IsBlind(UShort_t id) { return fPixels.GetSize() && fPixels[id]; }25 Bool_t IsBlind(UShort_t id) const { return fPixels.GetSize() && ((TArrayC)fPixels)[id]; } 26 26 27 27 ClassDef(MBlindPixels, 1) // container to store blind pixels -
trunk/MagicSoft/Mars/mhist/HistLinkDef.h
r1940 r1967 19 19 20 20 #pragma link C++ class MHCerPhotEvt+; 21 22 #pragma link C++ class MHBlindPixels+; 21 23 22 24 #pragma link C++ class MHStarMap+; -
trunk/MagicSoft/Mars/mhist/MH.cc
r1966 r1967 588 588 gPad->Update(); 589 589 590 h1->SetMaximum(TMath::Max(hist1.GetMaximum(), hist2.GetMaximum())); 591 h1->SetMinimum(TMath::Min(hist1.GetMinimum(), hist2.GetMinimum())); 590 // FIXME: Also align max/min with set Maximum/Minimum 591 const Double_t max = TMath::Max(hist1.GetBinContent(hist1.GetMaximumBin()), hist2.GetBinContent(hist2.GetMaximumBin())); 592 const Double_t min = TMath::Min(hist1.GetBinContent(hist1.GetMinimumBin()), hist2.GetBinContent(hist2.GetMinimumBin())); 593 h1->SetMaximum(max); 594 h1->SetMinimum(min); 592 595 593 596 TPaveText *t = (TPaveText*)gPad->FindObject("title"); … … 655 658 gPad->Update(); 656 659 657 hist1.SetMaximum(TMath::Max(hist1.GetMaximum(), hist2.GetMaximum())); 658 hist1.SetMinimum(TMath::Min(hist1.GetMinimum(), hist2.GetMinimum())); 660 // FIXME: Also align max/min with set Maximum/Minimum 661 /* 662 const Double_t max = TMath::Max(hist1.GetBinContent(hist1.GetMaximumBin()), hist2.GetBinContent(hist2.GetMaximumBin())); 663 const Double_t min = TMath::Min(hist1.GetBinContent(hist1.GetMinimumBin()), hist2.GetBinContent(hist2.GetMinimumBin())); 664 hist1.SetMaximum(max); 665 hist1.SetMinimum(min); 666 */ 659 667 660 668 TPaveText *t = (TPaveText*)gPad->FindObject("title"); … … 711 719 // 712 720 // If the opt string contains 'nonew' or gPad is not given NULL is returned. 713 // Other wise the present gPad is cleared andreturned.721 // Otherwise the present gPad is returned. 714 722 // 715 723 TVirtualPad *MH::GetNewPad(Option_t *opt) … … 720 728 return NULL; 721 729 722 gPad->Clear();723 730 return gPad; 724 731 } … … 726 733 // -------------------------------------------------------------------------- 727 734 // 728 // The object is cloned and drawn to the present pad. The kCanDelete 729 // bit is set for the clone. 730 // 731 TObject *MH::DrawClone(Option_t *opt="") const 732 { 735 // If the opt string contains 'nonew' or gPad is not given a new canvas 736 // with size w/h is created. Otherwise the object is cloned and drawn 737 // to the present pad. The kCanDelete bit is set for the clone. 738 // 739 TObject *MH::DrawClone(Option_t *opt, Int_t w, Int_t h) const 740 { 741 TVirtualPad *p = GetNewPad(opt); 742 if (!p) 743 p = MakeDefCanvas(this, w, h); 744 else 745 p->Clear(); 746 733 747 gROOT->SetSelectedPad(NULL); 734 748 … … 737 751 return o; 738 752 } 739 740 // --------------------------------------------------------------------------741 //742 // If the opt string contains 'nonew' or gPad is not given a new canvas743 // with size w/h is created. Otherwise the object is cloned and drawn744 // to the present pad. The kCanDelete bit is set for the clone.745 //746 TObject *MH::DrawClone(Option_t *opt, Int_t w, Int_t h) const747 {748 TVirtualPad *p = GetNewPad(opt);749 if (!p)750 p = MakeDefCanvas(this, w, h);751 752 return MH::DrawClone(opt);753 } -
trunk/MagicSoft/Mars/mhist/MH.h
r1965 r1967 70 70 71 71 void Draw(Option_t *o="") { MParContainer::Draw(o); } 72 TObject *DrawClone(Option_t *opt="") const; 73 TObject *DrawClone(Option_t *opt, Int_t w, Int_t h) const; 72 TObject *DrawClone(Option_t *opt, Int_t w=580, Int_t h=435) const; 74 73 75 74 static TVirtualPad *GetNewPad(Option_t *opt); -
trunk/MagicSoft/Mars/mhist/MH3.h
r1879 r1967 22 22 TString fDataMember[3]; // Data member which should be filled into the histogram x 23 23 MDataChain *fData[3]; // Object from which the data is filled 24 Double_t fScale[3]; 24 Double_t fScale[3]; // Scale for the three axis (eg unit) 25 25 26 26 void StreamPrimitive(ofstream &out) const; … … 60 60 void SetColors() const; 61 61 void Draw(Option_t *opt=NULL); 62 TObject *DrawClone(Option_t *opt=NULL) const;63 62 64 63 MParContainer *New() const; -
trunk/MagicSoft/Mars/mhist/MHMatrix.cc
r1948 r1967 693 693 // 694 694 TH1F hta; 695 hta.SetDirectory(NULL); 695 696 hta.SetName("hta"); 696 697 hta.SetTitle("Distribution after reduction"); … … 793 794 // 794 795 TH1F hth("th", "Distribution before reduction", nbins, frombin, tobin); 796 hth.SetDirectory(NULL); 795 797 for (Int_t j=0; j<nrows; j++) 796 798 hth.Fill(fM(j, refcolumn)); 797 799 798 800 TH1F hthd("thd", "Correction factors", nbins, frombin, tobin); 801 hthd.SetDirectory(NULL); 799 802 hthd.Divide((TH1F*)&thsh, &hth, 1, 1); 800 803 -
trunk/MagicSoft/Mars/mhist/MHSigmaTheta.cc
r1966 r1967 17 17 ! 18 18 ! Author(s): Wolfgang Wittek 1/2003 <mailto:wittek@mppmu.mpg.de> 19 ! 20 ! Copyright: MAGIC Software Development, 2000-2002 19 ! Author(s): Thomas Bretz 4/2003 <mailto:tbretz@astro.uni-wuerzburg.de> 20 ! 21 ! Copyright: MAGIC Software Development, 2000-2003 21 22 ! 22 23 ! … … 27 28 // MHSigmaTheta (extension of Robert's MHSigmabarTheta) // 28 29 // // 29 // calculates - the 1D-histogram ID of blind pixels 30 // - the 1D-histogram no.of pixels in MCerPhotEvt, and // 31 // - the 2D-histogram sigmabar vs. Theta, and // 30 // calculates - the 2D-histogram sigmabar vs. Theta, and // 32 31 // - the 3D-histogram sigma, pixel no., Theta // 33 32 // - the 3D-histogram (sigma^2-sigmabar^2), pixel no., Theta // … … 71 70 fTitle = title ? title : "2D histogram sigmabar vs. Theta"; 72 71 73 fNpix.SetDirectory(NULL);74 fNpix.SetName("1D-Npix");75 fNpix.SetTitle("1D : no.of used pixels in MCerPhotEvt");76 fNpix.SetXTitle("no. of used pixels in MCerPhotEvt");77 fNpix.SetYTitle("Counts");78 79 fBlindId.SetDirectory(NULL);80 fBlindId.SetName("1D-BlindId");81 fBlindId.SetTitle("1D : Id of blind pixel");82 fBlindId.SetXTitle("Id of blind pixel");83 fBlindId.SetYTitle("Counts");84 85 72 fSigmaTheta.SetDirectory(NULL); 86 73 fSigmaTheta.SetName("2D-ThetaSigmabar"); 87 fSigmaTheta.SetTitle("2D : Sigmabar, \\Theta");74 fSigmaTheta.SetTitle("2D: \\bar{\\sigma}_{ped}, \\Theta"); 88 75 fSigmaTheta.SetXTitle("\\Theta [\\circ]"); 89 fSigmaTheta.SetYTitle(" Sigmabar");76 fSigmaTheta.SetYTitle("\\bar{\\Theta}"); 90 77 91 78 fSigmaPixTheta.SetDirectory(NULL); 92 79 fSigmaPixTheta.SetName("3D-ThetaPixSigma"); 93 fSigmaPixTheta.SetTitle("3D : \\Theta, pixel no., Sigma");80 fSigmaPixTheta.SetTitle("3D : \\Theta, Pixel Id, \\sigma_{ped}"); 94 81 fSigmaPixTheta.SetXTitle("\\Theta [\\circ]"); 95 fSigmaPixTheta.SetYTitle(" pixel number");96 fSigmaPixTheta.SetZTitle(" Sigma");82 fSigmaPixTheta.SetYTitle("Pixel Id"); 83 fSigmaPixTheta.SetZTitle("\\sigma_{ped}"); 97 84 98 85 fDiffPixTheta.SetDirectory(NULL); 99 86 fDiffPixTheta.SetName("3D-ThetaPixDiff"); 100 fDiffPixTheta.SetTitle("3D : \\Theta, pixel, Sigma^2-Sigmabar^2");87 fDiffPixTheta.SetTitle("3D : \\Theta, Pixel Id, \\sigma_{ped}^{2}-\\bar{\\sigma}^{2}"); 101 88 fDiffPixTheta.SetXTitle("\\Theta [\\circ]"); 102 fDiffPixTheta.SetYTitle(" pixel number");103 fDiffPixTheta.SetZTitle(" Sigma^2-sigmabar^2");89 fDiffPixTheta.SetYTitle("Pixel Id"); 90 fDiffPixTheta.SetZTitle("\\sigma_{ped}^{2}-\\bar{\\sigma}^{2}"); 104 91 } 105 92 … … 180 167 binspix.SetEdges(npix+1, -0.5, 0.5+npix ); 181 168 182 SetBinning(&fNpix, &binspix);183 SetBinning(&fBlindId, &binspix);184 169 SetBinning(&fSigmaPixTheta, binstheta, &binspix, binssigma); 185 170 SetBinning(&fDiffPixTheta, binstheta, &binspix, binsdiff); … … 194 179 Bool_t MHSigmaTheta::Fill(const MParContainer *par) 195 180 { 196 //*fLog << "entry Fill" << endl;197 198 181 Double_t theta = fMcEvt->GetTelescopeTheta()*kRad2Deg; 199 182 Double_t mySig = fSigmabar->Calc(*fCam, *fPed, *fEvt); 200 183 201 //*fLog << "MHSigmaTheta::Fill; theta, mySig = " << theta << ", "202 // << mySig << endl;203 204 184 fSigmaTheta.Fill(theta, mySig); 205 185 206 186 const UInt_t npix = fEvt->GetNumPixels(); 207 187 208 Int_t npixused=0;209 188 for (UInt_t i=0; i<npix; i++) 210 189 { 211 MCerPhotPix cerpix = fEvt->operator[](i);190 MCerPhotPix cerpix = (*fEvt)[i]; 212 191 if (!cerpix.IsPixelUsed()) 213 { 214 fBlindId.Fill( cerpix.GetPixId() ); 215 continue; 216 } 217 npixused++; 218 219 /* 220 if (cerpix.GetNumPhotons() == 0) 221 continue; 222 */ 192 continue; 223 193 224 194 const Int_t id = cerpix.GetPixId(); … … 233 203 const Double_t diff = sigma*sigma/area - mySig*mySig; 234 204 fDiffPixTheta.Fill(theta, (Double_t)id, diff); 235 236 //*fLog << "theta, id, sigma, diff, area = " << theta << ", " << id237 // << ", "238 // << sigma << ", " << diff << ", " << area << endl;239 205 } 240 fNpix.Fill(npixused);241 206 242 207 return kTRUE; -
trunk/MagicSoft/Mars/mhist/Makefile
r1965 r1967 45 45 MHAlphaEnergyTime.cc \ 46 46 MHAlphaEnergyTheta.cc \ 47 MHBlindPixels.cc \ 47 48 MHEffOnTime.cc \ 48 49 MHTimeDiffTime.cc \ -
trunk/MagicSoft/Mars/mimage/MHHillas.cc
r1965 r1967 316 316 317 317 pad->cd(1); 318 gPad->SetBorderMode(0); 318 319 MH::Draw(*fWidth, *fLength, "Width'n'Length"); 319 320 -
trunk/MagicSoft/Mars/mmain/MStatusDisplay.cc
r1966 r1967 431 431 //lient->ProcessEventsFor(this); 432 432 gSystem->ProcessEvents(); 433 434 //TSeqCollection *GetListOfCleanups() const {return fCleanups;} 435 433 436 } 434 437 … … 440 443 MStatusDisplay::~MStatusDisplay() 441 444 { 445 SetLogStream(NULL); 446 442 447 delete fList; 443 448
Note:
See TracChangeset
for help on using the changeset viewer.