| 1 | #ifndef MARS_MCalibrationChargeCam
|
|---|
| 2 | #define MARS_MCalibrationChargeCam
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MCalibrationCam
|
|---|
| 5 | #include "MCalibrationCam.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class TH1D;
|
|---|
| 9 | class TH2D;
|
|---|
| 10 |
|
|---|
| 11 | class MCalibrationChargeBlindPix;
|
|---|
| 12 | class MCalibrationChargePINDiode;
|
|---|
| 13 | class MCalibrationChargePix;
|
|---|
| 14 | class MCalibrationChargeCam : public MCalibrationCam
|
|---|
| 15 | {
|
|---|
| 16 | private:
|
|---|
| 17 |
|
|---|
| 18 | static const Float_t fgAverageQE; // The default for fAverageQE (now set to: 0.18)
|
|---|
| 19 | static const Float_t fgAverageQEErr; // The default for fAverageQEErr (now set to: 0.02)
|
|---|
| 20 | static const Float_t fgConvFFactorRelErrLimit; // The default for fConvFFactorRelErrLimit (now set to: 0.35)
|
|---|
| 21 | static const Float_t fgPheFFactorRelErrLimit; // The default for fPheFFactorRelErrLimit (now set to: 5.)
|
|---|
| 22 |
|
|---|
| 23 | Float_t fAverageQE; // The average quantum efficieny (see Class description)
|
|---|
| 24 | Float_t fAverageQEVar; // The error of the average quantum efficieny (see Class description)
|
|---|
| 25 | Float_t fConvFFactorRelVarLimit; // Acceptance limit for rel. error of conversion factor (FFactor method)
|
|---|
| 26 | Float_t fPheFFactorRelVarLimit; // Acceptance limit for number of phe's w.r.t mean number (in variances)
|
|---|
| 27 |
|
|---|
| 28 | TH1D* fOffsets; //!
|
|---|
| 29 | TH1D* fSlopes; //!
|
|---|
| 30 |
|
|---|
| 31 | TH2D* fOffvsSlope; //!
|
|---|
| 32 |
|
|---|
| 33 | enum { kFFactorMethodValid, kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
|
|---|
| 34 |
|
|---|
| 35 | Float_t fMeanFluxPhesInnerPixel; // The mean number of photo-electrons in an INNER PIXEL
|
|---|
| 36 | Float_t fMeanFluxPhesInnerPixelVar; // The variance of the number of photo-electrons INNER PIXEL
|
|---|
| 37 | Float_t fMeanFluxPhesOuterPixel; // The mean number of photo-electrons in an INNER PIXEL
|
|---|
| 38 | Float_t fMeanFluxPhesOuterPixelVar; // The variance of the number of photo-electrons INNER PIXEL
|
|---|
| 39 |
|
|---|
| 40 | Float_t fMeanFluxPhotonsInnerPixel; // The mean number of photo-electrons in an INNER PIXEL
|
|---|
| 41 | Float_t fMeanFluxPhotonsInnerPixelVar; // The variance of the number of photo-electrons INNER PIXEL
|
|---|
| 42 | Float_t fMeanFluxPhotonsOuterPixel; // The mean number of photo-electrons in an INNER PIXEL
|
|---|
| 43 | Float_t fMeanFluxPhotonsOuterPixelVar; // The variance of the number of photo-electrons INNER PIXEL
|
|---|
| 44 |
|
|---|
| 45 | Byte_t fFlags; // Byte to hold the flags
|
|---|
| 46 |
|
|---|
| 47 | public:
|
|---|
| 48 |
|
|---|
| 49 | MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
|---|
| 50 | ~MCalibrationChargeCam();
|
|---|
| 51 |
|
|---|
| 52 | void Clear( Option_t *o="" );
|
|---|
| 53 |
|
|---|
| 54 | // Setters
|
|---|
| 55 | void SetAverageQE( const Float_t qe= fgAverageQE,
|
|---|
| 56 | const Float_t err=fgAverageQEErr) { fAverageQE = qe;
|
|---|
| 57 | fAverageQEVar = err*err; }
|
|---|
| 58 | void SetConvFFactorRelErrLimit( const Float_t f=fgConvFFactorRelErrLimit ) { fConvFFactorRelVarLimit = f*f; }
|
|---|
| 59 | void SetPheFFactorRelErrLimit ( const Float_t f=fgPheFFactorRelErrLimit ) { fPheFFactorRelVarLimit = f*f; }
|
|---|
| 60 |
|
|---|
| 61 | void SetFFactorMethodValid( const Bool_t b = kTRUE );
|
|---|
| 62 | void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
|
|---|
| 63 | void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
|
|---|
| 64 |
|
|---|
| 65 | // Getters
|
|---|
| 66 | Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
|---|
| 67 | Bool_t GetConversionFactorBlindPixel( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
|---|
| 68 | Bool_t GetConversionFactorPINDiode( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
|---|
| 69 | Bool_t GetConversionFactorCombined( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
|---|
| 70 |
|
|---|
| 71 | Float_t GetMeanFluxPhesInnerPixel() const { return fMeanFluxPhesInnerPixel; }
|
|---|
| 72 | Float_t GetMeanFluxPhesInnerPixelErr() const;
|
|---|
| 73 | Float_t GetMeanFluxPhesOuterPixel() const { return fMeanFluxPhesOuterPixel; }
|
|---|
| 74 | Float_t GetMeanFluxPhesOuterPixelErr() const;
|
|---|
| 75 |
|
|---|
| 76 | Float_t GetMeanFluxPhotonsInnerPixel() const { return fMeanFluxPhotonsInnerPixel; }
|
|---|
| 77 | Float_t GetMeanFluxPhotonsInnerPixelErr() const;
|
|---|
| 78 | Float_t GetMeanFluxPhotonsOuterPixel() const { return fMeanFluxPhotonsOuterPixel; }
|
|---|
| 79 | Float_t GetMeanFluxPhotonsOuterPixelErr() const;
|
|---|
| 80 |
|
|---|
| 81 | Bool_t IsBlindPixelMethodValid() const;
|
|---|
| 82 | Bool_t IsPINDiodeMethodValid() const;
|
|---|
| 83 |
|
|---|
| 84 | // Prints
|
|---|
| 85 | void Print(Option_t *o="") const;
|
|---|
| 86 |
|
|---|
| 87 | // Draws
|
|---|
| 88 | void DrawPixelContent(Int_t num) const;
|
|---|
| 89 | // void DrawHiLoFits();
|
|---|
| 90 |
|
|---|
| 91 | // Others
|
|---|
| 92 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
|---|
| 93 |
|
|---|
| 94 | Bool_t CalcMeanFluxPhotonsFFactorMethod(const MGeomCam &geom, MBadPixelsCam &bad);
|
|---|
| 95 |
|
|---|
| 96 | void ApplyPINDiodeCalibration(const MGeomCam &geom,
|
|---|
| 97 | const MBadPixelsCam &bad,
|
|---|
| 98 | const MCalibrationChargePINDiode &pindiode);
|
|---|
| 99 | void ApplyBlindPixelCalibration(const MGeomCam &geom,
|
|---|
| 100 | const MBadPixelsCam &bad,
|
|---|
| 101 | const MCalibrationChargeBlindPix &blindpix);
|
|---|
| 102 | void ApplyFFactorCalibration(const MGeomCam &geom, const MBadPixelsCam &bad);
|
|---|
| 103 |
|
|---|
| 104 | ClassDef(MCalibrationChargeCam, 1) // Container for calibration of the camera
|
|---|
| 105 | };
|
|---|
| 106 |
|
|---|
| 107 | #endif
|
|---|