Changeset 3262 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
02/23/04 00:10:35 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3261 r3262  
    55                                                 -*-*- END OF LINE -*-*-
    66 
     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
    715
    816 2004/02/21: Markus Gaug
  • trunk/MagicSoft/Mars/mfilter/MFCosmics.cc

    r3183 r3262  
    2828//
    2929//   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 230 by default which is slightly higher
     30//   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
    3232//   than the number of outer pixels in MAGIC (for the case that
    3333//   the outer pixels have some defect).
     
    6767MFCosmics::MFCosmics(const char *name, const char *title)
    6868    : fPedestals(NULL), fSignals(NULL),
    69       fRawEvt(NULL), fMaxEmptyPixels(230)
     69      fRawEvt(NULL), fMaxEmptyPixels(0.4)
    7070{
    7171    fName  = name  ? name  : "MFCosmics";
     
    102102        return kFALSE;
    103103    }
     104
    104105
    105106    memset(fCut, 0, sizeof(fCut));
     
    150151
    151152    Int_t cosmicpix = 0;
     153    Int_t allpix    = 0;
    152154
    153155    //
     
    164166        const Float_t sumhi  = sig.GetExtractedSignalHiGain();
    165167
     168        allpix++;
    166169        //
    167170        // We consider a pixel as presumably due to cosmics
     
    176179    // presumed pixels due to cosmics, then the event is discarted.
    177180    //
    178     return cosmicpix > fMaxEmptyPixels;
     181    return cosmicpix > fMaxEmptyPixels*allpix;
    179182}
    180183
     
    188191    *fLog << dec << setfill(' ');
    189192
     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
    190198    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
    191199    *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()) ;
    197200    *fLog << "%) Evts survived the cosmics rejection!" << endl;
    198201    *fLog << endl;
  • trunk/MagicSoft/Mars/mfilter/MFCosmics.h

    r3112 r3262  
    2222    Bool_t  fResult;
    2323
    24     Int_t  fMaxEmptyPixels;         // Maximum number of empty pixels before declaring event as cosmic
     24    Float_t fMaxEmptyPixels;         // Maximum number of empty pixels before declaring event as cosmic
    2525    Float_t fSqrtHiGainSamples;      // Square root of the number of used Hi-Gain Samples
    2626
     
    3737    MFCosmics(const char *name=NULL, const char *title=NULL);
    3838
    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; }
    4141
    4242    ClassDef(MFCosmics, 0)   // Filter to perform a cosmics rejection
     
    4444
    4545#endif
     46
     47
     48
Note: See TracChangeset for help on using the changeset viewer.