source: trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.h@ 3254

Last change on this file since 3254 was 3247, checked in by gaug, 21 years ago
*** empty log message ***
File size: 6.4 KB
Line 
1#ifndef MARS_MCalibrationChargePINDiode
2#define MARS_MCalibrationChargePINDiode
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7
8class MCalibrationChargePINDiode : public MParContainer
9{
10private:
11
12 static const Float_t fgChargeLimit; // The default limit (in units of PedRMS) for acceptance of the fitted mean charge
13 static const Float_t fgChargeErrLimit; // The default limit (in units of PedRMS) for acceptance of the fitted charge sigma
14 static const Float_t fgChargeRelErrLimit; // The default limit (in units of Error of fitted charge) for acceptance of the fitted mean
15
16 static const Float_t fgConversionChargePhotons; // The default mean conversion from PIN Diode charge to the number of incident photons
17 static const Float_t fgConversionChargePhotonsErr; // The default error of the mean conversion from PIN Diode charge to the number of incident photons
18
19 static const Float_t gkPINDiodeArea; // The Blind Pixel area in mm^2
20
21 static const Float_t gkFluxCameravsPINDiode ;
22 static const Float_t gkFluxCameravsPINDiodeErr ;
23
24 static const Float_t gkPINDiodeQEGreen;
25 static const Float_t gkPINDiodeQEBlue ;
26 static const Float_t gkPINDiodeQEUV ;
27 static const Float_t gkPINDiodeQECT1 ;
28
29 static const Float_t gkPINDiodeQEGreenErr;
30 static const Float_t gkPINDiodeQEBlueErr ;
31 static const Float_t gkPINDiodeQEUVErr ;
32 static const Float_t gkPINDiodeQECT1Err ;
33
34 Float_t fChargeLimit; // The limit (in units of PedRMS) for acceptance of the fitted mean charge
35 Float_t fChargeErrLimit; // The limit (in units of PedRMS) for acceptance of the fitted charge sigma
36 Float_t fChargeRelErrLimit; // The limit (in units of Error of fitted charge) for acceptance of the fitted mean
37
38 Float_t fConversionChargePhotons; // The mean conversion from PIN Diode charge to the number of incident photons
39 Float_t fConversionChargePhotonsErr; // The error of the mean conversion from PIN Diode charge to the number of incident photons
40
41 Float_t fPed; // The mean pedestal (from MPedestalPix)
42 Float_t fPedRms; // The pedestal RMS (from MPedestalPix)
43
44 Float_t fMeanCharge; // The mean charge after the fit
45 Float_t fMeanChargeErr; // The error of mean charge after the fit
46 Float_t fSigmaCharge; // The sigma of the mean charge after the fit
47 Float_t fSigmaChargeErr; // The error of the sigma of the mean charge after the fit
48 Float_t fChargeProb; // The probability of the fit function
49
50 Float_t fRmsChargeMean;
51 Float_t fRmsChargeMeanErr;
52 Float_t fRmsChargeSigma;
53 Float_t fRmsChargeSigmaErr;
54
55 Byte_t fFlags; // Flag for the set Bits
56
57 Float_t fAbsTimeMean;
58 Float_t fAbsTimeRms;
59
60 Float_t fTimeLowerEdge;
61 Float_t fTimeUpperEdge;
62
63 Float_t fConvertedPhotons;
64 Float_t fConvertedPhotonsErr;
65
66 Float_t fMeanFluxOutsidePlexiglass; // The mean number of photons in an INNER PIXEL outside the plexiglass
67 Float_t fMeanFluxErrOutsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
68
69public:
70
71 enum PulserColor_t { kEBlue, kEGreen, kEUV, kECT1 } ;
72
73private:
74
75 PulserColor_t fColor;
76
77 enum { kExcluded, kExcludeQualityCheck,
78 kChargeFitValid, kTimeFitValid,
79 kMeanTimeInFirstBin, kMeanTimeInLastBin,
80 kFluxOutsidePlexiglassAvailable };
81
82 Bool_t CheckChargeFitValidity();
83 Bool_t CheckTimeFitValidity();
84
85public:
86
87 MCalibrationChargePINDiode(const char *name=NULL, const char *title=NULL);
88 ~MCalibrationChargePINDiode() {}
89
90 void Clear(Option_t *o="");
91
92 // Setters
93 void SetColor( const PulserColor_t color ) { fColor = color; }
94
95 void SetMeanCharge ( const Float_t f ) { fMeanCharge = f; }
96 void SetMeanChargeErr ( const Float_t f ) { fMeanChargeErr = f; }
97 void SetSigmaCharge ( const Float_t f ) { fSigmaCharge = f; }
98 void SetSigmaChargeErr ( const Float_t f ) { fSigmaChargeErr = f; }
99
100 void SetRmsChargeMean ( const Float_t f ) { fRmsChargeMean = f; }
101 void SetRmsChargeMeanErr ( const Float_t f ) { fRmsChargeMeanErr = f; }
102 void SetRmsChargeSigma ( const Float_t f ) { fRmsChargeSigma = f; }
103 void SetRmsChargeSigmaErr( const Float_t f ) { fRmsChargeSigmaErr = f; }
104
105 void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; }
106 void SetAbsTimeRms ( const Float_t f ) { fAbsTimeRms = f; }
107
108 void SetChargeLimit ( const Float_t f=fgChargeLimit ) { fChargeLimit = f; }
109 void SetChargeErrLimit ( const Float_t f=fgChargeErrLimit ) { fChargeErrLimit = f; }
110 void SetChargeRelErrLimit( const Float_t f=fgChargeRelErrLimit ) { fChargeRelErrLimit = f; }
111
112 void SetConversionChargePhotons ( const Float_t f=fgConversionChargePhotons ) { fConversionChargePhotons = f; }
113 void SetConversionChargePhotonsErr ( const Float_t f=fgConversionChargePhotonsErr ) { fConversionChargePhotonsErr = f; }
114
115 void SetPedestal(Float_t ped, Float_t pedrms);
116
117 void SetExcluded ( const Bool_t b = kTRUE );
118 void SetExcludeQualityCheck( const Bool_t b = kTRUE );
119 void SetChargeFitValid ( const Bool_t b = kTRUE );
120 void SetTimeFitValid ( const Bool_t b = kTRUE );
121
122 // Setters ONLY for MC:
123 void SetMeanTimeInFirstBin( const Bool_t b = kTRUE );
124 void SetMeanTimeInLastBin ( const Bool_t b = kTRUE );
125
126 // Getters
127 Float_t GetMeanCharge() const { return fMeanCharge; }
128 Float_t GetMeanChargeErr() const { return fMeanChargeErr; }
129 Float_t GetSigmaCharge() const { return fSigmaCharge; }
130 Float_t GetSigmaChargeErr() const { return fSigmaChargeErr; }
131 Float_t GetChargeProb() const { return fChargeProb; }
132
133 Float_t GetMeanFluxOutsidePlexiglass() const { return fMeanFluxOutsidePlexiglass; }
134 Float_t GetMeanFluxErrOutsidePlexiglass() const { return fMeanFluxErrOutsidePlexiglass; }
135
136 // Pedestals
137 Float_t GetPed() const { return fPed; }
138 Float_t GetPedRms() const { return fPedRms; }
139
140
141 Bool_t IsExcluded() const;
142 Bool_t IsChargeFitValid() const;
143 Bool_t IsTimeFitValid() const;
144
145 Bool_t IsMeanTimeInFirstBin() const;
146 Bool_t IsMeanTimeInLastBin() const;
147
148 Bool_t CalcFluxOutsidePlexiglass();
149
150 ClassDef(MCalibrationChargePINDiode, 1) // Container for Calibration PIN Diode
151};
152
153#endif /* MARS_MCalibrationChargePINDiode */
154
Note: See TracBrowser for help on using the repository browser.