- Timestamp:
- 01/30/05 16:18:58 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r6129 r6131 23 23 24 24 * mjobs/MJPedestal.cc 25 * mhcalib/MHCalibrationRelTimeCam.[h,cc] 25 26 - updated correct display of reference lines 26 27 -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.cc
r5940 r6131 119 119 #include <TLegend.h> 120 120 #include <TGraph.h> 121 #include <TEnv.h> 121 122 122 123 ClassImp(MHCalibrationRelTimeCam); … … 134 135 const TString MHCalibrationRelTimeCam::gsHistXTitle = "Arr. Time [FADC slices]"; 135 136 const TString MHCalibrationRelTimeCam::gsHistYTitle = "Nr. events"; 137 const TString MHCalibrationRelTimeCam::fgReferenceFile = "mjobs/calibrationref.rc"; 136 138 // -------------------------------------------------------------------------- 137 139 // … … 170 172 SetHistYTitle(gsHistYTitle.Data()); 171 173 174 SetReferenceFile(); 175 176 fInnerRefTime = 2.95; 177 fOuterRefTime = 3.6; 172 178 } 173 179 … … 195 201 cam->fFirst = fFirst; 196 202 cam->fLast = fLast; 203 204 cam->fReferenceFile = fReferenceFile; 205 cam->fInnerRefTime = fInnerRefTime; 206 cam->fOuterRefTime = fOuterRefTime; 197 207 198 208 // … … 648 658 { 649 659 MHCalibrationPix &lopix = GetAverageLoGainArea(i); 650 DrawDataCheckPixel(lopix, 0.);660 DrawDataCheckPixel(lopix,i ? fOuterRefTime+1.5 : fInnerRefTime+1.5); 651 661 } 652 662 else 653 DrawDataCheckPixel(hipix, 0.);663 DrawDataCheckPixel(hipix,i ? fOuterRefTime : fInnerRefTime); 654 664 } 655 665 } … … 751 761 } 752 762 753 // DisplayRefLines(null,refline); 754 755 gPad->Modified(); 756 gPad->Update(); 763 DisplayRefLines(null,refline); 757 764 758 765 newpad->cd(2); … … 793 800 } 794 801 802 void MHCalibrationRelTimeCam::DisplayRefLines(const TH1F *hist, const Float_t refline) const 803 { 804 805 TGraph *gr = new TGraph(2); 806 gr->SetPoint(0,refline,0.); 807 gr->SetPoint(1,refline,hist->GetMaximum()); 808 gr->SetBit(kCanDelete); 809 gr->SetLineColor(kGreen); 810 gr->SetLineStyle(2); 811 gr->SetLineWidth(3); 812 gr->Draw("L"); 813 814 TLegend *leg = new TLegend(0.8,0.65,0.99,0.99); 815 leg->SetBit(kCanDelete); 816 leg->AddEntry(gr,"Trigger Time Calib.","l"); 817 leg->Draw(); 818 } 819 820 Int_t MHCalibrationRelTimeCam::ReadEnv(const TEnv &env, TString prefix, Bool_t print) 821 { 822 823 Bool_t rc = kFALSE; 824 825 if (IsEnvDefined(env, prefix, "ReferenceFile", print)) 826 { 827 SetReferenceFile(GetEnvValue(env,prefix,"ReferenceFile",fReferenceFile.Data())); 828 rc = kTRUE; 829 } 830 831 TEnv refenv(fReferenceFile); 832 833 fInnerRefTime = refenv.GetValue("InnerRefTime",fInnerRefTime); 834 fOuterRefTime = refenv.GetValue("OuterRefTime",fOuterRefTime); 835 836 return MHCalibrationCam::ReadEnv(env,prefix,print) ? kTRUE : rc; 837 838 } -
trunk/MagicSoft/Mars/mhcalib/MHCalibrationRelTimeCam.h
r5864 r6131 33 33 static const TString gsHistYTitle; //! Default Histogram y-axis titles 34 34 35 MArrayD fSumareahi ; // 36 MArrayD fSumarealo ; // 37 MArrayD fSumsectorhi; // 38 MArrayD fSumsectorlo; // 39 MArrayI fNumareahi ; // 40 MArrayI fNumarealo ; // 41 MArrayI fNumsectorhi; // 42 MArrayI fNumsectorlo; // 35 static const TString fgReferenceFile; //! default for fReferenceFile ("mjobs/calibrationref.rc") 43 36 44 UInt_t fReferencePixel; // The reference pixel for rel. times 37 UInt_t fReferencePixel; // The reference pixel for rel. times 38 Float_t fInnerRefTime; // The reference mean arrival time inner pixels 39 Float_t fOuterRefTime; // The reference mean arrival time outer pixels 40 41 TString fReferenceFile; // File name containing the reference values 42 43 MArrayD fSumareahi ; // 44 MArrayD fSumarealo ; // 45 MArrayD fSumsectorhi; // 46 MArrayD fSumsectorlo; // 47 MArrayI fNumareahi ; // 48 MArrayI fNumarealo ; // 49 MArrayI fNumsectorhi; // 50 MArrayI fNumsectorlo; // 45 51 46 52 Bool_t ReInitHists(MParList *pList); … … 51 57 void CheckOverflow( MHCalibrationPix &pix); 52 58 void DrawDataCheckPixel(MHCalibrationPix &pix, const Float_t refline); 59 void DisplayRefLines( const TH1F *hist, const Float_t refline) const; 60 61 Int_t ReadEnv ( const TEnv &env, TString prefix, Bool_t print ); 53 62 54 63 public: … … 63 72 64 73 // Setters 65 void SetReferencePixel( const UInt_t i=fgReferencePixel) { fReferencePixel = i; } 74 void SetReferencePixel( const UInt_t i=fgReferencePixel ) { fReferencePixel = i; } 75 void SetReferenceFile ( const TString ref=fgReferenceFile ) { fReferenceFile = ref; } 66 76 67 77 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const; -
trunk/MagicSoft/Mars/mjobs/calibrationref_Nov04.rc
r6127 r6131 11 11 RefConvFADC2PheOuter: 0.33 12 12 RefConvFADC2PhotInner: 0.71. 13 RefConvFADC2PhotOuter: 2. 913 RefConvFADC2PhotOuter: 2.8 14 14 RefQEInner: 0.18 15 15 RefQEOuter: 0.12 … … 18 18 RefArrivalTimeRmsInner: 0.58. 19 19 RefArrivalTimeRmsOuter: 0.57. 20 21 InnerRefTime: 2.95 22 OuterRefTime: 3.6
Note:
See TracChangeset
for help on using the changeset viewer.