| 1 | #ifndef MARS_MCalibrationChargePINDiode
|
|---|
| 2 | #define MARS_MCalibrationChargePINDiode
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MCalibrationPix
|
|---|
| 5 | #include "MCalibrationPix.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class MCalibrationChargePINDiode : public MCalibrationPix
|
|---|
| 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 fRmsChargeMean;
|
|---|
| 45 | Float_t fRmsChargeMeanErr;
|
|---|
| 46 | Float_t fRmsChargeSigma;
|
|---|
| 47 | Float_t fRmsChargeSigmaErr;
|
|---|
| 48 |
|
|---|
| 49 | Byte_t fCalibFlags; // Flag for the set Bits
|
|---|
| 50 |
|
|---|
| 51 | Float_t fAbsTimeMean;
|
|---|
| 52 | Float_t fAbsTimeRms;
|
|---|
| 53 |
|
|---|
| 54 | Float_t fTimeLowerEdge;
|
|---|
| 55 | Float_t fTimeUpperEdge;
|
|---|
| 56 |
|
|---|
| 57 | Float_t fConvertedPhotons;
|
|---|
| 58 | Float_t fConvertedPhotonsErr;
|
|---|
| 59 |
|
|---|
| 60 | Float_t fMeanFluxOutsidePlexiglass; // The mean number of photons in an INNER PIXEL outside the plexiglass
|
|---|
| 61 | Float_t fMeanFluxErrOutsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
|---|
| 62 |
|
|---|
| 63 | PulserColor_t fColor;
|
|---|
| 64 |
|
|---|
| 65 | enum { kExcludeQualityCheck, kOscillating,
|
|---|
| 66 | kChargeFitValid, kTimeFitValid,
|
|---|
| 67 | kMeanTimeInFirstBin, kMeanTimeInLastBin,
|
|---|
| 68 | kFluxOutsidePlexiglassAvailable };
|
|---|
| 69 |
|
|---|
| 70 | public:
|
|---|
| 71 |
|
|---|
| 72 | MCalibrationChargePINDiode(const char *name=NULL, const char *title=NULL);
|
|---|
| 73 | ~MCalibrationChargePINDiode() {}
|
|---|
| 74 |
|
|---|
| 75 | void Clear(Option_t *o="");
|
|---|
| 76 |
|
|---|
| 77 | // Setters
|
|---|
| 78 | void SetColor( const PulserColor_t color ) { fColor = color; }
|
|---|
| 79 |
|
|---|
| 80 | void SetRmsChargeMean ( const Float_t f ) { fRmsChargeMean = f; }
|
|---|
| 81 | void SetRmsChargeMeanErr ( const Float_t f ) { fRmsChargeMeanErr = f; }
|
|---|
| 82 | void SetRmsChargeSigma ( const Float_t f ) { fRmsChargeSigma = f; }
|
|---|
| 83 | void SetRmsChargeSigmaErr( const Float_t f ) { fRmsChargeSigmaErr = f; }
|
|---|
| 84 |
|
|---|
| 85 | void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; }
|
|---|
| 86 | void SetAbsTimeRms ( const Float_t f ) { fAbsTimeRms = f; }
|
|---|
| 87 |
|
|---|
| 88 | void SetChargeLimit ( const Float_t f=fgChargeLimit ) { fChargeLimit = f; }
|
|---|
| 89 | void SetChargeErrLimit ( const Float_t f=fgChargeErrLimit ) { fChargeErrLimit = f; }
|
|---|
| 90 | void SetChargeRelErrLimit( const Float_t f=fgChargeRelErrLimit ) { fChargeRelErrLimit = f; }
|
|---|
| 91 |
|
|---|
| 92 | void SetConversionChargePhotons ( const Float_t f=fgConversionChargePhotons ) { fConversionChargePhotons = f; }
|
|---|
| 93 | void SetConversionChargePhotonsErr ( const Float_t f=fgConversionChargePhotonsErr ) { fConversionChargePhotonsErr = f; }
|
|---|
| 94 |
|
|---|
| 95 | void SetPedestal(Float_t ped, Float_t pedrms);
|
|---|
| 96 |
|
|---|
| 97 | void SetOscillating ( const Bool_t b=kTRUE);
|
|---|
| 98 | void SetExcludeQualityCheck( const Bool_t b = kTRUE );
|
|---|
| 99 | void SetChargeFitValid ( const Bool_t b = kTRUE );
|
|---|
| 100 | void SetTimeFitValid ( const Bool_t b = kTRUE );
|
|---|
| 101 | void SetFluxOutsidePlexiglassAvailable ( const Bool_t b = kTRUE );
|
|---|
| 102 |
|
|---|
| 103 | // Setters ONLY for MC:
|
|---|
| 104 | void SetMeanTimeInFirstBin( const Bool_t b = kTRUE );
|
|---|
| 105 | void SetMeanTimeInLastBin ( const Bool_t b = kTRUE );
|
|---|
| 106 |
|
|---|
| 107 | // Getters
|
|---|
| 108 | Float_t GetMeanFluxOutsidePlexiglass() const { return fMeanFluxOutsidePlexiglass; }
|
|---|
| 109 | Float_t GetMeanFluxErrOutsidePlexiglass() const { return fMeanFluxErrOutsidePlexiglass; }
|
|---|
| 110 |
|
|---|
| 111 | // Pedestals
|
|---|
| 112 | Float_t GetPed() const { return fPed; }
|
|---|
| 113 | Float_t GetPedRms() const { return fPedRms; }
|
|---|
| 114 |
|
|---|
| 115 |
|
|---|
| 116 | Bool_t IsChargeFitValid() const;
|
|---|
| 117 | Bool_t IsTimeFitValid() const;
|
|---|
| 118 |
|
|---|
| 119 | Bool_t IsMeanTimeInFirstBin() const;
|
|---|
| 120 | Bool_t IsMeanTimeInLastBin() const;
|
|---|
| 121 |
|
|---|
| 122 | Bool_t CheckChargeFitValidity();
|
|---|
| 123 | Bool_t CheckTimeFitValidity();
|
|---|
| 124 | Bool_t CalcFluxOutsidePlexiglass();
|
|---|
| 125 |
|
|---|
| 126 | ClassDef(MCalibrationChargePINDiode, 1) // Container for Calibration PIN Diode
|
|---|
| 127 | };
|
|---|
| 128 |
|
|---|
| 129 | #endif /* MARS_MCalibrationChargePINDiode */
|
|---|
| 130 |
|
|---|
| 131 |
|
|---|
| 132 |
|
|---|
| 133 |
|
|---|
| 134 |
|
|---|
| 135 |
|
|---|
| 136 |
|
|---|
| 137 |
|
|---|
| 138 |
|
|---|