Changeset 5365 for trunk/MagicSoft/Mars/mfilter
- Timestamp:
- 11/09/04 20:49:06 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mfilter/MFSize.cc
r5335 r5365 59 59 // Constructor 60 60 // 61 MFSize::MFSize(const char *name, const char *title): fNumSelectedEvts(0) 61 MFSize::MFSize(const char *name, const char *title): fNumSelectedEvts(0), fProb(NULL) 62 62 { 63 63 fName = name ? name : "MFSize"; 64 64 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 gammas69 // in the standard MC sample to look like the distribution for MC70 // 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]);81 65 } 82 66 … … 114 98 Int_t MFSize::PreProcess(MParList *pList) 115 99 { 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 116 107 fHillas = (MHillas*)pList->FindObject(AddSerialNumber("MHillas")); 117 108 if (!fHillas)
Note:
See TracChangeset
for help on using the changeset viewer.