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

Last change on this file since 8587 was 8173, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 2.2 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 *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
56public:
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
Note: See TracBrowser for help on using the repository browser.