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 MCalibrationChargeCam : public MParContainer, public MCamEvent
|
---|
19 | {
|
---|
20 | private:
|
---|
21 |
|
---|
22 | static const Int_t gkBlindPixelId;
|
---|
23 | static const Int_t gkPINDiodeId;
|
---|
24 |
|
---|
25 | Int_t fNumPixels;
|
---|
26 | TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
|
---|
27 |
|
---|
28 | const MCalibrationChargeBlindPix *fBlindPixel; //! Pointer to the Blind Pixel with fit results
|
---|
29 | const MCalibrationChargePINDiode *fPINDiode; //! Pointer to the PIN Diode with fit results
|
---|
30 |
|
---|
31 | const MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer
|
---|
32 |
|
---|
33 | TH1D* fOffsets; //!
|
---|
34 | TH1D* fSlopes; //!
|
---|
35 |
|
---|
36 | TH2D* fOffvsSlope; //!
|
---|
37 |
|
---|
38 | UInt_t fNumExcludedPixels;
|
---|
39 |
|
---|
40 | Byte_t fFlags;
|
---|
41 |
|
---|
42 | enum { kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
|
---|
43 |
|
---|
44 | public:
|
---|
45 |
|
---|
46 | enum PulserColor_t { kEBlue, kEGreen, kEUV, kECT1 } ;
|
---|
47 |
|
---|
48 | private:
|
---|
49 |
|
---|
50 | PulserColor_t fColor;
|
---|
51 |
|
---|
52 | public:
|
---|
53 |
|
---|
54 | MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
---|
55 | ~MCalibrationChargeCam();
|
---|
56 |
|
---|
57 | void Clear( Option_t *o="" );
|
---|
58 | void InitSize( const UInt_t i );
|
---|
59 |
|
---|
60 | // Setters
|
---|
61 | void SetColor( const PulserColor_t color ) { fColor = color; }
|
---|
62 | void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; }
|
---|
63 | void SetGeomCam( const MGeomCam *geom) { fGeomCam = geom; }
|
---|
64 |
|
---|
65 | void SetPINDiode ( const MCalibrationChargePINDiode *d ) { fPINDiode = d; }
|
---|
66 | void SetBlindPixel( const MCalibrationChargeBlindPix *b ) { fBlindPixel = b; }
|
---|
67 |
|
---|
68 | // Setters only for MC!!
|
---|
69 | void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
|
---|
70 | void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
|
---|
71 |
|
---|
72 | // Getters
|
---|
73 | Int_t GetSize() const;
|
---|
74 | UInt_t GetNumPixels() const { return fNumPixels; }
|
---|
75 |
|
---|
76 | Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
77 | Bool_t GetConversionFactorBlindPixel( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
78 | Bool_t GetConversionFactorPINDiode( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
79 | Bool_t GetConversionFactorCombined( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
|
---|
80 |
|
---|
81 | Bool_t IsBlindPixelMethodValid() const;
|
---|
82 | Bool_t IsPINDiodeMethodValid() const;
|
---|
83 |
|
---|
84 | // Others
|
---|
85 | MCalibrationChargePix &operator[](UInt_t i);
|
---|
86 | const MCalibrationChargePix &operator[](UInt_t i) const;
|
---|
87 |
|
---|
88 | Bool_t CheckBounds(Int_t i) const;
|
---|
89 |
|
---|
90 | // Prints
|
---|
91 | void Print(Option_t *o="") const;
|
---|
92 |
|
---|
93 | // Draws
|
---|
94 | void DrawPixelContent(Int_t num) const;
|
---|
95 | // void DrawHiLoFits();
|
---|
96 |
|
---|
97 | // Others
|
---|
98 | Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
99 |
|
---|
100 | void ApplyPINDiodeCalibration();
|
---|
101 | void ApplyBlindPixelCalibration();
|
---|
102 |
|
---|
103 | ClassDef(MCalibrationChargeCam, 1) // Container for calibration information of the camera
|
---|
104 | };
|
---|
105 |
|
---|
106 | #endif
|
---|
107 |
|
---|
108 |
|
---|
109 |
|
---|
110 |
|
---|
111 |
|
---|