Changeset 2996


Ignore:
Timestamp:
01/30/04 21:25:33 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r2994 r2996  
    108108   * manalysis/MCalibrationCalc.cc
    109109     - retrieve default arrival time from MRawEvt
     110
     111   * manalysis/MCalibrationBlindPix.cc
     112   * manalysis/MCalibrationPix.cc
     113     - check for NaN's in fit results
     114
    110115
    111116 2004/01/29: Abelardo Moralejo
  • trunk/MagicSoft/Mars/mcalib/MCalibrationBlindPix.cc

    r2931 r2996  
    9292    return kFALSE;
    9393 
    94   fLambda = fHist->GetLambda();
    95   fMu0    = fHist->GetMu0();
    96   fMu1    = fHist->GetMu1();
    97   fSigma0 = fHist->GetSigma0();
    98   fSigma1 = fHist->GetSigma1();
     94  fLambda = TMath::IsNaN(fHist->GetLambda()) ? -1. : fHist->GetLambda();
     95  fMu0    = TMath::IsNaN(fHist->GetMu0())    ? -1. : fHist->GetMu0();
     96  fMu1    = TMath::IsNaN(fHist->GetMu1())    ? -1. : fHist->GetMu1();
     97  fSigma0 = TMath::IsNaN(fHist->GetSigma0()) ? -1. : fHist->GetSigma0();
     98  fSigma1 = TMath::IsNaN(fHist->GetSigma1()) ? -1. : fHist->GetSigma1();
    9999
    100   fErrLambda = fHist->GetLambdaErr();
    101   fErrMu0    = fHist->GetMu0Err();
    102   fErrMu1    = fHist->GetMu1Err();
    103   fErrSigma0 = fHist->GetSigma0Err();
    104   fErrSigma1 = fHist->GetSigma1Err();
     100  fErrLambda = TMath::IsNaN(fHist->GetLambdaErr()) ? -1. : fHist->GetLambdaErr();
     101  fErrMu0    = TMath::IsNaN(fHist->GetMu0Err())    ? -1. : fHist->GetMu0Err();
     102  fErrMu1    = TMath::IsNaN(fHist->GetMu1Err())    ? -1. : fHist->GetMu1Err();
     103  fErrSigma0 = TMath::IsNaN(fHist->GetSigma0Err()) ? -1. : fHist->GetSigma0Err();
     104  fErrSigma1 = TMath::IsNaN(fHist->GetSigma1Err()) ? -1. : fHist->GetSigma1Err();
    105105
    106106  return kTRUE;
  • trunk/MagicSoft/Mars/mcalib/MCalibrationPix.cc

    r2950 r2996  
    319319// The fits are declared valid (fFitValid = kTRUE), if:
    320320//
    321 // 1) Pixel has a fitted charge greater than 5*PedRMS
     321// 1) Pixel has a fitted charge greater than 3*PedRMS
    322322// 2) Pixel has a fit error greater than 0.
    323323// 3) Pixel has a fit Probability greater than 0.0001
     
    513513// The check return kTRUE if:
    514514//
    515 // 1) Pixel has a fitted charge greater than 5*PedRMS
    516 // 2) Pixel has a fit error greater than 0.
     515// 0) No value is nan
     516// 1) Pixel has a fitted charge greater than 3*PedRMS
     517// 2) Pixel has a fit error greater than 0.
    517518// 3) Pixel has a fitted charge greater its charge error
    518519// 4) Pixel has a fit Probability greater than 0.0001
     
    521522Bool_t MCalibrationPix::CheckChargeFitValidity()
    522523{
     524
     525  if (TMath::IsNaN(fCharge)
     526      || TMath::IsNaN(fErrCharge)
     527      || TMath::IsNaN(fErrCharge)
     528      || TMath::IsNaN(fSigmaCharge)
     529      || TMath::IsNaN(fErrSigmaCharge)
     530      || TMath::IsNaN(fChargeProb))
     531    {
     532      *fLog << warn << "WARNING: Some of the fit values are NAN in Pixel " << fPixId << endl;
     533      return kFALSE;
     534    }
     535 
    523536
    524537  if (TESTBIT(fFlags,kExcludeQualityCheck))
Note: See TracChangeset for help on using the changeset viewer.