Ignore:
Timestamp:
03/08/03 14:00:30 (22 years ago)
Author:
wittek
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MSelStandard.cc

    r1762 r1809  
     1
    12/* ======================================================================== *\
    23!
     
    3940
    4041#include "MHillas.h"
     42#include "MHillasExt.h"
    4143#include "MHillasSrc.h"
    4244#include "MCerPhotEvt.h"
     
    5456// Default constructor.
    5557//
    56 MSelStandard::MSelStandard(const MHillas *parhil, const MHillasSrc *parhilsrc,
     58MSelStandard::MSelStandard(const char *HilName, const char *HilSrcName,
    5759                           const char *name, const char *title)
    5860{
     
    6062    fTitle = title ? title : "Task to evaluate the Standard Cuts";
    6163
    62     fHil    = parhil;
    63     fHilsrc = parhilsrc;
     64    fHilName    = HilName;
     65    fHilSrcName = HilSrcName;
    6466}
    6567
     
    7274Bool_t MSelStandard::PreProcess(MParList *pList)
    7375{
     76    fHil    = (MHillasExt*)pList->FindObject(fHilName, "MHillasExt");
     77    if (!fHil)
     78    {
     79      *fLog << dbginf << "MHillasExt object " << fHilName << " not found... aborting." << endl;
     80      return kFALSE;
     81    }
     82
     83    fHilSrc = (MHillasSrc*)pList->FindObject(fHilSrcName, "MHillasSrc");
     84    if (!fHilSrc)
     85    {
     86      *fLog << dbginf << "MHillasSrc object " << fHilSrcName << " not found... aborting." << endl;
     87      return kFALSE;
     88    }
     89
     90
    7491    fMcEvt = (MMcEvt*)pList->FindObject("MMcEvt");
    7592    if (!fMcEvt)
     
    95112    fMm2Deg = fCam->GetConvMm2Deg();
    96113
    97     *fLog << "fMm2Deg = " << fMm2Deg << endl;
     114    //*fLog << "fMm2Deg = " << fMm2Deg << endl;
    98115
    99116    memset(fErrors, 0, sizeof(fErrors));
     
    114131    Int_t rc = 0;
    115132
    116     //Double_t fLength       = fHil->GetLength() * fMm2Deg;
    117     //Double_t fWidth        = fHil->GetWidth()  * fMm2Deg;
    118     Double_t fDist         = fHilsrc->GetDist()* fMm2Deg;
     133    Double_t fLength       = fHil->GetLength() * fMm2Deg;
     134    Double_t fWidth        = fHil->GetWidth()  * fMm2Deg;
     135    Double_t fDist         = fHilSrc->GetDist()* fMm2Deg;
    119136    //Double_t fDelta        = fHil->GetDelta()  * kRad2Deg;
    120137    Double_t fSize         = fHil->GetSize();
     
    122139    Int_t fNumCorePixels   = fHil->GetNumCorePixels();
    123140
    124     if (     fSize <= 60.0         ||  fDist< 0.4           ||  fDist > 1.1 
    125          ||  fNumUsedPixels >= 92  ||  fNumCorePixels < 4)
     141    if ( fNumUsedPixels >= 92  ||  fNumCorePixels < 4 )
    126142    {
    127143      //*fLog << "MSelStandard::Process; fSize, fDist, fNumUsedPixels, fNumCorePixels = "
     
    129145      //      << fNumCorePixels << endl;
    130146      rc = 1;
     147    }   
     148
     149    else if ( fSize <= 60.0         ||  fDist< 0.4           ||  fDist > 1.1 )
     150    {
     151      //*fLog << "MSelStandard::Process; fSize, fDist, fNumUsedPixels, fNumCorePixels = "
     152      //      << fSize << ",  " << fDist << ",  " << fNumUsedPixels << ",  "
     153      //      << fNumCorePixels << endl;
     154      rc = 2;
     155    }   
     156
     157    else if ( fLength <= 0.0         ||  fWidth <= 0.0 )
     158    {
     159      //*fLog << "MSelStandard::Process; fLength, fWidth = "
     160      //      << fLength << ",  " << fWidth << endl;
     161      rc = 3;
    131162    }   
    132163
     
    149180    *fLog << GetDescriptor() << " execution statistics:" << endl;
    150181    *fLog << dec << setfill(' ');
    151     *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3) << (int)(fErrors[1]*100/GetNumExecutions()) << "%) Evts skipped due to: Standard selections are not fullfilled" << endl;
     182    *fLog << " " << setw(7) << fErrors[1] << " (" << setw(3) << (int)(fErrors[1]*100/GetNumExecutions()) << "%) Evts skipped due to: Requirements on no.of used or core pxels not fullfilled" << endl;
     183
     184    *fLog << " " << setw(7) << fErrors[2] << " (" << setw(3) << (int)(fErrors[2]*100/GetNumExecutions()) << "%) Evts skipped due to: Requirements on SIZE or DIST not fullfilled" << endl;
     185
     186    *fLog << " " << setw(7) << fErrors[3] << " (" << setw(3) << (int)(fErrors[3]*100/GetNumExecutions()) << "%) Evts skipped due to: Length or Width is <= 0" << endl;
    152187
    153188    *fLog << " " << fErrors[0] << " (" << (int)(fErrors[0]*100/GetNumExecutions()) << "%) Evts survived Standard selections!" << endl;
     
    156191    return kTRUE;
    157192}
     193
     194
Note: See TracChangeset for help on using the changeset viewer.