Changeset 7028 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 05/13/05 15:28:58 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r7023 r7028 179 179 // 180 180 // 181 // 181 // ClassVersion 2: 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) 185 // 182 186 ////////////////////////////////////////////////////////////////////////////// 183 187 #include "MCalibrationChargeCalc.h" … … 236 240 const Float_t MCalibrationChargeCalc::fgLambdaErrLimit = 0.2; 237 241 const Float_t MCalibrationChargeCalc::fgLambdaCheckLimit = 0.5; 238 const Float_t MCalibrationChargeCalc::fgPheErrLimit = 4.5; 242 const Float_t MCalibrationChargeCalc::fgPheErrLowerLimit = 9.0; 243 const Float_t MCalibrationChargeCalc::fgPheErrUpperLimit = 5.5; 239 244 const Float_t MCalibrationChargeCalc::fgFFactorErrLimit = 4.5; 240 245 const Float_t MCalibrationChargeCalc::fgArrTimeRmsLimit = 3.5; … … 262 267 // - fLambdaErrLimit to fgLambdaErrLimit 263 268 // - fNamePedestalCam to fgNamePedestalCam 264 // - fPheErrLimit to fgPheErrLimit 269 // - fPheErrLowerLimit to fgPheErrLowerLimit 270 // - fPheErrUpperLimit to fgPheErrUpperLimit 265 271 // - fPulserColor to MCalibrationCam::kCT1 266 272 // - fOutputPath to "." … … 289 295 SetChargeErrLimit (); 290 296 SetChargeRelErrLimit (); 297 SetDebug ( kFALSE ); 291 298 SetFFactorErrLimit (); 292 299 SetLambdaCheckLimit (); 293 300 SetLambdaErrLimit (); 294 301 SetNamePedestalCam (); 295 SetPheErrLimit ();296 302 SetOutputPath (); 297 303 SetOutputFile (); 298 SetDebug ( kFALSE ); 304 SetPheErrLowerLimit (); 305 SetPheErrUpperLimit (); 299 306 300 307 SetCheckArrivalTimes (); … … 867 874 PrintUncalibrated(MBadPixelsPix::kDeadPedestalRms, 868 875 "Presumably dead from Pedestal Rms: "); 876 PrintUncalibrated(MBadPixelsPix::kDeviatingNumPhes, 877 "Deviating number of phes: "); 869 878 PrintUncalibrated(MBadPixelsPix::kPreviouslyExcluded, 870 879 "Previously excluded: "); … … 883 892 PrintUncalibrated(MBadPixelsPix::kLoGainNotFitted, 884 893 "Unsuccesful Gauss fit to the Lo Gain: "); 885 PrintUncalibrated(MBadPixelsPix::kDeviatingNumPhes,886 "Deviating number of phes: ");887 894 PrintUncalibrated(MBadPixelsPix::kDeviatingFFactor, 888 895 "Deviating F-Factor: "); … … 1100 1107 { 1101 1108 if (bad.IsUncalibrated( MBadPixelsPix::kDeviatingNumPhes )) 1102 bad.SetUnsuitable( MBadPixelsPix::kUn reliableRun );1109 bad.SetUnsuitable( MBadPixelsPix::kUnsuitableRun ); 1103 1110 } 1104 1111 … … 1235 1242 } 1236 1243 1237 lowlim [i] = areaphes[i] - fPheErrLimit*TMath::Sqrt(areavars[i]); 1238 upplim [i] = areaphes[i] + fPheErrLimit*TMath::Sqrt(areavars[i]); 1244 lowlim[i] = areaphes[i] - fPheErrLowerLimit*TMath::Sqrt(areavars[i]); 1245 upplim[i] = areaphes[i] + fPheErrUpperLimit*TMath::Sqrt(areavars[i]); 1246 1239 1247 1240 1248 TH1D *hist = camphes.ProjectionS(TArrayI(),TArrayI(1,&i),"_py",100); … … 1247 1255 hist->DrawClone(); 1248 1256 1249 if (ndf < 2)1257 if (ndf < 5) 1250 1258 { 1251 1259 *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the number of photo-electrons " 1252 1260 << "in the camera with area index: " << i << endl; 1253 *fLog << warn << GetDescriptor() << ": Number of dof.: " << ndf << " is smaller than 2" << endl;1261 *fLog << warn << GetDescriptor() << ": Number of dof.: " << ndf << " is smaller than 5 " << endl; 1254 1262 *fLog << warn << GetDescriptor() << ": Will use the simple mean and rms " << endl; 1255 1263 delete hist; … … 1282 1290 << Form("%7.2f+-%6.2f",mean,sigma) << endl; 1283 1291 1284 lowlim [i] = mean - fPheErrLimit*sigma;1285 upplim [i] = mean + fPheErrLimit*sigma;1292 lowlim[i] = mean - fPheErrLowerLimit*sigma; 1293 upplim[i] = mean + fPheErrUpperLimit*sigma; 1286 1294 1287 1295 delete hist; … … 1326 1334 { 1327 1335 *fLog << warn << "Number of phes: " 1328 << Form("%7.2f out of %3.1f sigma limit: ",nphe,fPheErrLimit)1336 << Form("%7.2f out of +%3.1f-%3.1f sigma limit: ",nphe,fPheErrUpperLimit,fPheErrLowerLimit) 1329 1337 << Form("[%7.2f,%7.2f] pixel%4i",lowlim[aidx],upplim[aidx],i) << endl; 1330 1338 bad.SetUncalibrated( MBadPixelsPix::kDeviatingNumPhes ); 1339 1331 1340 if (IsCheckDeviatingBehavior()) 1332 { 1333 bad.SetUnsuitable ( MBadPixelsPix::kUnreliableRun ); 1334 // pix.SetFFactorMethodValid(kFALSE); 1335 } 1341 bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun); 1336 1342 continue; 1337 1343 } … … 1511 1517 if (2.*(lambdacheck-lambda)/(lambdacheck+lambda) > fLambdaCheckLimit) 1512 1518 { 1513 *fLog << warn << GetDescriptor() 1514 << Form("%s%4.2f%s%4.2f%s%4.2f%s%2i",": Lambda: ",lambda," and Lambda-Check: ", 1515 lambdacheck," differ by more than ",fLambdaCheckLimit," in the Blind Pixel Nr.",i) 1516 << endl; 1519 *fLog << warn << GetDescriptor() << ": Lambda=" 1520 << Form("%4.2f", lambda) << " and Lambda-Check=" 1521 << Form("%4.2f", lambdacheck) << " differ by more than " 1522 << Form("%4.2f", fLambdaCheckLimit) << " in the Blind Pixel Nr." 1523 << Form("%2i", i) << endl; 1517 1524 blindpix.SetValid(kFALSE); 1518 1525 continue; … … 1521 1528 if (lambdaerr > fLambdaErrLimit) 1522 1529 { 1523 *fLog << warn << GetDescriptor() 1524 << Form("%s%4.2f%s%4.2f%s%2i",": Error of Fitted Lambda: ",lambdaerr," is greater than ", 1525 fLambdaErrLimit," in Blind Pixel Nr.",i) << endl; 1530 *fLog << warn << GetDescriptor() << ": Error of Fitted Lambda=" 1531 << Form("%4.2f", lambdaerr) << " is greater than " 1532 << Form("%4.2f", fLambdaErrLimit) 1533 << " in Blind Pixel Nr." << Form("%2d", i) << endl; 1526 1534 blindpix.SetValid(kFALSE); 1527 1535 continue; … … 2248 2256 rc = kTRUE; 2249 2257 } 2250 if (IsEnvDefined(env, prefix, "PheErrLimit", print))2251 {2252 SetPheErrLimit(GetEnvValue(env, prefix, "PheErrLimit", fPheErrLimit));2253 rc = kTRUE;2254 }2255 2258 if (IsEnvDefined(env, prefix, "CheckDeadPixels", print)) 2256 2259 { … … 2283 2286 rc = kTRUE; 2284 2287 } 2288 if (IsEnvDefined(env, prefix, "PheErrLowerLimit", print)) 2289 { 2290 SetPheErrLowerLimit(GetEnvValue(env, prefix, "PheErrLowerLimit", fPheErrLowerLimit)); 2291 rc = kTRUE; 2292 } 2293 if (IsEnvDefined(env, prefix, "PheErrUpperLimit", print)) 2294 { 2295 SetPheErrUpperLimit(GetEnvValue(env, prefix, "PheErrUpperLimit", fPheErrUpperLimit)); 2296 rc = kTRUE; 2297 } 2285 2298 2286 2299 return rc; 2287 2300 } 2288 2301 2302 2303 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h
r7013 r7028 54 54 static const Float_t fgLambdaCheckLimit; //! Default for fLambdaCheckLimit (now set to: 0.2) 55 55 static const Float_t fgLambdaErrLimit; //! Default for fLabmdaErrLimit (now set to: 0.5) 56 static const Float_t fgPheErrLimit; //! Default for fPheErrLimit (now set to: 4.5) 56 static const Float_t fgPheErrLowerLimit; //! Default for fPheErrLowerLimit (now set to: 9.0) 57 static const Float_t fgPheErrUpperLimit; //! Default for fPheErrUpperLimit (now set to: 4.5) 57 58 static const Float_t fgFFactorErrLimit; //! Default for fFFactorErrLimit (now set to: 4.5) 58 59 static const Float_t fgArrTimeRmsLimit; //! Default for fArrTimeRmsLimit (now set to: 3.5) … … 68 69 Float_t fNumHiGainSamples; // Number High-Gain FADC slices used by extractor 69 70 Float_t fNumLoGainSamples; // Number Low -Gain FADC slices used by extractor 70 Float_t fPheErrLimit; // Limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 71 Float_t fFFactorErrLimit; // Limit acceptance F-Factor w.r.t. area idx mean 71 Float_t fPheErrLowerLimit; // Lower limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 72 Float_t fPheErrUpperLimit; // Upper limit acceptance nr. phe's w.r.t. area idx mean (in sigmas) 73 Float_t fFFactorErrLimit; // Limit acceptance F-Factor w.r.t. area idx mean 72 74 Float_t fArrTimeRmsLimit; // Limit acceptance RMS of absolute arrival times 73 75 Float_t fSqrtHiGainSamples; // Square root nr. High-Gain FADC slices used by extractor … … 218 220 void SetOutputPath ( TString path="." ); 219 221 void SetOutputFile ( TString file="ChargeCalibStat.txt" ); 220 void SetPheErrLimit ( const Float_t f=fgPheErrLimit ) { fPheErrLimit = f; } 222 void SetPheErrLowerLimit ( const Float_t f=fgPheErrLowerLimit ) { fPheErrLowerLimit = f; } 223 void SetPheErrUpperLimit ( const Float_t f=fgPheErrUpperLimit ) { fPheErrUpperLimit = f; } 221 224 void SetPulserColor ( const MCalibrationCam::PulserColor_t col ) { fPulserColor = col; } 222 225 223 ClassDef(MCalibrationChargeCalc, 1) // Task calculating Calibration Containers and Quantum Efficiencies226 ClassDef(MCalibrationChargeCalc, 2) // Task calculating Calibration Containers and Quantum Efficiencies 224 227 }; 225 228 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r7013 r7028 523 523 break; 524 524 case 9: 525 if (!pix.IsFFactorMethodValid()) 525 // if (!pix.IsFFactorMethodValid()) 526 // return kFALSE; 527 if (pix.IsExcluded()) 526 528 return kFALSE; 527 529 val = pix.GetPheFFactorMethod(); 528 530 break; 529 531 case 10: 530 if (!pix.IsFFactorMethodValid()) 532 // if (!pix.IsFFactorMethodValid()) 533 // return kFALSE; 534 if (pix.IsExcluded()) 531 535 return kFALSE; 532 536 val = pix.GetPheFFactorMethodErr(); 537 if (val < 0.) 538 val = 0.00001; 533 539 break; 534 540 case 11: 535 if (!pix.IsFFactorMethodValid()) 541 // if (!pix.IsFFactorMethodValid()) 542 // return kFALSE; 543 if (pix.IsExcluded()) 536 544 return kFALSE; 537 545 val = pix.GetMeanConvFADC2Phe(); 538 546 break; 539 547 case 12: 540 if (!pix.IsFFactorMethodValid()) 548 // if (!pix.IsFFactorMethodValid()) 549 // return kFALSE; 550 if (pix.IsExcluded()) 541 551 return kFALSE; 542 552 val = pix.GetMeanConvFADC2PheErr(); 553 if (val < 0.) 554 val = 0.00001; 543 555 break; 544 556 case 13: 545 if (!pix.IsFFactorMethodValid()) 557 // if (!pix.IsFFactorMethodValid()) 558 // return kFALSE; 559 if (pix.IsExcluded()) 546 560 return kFALSE; 547 561 val = pix.GetMeanFFactorFADC2Phot(); 548 562 break; 549 563 case 14: 550 if (!pix.IsFFactorMethodValid()) 564 // if (!pix.IsFFactorMethodValid()) 565 // return kFALSE; 566 if (pix.IsExcluded()) 551 567 return kFALSE; 552 568 val = pix.GetMeanFFactorFADC2PhotErr(); 569 if (val < 0.) 570 val = 0.00001; 553 571 break; 554 572 case 15:
Note:
See TracChangeset
for help on using the changeset viewer.