Ignore:
Timestamp:
02/02/04 22:52:53 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mcalib/MCalibrationPINDiode.cc

    r2931 r3007  
    7676
    7777  CLRBIT(fFlags, kExcluded);
    78   CLRBIT(fFlags, kFitValid);
     78  CLRBIT(fFlags, kChargeFitValid);
     79  CLRBIT(fFlags, kChargeFitValid);
    7980  CLRBIT(fFlags, kFitted);
    8081
     
    129130// Set the Excluded Bit from outside
    130131//
    131 void MCalibrationPINDiode::SetFitValid(Bool_t b )   
    132 {
    133   b ?  SETBIT(fFlags, kFitValid) : CLRBIT(fFlags, kFitValid);
     132void MCalibrationPINDiode::SetChargeFitValid(Bool_t b )   
     133{
     134  b ?  SETBIT(fFlags, kChargeFitValid) : CLRBIT(fFlags, kChargeFitValid);
     135}
     136
     137// --------------------------------------------------------------------------
     138//
     139// Set the Excluded Bit from outside
     140//
     141void MCalibrationPINDiode::SetTimeFitValid(Bool_t b )   
     142{
     143  b ?  SETBIT(fFlags, kTimeFitValid) : CLRBIT(fFlags, kTimeFitValid);
    134144}
    135145
     
    148158 }
    149159
    150 Bool_t MCalibrationPINDiode::IsFitValid() const
    151 {
    152   return TESTBIT(fFlags, kFitValid); 
     160Bool_t MCalibrationPINDiode::IsChargeFitValid() const
     161{
     162  return TESTBIT(fFlags, kChargeFitValid); 
     163}
     164
     165Bool_t MCalibrationPINDiode::IsTimeFitValid() const
     166{
     167  return TESTBIT(fFlags, kTimeFitValid); 
    153168}
    154169
     
    165180  //    or if the histogram is empty
    166181  //
    167   if (fHist->IsFitOK() || fHist->IsEmpty())
     182  if (fHist->IsChargeFitOK() || fHist->IsEmpty())
    168183    return kTRUE;
    169184
     
    195210
    196211  if (CheckChargeFitValidity())
    197     SETBIT(fFlags,kFitValid);
     212    SETBIT(fFlags,kChargeFitValid);
    198213  else
    199214    {
    200       CLRBIT(fFlags,kFitValid);
     215      CLRBIT(fFlags,kChargeFitValid);
    201216      return kFALSE;
    202217    }
     
    242257    }
    243258     
    244   if (!fHist->IsFitOK())
     259  if (!fHist->IsChargeFitOK())
    245260    {
    246261      *fLog << warn << "WARNING: Probability of Fitted Charge too low in PINDiode " << endl;
     
    267282{
    268283
    269   if(!fHist->FitTimeHiGain())
     284  if(!fHist->FitTime())
    270285    {
    271286      *fLog << warn << "WARNING: Could not fit Hi Gain times of PIN Diode" << endl;
     
    274289    }
    275290 
    276   fTime          = fHist->GetTimeMean();
    277   fSigmaTime     = fHist->GetTimeSigma();
    278   fTimeChiSquare = fHist->GetTimeChiSquare();
    279   fTimeProb      = fHist->GetTimeProb();
     291  fTime          = fHist->GetRelTimeMean();
     292  fSigmaTime     = fHist->GetRelTimeSigma();
     293  fTimeProb      = fHist->GetRelTimeProb();
    280294 
    281295  if (CheckTimeFitValidity())
    282     SETBIT(fFlags,kFitValid);
     296    SETBIT(fFlags,kTimeFitValid);
    283297  else
    284     CLRBIT(fFlags,kFitValid);
     298    CLRBIT(fFlags,kTimeFitValid);
    285299
    286300  return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.