Changeset 3852 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 04/27/04 18:44:34 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.cc
r3768 r3852 73 73 fTitle = title ? title : "Calculate and write conversion factors into MCalibrationChargeCam and MCalibrationQECam containers"; 74 74 75 fHistRatio = new TH1F(AddSerialNumber("HistRatio"), "log10(fPhotElfromShower/fSize)", 1500, -3., 3.); 76 fHistRatio->SetXTitle("log_{10}(fPhotElfromShower / fSize) [photel/ADC count]"); 75 fHistADC2PhotEl = new TH1F(AddSerialNumber("ADC2PhotEl"), "log10(fPhotElfromShower/fSize)", 1500, -3., 3.); 76 fHistADC2PhotEl->SetXTitle("log_{10}(fPhotElfromShower / fSize) [photel/ADC count]"); 77 78 79 fHistPhot2PhotEl = new TH1F(AddSerialNumber("Phot2PhotEl"), "Photon conversion efficiency", 1000, 0., 1.); 80 fHistPhot2PhotEl->SetXTitle("Overall photon conversion efficiency [photoelectron/photon]"); 81 77 82 } 78 83 … … 101 106 Int_t MMcCalibrationCalc::PreProcess(MParList *pList) 102 107 { 103 fHistRatio->Reset(); 108 fHistADC2PhotEl->Reset(); 109 fHistPhot2PhotEl->Reset(); 110 104 111 fADC2PhotEl = 0; 105 112 fPhot2PhotEl = 0; … … 215 222 return kTRUE; 216 223 217 fPhot2PhotEl += (Float_t) fMcEvt->GetPhotElfromShower() / 218 (Float_t) fMcEvt->GetPassPhotCone(); 219 220 fHistRatio->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size)); 224 fHistADC2PhotEl->Fill(TMath::Log10(fMcEvt->GetPhotElfromShower()/size)); 225 fHistPhot2PhotEl->Fill( (Float_t) fMcEvt->GetPhotElfromShower() / 226 (Float_t) fMcEvt->GetPassPhotCone() ); 221 227 222 228 return kTRUE; … … 229 235 Int_t MMcCalibrationCalc::PostProcess() 230 236 { 231 const Stat_t n = fHist Ratio->GetEntries();237 const Stat_t n = fHistADC2PhotEl->GetEntries(); 232 238 if (n<1) 233 239 { … … 236 242 } 237 243 238 fPhot2PhotEl /= n; // Average quantum efficiency244 fPhot2PhotEl = fHistPhot2PhotEl->GetMean(); // Average quantum efficiency 239 245 240 246 // … … 244 250 Stat_t summax = 0; 245 251 Int_t mode = 0; 246 for (Int_t ibin = 1+reach; ibin <= fHist Ratio->GetNbinsX()-reach; ibin++)247 { 248 const Stat_t sum = fHist Ratio->Integral(ibin-reach, ibin+reach);252 for (Int_t ibin = 1+reach; ibin <= fHistADC2PhotEl->GetNbinsX()-reach; ibin++) 253 { 254 const Stat_t sum = fHistADC2PhotEl->Integral(ibin-reach, ibin+reach); 249 255 250 256 if (sum <= summax) … … 255 261 } 256 262 257 fADC2PhotEl = TMath::Power(10, fHist Ratio->GetBinCenter(mode));263 fADC2PhotEl = TMath::Power(10, fHistADC2PhotEl->GetBinCenter(mode)); 258 264 259 265 const Int_t num = fCalCam->GetSize(); … … 270 276 // average QE for a spectrum like that of Cherenkov light (see the documentration 271 277 // of MCalibrationQEPix). 272 // Here we obtain average QE using already a Cherenkov spectrum so AvNormFFacto 278 // Here we obtain average QE using already a Cherenkov spectrum so AvNormFFactor 273 279 // must be 1. 274 280 -
trunk/MagicSoft/Mars/mcalib/MMcCalibrationCalc.h
r3768 r3852 31 31 Long_t fEvents; 32 32 33 TH1F* fHistRatio; // Histogram for monitoring the calibration. 33 TH1F* fHistADC2PhotEl; 34 TH1F* fHistPhot2PhotEl; // Histograms for monitoring the calibration. 34 35 35 36 Bool_t CheckRunType(MParList *pList) const; … … 42 43 MMcCalibrationCalc(const char *name=NULL, const char *title=NULL); 43 44 44 TH1F* GetHist() { return fHistRatio; } 45 TH1F* GetHistADC2PhotEl() { return fHistADC2PhotEl; } 46 TH1F* GetHistPhot2PhotEl() { return fHistPhot2PhotEl; } 45 47 46 48 ClassDef(MMcCalibrationCalc, 0) // Task which obtains, for MC files, the calibration factor from ADC counts to photons.
Note:
See TracChangeset
for help on using the changeset viewer.