source: trunk/MagicSoft/Mars/mhist/MHCalibrationBlindPixel.h@ 2658

Last change on this file since 2658 was 2642, checked in by gaug, 21 years ago
*** empty log message ***
File size: 4.2 KB
Line 
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
28class TMath;
29class MParList;
30class MHCalibrationBlindPixel : public MH
31{
32private:
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 TF1 *fSinglePhePedFit;
42
43 Axis_t fBlindPixelChargefirst;
44 Axis_t fBlindPixelChargelast;
45 Int_t fBlindPixelChargenbins;
46
47 Axis_t fErrBlindPixelChargefirst;
48 Axis_t fErrBlindPixelChargelast;
49 Int_t fErrBlindPixelChargenbins;
50
51 void ResetBin(Int_t i);
52 void DrawLegend();
53
54 TPaveText *fFitLegend;
55 Bool_t fFitOK;
56
57 BlindPixelFitFunc fgSinglePheFitFunc; // In the beginning,
58 Int_t fgSinglePheFitNPar; // we want to be flexible using different functions
59
60 Double_t fLambda;
61 Double_t fMu0;
62 Double_t fMu1;
63 Double_t fSigma0;
64 Double_t fSigma1;
65
66 Double_t fLambdaErr;
67 Double_t fMu0Err;
68 Double_t fMu1Err;
69 Double_t fSigma0Err;
70 Double_t fSigma1Err;
71
72 Double_t fChisquare;
73 Double_t fProb;
74 Int_t fNdf;
75
76 Double_t fMeanTime;
77 Double_t fMeanTimeErr;
78 Double_t fSigmaTime;
79 Double_t fSigmaTimeErr;
80
81 Double_t fLambdaCheck;
82 Double_t fLambdaCheckErr;
83
84public:
85
86 MHCalibrationBlindPixel(const char *name=NULL, const char *title=NULL);
87 ~MHCalibrationBlindPixel();
88
89 Bool_t FillBlindPixelCharge(Float_t q) { return fHBlindPixelCharge->Fill(q) > -1; }
90 Bool_t FillErrBlindPixelCharge(Float_t errq) { return fHBlindPixelErrCharge->Fill(errq) > -1; }
91 Bool_t FillBlindPixelTime(Int_t t) { return fHBlindPixelTime->Fill(t) > -1; }
92 Bool_t FillBlindPixelChargevsN(Stat_t rq, Int_t t) { return fHBlindPixelChargevsN->Fill(t,rq) > -1; }
93
94 const Double_t GetLambda() const { return fLambda; }
95 const Double_t GetLambdaCheck() const { return fLambdaCheck; }
96 const Double_t GetMu0() const { return fMu0; }
97 const Double_t GetMu1() const { return fMu1; }
98 const Double_t GetSigma0() const { return fSigma0; }
99 const Double_t GetSigma1() const { return fSigma1; }
100
101 const Double_t GetLambdaErr() const { return fLambdaErr; }
102 const Double_t GetLambdaCheckErr() const { return fLambdaCheckErr; }
103 const Double_t GetMu0Err() const { return fMu0Err; }
104 const Double_t GetMu1Err() const { return fMu1Err; }
105 const Double_t GetSigma0Err() const { return fSigma0Err; }
106 const Double_t GetSigma1Err() const { return fSigma1Err; }
107
108 const Double_t GetChiSquare() const { return fChisquare; }
109 const Double_t GetProb() const { return fProb; }
110 const Int_t GetNdf() const { return fNdf; }
111
112 const Double_t GetMeanTime() const { return fMeanTime; }
113 const Double_t GetMeanTimeErr() const { return fMeanTimeErr; }
114 const Double_t GetSigmaTime() const { return fSigmaTime; }
115 const Double_t GetSigmaTimeErr() const { return fSigmaTimeErr; }
116
117 const TH1F *GetHErrCharge() { return fHBlindPixelErrCharge; }
118 const TH1F *GetHErrCharge() const { return fHBlindPixelErrCharge; }
119
120 Bool_t SimulateSinglePhe(Double_t lambda,
121 Double_t mu0,
122 Double_t mu1,
123 Double_t sigma0,
124 Double_t sigma1);
125
126 Bool_t FitSinglePhe(Axis_t rmin=0, Axis_t rmax=0, Option_t *opt="RL0+");
127 Bool_t FitTime(Axis_t rmin=0., Axis_t rmax=0.,Option_t *opt="R0+");
128
129 void ChangeFitFunc(BlindPixelFitFunc fitfunc, Int_t par=5);
130
131 void CutAllEdges();
132 void Draw(Option_t *option="");
133
134 Bool_t IsFitOK() { return fFitOK; }
135
136 ClassDef(MHCalibrationBlindPixel, 1)
137};
138
139#endif /* MARS_MHCalibrationBlindPixel */
Note: See TracBrowser for help on using the repository browser.