source: trunk/MagicSoft/Mars/mhflux/MHCollectionArea.h@ 7193

Last change on this file since 7193 was 7094, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 2.0 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;
18
19class MHCollectionArea : public MH
20{
21private:
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
40public:
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
Note: See TracBrowser for help on using the repository browser.