1 | #ifndef MARS_MHFlux
|
---|
2 | #define MARS_MHFlux
|
---|
3 |
|
---|
4 | #ifndef MARS_MH
|
---|
5 | #include "MH.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MParContainer
|
---|
9 | #include "MParContainer.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef ROOT_TH1
|
---|
13 | #include "TH1.h"
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #ifndef ROOT_TH2
|
---|
17 | #include "TH2.h"
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | class TH2D;
|
---|
21 |
|
---|
22 | // base class MH is used because it defines "MakeDefCanvas"
|
---|
23 | // if base class MH is used one has to define the member function Fill
|
---|
24 | // because in MH Fill is set to zero
|
---|
25 | class MHFlux : public MH
|
---|
26 | {
|
---|
27 | private:
|
---|
28 | //const char *fVarname;
|
---|
29 | //const char *fUnit;
|
---|
30 |
|
---|
31 | TString fVarname;
|
---|
32 | TString fUnit;
|
---|
33 |
|
---|
34 | TH2D fHOrig; // original distribution of E-est
|
---|
35 | TH2D fHUnfold; // unfolded distribution of E-unfold
|
---|
36 | TH2D fHFlux; // absolute differential photon flux versus E-unfold
|
---|
37 | // all these plots for different bins of the variable (Theta or time)
|
---|
38 |
|
---|
39 | public:
|
---|
40 | MHFlux(const TH2D &h2d, const Bool_t Draw,
|
---|
41 | // const char *varname=NULL, const char *unit=NULL);
|
---|
42 | const TString varname, const TString unit);
|
---|
43 |
|
---|
44 | Bool_t Fill(const MParContainer *par);
|
---|
45 |
|
---|
46 | void Unfold(const Bool_t Draw);
|
---|
47 | void CalcFlux(const TH1D *teff, const TProfile *thetabar,
|
---|
48 | const TH2D *aeff, const Bool_t Draw);
|
---|
49 |
|
---|
50 | void Draw(Option_t *option="");
|
---|
51 | TObject *DrawClone(Option_t *option="") const;
|
---|
52 |
|
---|
53 | const TH2D *GetHOrig() { return &fHOrig; }
|
---|
54 | const TH2D *GetHUnfold() { return &fHUnfold; }
|
---|
55 | const TH2D *GetHFlux() { return &fHFlux; }
|
---|
56 |
|
---|
57 | void Parab(double x1, double x2, double x3,
|
---|
58 | double y1, double y2, double y3,
|
---|
59 | double *a, double *b, double *c, int *errflag);
|
---|
60 |
|
---|
61 | ClassDef(MHFlux, 1) //2D-plots (original, unfolded, flux)
|
---|
62 | };
|
---|
63 |
|
---|
64 | #endif
|
---|
65 |
|
---|
66 |
|
---|
67 |
|
---|
68 |
|
---|
69 |
|
---|
70 |
|
---|
71 |
|
---|
72 |
|
---|
73 |
|
---|
74 |
|
---|
75 |
|
---|
76 |
|
---|