source: trunk/MagicSoft/Mars/mhist/MHOnSubtraction.h@ 2230

Last change on this file since 2230 was 2170, checked in by rwagner, 21 years ago
*** empty log message ***
File size: 2.3 KB
Line 
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
26class TH2D;
27class TPad;
28class TLegend;
29class TString;
30
31class MParList;
32class MHArray;
33
34class MHOnSubtraction : public MH
35{
36private:
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 Bool_t CalcAET(TH3D *histon, MParList *parlist, const Bool_t Draw);
51
52 Bool_t FitHistogram(TH1 &alphaHisto, Double_t &sigLiMa,
53 Double_t &lowerBin, Double_t &upperBin,
54 Float_t signalRegionFactor = 3, const Bool_t draw = kFALSE,
55 TString funcName = "");
56
57 Bool_t ExtractSignal(TH1 &alphaHisto, Double_t &sigLiMa,
58 Double_t &lowerBin, Double_t &upperBin,
59 Double_t &gammaSignal, Double_t &errorGammaSignal,
60 Double_t &off, Double_t &errorOff,
61 Float_t signalRegionFactor = 3, const Bool_t draw = kFALSE,
62 TString funcName = "", TPad *drawPad = 0, Int_t drawBase = 0);
63
64
65
66public:
67 MHOnSubtraction(const char *name=NULL, const char *title=NULL);
68 ~MHOnSubtraction();
69
70 virtual Bool_t SetupFill(const MParList *pliston);
71 virtual Bool_t Fill(const MParContainer *pcont, const Stat_t w);
72
73/* const TH3D *GetHist() { return fH; } */
74/* const TH3D *GetHist() const { return fH; } */
75
76 Double_t CalcSignificance(Double_t nOn, Double_t nOff, Double_t theta);
77
78 void SetExpoSlope(Double_t slope) { fSlope = slope; }
79
80 Bool_t Calc(MParList *parlist, const Bool_t Draw);
81
82 Bool_t Calc(TH3 *histon, MParList *parlist, const Bool_t Draw);
83 Bool_t TH2Calc(TH2 *aeHisto, MParList *parlist, const Bool_t Draw,
84 TPad *drawPad = 0, Int_t drawBase = 0);
85 Bool_t Calc(TH1 *histon, MParList *parlist, const Bool_t Draw,
86 Float_t signalRegion = 0);
87
88 void Draw(Option_t *option="");
89 TObject *DrawClone(Option_t *option="") const;
90
91 ClassDef(MHOnSubtraction, 1) //Extracts gamma signals from pure ON-data
92};
93
94#endif
95
Note: See TracBrowser for help on using the repository browser.