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 | TH1I* fHBlindPixelTime; //-> Variance of summed FADC slices
|
---|
36 | TH1I* fHBlindPixelChargevsN; //-> Summed Charge vs. Event Nr.
|
---|
37 |
|
---|
38 | TF1 *fSinglePheFit;
|
---|
39 | TF1 *fTimeGausFit;
|
---|
40 | TF1 *fSinglePhePedFit;
|
---|
41 |
|
---|
42 | Axis_t fBlindPixelChargefirst;
|
---|
43 | Axis_t fBlindPixelChargelast;
|
---|
44 | Int_t fBlindPixelChargenbins;
|
---|
45 |
|
---|
46 | void ResetBin(Int_t i);
|
---|
47 | void DrawLegend();
|
---|
48 |
|
---|
49 | TPaveText *fFitLegend;
|
---|
50 | Bool_t fFitOK;
|
---|
51 |
|
---|
52 | BlindPixelFitFunc fgSinglePheFitFunc; // In the beginning,
|
---|
53 | Int_t fgSinglePheFitNPar; // we want to be flexible using different functions
|
---|
54 |
|
---|
55 | Double_t fLambda;
|
---|
56 | Double_t fMu0;
|
---|
57 | Double_t fMu1;
|
---|
58 | Double_t fSigma0;
|
---|
59 | Double_t fSigma1;
|
---|
60 |
|
---|
61 | Double_t fLambdaErr;
|
---|
62 | Double_t fMu0Err;
|
---|
63 | Double_t fMu1Err;
|
---|
64 | Double_t fSigma0Err;
|
---|
65 | Double_t fSigma1Err;
|
---|
66 |
|
---|
67 | Double_t fChisquare;
|
---|
68 | Double_t fProb;
|
---|
69 | Int_t fNdf;
|
---|
70 |
|
---|
71 | Double_t fMeanTime;
|
---|
72 | Double_t fMeanTimeErr;
|
---|
73 | Double_t fSigmaTime;
|
---|
74 | Double_t fSigmaTimeErr;
|
---|
75 |
|
---|
76 | Double_t fLambdaCheck;
|
---|
77 | Double_t fLambdaCheckErr;
|
---|
78 |
|
---|
79 | public:
|
---|
80 |
|
---|
81 | MHCalibrationBlindPixel(const char *name=NULL, const char *title=NULL);
|
---|
82 | ~MHCalibrationBlindPixel();
|
---|
83 |
|
---|
84 | Bool_t FillBlindPixelCharge(Float_t q) { return fHBlindPixelCharge->Fill(q) > -1; }
|
---|
85 | Bool_t FillBlindPixelTime(Int_t t) { return fHBlindPixelTime->Fill(t) > -1; }
|
---|
86 | Bool_t FillBlindPixelChargevsN(Stat_t rq, Int_t t) { return fHBlindPixelChargevsN->Fill(t,rq) > -1; }
|
---|
87 |
|
---|
88 | const Double_t GetLambda() const { return fLambda; }
|
---|
89 | const Double_t GetLambdaCheck() const { return fLambdaCheck; }
|
---|
90 | const Double_t GetMu0() const { return fMu0; }
|
---|
91 | const Double_t GetMu1() const { return fMu1; }
|
---|
92 | const Double_t GetSigma0() const { return fSigma0; }
|
---|
93 | const Double_t GetSigma1() const { return fSigma1; }
|
---|
94 |
|
---|
95 | const Double_t GetLambdaErr() const { return fLambdaErr; }
|
---|
96 | const Double_t GetLambdaCheckErr() const { return fLambdaCheckErr; }
|
---|
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 | Bool_t SimulateSinglePhe(Double_t lambda,
|
---|
112 | Double_t mu0,
|
---|
113 | Double_t mu1,
|
---|
114 | Double_t sigma0,
|
---|
115 | Double_t sigma1);
|
---|
116 |
|
---|
117 | Bool_t FitSinglePhe(Axis_t rmin=0, Axis_t rmax=0, Option_t *opt="RL0+Q");
|
---|
118 | Bool_t FitTime(Axis_t rmin=0., Axis_t rmax=0.,Option_t *opt="R0+Q");
|
---|
119 |
|
---|
120 | void ChangeFitFunc(BlindPixelFitFunc fitfunc, Int_t par=5);
|
---|
121 |
|
---|
122 | void CutAllEdges();
|
---|
123 | void Draw(Option_t *option="");
|
---|
124 |
|
---|
125 | Bool_t IsFitOK() { return fFitOK; }
|
---|
126 |
|
---|
127 | ClassDef(MHCalibrationBlindPixel, 1)
|
---|
128 | };
|
---|
129 |
|
---|
130 | #endif /* MARS_MHCalibrationBlindPixel */
|
---|