Changeset 7046 for trunk/MagicSoft/Mars
- Timestamp:
- 05/17/05 13:27:33 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mfilter
- Files:
-
- 2 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)) -
trunk/MagicSoft/Mars/mfilter/MFCosmics.h
r7043 r7046 32 32 33 33 Float_t fMinAcceptedFraction; // return error if exceeded 34 Float_t fMax ExcludedFraction; // return error if exceeded34 Float_t fMaxAcceptedFraction; // return error if exceeded 35 35 36 36 // MFCosmics … … 53 53 Float_t GetMaxEmptyPixels() const { return fMaxEmptyPixels; } 54 54 55 void SetMax ExcludedFraction(const Float_t n) { fMaxExcludedFraction = n; }55 void SetMaxAcceptedFraction(const Float_t n) { fMaxAcceptedFraction = n; } 56 56 void SetMinAcceptedFraction(const Float_t n) { fMinAcceptedFraction = n; } 57 57
Note:
See TracChangeset
for help on using the changeset viewer.