Changeset 3262
- Timestamp:
- 02/23/04 00:10:35 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3261 r3262 5 5 -*-*- END OF LINE -*-*- 6 6 7 8 2004/02/22: Markus Gaug 9 10 * mfilter/MFCosmics.[h,cc] 11 12 - fMaxNumEmpty changed from absolute number to relative number of 13 pixels 14 7 15 8 16 2004/02/21: Markus Gaug -
trunk/MagicSoft/Mars/mfilter/MFCosmics.cc
r3183 r3262 28 28 // 29 29 // Filter to reject cosmics by the criterion that at least 30 // fMaxEmptyPixels pixels have values of lower than 3 Pedestal RMS.31 // fMaxEmptyPixels is set to 230by default which is slightly higher30 // fMaxEmptyPixels of the pixels have values of lower than 3 Pedestal RMS. 31 // fMaxEmptyPixels is set to 0.4 by default which is slightly higher 32 32 // than the number of outer pixels in MAGIC (for the case that 33 33 // the outer pixels have some defect). … … 67 67 MFCosmics::MFCosmics(const char *name, const char *title) 68 68 : fPedestals(NULL), fSignals(NULL), 69 fRawEvt(NULL), fMaxEmptyPixels( 230)69 fRawEvt(NULL), fMaxEmptyPixels(0.4) 70 70 { 71 71 fName = name ? name : "MFCosmics"; … … 102 102 return kFALSE; 103 103 } 104 104 105 105 106 memset(fCut, 0, sizeof(fCut)); … … 150 151 151 152 Int_t cosmicpix = 0; 153 Int_t allpix = 0; 152 154 153 155 // … … 164 166 const Float_t sumhi = sig.GetExtractedSignalHiGain(); 165 167 168 allpix++; 166 169 // 167 170 // We consider a pixel as presumably due to cosmics … … 176 179 // presumed pixels due to cosmics, then the event is discarted. 177 180 // 178 return cosmicpix > fMaxEmptyPixels ;181 return cosmicpix > fMaxEmptyPixels*allpix; 179 182 } 180 183 … … 188 191 *fLog << dec << setfill(' '); 189 192 193 *fLog << " " << setw(7) << fCut[0] << " (" << setw(3) ; 194 *fLog << (int)(fCut[0]*100/GetNumExecutions()) ; 195 *fLog << "%) Evts skipped due to: Cosmics Rejection applied " ; 196 *fLog << " (with fMaxEmptyPixels = " << fMaxEmptyPixels*100 << "%)" << endl; 197 190 198 *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ; 191 199 *fLog << (int)(fCut[1]*100/GetNumExecutions()) ; 192 *fLog << "%) Evts skipped due to: Cosmics Rejection applied " ;193 *fLog << " (with fMaxEmptyPixels = " << fMaxEmptyPixels << ")" << endl;194 195 *fLog << " " << setw(7) << fCut[0] << " (" << setw(3) ;196 *fLog << (int)(fCut[0]*100/GetNumExecutions()) ;197 200 *fLog << "%) Evts survived the cosmics rejection!" << endl; 198 201 *fLog << endl; -
trunk/MagicSoft/Mars/mfilter/MFCosmics.h
r3112 r3262 22 22 Bool_t fResult; 23 23 24 Int_tfMaxEmptyPixels; // Maximum number of empty pixels before declaring event as cosmic24 Float_t fMaxEmptyPixels; // Maximum number of empty pixels before declaring event as cosmic 25 25 Float_t fSqrtHiGainSamples; // Square root of the number of used Hi-Gain Samples 26 26 … … 37 37 MFCosmics(const char *name=NULL, const char *title=NULL); 38 38 39 void SetMaxEmptyPixels(const Int_t n) { fMaxEmptyPixels = n;}40 Int_t GetMaxEmptyPixels() const{ return fMaxEmptyPixels; }39 void SetMaxEmptyPixels(const Float_t n) { fMaxEmptyPixels = n; } 40 Float_t GetMaxEmptyPixels() const { return fMaxEmptyPixels; } 41 41 42 42 ClassDef(MFCosmics, 0) // Filter to perform a cosmics rejection … … 44 44 45 45 #endif 46 47 48
Note:
See TracChangeset
for help on using the changeset viewer.