Ignore:
Timestamp:
05/17/05 13:27:33 (20 years ago)
Author:
tbretz
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfilter/MFCosmics.cc

    r7043 r7046  
    3838//       fMinAcceptedFraction.
    3939//    b) check the ratio of events which were rejected against
    40 //       fMaxExcludedFraction.
     40//       fMaxAcceptedFraction.
    4141//
    4242//  Input Containers:
     
    8282    : fPedestals(NULL), fSignals(NULL), fBadPixels(NULL), fRawEvt(NULL),
    8383    fNamePedestalCam(fgNamePedestalCam), fMaxEmptyPixels(0.2),
    84     fMinAcceptedFraction(0), fMaxExcludedFraction(1)
     84    fMinAcceptedFraction(0), fMaxAcceptedFraction(1)
    8585{
    8686    fName  = name  ? name  : "MFCosmics";
     
    214214//       fMinAcceptedFraction.
    215215//    b) check the ratio of events which were rejected against
    216 //       fMaxExcludedFraction.
     216//       fMaxAcceptedFraction.
    217217//
    218218//   return failure (kFALSE) if condition is not fullfilled.
     
    238238    *fLog << endl;
    239239
    240     const Float_t min = fMinAcceptedFraction*n;
    241     const Float_t max = fMaxExcludedFraction*n;
    242     if (fCut[0]<min)
    243     {
    244         *fLog << err << "ERROR - Fraction of accepted events " << min*100;
     240    if (fCut[0]<fMinAcceptedFraction*n)
     241    {
     242        *fLog << err << "ERROR - Fraction of accepted events " << Form("%.1f", fCut[0]*100./n);
    245243        *fLog << "% underrun " << fMinAcceptedFraction*100 << "%... abort." << endl;
    246244        return kFALSE;
    247245    }
    248     if (fCut[1]>max)
    249     {
    250         *fLog << err << "ERROR - Fraction of excluded events " << max*100;
    251         *fLog << "% exceeded " << fMaxExcludedFraction*100 << "%... abort." << endl;
     246    if (fCut[0]>fMaxAcceptedFraction*n)
     247    {
     248        *fLog << err << "ERROR - Fraction of accepted events " << Form("%.1f", fCut[0]*100./n);
     249        *fLog << "% exceeded " << fMaxAcceptedFraction*100 << "%... abort." << endl;
    252250        return kFALSE;
    253251    }
     
    260258// Read the setup from a TEnv, eg:
    261259//   MFCosmics.MaxEmptyPixels:    0.2
    262 //   MFCosmics.MaxExcludedFraction: 1
     260//   MFCosmics.MaxAcceptedFraction: 1
    263261//   MFCosmics.MinAcceptedFraction: 0
    264262//
     
    271269        SetMaxEmptyPixels(GetEnvValue(env, prefix, "MaxEmptyPixels", fMaxEmptyPixels));
    272270    }
    273     if (IsEnvDefined(env, prefix, "MaxExcludedFraction", print))
     271    if (IsEnvDefined(env, prefix, "MaxAcceptedFraction", print))
    274272    {
    275273        rc = kTRUE;
    276         SetMaxExcludedFraction(GetEnvValue(env, prefix, "MaxExcludedFraction", fMaxExcludedFraction));
     274        SetMaxAcceptedFraction(GetEnvValue(env, prefix, "MaxAcceptedFraction", fMaxAcceptedFraction));
    277275    }
    278276    if (IsEnvDefined(env, prefix, "MinAcceptedFraction", print))
Note: See TracChangeset for help on using the changeset viewer.