| 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 | class MMcSpectrumWeight;
|
|---|
| 21 |
|
|---|
| 22 | class MJSpectrum : public MJob
|
|---|
| 23 | {
|
|---|
| 24 | private:
|
|---|
| 25 | MTask *fCut0;
|
|---|
| 26 | MTask *fCut1;
|
|---|
| 27 | MTask *fCut2;
|
|---|
| 28 | MTask *fCut3;
|
|---|
| 29 | MTask *fEstimateEnergy;
|
|---|
| 30 |
|
|---|
| 31 | Bool_t fRefill;
|
|---|
| 32 | Bool_t fSimpleMode;
|
|---|
| 33 | Bool_t fRawMc;
|
|---|
| 34 | Bool_t fNoThetaWeights;
|
|---|
| 35 |
|
|---|
| 36 | // Read Input
|
|---|
| 37 | Bool_t ReadTask(MTask* &task, const char *name) const;
|
|---|
| 38 | Float_t ReadInput(MParList &plist, TH1D &h1, TH1D &size);
|
|---|
| 39 | Bool_t ReadOrigMCDistribution(const MDataSet &set, TH1 &h, MMcSpectrumWeight &w) const;
|
|---|
| 40 | Bool_t GetThetaDistribution(TH1D &temp1, TH1D &temp2) const;
|
|---|
| 41 | Bool_t Refill(MParList &plist, TH1D &h) const;
|
|---|
| 42 | Bool_t InitWeighting(const MDataSet &set, MMcSpectrumWeight &w) const;
|
|---|
| 43 |
|
|---|
| 44 | // Display Output
|
|---|
| 45 | void PrintSetup(const MAlphaFitter &fit) const;
|
|---|
| 46 | void DisplayResult(const TH2D &mh1) const;
|
|---|
| 47 | Bool_t IntermediateLoop(MParList &plist, MH3 &h1, TH1D &temp1, const MDataSet &set, MMcSpectrumWeight &w) const;
|
|---|
| 48 | TArrayD DisplaySpectrum(MHCollectionArea &area, TH1D &excess, MHEnergyEst &hest, Double_t ontime) const;
|
|---|
| 49 | Bool_t DisplaySize(MParList &plist, Double_t scale) const;
|
|---|
| 50 | Bool_t PlotSame(MStatusArray &arr, MParList &plist, const char *name, const char *tab, const char *plot, Double_t scale) const;
|
|---|
| 51 |
|
|---|
| 52 | public:
|
|---|
| 53 | MJSpectrum(const char *name=NULL, const char *title=NULL);
|
|---|
| 54 | ~MJSpectrum();
|
|---|
| 55 |
|
|---|
| 56 | Bool_t Process(const MDataSet &set);
|
|---|
| 57 |
|
|---|
| 58 | void EnableRefilling(Bool_t b=kTRUE) { fRefill=b; }
|
|---|
| 59 | void EnableSimpleMode(Bool_t b=kTRUE) { fSimpleMode=b; }
|
|---|
| 60 | void EnableRawMc(Bool_t b=kTRUE) { fRawMc=b; }
|
|---|
| 61 |
|
|---|
| 62 | void SetEnergyEstimator(const MTask *task);
|
|---|
| 63 |
|
|---|
| 64 | ClassDef(MJSpectrum, 0) // Proh'gram to calculate spectrum
|
|---|
| 65 | };
|
|---|
| 66 |
|
|---|
| 67 | #endif
|
|---|