Ignore:
Timestamp:
11/09/04 20:49:06 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
File:
1 edited

Legend:

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

    r5335 r5365  
    5959//     Constructor
    6060//
    61 MFSize::MFSize(const char *name, const char *title): fNumSelectedEvts(0)
     61MFSize::MFSize(const char *name, const char *title): fNumSelectedEvts(0), fProb(NULL)
    6262{
    6363  fName  = name  ? name  : "MFSize";
    6464  fTitle = title ? title : "Filter to select events according to Size";
    65 
    66   //
    67   // Default fProb histogram: 20 bins in the log10(Size) range [2,4]
    68   // Values are calculated to make the Size distribution of MC gammas
    69   // in the standard MC sample to look like the distribution for MC
    70   // hadrons (p+He)
    71   //
    72   fProb = new TH1F("ProbVsLog10Size", "", 20, 2., 4.);
    73 
    74   Float_t frac[20] = {0.144928, 0.171911, 0.18763, 0.209461, 0.253219,
    75                       0.305425, 0.384593, 0.485204, 0.612452, 0.708138,
    76                       0.754522, 0.728028, 0.774046, 0.791422, 0.808775,
    77                       0.896842, 1., 1., 1., 1.};
    78  
    79   for (Int_t i = 0; i < 20; i++)
    80     fProb->SetBinContent(i+1, frac[i]);
    8165}
    8266
     
    11498Int_t MFSize::PreProcess(MParList *pList)
    11599{
     100  if (!fProb)
     101    {
     102      *fLog << err << dbginf << fName <<
     103        " Histogram fProb not set. You must call MFSize::SetProb(TH1F*) before the event loop." << endl;
     104      return kFALSE;
     105    } 
     106
    116107  fHillas = (MHillas*)pList->FindObject(AddSerialNumber("MHillas"));
    117108    if (!fHillas)
Note: See TracChangeset for help on using the changeset viewer.