Ignore:
Timestamp:
05/17/05 12:08:31 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargePINDiode.cc

    r6528 r7043  
    191191  fHRmsCharge.SetBins(fRmsChargeNbins,fRmsChargeFirst,fRmsChargeLast);
    192192
     193  fExclusionMean  = 0;
     194  fExclusionSigma = 0; 
     195  fExclusionChi2  = 0;
     196
    193197  return kTRUE;
    194198
     
    250254  const Float_t signal = (float)extractor->GetExtractedSignal();
    251255  const Float_t time   = extractor->GetExtractedTime();
    252   const Float_t rms    = extractor->GetExtractedRms();
    253 
     256  const Float_t sigma    = extractor->GetExtractedSigma();
     257  const Float_t chi2    = extractor->GetExtractedChi2();
     258
     259  if (time < 3. || time > 24.)
     260    {
     261      fExclusionMean++;
     262      return kTRUE;
     263    }
     264 
     265  if (sigma < 5. || sigma > 18.)
     266    {
     267      fExclusionSigma++;
     268      return kTRUE;
     269    }
     270 
     271  if (chi2  > 0.35)
     272    {
     273      fExclusionChi2++;
     274      return kTRUE;
     275    }
     276 
    254277  FillHistAndArray(signal);
    255278  FillAbsTime(time);
    256   FillRmsCharge(rms);
     279  FillRmsCharge(sigma);
    257280
    258281  return kTRUE;
     
    293316  FitRmsCharge();
    294317
    295   CreateFourierSpectrum();
    296   fPINDiode->SetOscillating  ( !IsFourierSpectrumOK() );
    297 
    298318  fPINDiode->SetMean     (  fMean     );
    299319  fPINDiode->SetMeanVar  (  fMeanErr  * fMeanErr );
     
    311331
    312332  fPINDiode->SetValid(kTRUE);
    313 
    314   const Byte_t  loweredge  = fSigPIN->GetFirstUsedSlice();
    315   const Byte_t  upperedge  = fSigPIN->GetLastUsedSlice();
    316   const Float_t lowerlimit = (Float_t)loweredge + fTimeLowerLimit;
    317   const Float_t upperlimit = (Float_t)upperedge + fTimeUpperLimit; 
    318 
    319   if (GetAbsTimeMean() < lowerlimit)
    320     {
    321       *fLog << warn << GetDescriptor()
    322             << Form("%s%3.1f%s%2.1f%s",": Mean ArrivalTime: ",GetAbsTimeMean()," smaller than ",
    323                     lowerlimit," FADC slices from lower edge in PIN Diode") << endl;
    324       *fLog << warn << GetDescriptor() << ": No PIN Diode calibration!! " << endl;
    325       fPINDiode->SetValid(kFALSE);
    326     }
    327  
    328   if ( GetAbsTimeMean() > upperlimit )
    329     {
    330       *fLog << warn << GetDescriptor()
    331             << Form("%s%3.1f%s%2.1f%s",": Mean ArrivalTime: ",GetAbsTimeMean()," bigger than ",
    332                     upperlimit," FADC slices from upper edge in PIN Diode") << endl;
    333       *fLog << warn << GetDescriptor() << ": No PIN Diode calibration!! " << endl;
    334       fPINDiode->SetValid(kFALSE);
    335     }
    336333
    337334  return kTRUE;
Note: See TracChangeset for help on using the changeset viewer.