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

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