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 MCalibrationPix;
|
---|
16 | class MCalibrationBlindPix;
|
---|
17 | class MCalibrationChargePINDiode;
|
---|
18 | class MCalibrationChargeCam : public MParContainer, public MCamEvent
|
---|
19 | {
|
---|
20 | private:
|
---|
21 |
|
---|
22 | static const Int_t gkBlindPixelId;
|
---|
23 | static const Int_t gkPINDiodeId;
|
---|
24 | static const Float_t gkBlindPixelArea; // The Blind Pixel area in mm^2
|
---|
25 |
|
---|
26 | static const Float_t gkCalibrationBlindPixelQEGreen;
|
---|
27 | static const Float_t gkCalibrationBlindPixelQEBlue ;
|
---|
28 | static const Float_t gkCalibrationBlindPixelQEUV ;
|
---|
29 | static const Float_t gkCalibrationBlindPixelQECT1 ;
|
---|
30 |
|
---|
31 | static const Float_t gkCalibrationBlindPixelQEGreenErr;
|
---|
32 | static const Float_t gkCalibrationBlindPixelQEBlueErr ;
|
---|
33 | static const Float_t gkCalibrationBlindPixelQEUVErr ;
|
---|
34 | static const Float_t gkCalibrationBlindPixelQECT1Err ;
|
---|
35 |
|
---|
36 | static const Float_t gkCalibrationBlindPixelAttGreen;
|
---|
37 | static const Float_t gkCalibrationBlindPixelAttBlue ;
|
---|
38 | static const Float_t gkCalibrationBlindPixelAttUV ;
|
---|
39 | static const Float_t gkCalibrationBlindPixelAttCT1 ;
|
---|
40 |
|
---|
41 | Int_t fNumPixels;
|
---|
42 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
---|
43 |
|
---|
44 | MCalibrationBlindPix *fBlindPixel; //-> Pointer to the Blind Pixel with fit results
|
---|
45 | const MCalibrationChargePINDiode *fPINDiode; //! Pointer to the PIN Diode with fit results
|
---|
46 |
|
---|
47 | const MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer
|
---|
48 |
|
---|
49 | TH1D* fOffsets; //!
|
---|
50 | TH1D* fSlopes; //!
|
---|
51 |
|
---|
52 | TH2D* fOffvsSlope; //!
|
---|
53 |
|
---|
54 | Float_t fMeanFluxInsidePlexiglass; // The mean number of photons in an INNER PIXEL inside the plexiglass
|
---|
55 | Float_t fMeanFluxErrInsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
|
---|
56 |
|
---|
57 | UInt_t fNumExcludedPixels;
|
---|
58 |
|
---|
59 | Byte_t fFlags;
|
---|
60 |
|
---|
61 | enum { kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid,
|
---|
62 | kFluxInsidePlexiglassAvailable };
|
---|
63 |
|
---|
64 | public:
|
---|
65 |
|
---|
66 | enum PulserColor_t { kEBlue, kEGreen, kEUV, kECT1 } ;
|
---|
67 |
|
---|
68 | private:
|
---|
69 |
|
---|
70 | PulserColor_t fColor;
|
---|
71 |
|
---|
72 | public:
|
---|
73 |
|
---|
74 | MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
---|
75 | ~MCalibrationChargeCam();
|
---|
76 |
|
---|
77 | void Clear( Option_t *o="" );
|
---|
78 | void InitSize( const UInt_t i );
|
---|
79 |
|
---|
80 | // Setters
|
---|
81 | void SetColor( const PulserColor_t color ) { fColor = color; }
|
---|
82 | void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; }
|
---|
83 | void SetGeomCam( const MGeomCam *geom) { fGeomCam = geom; }
|
---|
84 | void SetPINDiode( const MCalibrationChargePINDiode *d ) { fPINDiode = d; }
|
---|
85 |
|
---|
86 | // Setters only for MC!!
|
---|
87 | void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
|
---|
88 | void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
|
---|
89 |
|
---|
90 | // Getters
|
---|
91 | Int_t GetSize() const;
|
---|
92 | UInt_t GetNumPixels() const { return fNumPixels; }
|
---|
93 |
|
---|
94 | MCalibrationBlindPix *GetBlindPixel() { return fBlindPixel; }
|
---|
95 | const MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
|
---|
96 |
|
---|
97 | Float_t GetMeanFluxInsidePlexiglass() const { return fMeanFluxInsidePlexiglass; }
|
---|
98 | Float_t GetMeanFluxErrInsidePlexiglass() const { return fMeanFluxErrInsidePlexiglass; }
|
---|
99 |
|
---|
100 | Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
101 | Bool_t GetConversionFactorBlindPixel( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
102 | Bool_t GetConversionFactorPINDiode( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
103 | Bool_t GetConversionFactorCombined( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
104 |
|
---|
105 | Bool_t IsPixelUsed(Int_t idx) const;
|
---|
106 | Bool_t IsPixelFitted(Int_t idx) const;
|
---|
107 |
|
---|
108 | Bool_t IsBlindPixelMethodValid() const;
|
---|
109 | Bool_t IsPINDiodeMethodValid() const;
|
---|
110 |
|
---|
111 | Bool_t IsFluxInsidePlexiglassAvailable() const;
|
---|
112 |
|
---|
113 | // Others
|
---|
114 | MCalibrationPix &operator[](UInt_t i);
|
---|
115 | const MCalibrationPix &operator[](UInt_t i) const;
|
---|
116 |
|
---|
117 | void CutEdges();
|
---|
118 | Bool_t CheckBounds(Int_t i) const;
|
---|
119 |
|
---|
120 | // Prints
|
---|
121 | void Print(Option_t *o="") const;
|
---|
122 |
|
---|
123 | // Draws
|
---|
124 | void DrawPixelContent(Int_t num) const;
|
---|
125 | // void DrawHiLoFits();
|
---|
126 |
|
---|
127 | // Others
|
---|
128 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
129 |
|
---|
130 | Bool_t CalcFluxInsidePlexiglass();
|
---|
131 | void ApplyPINDiodeCalibration();
|
---|
132 |
|
---|
133 | ClassDef(MCalibrationChargeCam, 1) // Container for calibration information of the camera
|
---|
134 | };
|
---|
135 |
|
---|
136 | #endif
|
---|
137 |
|
---|
138 |
|
---|
139 |
|
---|