Changeset 7099 for trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
- Timestamp:
- 05/27/05 16:33:19 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r7069 r7099 181 181 // ClassVersion 2: 182 182 // - Float_t fPheErrLimit; 183 // + Float_t fPheErrLowerLimit; // Lower limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 184 // + Float_t fPheErrUpperLimit; // Upper limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 183 // + Float_t fPheErrLowerLimit; // Lower limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 184 // + Float_t fPheErrUpperLimit; // Upper limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 185 // 186 // ClassVersion 3: 187 // + Bool_t fUseExtractorRes; // Include extractor resolution in F-Factor method 185 188 // 186 189 ////////////////////////////////////////////////////////////////////////////// … … 280 283 // 281 284 MCalibrationChargeCalc::MCalibrationChargeCalc(const char *name, const char *title) 282 : fGeom(NULL), fSignal(NULL), fCalibPattern(NULL) 285 : fUseExtractorRes(kFALSE), 286 fGeom(NULL), fSignal(NULL), fCalibPattern(NULL), fExtractor(NULL) 283 287 { 284 288 … … 661 665 return kTRUE; 662 666 } 663 667 664 668 if (fNumProcessed == 0) 665 669 return kTRUE; … … 1017 1021 << endl; 1018 1022 bad.SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes); 1023 bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 1024 return kFALSE; 1025 } 1026 1027 if (cal.GetPheFFactorMethod() < 0.) 1028 { 1029 bad.SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes); 1030 bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 1031 cal.SetFFactorMethodValid(kFALSE); 1032 return kFALSE; 1033 } 1034 1035 if (!cal.CalcConvFFactor()) 1036 { 1037 *fLog << warn << "Could not calculate the Conv. FADC counts to Phes in "; 1038 *fLog << what << ": " << Form("%4i", cal.GetPixId()) << endl; 1039 bad.SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes); 1040 return kFALSE; 1041 } 1042 1043 if (!fUseExtractorRes) 1044 return kTRUE; 1045 1046 if (!fExtractor) 1047 { 1048 *fLog << err << "Extractor resolution has been chosen, but not extractor is set. Cannot calibrate" << endl; 1049 return kFALSE; 1050 } 1051 1052 const Float_t resinphes = cal.IsHiGainSaturation() 1053 ? cal.GetPheFFactorMethod()*fExtractor->GetResolutionPerPheLoGain() 1054 : cal.GetPheFFactorMethod()*fExtractor->GetResolutionPerPheHiGain(); 1055 1056 Float_t resinfadc = cal.IsHiGainSaturation() 1057 ? resinphes/cal.GetMeanConvFADC2Phe()/cal.GetConversionHiLo() 1058 : resinphes/cal.GetMeanConvFADC2Phe(); 1059 1060 if (resinfadc > 1.5*cal.GetPedRms() ) 1061 { 1062 *fLog << warn << " Extractor Resolution: " << resinfadc << " bigger than Pedestal RMS " << cal.GetPedRms() << endl; 1063 resinfadc = cal.GetPedRms(); 1064 } 1065 1066 if (!cal.CalcReducedSigma(resinfadc)) 1067 { 1068 *fLog << warn << "Could not calculate the reduced sigma in " << what; 1069 *fLog << ": " << Form("%4i",cal.GetPixId()) << endl; 1070 bad.SetUncalibrated( MBadPixelsPix::kChargeSigmaNotValid ); 1071 return kFALSE; 1072 } 1073 1074 if (!cal.CalcFFactor()) 1075 { 1076 *fLog << warn << "Could not calculate the F-Factor in " << what; 1077 *fLog << ": " << Form("%4i",cal.GetPixId()) << endl; 1078 bad.SetUncalibrated(MBadPixelsPix::kDeviatingNumPhes); 1079 bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 1019 1080 return kFALSE; 1020 1081 } … … 2299 2360 rc = kTRUE; 2300 2361 } 2362 if (IsEnvDefined(env, prefix, "UseExtractorRes", print)) 2363 { 2364 SetUseExtractorRes(GetEnvValue(env, prefix, "UseExtractorRes", fUseExtractorRes)); 2365 rc = kTRUE; 2366 } 2301 2367 2302 2368 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.