source: trunk/MagicSoft/Mars/mmontecarlo/MMcTriggerRateCalc.h@ 2006

Last change on this file since 2006 was 1792, checked in by moralejo, 22 years ago
*** empty log message ***
File size: 1.8 KB
Line 
1#ifndef MARS_MMcTriggerRateCalc
2#define MARS_MMcTriggerRateCalc
3
4#ifndef ROOT_TObjArray
5#include <TObjArray.h>
6#endif
7#ifndef MARS_MTask
8#include "MTask.h"
9#endif
10
11#include <TGraphErrors.h>
12
13class MParList;
14class MMcEvt;
15class MMcRunHeader;
16class MMcCorsikaRunHeader;
17class MMcTrig;
18class MHMcRate;
19
20class MMcTriggerRateCalc : public MTask
21{
22private:
23 MMcEvt *fMcEvt; //!
24
25 TObjArray *fMcRate;
26 TObjArray *fMcTrig;
27
28 MMcRunHeader *fMcRunHeader;
29 MMcCorsikaRunHeader *fMcCorRunHeader;
30
31 UInt_t fNum; // decoded dimension
32 UInt_t fFirst;
33 UInt_t fLast;
34
35 Float_t* fTrigNSB; // Number of triggers due to NSB alone
36 Float_t fSimNSB; // Number of simulated NSB-only events
37
38 Float_t* fTrigger; // Number of triggered showers
39 Float_t fShowers; // Number of simulated showers
40 Float_t fAnalShow; // Number of analysed showers
41
42 Int_t fPartId; // Incident particle that generates showers
43
44 void Init(int dim, float *trigbg,
45 float simbg, const char *name, const char *title);
46
47 MHMcRate *GetRate(UInt_t i) const { return (MHMcRate*)((*fMcRate)[i]); }
48 MMcTrig *GetTrig(UInt_t i) const { return (MMcTrig*)((*fMcTrig)[i]); }
49
50 TH1F* fHist[5];
51
52public:
53 MMcTriggerRateCalc(int dim=0, float *trigbg=NULL, float simbg=100000,
54 const char *name=NULL, const char *title=NULL);
55
56 MMcTriggerRateCalc(float rate, int dim, float *trigbg, float simbg,
57 const char *name=NULL, const char *title=NULL);
58
59 ~MMcTriggerRateCalc();
60
61 Bool_t ReInit(MParList *plist);
62
63 Bool_t PreProcess(MParList *pList);
64 Bool_t Process();
65 Bool_t PostProcess();
66
67 TH1F* GetHist(Int_t i) {return fHist[i];}
68
69 void Draw();
70
71 ClassDef(MMcTriggerRateCalc, 0) // Task to compute the trigger rate
72};
73
74#endif
Note: See TracBrowser for help on using the repository browser.