source: tags/Mars-V0.8/mhist/MHFlux.h

Last change on this file was 1604, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.6 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
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
25class MHFlux : public MH
26{
27private:
28
29 TString fVarname;
30 TString fUnit;
31
32 TH2D fHOrig; // original distribution of E-est
33 TH2D fHUnfold; // unfolded distribution of E-unfold
34 TH2D fHFlux; // absolute differential photon flux versus E-unfold
35 // all these plots for different bins of the variable (Theta or time)
36
37public:
38 MHFlux(const TH2D &h2d, const Bool_t Draw,
39 const TString varname, const TString unit);
40
41 Bool_t Fill(const MParContainer *par);
42
43 void Unfold(const Bool_t Draw);
44 void CalcFlux(const TH1D *teff, const TProfile *thetabar,
45 const TH2D *aeff, const Bool_t Draw);
46
47 void Draw(Option_t *option="");
48 TObject *DrawClone(Option_t *option="") const;
49
50 const TH2D *GetHOrig() { return &fHOrig; }
51 const TH2D *GetHUnfold() { return &fHUnfold; }
52 const TH2D *GetHFlux() { return &fHFlux; }
53
54 static Bool_t Parab(double x1, double x2, double x3,
55 double y1, double y2, double y3,
56 double *a, double *b, double *c);
57
58 ClassDef(MHFlux, 1) //2D-plots (original, unfolded, flux)
59};
60
61#endif
62
63
64
65
66
67
68
69
70
71
72
73
Note: See TracBrowser for help on using the repository browser.