| 1 | #ifndef MARS_MCalibrationCam
|
|---|
| 2 | #define MARS_MCalibrationCam
|
|---|
| 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 MCalibrationPix;
|
|---|
| 16 | class MCalibrationBlindPix;
|
|---|
| 17 | class MCalibrationPINDiode;
|
|---|
| 18 |
|
|---|
| 19 | class MCalibrationCam : public MParContainer, public MCamEvent
|
|---|
| 20 | {
|
|---|
| 21 | private:
|
|---|
| 22 |
|
|---|
| 23 | Int_t fNumPixels;
|
|---|
| 24 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
|---|
| 25 |
|
|---|
| 26 | MCalibrationBlindPix *fBlindPixel; //-> Pointer to the Blind Pixel with fit results
|
|---|
| 27 | MCalibrationPINDiode *fPINDiode; //-> Pointer to the PIN Diode with fit results
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 | TH1D* fOffsets; //!
|
|---|
| 31 | TH1D* fSlopes; //!
|
|---|
| 32 |
|
|---|
| 33 | TH2D* fOffvsSlope; //!
|
|---|
| 34 |
|
|---|
| 35 | const Int_t fBlindPixelId;
|
|---|
| 36 | const Int_t fPINDiodeId;
|
|---|
| 37 |
|
|---|
| 38 | Float_t fMeanPhotInsidePlexiglass; // The mean number of photons in an INNER PIXEL inside the plexiglass
|
|---|
| 39 | Float_t fMeanPhotErrInsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
|---|
| 40 | Float_t fMeanPhotOutsidePlexiglass; // The mean number of photons in an INNER PIXEL outside the plexiglass
|
|---|
| 41 | Float_t fMeanPhotErrOutsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
|---|
| 42 |
|
|---|
| 43 | UInt_t fNumExcludedPixels;
|
|---|
| 44 |
|
|---|
| 45 | Byte_t fFlags;
|
|---|
| 46 |
|
|---|
| 47 | enum { kBlindPixelMethodValid, kPINDiodeMethodValid,
|
|---|
| 48 | kNumPhotInsidePlexiglassAvailable, kNumPhotOutsidePlexiglassAvailable };
|
|---|
| 49 |
|
|---|
| 50 | public:
|
|---|
| 51 |
|
|---|
| 52 | enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
|
|---|
| 53 |
|
|---|
| 54 | private:
|
|---|
| 55 |
|
|---|
| 56 | CalibrationColor_t fColor;
|
|---|
| 57 |
|
|---|
| 58 | public:
|
|---|
| 59 |
|
|---|
| 60 | MCalibrationCam(const char *name=NULL, const char *title=NULL);
|
|---|
| 61 | ~MCalibrationCam();
|
|---|
| 62 |
|
|---|
| 63 | void Clear(Option_t *o="");
|
|---|
| 64 | void InitSize(const UInt_t i);
|
|---|
| 65 |
|
|---|
| 66 | // Setters
|
|---|
| 67 | void SetColor(const CalibrationColor_t color) { fColor = color; }
|
|---|
| 68 | void SetNumPixelsExcluded(const UInt_t n) { fNumExcludedPixels = n; }
|
|---|
| 69 |
|
|---|
| 70 | void SetBlindPixelMethodValid(const Bool_t b = kTRUE);
|
|---|
| 71 | void SetPINDiodeMethodValid(const Bool_t b = kTRUE);
|
|---|
| 72 |
|
|---|
| 73 | // Getters
|
|---|
| 74 | Int_t GetSize() const;
|
|---|
| 75 | UInt_t GetNumPixels() const { return fNumPixels; }
|
|---|
| 76 |
|
|---|
| 77 | MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
|
|---|
| 78 | MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
|
|---|
| 79 | MCalibrationBlindPix *GetBlindPixel() { return fBlindPixel; }
|
|---|
| 80 | MCalibrationPINDiode *GetPINDiode() { return fPINDiode; }
|
|---|
| 81 |
|
|---|
| 82 | Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
|---|
| 83 | Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
|---|
| 84 | Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
|---|
| 85 | Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
|
|---|
| 86 |
|
|---|
| 87 | Bool_t IsPixelUsed(Int_t idx) const;
|
|---|
| 88 | Bool_t IsPixelFitted(Int_t idx) const;
|
|---|
| 89 |
|
|---|
| 90 | Bool_t IsBlindPixelMethodValid() const;
|
|---|
| 91 | Bool_t IsPINDiodeMethodValid() const;
|
|---|
| 92 |
|
|---|
| 93 | Bool_t IsNumPhotInsidePlexiglassAvailable() const;
|
|---|
| 94 | Bool_t IsNumPhotOutsidePlexiglassAvailable() const;
|
|---|
| 95 |
|
|---|
| 96 |
|
|---|
| 97 | // Others
|
|---|
| 98 | MCalibrationPix &operator[](Int_t i);
|
|---|
| 99 | MCalibrationPix &operator[](Int_t i) const;
|
|---|
| 100 |
|
|---|
| 101 | void CutEdges();
|
|---|
| 102 | Bool_t CheckBounds(Int_t i) const;
|
|---|
| 103 |
|
|---|
| 104 | // Prints
|
|---|
| 105 | void Print(Option_t *o="") const;
|
|---|
| 106 |
|
|---|
| 107 | // Draws
|
|---|
| 108 | void DrawPixelContent(Int_t num) const;
|
|---|
| 109 | void DrawHiLoFits();
|
|---|
| 110 |
|
|---|
| 111 | // Others
|
|---|
| 112 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
|---|
| 113 |
|
|---|
| 114 | Bool_t CalcNumPhotInsidePlexiglass();
|
|---|
| 115 | Bool_t CalcNumPhotOutsidePlexiglass();
|
|---|
| 116 |
|
|---|
| 117 | ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
|
|---|
| 118 | };
|
|---|
| 119 |
|
|---|
| 120 | #endif
|
|---|
| 121 |
|
|---|