| 1 | #ifndef MARS_MCalibrationChargeCam
|
|---|
| 2 | #define MARS_MCalibrationChargeCam
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MParContainer
|
|---|
| 5 | #include "MParContainer.h"
|
|---|
| 6 | #endif
|
|---|
| 7 | #ifndef MARS_MCamEvent
|
|---|
| 8 | #include "MCamEvent.h"
|
|---|
| 9 | #endif
|
|---|
| 10 |
|
|---|
| 11 | class TH1D;
|
|---|
| 12 | class TH2D;
|
|---|
| 13 | class TClonesArray;
|
|---|
| 14 |
|
|---|
| 15 | class MCalibrationChargeBlindPix;
|
|---|
| 16 | class MCalibrationChargePINDiode;
|
|---|
| 17 | class MCalibrationChargePix;
|
|---|
| 18 | class MBadPixelsPix;
|
|---|
| 19 | class MBadPixelsCam;
|
|---|
| 20 | class MCalibrationChargeCam : public MParContainer, public MCamEvent
|
|---|
| 21 | {
|
|---|
| 22 | private:
|
|---|
| 23 |
|
|---|
| 24 | static const Float_t gkAverageQE; // The average quantum efficieny agreed on for the first analysis
|
|---|
| 25 | static const Float_t gkAverageQEErr; // The error of average quantum efficieny
|
|---|
| 26 |
|
|---|
| 27 | static const Float_t fgConvFFactorRelErrLimit; // The limit for acceptance of the rel. error of the conversion factor with the FFactor method
|
|---|
| 28 | static const Float_t fgPheFFactorRelLimit; // The rel. limit for acceptance of a calculated number of phe's w.r.t the mean number (in sigma of the error)
|
|---|
| 29 |
|
|---|
| 30 | Float_t fAverageQE; // The average quantum efficieny (see Class description)
|
|---|
| 31 | Float_t fAverageQEErr; // The error of the average quantum efficieny (see Class description)
|
|---|
| 32 |
|
|---|
| 33 | Float_t fConvFFactorRelErrLimit; // The limit for acceptance of the rel. error of the conversion factor with the FFactor method
|
|---|
| 34 | Float_t fPheFFactorRelLimit; // The rel. limit for acceptance of a calculated number of phe's w.r.t the mean number (in sigma of the error).
|
|---|
| 35 |
|
|---|
| 36 | Int_t fNumPixels;
|
|---|
| 37 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
|---|
| 38 |
|
|---|
| 39 | MCalibrationChargePix *fAverageInnerPix; //-> Average Pixel of all events
|
|---|
| 40 | MCalibrationChargePix *fAverageOuterPix; //-> Average Pixel of all events
|
|---|
| 41 |
|
|---|
| 42 | MBadPixelsPix *fAverageInnerBadPix; //-> Average Pixel of all events
|
|---|
| 43 | MBadPixelsPix *fAverageOuterBadPix; //-> Average Pixel of all events
|
|---|
| 44 |
|
|---|
| 45 | const MCalibrationChargeBlindPix *fBlindPixel; //! Pointer to the Blind Pixel with fit results
|
|---|
| 46 | const MCalibrationChargePINDiode *fPINDiode; //! Pointer to the PIN Diode with fit results
|
|---|
| 47 |
|
|---|
| 48 | TH1D* fOffsets; //!
|
|---|
| 49 | TH1D* fSlopes; //!
|
|---|
| 50 |
|
|---|
| 51 | TH2D* fOffvsSlope; //!
|
|---|
| 52 |
|
|---|
| 53 | UInt_t fNumExcludedPixels;
|
|---|
| 54 |
|
|---|
| 55 | Byte_t fFlags;
|
|---|
| 56 |
|
|---|
| 57 | enum { kFFactorMethodValid, kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
|
|---|
| 58 |
|
|---|
| 59 | Float_t fMeanFluxPhesInnerPixel; // The mean number of photo-electrons in an INNER PIXEL
|
|---|
| 60 | Float_t fMeanFluxPhesInnerPixelErr; // The uncertainty about the number of photo-electrons INNER PIXEL
|
|---|
| 61 | Float_t fMeanFluxPhesOuterPixel; // The mean number of photo-electrons in an INNER PIXEL
|
|---|
| 62 | Float_t fMeanFluxPhesOuterPixelErr; // The uncertainty about the number of photo-electrons INNER PIXEL
|
|---|
| 63 |
|
|---|
| 64 | Float_t fMeanFluxPhotonsInnerPixel; // The mean number of photo-electrons in an INNER PIXEL
|
|---|
| 65 | Float_t fMeanFluxPhotonsInnerPixelErr; // The uncertainty about the number of photo-electrons INNER PIXEL
|
|---|
| 66 | Float_t fMeanFluxPhotonsOuterPixel; // The mean number of photo-electrons in an INNER PIXEL
|
|---|
| 67 | Float_t fMeanFluxPhotonsOuterPixelErr; // The uncertainty about the number of photo-electrons INNER PIXEL
|
|---|
| 68 |
|
|---|
| 69 | public:
|
|---|
| 70 |
|
|---|
| 71 | MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
|---|
| 72 | ~MCalibrationChargeCam();
|
|---|
| 73 |
|
|---|
| 74 | void Clear( Option_t *o="" );
|
|---|
| 75 | void InitSize( const UInt_t i );
|
|---|
| 76 |
|
|---|
| 77 | // Setters
|
|---|
| 78 | void SetAverageQE( const Float_t qe= gkAverageQE,
|
|---|
| 79 | const Float_t err=gkAverageQEErr) { fAverageQE = qe;
|
|---|
| 80 | fAverageQEErr = err; }
|
|---|
| 81 | void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; }
|
|---|
| 82 | void SetConvFFactorRelErrLimit( const Float_t f=fgConvFFactorRelErrLimit ) { fConvFFactorRelErrLimit = f; }
|
|---|
| 83 | void SetPheFFactorRelLimit ( const Float_t f=fgPheFFactorRelLimit ) { fPheFFactorRelLimit = f; }
|
|---|
| 84 |
|
|---|
| 85 | void SetPINDiode ( const MCalibrationChargePINDiode *d ) { fPINDiode = d; }
|
|---|
| 86 | void SetBlindPixel( const MCalibrationChargeBlindPix *b ) { fBlindPixel = b; }
|
|---|
| 87 |
|
|---|
| 88 | void SetFFactorMethodValid( const Bool_t b = kTRUE );
|
|---|
| 89 | void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
|
|---|
| 90 | void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
|
|---|
| 91 |
|
|---|
| 92 | // Getters
|
|---|
| 93 | Int_t GetSize() const;
|
|---|
| 94 | UInt_t GetNumPixels() const { return fNumPixels; }
|
|---|
| 95 |
|
|---|
| 96 | Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
|---|
| 97 | Bool_t GetConversionFactorBlindPixel( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
|---|
| 98 | Bool_t GetConversionFactorPINDiode( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
|---|
| 99 | Bool_t GetConversionFactorCombined( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
|---|
| 100 |
|
|---|
| 101 | Float_t GetMeanFluxPhesInnerPixel() const { return fMeanFluxPhesInnerPixel; }
|
|---|
| 102 | Float_t GetMeanFluxPhesInnerPixelErr() const { return fMeanFluxPhesInnerPixelErr; }
|
|---|
| 103 | Float_t GetMeanFluxPhesOuterPixel() const { return fMeanFluxPhesOuterPixel; }
|
|---|
| 104 | Float_t GetMeanFluxPhesOuterPixelErr() const { return fMeanFluxPhesOuterPixelErr; }
|
|---|
| 105 |
|
|---|
| 106 | Float_t GetMeanFluxPhotonsInnerPixel() const { return fMeanFluxPhotonsInnerPixel; }
|
|---|
| 107 | Float_t GetMeanFluxPhotonsInnerPixelErr() const { return fMeanFluxPhotonsInnerPixelErr; }
|
|---|
| 108 | Float_t GetMeanFluxPhotonsOuterPixel() const { return fMeanFluxPhotonsOuterPixel; }
|
|---|
| 109 | Float_t GetMeanFluxPhotonsOuterPixelErr() const { return fMeanFluxPhotonsOuterPixelErr; }
|
|---|
| 110 |
|
|---|
| 111 | Bool_t IsBlindPixelMethodValid() const;
|
|---|
| 112 | Bool_t IsPINDiodeMethodValid() const;
|
|---|
| 113 |
|
|---|
| 114 | // Others
|
|---|
| 115 | MCalibrationChargePix &operator[](UInt_t i);
|
|---|
| 116 | const MCalibrationChargePix &operator[](UInt_t i) const;
|
|---|
| 117 |
|
|---|
| 118 | MCalibrationChargePix *GetAverageInnerPix() { return fAverageInnerPix; }
|
|---|
| 119 | const MCalibrationChargePix *GetAverageInnerPix() const { return fAverageInnerPix; }
|
|---|
| 120 |
|
|---|
| 121 | MCalibrationChargePix *GetAverageOuterPix() { return fAverageOuterPix; }
|
|---|
| 122 | const MCalibrationChargePix *GetAverageOuterPix() const { return fAverageOuterPix; }
|
|---|
| 123 |
|
|---|
| 124 | MBadPixelsPix *GetAverageInnerBadPix() { return fAverageInnerBadPix; }
|
|---|
| 125 | const MBadPixelsPix *GetAverageInnerBadPix() const { return fAverageInnerBadPix; }
|
|---|
| 126 |
|
|---|
| 127 | MBadPixelsPix *GetAverageOuterBadPix() { return fAverageOuterBadPix; }
|
|---|
| 128 | const MBadPixelsPix *GetAverageOuterBadPix() const { return fAverageOuterBadPix; }
|
|---|
| 129 |
|
|---|
| 130 | // Prints
|
|---|
| 131 | void Print(Option_t *o="") const;
|
|---|
| 132 |
|
|---|
| 133 | // Draws
|
|---|
| 134 | void DrawPixelContent(Int_t num) const;
|
|---|
| 135 | // void DrawHiLoFits();
|
|---|
| 136 |
|
|---|
| 137 | // Others
|
|---|
| 138 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
|---|
| 139 |
|
|---|
| 140 | Bool_t CalcMeanFluxPhotonsFFactorMethod(const MGeomCam &geom, const MBadPixelsCam &bad);
|
|---|
| 141 |
|
|---|
| 142 | void ApplyPINDiodeCalibration(const MGeomCam &geom, const MBadPixelsCam &bad);
|
|---|
| 143 | void ApplyBlindPixelCalibration(const MGeomCam &geom, const MBadPixelsCam &bad);
|
|---|
| 144 | void ApplyFFactorCalibration(const MGeomCam &geom, const MBadPixelsCam &bad);
|
|---|
| 145 |
|
|---|
| 146 | ClassDef(MCalibrationChargeCam, 1) // Container for calibration information of the camera
|
|---|
| 147 | };
|
|---|
| 148 |
|
|---|
| 149 | #endif
|
|---|