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