1 | #ifndef MARS_MHCalibrationBlindPixel
|
---|
2 | #define MARS_MHCalibrationBlindPixel
|
---|
3 |
|
---|
4 | #ifndef MARS_MH
|
---|
5 | #include "MH.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef MARS_MHCalibrationConfig
|
---|
9 | #include "MHCalibrationConfig.h"
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef ROOT_TH1
|
---|
13 | #include "TH1.h"
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #ifndef ROOT_TH1F
|
---|
17 | #include "TH1F.h"
|
---|
18 | #endif
|
---|
19 |
|
---|
20 | #ifndef ROOT_TF1
|
---|
21 | #include "TF1.h"
|
---|
22 | #endif
|
---|
23 |
|
---|
24 | #ifndef ROOT_TPaveText
|
---|
25 | #include "TPaveText.h"
|
---|
26 | #endif
|
---|
27 |
|
---|
28 | class TMath;
|
---|
29 | class MParList;
|
---|
30 | class MHCalibrationBlindPixel : public MH
|
---|
31 | {
|
---|
32 | private:
|
---|
33 |
|
---|
34 | TH1I* fHBPQ; //-> Histogram with the single Phe spectrum
|
---|
35 | TH1F* fHBPErrQ; //-> Variance of summed FADC slices
|
---|
36 | TH1I* fHBPT; //-> Variance of summed FADC slices
|
---|
37 | TH1I* fHBPQvsN; //-> Summed Charge vs. Event Nr.
|
---|
38 |
|
---|
39 | TF1 *fSinglePheFit;
|
---|
40 | TF1 *fTimeGausFit;
|
---|
41 |
|
---|
42 | Axis_t fBPQfirst;
|
---|
43 | Axis_t fBPQlast;
|
---|
44 | Int_t fBPQnbins;
|
---|
45 |
|
---|
46 | Axis_t fErrBPQfirst;
|
---|
47 | Axis_t fErrBPQlast;
|
---|
48 | Int_t fErrBPQnbins;
|
---|
49 |
|
---|
50 | void ResetBin(Int_t i);
|
---|
51 | void DrawLegend();
|
---|
52 |
|
---|
53 | TPaveText *fFitLegend;
|
---|
54 | Bool_t fFitOK;
|
---|
55 |
|
---|
56 | BPFitFunc fgSinglePheFitFunc; // In the beginning,
|
---|
57 | Int_t fgSinglePheFitNPar; // we want to be flexible using different functions
|
---|
58 |
|
---|
59 | Double_t fLambda;
|
---|
60 | Double_t fMu0;
|
---|
61 | Double_t fMu1;
|
---|
62 | Double_t fSigma0;
|
---|
63 | Double_t fSigma1;
|
---|
64 |
|
---|
65 | Double_t fLambdaErr;
|
---|
66 | Double_t fMu0Err;
|
---|
67 | Double_t fMu1Err;
|
---|
68 | Double_t fSigma0Err;
|
---|
69 | Double_t fSigma1Err;
|
---|
70 |
|
---|
71 | Double_t fChisquare;
|
---|
72 | Double_t fProb;
|
---|
73 | Int_t fNdf;
|
---|
74 |
|
---|
75 | Double_t fMeanT;
|
---|
76 | Double_t fMeanTErr;
|
---|
77 | Double_t fSigmaT;
|
---|
78 | Double_t fSigmaTErr;
|
---|
79 |
|
---|
80 | public:
|
---|
81 |
|
---|
82 | MHCalibrationBlindPixel(const char *name=NULL, const char *title=NULL);
|
---|
83 | ~MHCalibrationBlindPixel();
|
---|
84 |
|
---|
85 | Bool_t FillBPQ(Int_t q) { return fHBPQ->Fill(q) > -1; }
|
---|
86 | Bool_t FillErrBPQ(Float_t errq) { return fHBPErrQ->Fill(errq) > -1; }
|
---|
87 | Bool_t FillBPT(Int_t t) { return fHBPT->Fill(t) > -1; }
|
---|
88 | Bool_t FillBPQvsN(Stat_t rq, Int_t t) { return fHBPQvsN->Fill(t,rq) > -1; }
|
---|
89 |
|
---|
90 | const Double_t GetLambda() const { return fLambda; }
|
---|
91 | const Double_t GetMu0() const { return fMu0; }
|
---|
92 | const Double_t GetMu1() const { return fMu1; }
|
---|
93 | const Double_t GetSigma0() const { return fSigma0; }
|
---|
94 | const Double_t GetSigma1() const { return fSigma1; }
|
---|
95 |
|
---|
96 | const Double_t GetLambdaErr() const { return fLambdaErr; }
|
---|
97 | const Double_t GetMu0Err() const { return fMu0Err; }
|
---|
98 | const Double_t GetMu1Err() const { return fMu1Err; }
|
---|
99 | const Double_t GetSigma0Err() const { return fSigma0Err; }
|
---|
100 | const Double_t GetSigma1Err() const { return fSigma1Err; }
|
---|
101 |
|
---|
102 | const Double_t GetChiSquare() const { return fChisquare; }
|
---|
103 | const Double_t GetProb() const { return fProb; }
|
---|
104 | const Int_t GetNdf() const { return fNdf; }
|
---|
105 |
|
---|
106 | const Double_t GetMeanT() const { return fMeanT; }
|
---|
107 | const Double_t GetMeanTErr() const { return fMeanTErr; }
|
---|
108 | const Double_t GetSigmaT() const { return fSigmaT; }
|
---|
109 | const Double_t GetSigmaTErr() const { return fSigmaTErr; }
|
---|
110 |
|
---|
111 | const TH1F *GetHErrQ() { return fHBPErrQ; }
|
---|
112 | const TH1F *GetHErrQ() const { return fHBPErrQ; }
|
---|
113 |
|
---|
114 | Bool_t SimulateSinglePhe(Double_t lambda,
|
---|
115 | Double_t mu0,
|
---|
116 | Double_t mu1,
|
---|
117 | Double_t sigma0,
|
---|
118 | Double_t sigma1);
|
---|
119 |
|
---|
120 | Bool_t FitSinglePhe(Axis_t rmin=0, Axis_t rmax=0, Option_t *opt="R0+");
|
---|
121 | Bool_t FitT(Axis_t rmin=0., Axis_t rmax=0.,Option_t *opt="R0+");
|
---|
122 |
|
---|
123 | void ChangeFitFunc(BPFitFunc fitfunc, Int_t par=5);
|
---|
124 |
|
---|
125 |
|
---|
126 | void CutAllEdges();
|
---|
127 | void Draw(Option_t *option="");
|
---|
128 |
|
---|
129 | ClassDef(MHCalibrationBlindPixel, 0)
|
---|
130 | };
|
---|
131 |
|
---|
132 | #endif /* MARS_MHCalibrationBlindPixel */
|
---|