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();
|
---|
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;
|
---|
61 |
|
---|
62 | void SetMcAreaRadius(Float_t x) { fMcAreaRadius = x; }
|
---|
63 |
|
---|
64 | ClassDef(MHCollectionArea, 2) // Data Container to calculate Collection Area
|
---|
65 | };
|
---|
66 |
|
---|
67 | #endif
|
---|