Changeset 7013 for trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
- Timestamp:
- 05/11/05 19:06:48 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r6928 r7013 231 231 using namespace std; 232 232 233 const Float_t MCalibrationChargeCalc::fgChargeLimit = 2.5;233 const Float_t MCalibrationChargeCalc::fgChargeLimit = 4.5; 234 234 const Float_t MCalibrationChargeCalc::fgChargeErrLimit = 0.; 235 235 const Float_t MCalibrationChargeCalc::fgChargeRelErrLimit = 1.; … … 238 238 const Float_t MCalibrationChargeCalc::fgPheErrLimit = 4.5; 239 239 const Float_t MCalibrationChargeCalc::fgFFactorErrLimit = 4.5; 240 const Float_t MCalibrationChargeCalc::fgArrTimeRmsLimit = 3.5; 240 241 const TString MCalibrationChargeCalc::fgNamePedestalCam = "MPedestalCam"; 242 241 243 // -------------------------------------------------------------------------- 242 244 // … … 252 254 // 253 255 // Initializes: 256 // - fArrTimeRmsLimit to fgArrTimeRmsLimit 254 257 // - fChargeLimit to fgChargeLimit 255 258 // - fChargeErrLimit to fgChargeErrLimit … … 282 285 AddToBranchList("MRawEvtData.fLoGainFadcSamples"); 283 286 287 SetArrTimeRmsLimit (); 284 288 SetChargeLimit (); 285 289 SetChargeErrLimit (); … … 294 298 SetDebug ( kFALSE ); 295 299 300 SetCheckArrivalTimes (); 296 301 SetCheckDeadPixels (); 297 302 SetCheckDeviatingBehavior(); … … 732 737 if (FinalizeCharges(pix,bad,"pixel ")) 733 738 nvalid++; 739 740 FinalizeArrivalTimes(pix,bad,"pixel "); 734 741 } 735 742 … … 760 767 FinalizePedestals(ped,pix,aidx); 761 768 FinalizeCharges(pix, chargecam->GetAverageBadArea(aidx),"area id"); 769 FinalizeArrivalTimes(pix, chargecam->GetAverageBadArea(aidx), "area id"); 762 770 } 763 771 … … 855 863 PrintUncalibrated(MBadPixelsPix::kLoGainOverFlow, 856 864 "Pixels with Low Gain Overflow : "); 865 PrintUncalibrated(MBadPixelsPix::kFluctuatingArrivalTimes, 866 "Fluctuating Pulse Arrival Times: "); 867 PrintUncalibrated(MBadPixelsPix::kDeadPedestalRms, 868 "Presumably dead from Pedestal Rms: "); 869 PrintUncalibrated(MBadPixelsPix::kPreviouslyExcluded, 870 "Previously excluded: "); 857 871 858 872 *fLog << inf << endl; … … 1018 1032 } 1019 1033 1020 1034 // ----------------------------------------------------------------------------------- 1035 // 1036 // Test the arrival Times RMS of the pixel and set the bit 1037 // - MBadPixelsPix::kFluctuatingArrivalTimes 1038 // 1039 void MCalibrationChargeCalc::FinalizeArrivalTimes(MCalibrationChargePix &cal, MBadPixelsPix &bad, const char* what) 1040 { 1041 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 1042 return; 1043 1044 if (cal.GetAbsTimeRms() > fArrTimeRmsLimit) 1045 { 1046 *fLog << warn; 1047 *fLog << "RMS of pulse arrival times: " << Form("%2.1f", cal.GetAbsTimeRms()); 1048 *fLog << " FADC sl. < " << Form("%2.1", fArrTimeRmsLimit); 1049 *fLog << " in " << what << Form("%3i", cal.GetPixId()) << endl; 1050 bad.SetUncalibrated( MBadPixelsPix::kFluctuatingArrivalTimes); 1051 } 1052 } 1021 1053 1022 1054 // ----------------------------------------------------------------------------------- … … 1039 1071 { 1040 1072 1041 MBadPixelsCam *badcam = fIntensBad 1042 ? (MBadPixelsCam*) fIntensBad->GetCam() : fBadPixels; 1043 MCalibrationChargeCam *chargecam = fIntensCam 1044 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 1073 MBadPixelsCam *badcam = fIntensBad ? (MBadPixelsCam*)fIntensBad->GetCam() : fBadPixels; 1045 1074 1046 1075 for (Int_t i=0; i<badcam->GetSize(); i++) 1047 1076 { 1048 1077 1049 MBadPixelsPix &bad = (*badcam) [i]; 1050 MCalibrationPix &pix = (*chargecam)[i]; 1078 MBadPixelsPix &bad = (*badcam)[i]; 1051 1079 1052 1080 if (IsCheckDeadPixels()) … … 1086 1114 } 1087 1115 1088 if (bad.IsUnsuitable( MBadPixelsPix::kUnsuitableRun )) 1089 pix.SetExcluded(); 1116 if (IsCheckArrivalTimes()) 1117 { 1118 if (bad.IsUncalibrated( MBadPixelsPix::kFluctuatingArrivalTimes )) 1119 bad.SetUnsuitable( MBadPixelsPix::kUnsuitableRun ); 1120 } 1090 1121 1091 1122 if (bad.IsUncalibrated( MBadPixelsPix::kChargeSigmaNotValid )) … … 1812 1843 qepix.SetFFactorMethodValid(kFALSE,fPulserColor); 1813 1844 pix.SetFFactorMethodValid(kFALSE); 1814 pix.SetExcluded();1815 1845 continue; 1816 1846 } … … 2200 2230 rc = kTRUE; 2201 2231 } 2232 if (IsEnvDefined(env, prefix, "ArrTimeRmsLimit", print)) 2233 { 2234 SetArrTimeRmsLimit(GetEnvValue(env, prefix, "ArrTimeRmsLimit", fArrTimeRmsLimit)); 2235 rc = kTRUE; 2236 } 2202 2237 if (IsEnvDefined(env, prefix, "FFactorErrLimit", print)) 2203 2238 { … … 2245 2280 rc = kTRUE; 2246 2281 } 2247 2282 if (IsEnvDefined(env, prefix, "CheckArrivalTimes", print)) 2283 { 2284 SetCheckArrivalTimes(GetEnvValue(env, prefix, "CheckArrivalTimes", IsCheckArrivalTimes())); 2285 rc = kTRUE; 2286 } 2287 2248 2288 return rc; 2249 2289 }
Note:
See TracChangeset
for help on using the changeset viewer.