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

Last change on this file since 1575 was 1573, checked in by wittek, 22 years ago
change type of fVarname and fUnit from *char to TString
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 //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
39public:
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
Note: See TracBrowser for help on using the repository browser.