source: tags/Mars-V0.9.4.3/mjobs/MJSpectrum.h

Last change on this file was 7404, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 2.0 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
32 Bool_t fRefill;
33 Bool_t fSimpleMode;
34 Bool_t fRawMc;
35 Bool_t fNoThetaWeights;
36
37 // Read Input
38 Bool_t ReadTask(MTask* &task, const char *name) const;
39 Float_t ReadInput(MParList &plist, TH1D &h1, TH1D &size);
40 Bool_t ReadOrigMCDistribution(const MDataSet &set, TH1 &h, MMcSpectrumWeight &w) const;
41 Bool_t GetThetaDistribution(TH1D &temp1, TH1D &temp2) const;
42 Bool_t Refill(MParList &plist, TH1D &h) const;
43 Bool_t InitWeighting(const MDataSet &set, MMcSpectrumWeight &w) const;
44
45 // Display Output
46 void PrintSetup(const MAlphaFitter &fit) const;
47 void DisplayResult(const TH2D &mh1) const;
48 Bool_t IntermediateLoop(MParList &plist, MH3 &h1, TH1D &temp1, const MDataSet &set, MMcSpectrumWeight &w) const;
49 TArrayD FitSpectrum(TH1D &spectrum) const;
50 TArrayD DisplaySpectrum(MHCollectionArea &area, TH1D &excess, MHEnergyEst &hest, Double_t ontime) const;
51 Bool_t DisplaySize(MParList &plist, Double_t scale) const;
52 Bool_t PlotSame(MStatusArray &arr, MParList &plist, const char *name, const char *tab, const char *plot, Double_t scale) const;
53
54public:
55 MJSpectrum(const char *name=NULL, const char *title=NULL);
56 ~MJSpectrum();
57
58 Bool_t Process(const MDataSet &set);
59
60 void EnableRefilling(Bool_t b=kTRUE) { fRefill=b; }
61 void EnableSimpleMode(Bool_t b=kTRUE) { fSimpleMode=b; }
62 void EnableRawMc(Bool_t b=kTRUE) { fRawMc=b; }
63
64 void SetEnergyEstimator(const MTask *task);
65
66 static TString FormString(const TF1 &f, Byte_t type=0);
67
68 ClassDef(MJSpectrum, 0) // Proh'gram to calculate spectrum
69};
70
71#endif
Note: See TracBrowser for help on using the repository browser.