source: trunk/MagicSoft/Mars/mhist/MHFlux.h@ 1682

Last change on this file since 1682 was 1668, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 2.5 KB
Line 
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
20class TH2D;
21
22class MHGamma;
23class MHEffOnTime;
24class MHThetabarTheta;
25
26// base class MH is used because it defines "MakeDefCanvas"
27// if base class MH is used one has to define the member function Fill
28// because in MH Fill is set to zero
29class MHFlux : public MH
30{
31private:
32
33 TString fVarname;
34 TString fUnit;
35
36 TH2D fHOrig; // original distribution of E-est
37 TH2D fHUnfold; // unfolded distribution of E-unfold
38 TH2D fHFlux; // absolute differential photon flux versus E-unfold
39 // all these plots for different bins of the variable (Theta or time)
40
41 void CalcEffCol(const TAxis &axex, TH2D &aeff, Int_t n, Double_t aeffbar[], Double_t daeffbar[]);
42 Double_t ParabInterpolCos(const TAxis &axe, const TH2D *aeff, Int_t j, Int_t k3, Double_t val) const;
43 void FindBins(const TAxis &axe, const Double_t bar, Int_t &k3, Int_t &k0) const;
44 void CalcAbsGammaFlux(const TH1D &teff, const TH2D &fHAeff);
45 Double_t ParabInterpolLog(const TAxis &axe, Int_t j,
46 Double_t y[], Double_t Ebar) const;
47
48public:
49 MHFlux(const TH2D &h2d, const TString varname, const TString unit);
50 MHFlux(const MHGamma &h2d, const TString varname, const TString unit);
51
52 Bool_t Fill(const MParContainer *par);
53
54 void Unfold();
55 void CalcFlux(const TH1D *teff, const TProfile *thetabar,
56 const TH2D *aeff);
57
58 void CalcFlux(const MHEffOnTime &teff,
59 const MHThetabarTheta &thetabar,
60 const TH2D *aeff);
61
62 void Draw(Option_t *option="");
63 TObject *DrawClone(Option_t *option="") const;
64 void DrawFluxProjectionX(Option_t *opt="") const;
65 void DrawOrigProjectionX(Option_t *opt="") const;
66
67 const TH2D *GetHOrig() { return &fHOrig; }
68 const TH2D *GetHUnfold() { return &fHUnfold; }
69 const TH2D *GetHFlux() { return &fHFlux; }
70
71 static Bool_t Parab(double x1, double x2, double x3,
72 double y1, double y2, double y3,
73 double *a, double *b, double *c);
74
75 static Double_t Parab(double x1, double x2, double x3,
76 double y1, double y2, double y3,
77 double val);
78
79 ClassDef(MHFlux, 0) //2D-plots (original, unfolded, flux)
80};
81
82#endif
83
84
85
86
87
88
89
90
91
92
93
94
Note: See TracBrowser for help on using the repository browser.