1 | #ifndef MARS_MHCollectionArea
|
---|
2 | #define MARS_MHCollectionArea
|
---|
3 |
|
---|
4 | #ifndef MARS_MH
|
---|
5 | #include "MH.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TH1
|
---|
9 | #include <TH1.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef ROOT_TH2
|
---|
13 | #include <TH2.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | class MMcEvt;
|
---|
17 | class MParameterD;
|
---|
18 |
|
---|
19 | class MHCollectionArea : public MH
|
---|
20 | {
|
---|
21 | private:
|
---|
22 | MMcEvt *fMcEvt;
|
---|
23 | MParameterD *fEnergy;
|
---|
24 |
|
---|
25 | TH2D fHistSel;
|
---|
26 | TH2D fHistAll;
|
---|
27 |
|
---|
28 | TH1D fHEnergy;
|
---|
29 |
|
---|
30 | Float_t fMcAreaRadius; // [m] Radius of circle within which the cores of Corsika events have been uniformly distributed.
|
---|
31 |
|
---|
32 | UInt_t fTotalNumSimulatedShowers;
|
---|
33 | UInt_t fCorsikaVersion;
|
---|
34 | Bool_t fAllEvtsTriggered;
|
---|
35 | Bool_t fIsExtern;
|
---|
36 |
|
---|
37 | void Calc(TH2D &hsel, TH2D &hall);
|
---|
38 | void CalcEfficiency();
|
---|
39 |
|
---|
40 | public:
|
---|
41 | MHCollectionArea(const char *name=NULL, const char *title=NULL);
|
---|
42 |
|
---|
43 | Bool_t SetupFill(const MParList *pList);
|
---|
44 | Bool_t ReInit(MParList *pList);
|
---|
45 | Bool_t Fill(const MParContainer *par, const Stat_t weight=1);
|
---|
46 | Bool_t Finalize() { CalcEfficiency(); return kTRUE; }
|
---|
47 |
|
---|
48 | void Draw(Option_t *option="");
|
---|
49 | void Paint(Option_t *option="");
|
---|
50 |
|
---|
51 | void SetHistAll(const TH2D &h) { h.Copy(fHistAll); fIsExtern=kTRUE; }
|
---|
52 |
|
---|
53 | TH2D &GetHistAll() { return fHistAll; }
|
---|
54 | const TH2D &GetHistAll() const { return fHistAll; }
|
---|
55 | const TH2D &GetHistSel() const { return fHistSel; }
|
---|
56 | const TH1D &GetHEnergy() const { return fHEnergy; }
|
---|
57 |
|
---|
58 | Double_t GetEntries() const { return fHistAll.Integral(); }
|
---|
59 | Double_t GetCollectionAreaEff() const { return fHEnergy.Integral(); }
|
---|
60 | Double_t GetCollectionAreaAbs() const { return TMath::Pi()*fMcAreaRadius*fMcAreaRadius; }
|
---|
61 |
|
---|
62 | /*
|
---|
63 | void DrawAll(Option_t *option="");
|
---|
64 | void DrawSel(Option_t *option="");
|
---|
65 |
|
---|
66 | const TH1D *GetHist() { return fHistCol; }
|
---|
67 | const TH1D *GetHist() const { return fHistCol; }
|
---|
68 |
|
---|
69 |
|
---|
70 |
|
---|
71 | void CalcEfficiency();
|
---|
72 | void CalcEfficiency2();
|
---|
73 |
|
---|
74 | void Calc(const MHMcEnergyImpact &mcsel, const MHMcEnergyImpact &mcall);
|
---|
75 | void Calc(const MHMcEfficiency &heff);
|
---|
76 | */
|
---|
77 | void SetMcAreaRadius(Float_t x) { fMcAreaRadius = x; }
|
---|
78 |
|
---|
79 | ClassDef(MHCollectionArea, 1) // Data Container to calculate Collection Area
|
---|
80 | };
|
---|
81 |
|
---|
82 | #endif
|
---|