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

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