1 | #ifndef MARS_MJSpectrum
|
---|
2 | #define MARS_MJSpectrum
|
---|
3 |
|
---|
4 | #ifndef MARS_MJob
|
---|
5 | #include <MJob.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | class TH1;
|
---|
9 | class TH1D;
|
---|
10 | class TH2D;
|
---|
11 |
|
---|
12 | class MH3;
|
---|
13 | class MTask;
|
---|
14 | class MParList;
|
---|
15 | class MDataSet;
|
---|
16 | class MHEnergyEst;
|
---|
17 | class MAlphaFitter;
|
---|
18 | class MStatusArray;
|
---|
19 | class MHCollectionArea;
|
---|
20 |
|
---|
21 | class MJSpectrum : public MJob
|
---|
22 | {
|
---|
23 | private:
|
---|
24 | MTask *fCut0;
|
---|
25 | MTask *fCut1;
|
---|
26 | MTask *fCut2;
|
---|
27 | MTask *fCut3;
|
---|
28 | MTask *fEstimateEnergy;
|
---|
29 |
|
---|
30 | Bool_t fRefill;
|
---|
31 | Bool_t fSimpleMode;
|
---|
32 | Bool_t fRawMc;
|
---|
33 |
|
---|
34 | // Read Input
|
---|
35 | Bool_t ReadTask(MTask* &task, const char *name) const;
|
---|
36 | Float_t ReadInput(MParList &plist, TH1D &h1, TH1D &size);
|
---|
37 | Bool_t ReadOrigMCDistribution(const MDataSet &set, TH1 &h) const;
|
---|
38 | Bool_t GetThetaDistribution(TH1D &temp1, TH1D &temp2) const;
|
---|
39 | Bool_t Refill(MParList &plist, TH1D &h) const;
|
---|
40 |
|
---|
41 | // Display Output
|
---|
42 | void PrintSetup(const MAlphaFitter &fit) const;
|
---|
43 | void DisplayResult(const TH2D &mh1) const;
|
---|
44 | Bool_t IntermediateLoop(MParList &plist, MH3 &h1, TH1D &temp1, const MDataSet &set) const;
|
---|
45 | void DisplaySpectrum(MHCollectionArea &area, TH1D &excess, MHEnergyEst &hest, Double_t ontime) const;
|
---|
46 | Bool_t DisplaySize(MParList &plist) const;
|
---|
47 | Bool_t PlotSame(MStatusArray &arr, MParList &plist, const char *name, const char *tab, const char *plot) const;
|
---|
48 |
|
---|
49 | public:
|
---|
50 | MJSpectrum(const char *name=NULL, const char *title=NULL);
|
---|
51 | ~MJSpectrum();
|
---|
52 |
|
---|
53 | Bool_t Process(const MDataSet &set);
|
---|
54 |
|
---|
55 | void EnableRefilling(Bool_t b=kTRUE) { fRefill=b; }
|
---|
56 | void EnableSimpleMode(Bool_t b=kTRUE) { fSimpleMode=b; }
|
---|
57 | void EnableRawMc(Bool_t b=kTRUE) { fRawMc=b; }
|
---|
58 |
|
---|
59 | void SetEnergyEstimator(const MTask *task);
|
---|
60 |
|
---|
61 | ClassDef(MJSpectrum, 0) // Proh'gram to calculate spectrum
|
---|
62 | };
|
---|
63 |
|
---|
64 | #endif
|
---|