Ignore:
Timestamp:
02/23/04 00:10:35 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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;
Note: See TracChangeset for help on using the changeset viewer.