source: trunk/MagicSoft/Mars/mhistmc/MHMcCollectionArea.h@ 8038

Last change on this file since 8038 was 6491, checked in by moralejo, 20 years ago
*** empty log message ***
File size: 1.7 KB
Line 
1#ifndef MARS_MHMcCollectionArea
2#define MARS_MHMcCollectionArea
3
4#ifndef MARS_MH
5#include "MH.h"
6#endif
7
8#include "MBinning.h"
9#include "TF1.h"
10
11class TH1D;
12class TH2D;
13class TH3D;
14
15//
16// Version 2:
17//
18// Now all histograms are saved with the object. Added members
19// fImpactMax, fImpactBins, fMinEvents
20//
21
22class MHMcCollectionArea : public MH
23{
24private:
25 TH3D *fHistAll; // all simulated showers
26 TH3D *fHistSel; // the selected showers
27 TH2D *fHistCol; // the collection area in fine bins
28 TH2D *fHistColCoarse; // the coll. area in coarse bins
29
30 Int_t fImpactBins; // number of bins in i.p. for histograms
31 Float_t fImpactMax; // [m] Maximum impact parameter for histograms
32
33 Int_t fMinEvents;
34 // minimum number of events in each of the "fine bins" of fHistAll
35 // so that the bin is used in the averaging for the coarse bins.
36
37 void Calc(TH3D &hsel, TH3D &hall);
38
39public:
40 MHMcCollectionArea(const char *name=NULL, const char *title=NULL);
41 ~MHMcCollectionArea();
42
43 void FillAll(Double_t energy, Double_t radius, Double_t theta);
44 void FillSel(Double_t energy, Double_t radius, Double_t theta);
45
46 const TH2D *GetHist() const { return fHistCol; }
47 const TH2D *GetHistCoarse() const { return fHistColCoarse; }
48 const TH3D *GetHistAll() const { return fHistAll; }
49 const TH3D *GetHistSel() const { return fHistSel; }
50
51 void SetBinnings(const MBinning &binsEnergy, const MBinning &binsTheta);
52 void SetCoarseBinnings(const MBinning &binsEnergy, const MBinning &binsTheta);
53
54 void Draw(Option_t *option="");
55
56 void Calc(TF1 *spectrum);
57
58 ClassDef(MHMcCollectionArea, 2) // Data Container to store Collection Area
59 };
60
61#endif
Note: See TracBrowser for help on using the repository browser.