Changeset 7046 for trunk/MagicSoft/Mars/mfilter/MFCosmics.cc
- Timestamp:
- 05/17/05 13:27:33 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfilter/MFCosmics.cc
r7043 r7046 38 38 // fMinAcceptedFraction. 39 39 // b) check the ratio of events which were rejected against 40 // fMax ExcludedFraction.40 // fMaxAcceptedFraction. 41 41 // 42 42 // Input Containers: … … 82 82 : fPedestals(NULL), fSignals(NULL), fBadPixels(NULL), fRawEvt(NULL), 83 83 fNamePedestalCam(fgNamePedestalCam), fMaxEmptyPixels(0.2), 84 fMinAcceptedFraction(0), fMax ExcludedFraction(1)84 fMinAcceptedFraction(0), fMaxAcceptedFraction(1) 85 85 { 86 86 fName = name ? name : "MFCosmics"; … … 214 214 // fMinAcceptedFraction. 215 215 // b) check the ratio of events which were rejected against 216 // fMax ExcludedFraction.216 // fMaxAcceptedFraction. 217 217 // 218 218 // return failure (kFALSE) if condition is not fullfilled. … … 238 238 *fLog << endl; 239 239 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); 245 243 *fLog << "% underrun " << fMinAcceptedFraction*100 << "%... abort." << endl; 246 244 return kFALSE; 247 245 } 248 if (fCut[ 1]>max)249 { 250 *fLog << err << "ERROR - Fraction of excluded events " << max*100;251 *fLog << "% exceeded " << fMax ExcludedFraction*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; 252 250 return kFALSE; 253 251 } … … 260 258 // Read the setup from a TEnv, eg: 261 259 // MFCosmics.MaxEmptyPixels: 0.2 262 // MFCosmics.Max ExcludedFraction: 1260 // MFCosmics.MaxAcceptedFraction: 1 263 261 // MFCosmics.MinAcceptedFraction: 0 264 262 // … … 271 269 SetMaxEmptyPixels(GetEnvValue(env, prefix, "MaxEmptyPixels", fMaxEmptyPixels)); 272 270 } 273 if (IsEnvDefined(env, prefix, "Max ExcludedFraction", print))271 if (IsEnvDefined(env, prefix, "MaxAcceptedFraction", print)) 274 272 { 275 273 rc = kTRUE; 276 SetMax ExcludedFraction(GetEnvValue(env, prefix, "MaxExcludedFraction", fMaxExcludedFraction));274 SetMaxAcceptedFraction(GetEnvValue(env, prefix, "MaxAcceptedFraction", fMaxAcceptedFraction)); 277 275 } 278 276 if (IsEnvDefined(env, prefix, "MinAcceptedFraction", print))
Note:
See TracChangeset
for help on using the changeset viewer.