source: trunk/Mars/mhflux/MHCollectionArea.h@ 19331

Last change on this file since 19331 was 9359, checked in by tbretz, 16 years ago
*** empty log message ***
File size: 1.7 KB
Line 
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
16class MMcEvt;
17class MParameterD;
18class MMcRunHeader;
19
20class MHCollectionArea : public MH
21{
22private:
23 MMcEvt *fMcEvt; //!
24 MMcRunHeader *fHeader; //!
25 //MParameterD *fEnergy; //!
26
27 TH2D fHistSel;
28 TH2D fHistAll;
29
30 TH1D fHEnergy;
31
32 Float_t fMcAreaRadius; // [m] Radius of circle within which the cores of Corsika events have been uniformly distributed.
33
34 UInt_t fTotalNumSimulatedShowers;
35 UInt_t fCorsikaVersion;
36 Bool_t fAllEvtsTriggered;
37 Bool_t fIsExtern;
38
39 void GetImpactMax();
40 void Calc(TH2D &hsel, TH2D &hall);
41 void CalcEfficiency();
42
43public:
44 MHCollectionArea(const char *name=NULL, const char *title=NULL);
45
46 Bool_t SetupFill(const MParList *pList);
47 Bool_t ReInit(MParList *pList);
48 Int_t Fill(const MParContainer *par, const Stat_t weight=1);
49 Bool_t Finalize();
50
51 void Draw(Option_t *option="");
52 void Paint(Option_t *option="");
53
54 void SetHistAll(const TH2D &h) { h.Copy(fHistAll); fIsExtern=kTRUE; }
55
56 TH2D &GetHistAll() { return fHistAll; }
57 const TH2D &GetHistAll() const { return fHistAll; }
58 const TH2D &GetHistSel() const { return fHistSel; }
59 const TH1D &GetHEnergy() const { return fHEnergy; }
60
61 Double_t GetEntries() const { return fHistAll.Integral(); }
62 Double_t GetCollectionAreaEff() const { return fHEnergy.Integral(); }
63 Double_t GetCollectionAreaAbs() const;
64
65 void SetMcAreaRadius(Float_t x) { fMcAreaRadius = x; }
66
67 ClassDef(MHCollectionArea, 2) // Data Container to calculate Collection Area
68};
69
70#endif
Note: See TracBrowser for help on using the repository browser.