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