Ignore:
Timestamp:
07/17/03 08:06:40 (21 years ago)
Author:
wittek
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mfilter
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.cc

    r2206 r2282  
    3030//  This is a class to evaluate basic cuts
    3131//
    32 //  WHAT ARE THE BASIC CUTS?
    33 //
    3432//  to be called after the calibration (when the number of photons is
    3533//               available for all pixels)
    3634//
     35//  The basic cuts are :
     36//
     37//      remove bad runs
     38//      thetamin < theta < thetamax
     39//      software trigger fullfilled (with minimum no.of photons = minphotons)
     40//
     41//
    3742/////////////////////////////////////////////////////////////////////////////
    3843
     
    4449
    4550#include "MCerPhotEvt.h"
    46 //nclude "MRawRunHeader.h"
     51#include "MRawRunHeader.h"
    4752
    4853#include "MGeomPix.h"
     
    95100Int_t MFCT1SelBasic::PreProcess(MParList *pList)
    96101{
    97     /*
    98102    fRawRun = (MRawRunHeader*)pList->FindObject("MRawRunHeader");
    99103    if (!fRawRun)
     
    102106        return kFALSE;
    103107    }
    104     */
    105108
    106109    fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
     
    148151// Evaluate basic cuts
    149152//
    150 // if cuts are fulfilled      : fResult = kTRUE;
    151 // if they are not fullfilled : fResult = kFALSE;
     153//     bad events    : fResult = kTRUE;
     154//     good events  : fResult = kFALSE;
    152155//
    153156Int_t MFCT1SelBasic::Process()
     
    157160    fResult  = kFALSE;
    158161
     162    // remove bad runs for MC gammas
     163    if (fMcEvt->GetEnergy() == 0.0  &&  fMcEvt->GetImpact() == 0.0)
     164    {
     165      if (fRawRun->GetRunNumber() == 601  ||
     166          fRawRun->GetRunNumber() == 613  ||
     167          fRawRun->GetRunNumber() == 614    )
     168        return Set(1);
     169    }
     170
    159171    if (theta<fThetaMin)
    160         return Set(1);
     172        return Set(2);
    161173
    162174    if (theta>fThetaMax)
    163         return Set(2);
     175        return Set(3);
    164176
    165177    if (!SwTrigger())
    166         return Set(3);
     178        return Set(4);
    167179
    168180    fCut[0]++;
     
    234246    *fLog << GetDescriptor() << " execution statistics:" << endl;
    235247    *fLog << dec << setfill(' ');
     248
    236249    *fLog << " " << setw(7) << fCut[1] << " (" << setw(3) ;
    237250    *fLog << (int)(fCut[1]*100/GetNumExecutions()) ;
    238     *fLog << "%) Evts skipped due to: Zenith angle < " << fThetaMin << endl;
     251    *fLog << "%) Evts skipped due to: bad run " << endl;
    239252
    240253    *fLog << " " << setw(7) << fCut[2] << " (" << setw(3) ;
    241254    *fLog << (int)(fCut[2]*100/GetNumExecutions()) ;
    242     *fLog << "%) Evts skipped due to: Zenith angle > " << fThetaMax << endl;
     255    *fLog << "%) Evts skipped due to: Zenith angle < " << fThetaMin << endl;
    243256
    244257    *fLog << " " << setw(7) << fCut[3] << " (" << setw(3) ;
    245258    *fLog << (int)(fCut[3]*100/GetNumExecutions()) ;
     259    *fLog << "%) Evts skipped due to: Zenith angle > " << fThetaMax << endl;
     260
     261    *fLog << " " << setw(7) << fCut[4] << " (" << setw(3) ;
     262    *fLog << (int)(fCut[4]*100/GetNumExecutions()) ;
    246263    *fLog << "%) Evts skipped due to: Software trigger not fullfilled" ;
    247264    *fLog << " (with fMinPhotons = " << fMinPhotons << ")" << endl;
  • trunk/MagicSoft/Mars/mfilter/MFCT1SelBasic.h

    r2206 r2282  
    1818class MCerPhotEvt;
    1919class MPedestalCam;
    20 //class MRawRunHeader;
     20class MRawRunHeader;
    2121
    2222class MFCT1SelBasic : public MFilter
     
    2727    const MCerPhotEvt   *fEvt;      // Cerenkov Photon Event
    2828    //const MPedestalCam  *fPed;      // Pedestal information
    29     //const MRawRunHeader *fRawRun;
     29    const MRawRunHeader *fRawRun;
    3030
    3131    Float_t     fMinPhotons;
     
    3333    Float_t     fThetaMax;
    3434
    35     Int_t       fCut[4];
     35    Int_t       fCut[5];
    3636
    3737    Bool_t      fResult;
Note: See TracChangeset for help on using the changeset viewer.