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 | TH1F* fHBlindPixelCharge; //-> Histogram with the single Phe spectrum
|
---|
35 | TH1F* fHBlindPixelErrCharge; //-> Variance of summed FADC slices
|
---|
36 | TH1I* fHBlindPixelTime; //-> Variance of summed FADC slices
|
---|
37 | TH1I* fHBlindPixelChargevsN; //-> Summed Charge vs. Event Nr.
|
---|
38 |
|
---|
39 | TF1 *fSinglePheFit;
|
---|
40 | TF1 *fTimeGausFit;
|
---|
41 |
|
---|
42 | Axis_t fBlindPixelChargefirst;
|
---|
43 | Axis_t fBlindPixelChargelast;
|
---|
44 | Int_t fBlindPixelChargenbins;
|
---|
45 |
|
---|
46 | Axis_t fErrBlindPixelChargefirst;
|
---|
47 | Axis_t fErrBlindPixelChargelast;
|
---|
48 | Int_t fErrBlindPixelChargenbins;
|
---|
49 |
|
---|
50 | void ResetBin(Int_t i);
|
---|
51 | void DrawLegend();
|
---|
52 |
|
---|
53 | TPaveText *fFitLegend;
|
---|
54 | Bool_t fFitOK;
|
---|
55 |
|
---|
56 | BlindPixelFitFunc 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 fMeanTime;
|
---|
76 | Double_t fMeanTimeErr;
|
---|
77 | Double_t fSigmaTime;
|
---|
78 | Double_t fSigmaTimeErr;
|
---|
79 |
|
---|
80 | public:
|
---|
81 |
|
---|
82 | MHCalibrationBlindPixel(const char *name=NULL, const char *title=NULL);
|
---|
83 | ~MHCalibrationBlindPixel();
|
---|
84 |
|
---|
85 | Bool_t FillBlindPixelCharge(Float_t q) { return fHBlindPixelCharge->Fill(q) > -1; }
|
---|
86 | Bool_t FillErrBlindPixelCharge(Float_t errq) { return fHBlindPixelErrCharge->Fill(errq) > -1; }
|
---|
87 | Bool_t FillBlindPixelTime(Int_t t) { return fHBlindPixelTime->Fill(t) > -1; }
|
---|
88 | Bool_t FillBlindPixelChargevsN(Stat_t rq, Int_t t) { return fHBlindPixelChargevsN->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 GetMeanTime() const { return fMeanTime; }
|
---|
107 | const Double_t GetMeanTimeErr() const { return fMeanTimeErr; }
|
---|
108 | const Double_t GetSigmaTime() const { return fSigmaTime; }
|
---|
109 | const Double_t GetSigmaTimeErr() const { return fSigmaTimeErr; }
|
---|
110 |
|
---|
111 | const TH1F *GetHErrCharge() { return fHBlindPixelErrCharge; }
|
---|
112 | const TH1F *GetHErrCharge() const { return fHBlindPixelErrCharge; }
|
---|
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 FitTime(Axis_t rmin=0., Axis_t rmax=0.,Option_t *opt="R0+");
|
---|
122 |
|
---|
123 | void ChangeFitFunc(BlindPixelFitFunc fitfunc, Int_t par=5);
|
---|
124 |
|
---|
125 | void CutAllEdges();
|
---|
126 | void Draw(Option_t *option="");
|
---|
127 |
|
---|
128 | ClassDef(MHCalibrationBlindPixel, 1)
|
---|
129 | };
|
---|
130 |
|
---|
131 | #endif /* MARS_MHCalibrationBlindPixel */
|
---|