source: trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargePINDiode.h@ 8916

Last change on this file since 8916 was 8339, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 5.9 KB
Line 
1#ifndef MARS_MHCalibrationChargePINDiode
2#define MARS_MHCalibrationChargePINDiode
3
4
5#ifndef MARS_MHCalibrationChargePix
6#include "MHCalibrationChargePix.h"
7#endif
8
9class TH1F;
10class MExtractedSignalPINDiode;
11class MCalibrationChargePINDiode;
12class MHCalibrationChargePINDiode : public MHCalibrationChargePix
13{
14private:
15
16 static const Axis_t fgAbsTimeFirst; //! Default for fAbsTimeFirst (now set to: -0.5 )
17 static const Axis_t fgAbsTimeLast; //! Default for fAbsTimeLast (now set to: 29.5 )
18 static const Int_t fgAbsTimeNbins; //! Default for fAbsTimeNBins (now set to: 30 )
19 static const Int_t fgChargeNbins; //! Default for fNBins (now set to: 200 )
20 static const Axis_t fgChargeFirst; //! Default for fFirst (now set to: -0.5 )
21 static const Axis_t fgChargeLast; //! Default for fLast (now set to: 199.5 )
22 static const Int_t fgRmsChargeNbins; //! Default for fRmsChargeNBins (now set to: 100 )
23 static const Axis_t fgRmsChargeFirst; //! Default for fRmsChargeFirst (now set to: 0. )
24 static const Axis_t fgRmsChargeLast; //! Default for fRmsChargeLast (now set to: 100. )
25 static const Float_t fgTimeLowerLimit; //! Default for fTimeLowerLimit (now set to: 1.)
26 static const Float_t fgTimeUpperLimit; //! Default for fTimeUpperLimit (now set to: 2.)
27
28 static const TString gsHistName; //! Default Histogram names
29 static const TString gsHistTitle; //! Default Histogram titles
30 static const TString gsHistXTitle; //! Default Histogram x-axis titles
31 static const TString gsHistYTitle; //! Default Histogram y-axis titles
32
33 static const TString gsAbsHistName; //! Default Histogram names abs.times
34 static const TString gsAbsHistTitle; //! Default Histogram titles abs.times
35 static const TString gsAbsHistXTitle; //! Default Histogram x-axis titles abs.times
36 static const TString gsAbsHistYTitle; //! Default Histogram y-axis titles abs.times
37
38 TString fHistName; // Histogram names
39 TString fHistTitle; // Histogram titles
40 TString fHistXTitle; // Histogram x-axis titles
41 TString fHistYTitle; // Histogram y-axis titles
42
43 TString fAbsHistName; // Histogram names abs.times
44 TString fAbsHistTitle; // Histogram titles abs. times
45 TString fAbsHistXTitle; // Histogram x-axis titles abs. times
46 TString fAbsHistYTitle; // Histogram y-axis titles abs. times
47
48 MCalibrationChargePINDiode *fPINDiode; //! Storage container of the results
49 MExtractedSignalPINDiode *fSigPIN; //! Storage container of extracted signal
50
51 TH1F fHRmsCharge; // Histogram containing Variance of summed FADC slices
52
53 Axis_t fRmsChargeFirst; // Lower bound bin used for the fHRmsCharge
54 Axis_t fRmsChargeLast; // Upper bound bin used for the fHRmsCharge
55 Int_t fRmsChargeNbins; // Number of bins used for the fHRmsCharge
56 Float_t fRmsChargeMean; // Mean of the Gauss fit
57 Float_t fRmsChargeMeanErr; // Error of the mean of the Gauss fit
58 Float_t fRmsChargeSigma; // Sigma of the Gauss fit
59 Float_t fRmsChargeSigmaErr; // Error of the sigma of the Gauss fit
60 Float_t fTimeLowerLimit; // Limit dist. to first signal slice (units: FADC slices)
61 Float_t fTimeUpperLimit; // Limit dist. to last signal slice (units: FADC slices)
62
63 Int_t fExclusionMean; // Number of events excluded by deviating mean
64 Int_t fExclusionSigma; // Number of events excluded by deviating sigma
65 Int_t fExclusionChi2; // Number of events excluded by deviating chi2
66
67public:
68
69 MHCalibrationChargePINDiode(const char *name=NULL, const char *title=NULL);
70 ~MHCalibrationChargePINDiode(){}
71
72 Bool_t SetupFill(const MParList *pList);
73 Bool_t ReInit ( MParList *pList);
74 Bool_t Fill (const MParContainer *par, const Stat_t w=1);
75 Bool_t Finalize ();
76
77 // Draw
78 void Draw(Option_t *opt="");
79
80 // Getters
81 TH1F *GetHRmsCharge() { return &fHRmsCharge; }
82 const TH1F *GetHRmsCharge() const { return &fHRmsCharge; }
83 Float_t GetRmsChargeMean() const { return fRmsChargeMean; }
84 Float_t GetRmsChargeMeanErr() const { return fRmsChargeMeanErr; }
85 Float_t GetRmsChargeSigma() const { return fRmsChargeSigma; }
86 Float_t GetRmsChargeSigmaErr() const { return fRmsChargeSigmaErr; }
87
88 Int_t GetExclusionMean() const { return fExclusionMean; }
89 Int_t GetExclusionSigma() const { return fExclusionSigma; }
90 Int_t GetExclusionChi2() const { return fExclusionChi2; }
91
92
93 // Fill histos
94 Bool_t FillRmsCharge(const Float_t q);
95
96 // Fits
97 Bool_t FitRmsCharge(Option_t *option="RQ0");
98
99 // Setters
100 void SetBinningRmsCharge(Int_t n, Axis_t lo, Axis_t up) { fRmsChargeNbins=n; fRmsChargeFirst=lo; fRmsChargeLast=up; }
101
102 void SetTimeLowerLimit ( const Float_t f=fgTimeLowerLimit ) { fTimeLowerLimit = f; }
103 void SetTimeUpperLimit ( const Float_t f=fgTimeUpperLimit ) { fTimeUpperLimit = f; }
104
105 void SetAbsHistName ( const char *name ) { fAbsHistName = name; }
106 void SetAbsHistTitle ( const char *name ) { fAbsHistTitle = name; }
107 void SetAbsHistXTitle( const char *name ) { fAbsHistXTitle = name; }
108 void SetAbsHistYTitle( const char *name ) { fAbsHistYTitle = name; }
109
110 void SetHistName ( const char *name ) { fHistName = name; }
111 void SetHistTitle ( const char *name ) { fHistTitle = name; }
112 void SetHistXTitle( const char *name ) { fHistXTitle = name; }
113 void SetHistYTitle( const char *name ) { fHistYTitle = name; }
114
115 ClassDef(MHCalibrationChargePINDiode, 2) // Histogram class for Charge PIN Diode Calibration
116};
117
118#endif
119
Note: See TracBrowser for help on using the repository browser.