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

Last change on this file since 7333 was 7148, 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 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
52public:
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
Note: See TracBrowser for help on using the repository browser.