| 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 | class MHGamma;
|
|---|
| 23 | class MHEffOnTime;
|
|---|
| 24 | class 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
|
|---|
| 29 | class MHFlux : public MH
|
|---|
| 30 | {
|
|---|
| 31 | private:
|
|---|
| 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 |
|
|---|
| 48 | public:
|
|---|
| 49 | MHFlux(const TH2D &h2d, const TString varname, const TString unit);
|
|---|
| 50 | MHFlux(const MHGamma &h2d, const TString varname, const TString unit);
|
|---|
| 51 |
|
|---|
| 52 | void Unfold();
|
|---|
| 53 | void CalcFlux(const TH1D *teff, const TProfile *thetabar,
|
|---|
| 54 | const TH2D *aeff);
|
|---|
| 55 |
|
|---|
| 56 | void CalcFlux(const MHEffOnTime &teff,
|
|---|
| 57 | const MHThetabarTheta &thetabar,
|
|---|
| 58 | const TH2D *aeff);
|
|---|
| 59 |
|
|---|
| 60 | void Draw(Option_t *option="");
|
|---|
| 61 |
|
|---|
| 62 | void DrawFluxProjectionX(Option_t *opt="") const;
|
|---|
| 63 | void DrawOrigProjectionX(Option_t *opt="") const;
|
|---|
| 64 |
|
|---|
| 65 | const TH2D *GetHOrig() { return &fHOrig; }
|
|---|
| 66 | const TH2D *GetHUnfold() { return &fHUnfold; }
|
|---|
| 67 | const TH2D *GetHFlux() { return &fHFlux; }
|
|---|
| 68 |
|
|---|
| 69 | static Bool_t Parab(double x1, double x2, double x3,
|
|---|
| 70 | double y1, double y2, double y3,
|
|---|
| 71 | double *a, double *b, double *c);
|
|---|
| 72 |
|
|---|
| 73 | static Double_t Parab(double x1, double x2, double x3,
|
|---|
| 74 | double y1, double y2, double y3,
|
|---|
| 75 | double val);
|
|---|
| 76 |
|
|---|
| 77 | ClassDef(MHFlux, 0) //2D-plots (original, unfolded, flux)
|
|---|
| 78 | };
|
|---|
| 79 |
|
|---|
| 80 | #endif
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
|
|---|
| 90 |
|
|---|
| 91 |
|
|---|
| 92 |
|
|---|