| 1 | #ifndef MARS_MCalibrationChargePINDiode
|
|---|
| 2 | #define MARS_MCalibrationChargePINDiode
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MParContainer
|
|---|
| 5 | #include "MParContainer.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class MCalibrationChargePINDiode : public MParContainer
|
|---|
| 9 | {
|
|---|
| 10 | private:
|
|---|
| 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 |
|
|---|
| 69 | PulserColor_t fColor;
|
|---|
| 70 |
|
|---|
| 71 | enum { kExcluded, kExcludeQualityCheck,
|
|---|
| 72 | kChargeFitValid, kTimeFitValid,
|
|---|
| 73 | kMeanTimeInFirstBin, kMeanTimeInLastBin,
|
|---|
| 74 | kFluxOutsidePlexiglassAvailable };
|
|---|
| 75 |
|
|---|
| 76 | public:
|
|---|
| 77 |
|
|---|
| 78 | MCalibrationChargePINDiode(const char *name=NULL, const char *title=NULL);
|
|---|
| 79 | ~MCalibrationChargePINDiode() {}
|
|---|
| 80 |
|
|---|
| 81 | void Clear(Option_t *o="");
|
|---|
| 82 |
|
|---|
| 83 | // Setters
|
|---|
| 84 | void SetColor( const PulserColor_t color ) { fColor = color; }
|
|---|
| 85 |
|
|---|
| 86 | void SetMeanCharge ( const Float_t f ) { fMeanCharge = f; }
|
|---|
| 87 | void SetMeanChargeErr ( const Float_t f ) { fMeanChargeErr = f; }
|
|---|
| 88 | void SetSigmaCharge ( const Float_t f ) { fSigmaCharge = f; }
|
|---|
| 89 | void SetSigmaChargeErr ( const Float_t f ) { fSigmaChargeErr = f; }
|
|---|
| 90 |
|
|---|
| 91 | void SetRmsChargeMean ( const Float_t f ) { fRmsChargeMean = f; }
|
|---|
| 92 | void SetRmsChargeMeanErr ( const Float_t f ) { fRmsChargeMeanErr = f; }
|
|---|
| 93 | void SetRmsChargeSigma ( const Float_t f ) { fRmsChargeSigma = f; }
|
|---|
| 94 | void SetRmsChargeSigmaErr( const Float_t f ) { fRmsChargeSigmaErr = f; }
|
|---|
| 95 |
|
|---|
| 96 | void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; }
|
|---|
| 97 | void SetAbsTimeRms ( const Float_t f ) { fAbsTimeRms = f; }
|
|---|
| 98 |
|
|---|
| 99 | void SetChargeLimit ( const Float_t f=fgChargeLimit ) { fChargeLimit = f; }
|
|---|
| 100 | void SetChargeErrLimit ( const Float_t f=fgChargeErrLimit ) { fChargeErrLimit = f; }
|
|---|
| 101 | void SetChargeRelErrLimit( const Float_t f=fgChargeRelErrLimit ) { fChargeRelErrLimit = f; }
|
|---|
| 102 |
|
|---|
| 103 | void SetConversionChargePhotons ( const Float_t f=fgConversionChargePhotons ) { fConversionChargePhotons = f; }
|
|---|
| 104 | void SetConversionChargePhotonsErr ( const Float_t f=fgConversionChargePhotonsErr ) { fConversionChargePhotonsErr = f; }
|
|---|
| 105 |
|
|---|
| 106 | void SetPedestal(Float_t ped, Float_t pedrms);
|
|---|
| 107 |
|
|---|
| 108 | void SetExcluded ( const Bool_t b = kTRUE );
|
|---|
| 109 | void SetExcludeQualityCheck( const Bool_t b = kTRUE );
|
|---|
| 110 | void SetChargeFitValid ( const Bool_t b = kTRUE );
|
|---|
| 111 | void SetTimeFitValid ( const Bool_t b = kTRUE );
|
|---|
| 112 | void SetFluxOutsidePlexiglassAvailable ( const Bool_t b = kTRUE );
|
|---|
| 113 |
|
|---|
| 114 | // Setters ONLY for MC:
|
|---|
| 115 | void SetMeanTimeInFirstBin( const Bool_t b = kTRUE );
|
|---|
| 116 | void SetMeanTimeInLastBin ( const Bool_t b = kTRUE );
|
|---|
| 117 |
|
|---|
| 118 | // Getters
|
|---|
| 119 | Float_t GetMeanCharge() const { return fMeanCharge; }
|
|---|
| 120 | Float_t GetMeanChargeErr() const { return fMeanChargeErr; }
|
|---|
| 121 | Float_t GetSigmaCharge() const { return fSigmaCharge; }
|
|---|
| 122 | Float_t GetSigmaChargeErr() const { return fSigmaChargeErr; }
|
|---|
| 123 | Float_t GetChargeProb() const { return fChargeProb; }
|
|---|
| 124 |
|
|---|
| 125 | Float_t GetMeanFluxOutsidePlexiglass() const { return fMeanFluxOutsidePlexiglass; }
|
|---|
| 126 | Float_t GetMeanFluxErrOutsidePlexiglass() const { return fMeanFluxErrOutsidePlexiglass; }
|
|---|
| 127 |
|
|---|
| 128 | // Pedestals
|
|---|
| 129 | Float_t GetPed() const { return fPed; }
|
|---|
| 130 | Float_t GetPedRms() const { return fPedRms; }
|
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 | Bool_t IsExcluded() const;
|
|---|
| 134 | Bool_t IsChargeFitValid() const;
|
|---|
| 135 | Bool_t IsTimeFitValid() const;
|
|---|
| 136 |
|
|---|
| 137 | Bool_t IsMeanTimeInFirstBin() const;
|
|---|
| 138 | Bool_t IsMeanTimeInLastBin() const;
|
|---|
| 139 |
|
|---|
| 140 | Bool_t CheckChargeFitValidity();
|
|---|
| 141 | Bool_t CheckTimeFitValidity();
|
|---|
| 142 | Bool_t CalcFluxOutsidePlexiglass();
|
|---|
| 143 |
|
|---|
| 144 | ClassDef(MCalibrationChargePINDiode, 1) // Container for Calibration PIN Diode
|
|---|
| 145 | };
|
|---|
| 146 |
|
|---|
| 147 | #endif /* MARS_MCalibrationChargePINDiode */
|
|---|
| 148 |
|
|---|
| 149 |
|
|---|
| 150 |
|
|---|
| 151 |
|
|---|
| 152 |
|
|---|
| 153 |
|
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
|
|---|