| 1 | #ifndef MARS_MCalibrationCam
|
|---|
| 2 | #define MARS_MCalibrationCam
|
|---|
| 3 |
|
|---|
| 4 | #ifndef MARS_MCamEvent
|
|---|
| 5 | #include "MCamEvent.h"
|
|---|
| 6 | #endif
|
|---|
| 7 |
|
|---|
| 8 | class TH1D;
|
|---|
| 9 | class TH2D;
|
|---|
| 10 | class TClonesArray;
|
|---|
| 11 |
|
|---|
| 12 | class MCalibrationPix;
|
|---|
| 13 | class MCalibrationBlindPix;
|
|---|
| 14 | class MCalibrationPINDiode;
|
|---|
| 15 |
|
|---|
| 16 | class MCalibrationCam : public MCamEvent
|
|---|
| 17 | {
|
|---|
| 18 | private:
|
|---|
| 19 |
|
|---|
| 20 | Int_t fNumPixels;
|
|---|
| 21 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
|---|
| 22 |
|
|---|
| 23 | MCalibrationBlindPix *fBlindPixel; //-> Pointer to the Blind Pixel with fit results
|
|---|
| 24 | MCalibrationPINDiode *fPINDiode; //-> Pointer to the PIN Diode with fit results
|
|---|
| 25 |
|
|---|
| 26 | Bool_t fNumPhotInsidePlexiglassAvailable; // TRUE: Blind Pixel could have been fitted well
|
|---|
| 27 | Float_t fMeanPhotInsidePlexiglass; // The mean number of photons in an INNER PIXEL inside the plexiglass
|
|---|
| 28 | Float_t fMeanPhotErrInsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
|---|
| 29 |
|
|---|
| 30 | Bool_t fNumPhotOutsidePlexiglassAvailable; // TRUE: PIN Diode could have been fitted well
|
|---|
| 31 | Float_t fMeanPhotOutsidePlexiglass; // The mean number of photons in an INNER PIXEL outside the plexiglass
|
|---|
| 32 | Float_t fMeanPhotErrOutsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
|---|
| 33 |
|
|---|
| 34 | TH1D* fOffsets; //!
|
|---|
| 35 | TH1D* fSlopes; //!
|
|---|
| 36 |
|
|---|
| 37 | TH2D* fOffvsSlope; //!
|
|---|
| 38 |
|
|---|
| 39 | UInt_t fNumExcludedPixels;
|
|---|
| 40 |
|
|---|
| 41 | public:
|
|---|
| 42 |
|
|---|
| 43 | enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
|
|---|
| 44 |
|
|---|
| 45 | private:
|
|---|
| 46 |
|
|---|
| 47 | CalibrationColor_t fColor;
|
|---|
| 48 |
|
|---|
| 49 | public:
|
|---|
| 50 |
|
|---|
| 51 | MCalibrationCam(const char *name=NULL, const char *title=NULL);
|
|---|
| 52 | ~MCalibrationCam();
|
|---|
| 53 |
|
|---|
| 54 | void Clear(Option_t *o="");
|
|---|
| 55 |
|
|---|
| 56 | void InitSize(const Int_t i);
|
|---|
| 57 |
|
|---|
| 58 | // Setters
|
|---|
| 59 | void SetColor(const CalibrationColor_t color) { fColor = color; }
|
|---|
| 60 | void SetNumPixelsExcluded(const UInt_t n) { fNumExcludedPixels = n; }
|
|---|
| 61 |
|
|---|
| 62 | // Getters
|
|---|
| 63 | Int_t GetSize() const;
|
|---|
| 64 | UInt_t GetNumPixels() const { return fNumPixels; }
|
|---|
| 65 |
|
|---|
| 66 | MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
|
|---|
| 67 | MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
|
|---|
| 68 |
|
|---|
| 69 | Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
|---|
| 70 | Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
|---|
| 71 | Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
|---|
| 72 | Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
|---|
| 73 |
|
|---|
| 74 | Bool_t IsPixelUsed(Int_t idx) const;
|
|---|
| 75 | Bool_t IsPixelFitted(Int_t idx) const;
|
|---|
| 76 |
|
|---|
| 77 | // Others
|
|---|
| 78 | MCalibrationPix &operator[](Int_t i);
|
|---|
| 79 | MCalibrationPix &operator[](Int_t i) const;
|
|---|
| 80 |
|
|---|
| 81 | void CutEdges();
|
|---|
| 82 | Bool_t CheckBounds(Int_t i) 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 CalcNumPhotInsidePlexiglass();
|
|---|
| 95 | Bool_t CalcNumPhotOutsidePlexiglass();
|
|---|
| 96 |
|
|---|
| 97 | ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
|
|---|
| 98 | };
|
|---|
| 99 |
|
|---|
| 100 | #endif
|
|---|
| 101 |
|
|---|