Changeset 2759
- Timestamp:
- 01/09/04 11:36:52 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r2758 r2759 4 4 5 5 -*-*- END OF LINE -*-*- 6 2004/01/09: Markus Gaug 7 8 * mcalib/MCalibrationPix.[h,cc] 9 - fixed a bug in calculation of fFitValid. 10 before, a call to IsFitValid() always returned false 11 6 12 2004/01/09: Javier López 7 13 -
trunk/MagicSoft/Mars/mcalib/MCalibrationPix.cc
r2734 r2759 131 131 // 8) Calculate the errors of the F-Factor method 132 132 // 133 // The fit isdeclared valid (fFitValid = kTRUE), if:133 // The fits are declared valid (fFitValid = kTRUE), if: 134 134 // 135 135 // 1) Pixel has a fitted charge greater than 3*PedRMS … … 139 139 // 5) If FitTimes is used, 140 140 // the mean arrival time is at least 1.0 slices from the used edge slices 141 // 141 // (this stage is only performed in the times fit) 142 // 142 143 // The conversion factor after the F-Factor method is declared valid, if: 143 144 // … … 219 220 fFitted = kTRUE; 220 221 221 222 if (fHiGainSaturation) 223 { 224 if ( (fCharge > 0.3*GetPedRms()) && 225 (fErrCharge > 0.) && 226 (fHist->IsFitOK()) && 227 (fSigmaCharge > fPedRms/fConversionHiLo) && 228 (fTime > fHist->GetTimeLowerFitRange()+1.) && 229 (fTime < fHist->GetTimeUpperFitRange()-1.) ) 230 fFitValid = kTRUE; 231 } 232 else 233 { 234 if ( (fCharge > 3.*GetPedRms()) && 235 (fErrCharge > 0.) && 236 (fHist->IsFitOK()) && 237 (fSigmaCharge > fPedRms) && 238 (fTime > fHist->GetTimeLowerFitRange()+1.) && 239 (fTime < fHist->GetTimeUpperFitRange()-1.) ) 240 fFitValid = kTRUE; 241 } 222 if (CheckChargeFitValidity()) 223 fFitValid = kTRUE; 224 242 225 243 226 // … … 356 339 } 357 340 341 // 342 // The check return kTRUE if: 343 // 344 // 1) Pixel has a fitted charge greater than 3*PedRMS 345 // 2) Pixel has a fit error greater than 0. 346 // 3) Pixel has a fit Probability greater than 0.0001 347 // 4) Pixel has a charge sigma bigger than its Pedestal RMS 348 // 349 Bool_t MCalibrationPix::CheckChargeFitValidity() 350 { 351 352 Float_t equivpedestal = GetPedRms(); 353 354 if (fHiGainSaturation) 355 equivpedestal /= fConversionHiLo; 356 357 if (fCharge < 3.*equivpedestal) 358 { 359 *fLog << warn << "WARNING: Fitted Charge is smaller than 3 Pedestal RMS in Pixel " << fPixId << endl; 360 return kFALSE; 361 } 362 363 if (fErrCharge < 0.) 364 { 365 *fLog << warn << "WARNING: Error of Fitted Charge is smaller than 0 in Pixel " << fPixId << endl; 366 return kFALSE; 367 } 368 369 if (!fHist->IsFitOK()) 370 { 371 *fLog << warn << "WARNING: Probability of Fitted Charge too low in Pixel " << fPixId << endl; 372 return kFALSE; 373 } 374 375 if (fSigmaCharge < equivpedestal) 376 { 377 *fLog << warn << "WARNING: Sigma of Fitted Charge smaller than Pedestal RMS in Pixel " << fPixId << endl; 378 return kFALSE; 379 } 380 return kTRUE; 381 } 382 383 // 384 // The check returns kTRUE if: 385 // 386 // The mean arrival time is at least 1.0 slices from the used edge slices 387 // 388 Bool_t MCalibrationPix::CheckTimeFitValidity() 389 { 390 391 if (fTime < fHist->GetTimeLowerFitRange()+1.) 392 { 393 *fLog << warn 394 << "WARNING: Mean Fitted Time inside or smaller than first used FADC slice in Pixel " 395 << fPixId << endl; 396 return kFALSE; 397 } 398 399 if (fTime < fHist->GetTimeUpperFitRange()-1.) 400 { 401 *fLog << warn 402 << "WARNING: Mean Fitted Time inside or greater than last used FADC slice in Pixel " 403 << fPixId << endl; 404 return kFALSE; 405 } 406 407 return kTRUE; 408 } 409 410 358 411 359 412 void MCalibrationPix::ApplyLoGainConversion() … … 432 485 fTimeChiSquare = fHist->GetTimeChiSquare(); 433 486 487 if (!CheckTimeFitValidity()) 488 fFitValid = kFALSE; 489 434 490 return kTRUE; 435 491 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationPix.h
r2734 r2759 60 60 61 61 MHCalibrationPixel *fHist; //! Pointer to the histograms performing the fits, etc. 62 63 Bool_t CheckChargeFitValidity(); 64 Bool_t CheckTimeFitValidity(); 62 65 63 66 public:
Note:
See TracChangeset
for help on using the changeset viewer.