source: trunk/MagicSoft/Mars/mjobs/MJSpectrum.h@ 8676

Last change on this file since 8676 was 8676, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 2.3 KB
Line 
1#ifndef MARS_MJSpectrum
2#define MARS_MJSpectrum
3
4#ifndef MARS_MJob
5#include <MJob.h>
6#endif
7
8class TF1;
9class TH1;
10class TH1D;
11class TH2D;
12
13class MH3;
14class MTask;
15class MParList;
16class MDataSet;
17class MHEnergyEst;
18class MAlphaFitter;
19class MStatusArray;
20class MHCollectionArea;
21class MMcSpectrumWeight;
22
23class MJSpectrum : public MJob
24{
25private:
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 fForceTheta;
38 Bool_t fRawMc;
39 Bool_t fNoThetaWeights;
40
41 // Read Input
42 Bool_t ReadTask(MTask* &task, const char *name, Bool_t mustexist=kTRUE) const;
43 Float_t ReadInput(MParList &plist, TH1D &h1, TH1D &size);
44 Bool_t ReadOrigMCDistribution(const MDataSet &set, TH1 &h, MMcSpectrumWeight &w) const;
45 Bool_t GetThetaDistribution(TH1D &temp1, TH1D &temp2) const;
46 Bool_t Refill(MParList &plist, TH1D &h) /*const*/;
47 Bool_t InitWeighting(const MDataSet &set, MMcSpectrumWeight &w) const;
48
49 // Display Output
50 void PrintSetup(const MAlphaFitter &fit) const;
51 Bool_t DisplayResult(const TH2D &mh1) const;
52 Bool_t IntermediateLoop(MParList &plist, MH3 &h1, TH1D &temp1, const MDataSet &set, MMcSpectrumWeight &w) const;
53 TArrayD FitSpectrum(TH1D &spectrum) const;
54 TArrayD DisplaySpectrum(MHCollectionArea &area, TH1D &excess, MHEnergyEst &hest, Double_t ontime) const;
55 Bool_t DisplaySize(MParList &plist, Double_t scale) const;
56 void DisplayCutEfficiency(const MHCollectionArea &area0, const MHCollectionArea &area1) const;
57 Bool_t PlotSame(MStatusArray &arr, MParList &plist, const char *name, const char *tab, const char *plot, Double_t scale) const;
58
59public:
60 MJSpectrum(const char *name=NULL, const char *title=NULL);
61 ~MJSpectrum();
62
63 Bool_t Process(const MDataSet &set);
64
65 void EnableRefilling(Bool_t b=kTRUE) { fRefill=b; }
66 //void EnableSimpleMode(Bool_t b=kTRUE) { fSimpleMode=b; }
67 void EnableRawMc(Bool_t b=kTRUE) { fRawMc=b; }
68 void ForceTheta(Bool_t b=kTRUE) { fForceTheta=b; }
69
70 void SetEnergyEstimator(const MTask *task);
71
72 static TString FormString(const TF1 &f, Byte_t type=0);
73
74 ClassDef(MJSpectrum, 0) // Proh'gram to calculate spectrum
75};
76
77#endif
Note: See TracBrowser for help on using the repository browser.