1 | #ifndef MARS_MHOnSubtraction
|
---|
2 | #define MARS_MHOnSubtraction
|
---|
3 |
|
---|
4 | #ifndef MARS_MH
|
---|
5 | #include "MH.h"
|
---|
6 | #endif
|
---|
7 | #ifndef ROOT_TH1
|
---|
8 | #include "TH1.h"
|
---|
9 | #endif
|
---|
10 | #ifndef ROOT_TH3
|
---|
11 | #include "TH3.h"
|
---|
12 | #endif
|
---|
13 | #ifndef ROOT_TGraph
|
---|
14 | #include "TGraph.h"
|
---|
15 | #endif
|
---|
16 | #ifndef ROOT_TPaveLabel
|
---|
17 | #include "TPaveLabel.h"
|
---|
18 | #endif
|
---|
19 | #ifndef ROOT_TFile
|
---|
20 | #include "TFile.h"
|
---|
21 | #endif
|
---|
22 |
|
---|
23 |
|
---|
24 |
|
---|
25 |
|
---|
26 | class TH2D;
|
---|
27 | class TPad;
|
---|
28 | class TLegend;
|
---|
29 | class TString;
|
---|
30 |
|
---|
31 | class MParList;
|
---|
32 | class MHArray;
|
---|
33 |
|
---|
34 | class MHOnSubtraction : public MH
|
---|
35 | {
|
---|
36 | private:
|
---|
37 | TString fHistogramType;
|
---|
38 | TH1D* fChiSquareHisto;
|
---|
39 | TH1D* fSignificanceHisto;
|
---|
40 | TH1D* fSummedAlphaPlots;
|
---|
41 | MHArray *fThetaHistoArray;
|
---|
42 | TLegend *fThetaLegend;
|
---|
43 | Double_t fMaxSignif;
|
---|
44 | Double_t fMaxRedChiSq;
|
---|
45 | Double_t fSlope; // slope for exponential fit
|
---|
46 | Int_t fThetaBin;
|
---|
47 | Int_t fSigniPlotIndex;
|
---|
48 | Int_t fSigniPlotColor;
|
---|
49 |
|
---|
50 | Double_t fSignificance;
|
---|
51 |
|
---|
52 | Bool_t CalcAET(TH3D *histon, MParList *parlist, const Bool_t Draw);
|
---|
53 |
|
---|
54 | Bool_t FitHistogram(TH1 &alphaHisto, Double_t &sigLiMa,
|
---|
55 | Double_t &lowerBin, Double_t &upperBin,
|
---|
56 | Float_t signalRegionFactor = 3, const Bool_t draw = kFALSE,
|
---|
57 | TString funcName = "");
|
---|
58 |
|
---|
59 | Bool_t ExtractSignal(TH1 &alphaHisto, Double_t &sigLiMa,
|
---|
60 | Double_t &lowerBin, Double_t &upperBin,
|
---|
61 | Double_t &gammaSignal, Double_t &errorGammaSignal,
|
---|
62 | Double_t &off, Double_t &errorOff,
|
---|
63 | Float_t signalRegionFactor = 3, const Bool_t draw = kFALSE,
|
---|
64 | TString funcName = "", TPad *drawPad = 0, Int_t drawBase = 0);
|
---|
65 |
|
---|
66 |
|
---|
67 |
|
---|
68 | public:
|
---|
69 | MHOnSubtraction(const char *name=NULL, const char *title=NULL);
|
---|
70 | ~MHOnSubtraction();
|
---|
71 |
|
---|
72 | virtual Bool_t SetupFill(const MParList *pliston);
|
---|
73 | virtual Bool_t Fill(const MParContainer *pcont, const Stat_t w);
|
---|
74 |
|
---|
75 | /* const TH3D *GetHist() { return fH; } */
|
---|
76 | /* const TH3D *GetHist() const { return fH; } */
|
---|
77 |
|
---|
78 | Double_t CalcSignificance(Double_t nOn, Double_t nOff, Double_t theta);
|
---|
79 | Double_t GetSignificance() { return fSignificance; };
|
---|
80 |
|
---|
81 | void SetExpoSlope(Double_t slope) { fSlope = slope; }
|
---|
82 |
|
---|
83 | Bool_t Calc(MParList *parlist, const Bool_t Draw);
|
---|
84 |
|
---|
85 | Bool_t Calc(TH3 *histon, MParList *parlist, const Bool_t Draw);
|
---|
86 | Bool_t TH2Calc(TH2 *aeHisto, MParList *parlist, const Bool_t Draw,
|
---|
87 | TPad *drawPad = 0, Int_t drawBase = 0);
|
---|
88 | Bool_t Calc(TH1 *histon, MParList *parlist, const Bool_t Draw,
|
---|
89 | Float_t signalRegion = 0);
|
---|
90 |
|
---|
91 | void Draw(Option_t *option="");
|
---|
92 | TObject *DrawClone(Option_t *option="") const;
|
---|
93 |
|
---|
94 | ClassDef(MHOnSubtraction, 1) //Extracts gamma signals from pure ON-data
|
---|
95 | };
|
---|
96 |
|
---|
97 | #endif
|
---|
98 |
|
---|