1 | #ifndef MARS_MHCalibrationChargeCam
|
---|
2 | #define MARS_MHCalibrationChargeCam
|
---|
3 |
|
---|
4 | #ifndef ROOT_TObjArray
|
---|
5 | #include <TObjArray.h>
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TArrayI
|
---|
9 | #include <TArrayI.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | #ifndef ROOT_TArrayF
|
---|
13 | #include <TArrayF.h>
|
---|
14 | #endif
|
---|
15 |
|
---|
16 | #ifndef MARS_MH
|
---|
17 | #include "MH.h"
|
---|
18 | #endif
|
---|
19 | #ifndef MARS_MCamEvent
|
---|
20 | #include "MCamEvent.h"
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | class TText;
|
---|
24 | class TArrayI;
|
---|
25 | class TArrayF;
|
---|
26 | class MRawEvtData;
|
---|
27 | class MGeomCam;
|
---|
28 | class MBadPixelsCam;
|
---|
29 | class MBadPixelsPix;
|
---|
30 | class MCalibrationChargeCam;
|
---|
31 | class MCalibrationChargePix;
|
---|
32 | class MHCalibrationChargeHiGainPix;
|
---|
33 | class MHCalibrationChargeLoGainPix;
|
---|
34 | class MHCalibrationChargeCam : public MH, public MCamEvent
|
---|
35 | {
|
---|
36 | private:
|
---|
37 |
|
---|
38 | static const Int_t fgAverageNbins; // The default for fAverageNbins
|
---|
39 | static const Float_t fgNumHiGainSaturationLimit; // The default for fNumHiGainSaturationLimit
|
---|
40 | static const Float_t fgNumLoGainSaturationLimit; // The default for fNumLoGainSaturationLimit
|
---|
41 | static const Int_t fgPulserFrequency; // The default for fPulserFrequency
|
---|
42 |
|
---|
43 | Int_t fAverageNbins; // Number of bins for the average histograms
|
---|
44 | Float_t fNumHiGainSaturationLimit; // Rel. amount sat. higain FADC slices until pixel is called saturated
|
---|
45 | Float_t fNumLoGainSaturationLimit; // Rel. amount sat. logain FADC slices until pixel is called saturated
|
---|
46 | Int_t fPulserFrequency; // Light pulser frequency
|
---|
47 |
|
---|
48 | TObjArray *fHiGainArray; //-> Array of MHCalibrationChargeHiGainPix, one per pixel
|
---|
49 | TObjArray *fLoGainArray; //-> Array of MHCalibrationChargeLoGainPix, one per pixel
|
---|
50 | TObjArray *fAverageHiGainAreas; //-> Array of MHCalibrationChargeHiGainPix, one per pixel area
|
---|
51 | TObjArray *fAverageLoGainAreas; //-> Array of MHCalibrationChargeLoGainPix, one per pixel area
|
---|
52 | TObjArray *fAverageHiGainSectors; //-> Array of MHCalibrationChargeHiGainPix, one per camera sector
|
---|
53 | TObjArray *fAverageLoGainSectors; //-> Array of MHCalibrationChargeLoGainPix, one per camera sector
|
---|
54 |
|
---|
55 | MCalibrationChargeCam *fCam; //! Calibration Cam with the results
|
---|
56 | MRawEvtData *fRawEvt; //! Raw event data
|
---|
57 | MGeomCam *fGeom; //! Camera geometry
|
---|
58 | MBadPixelsCam *fBadPixels; //! Bad Pixels storage container
|
---|
59 |
|
---|
60 | TArrayI fAverageAreaNum; // Number of pixels in average pixels per area
|
---|
61 | TArrayI fAverageAreaSat; // Number of saturated slices in average pixels per area
|
---|
62 | TArrayF fAverageAreaSigma; // Re-normalized sigmas in average pixels per area
|
---|
63 | TArrayF fAverageAreaSigmaErr; // Errors of Re-normalized sigmas in average pixels per area
|
---|
64 | TArrayF fAverageAreaRelSigma; // Re-normalized relative sigmas in average pixels per area
|
---|
65 | TArrayF fAverageAreaRelSigmaErr; // Errors of Re-normalized relative sigmas in average pixels per area
|
---|
66 |
|
---|
67 | TArrayI fAverageSectorNum; // Number of pixels in average pixels per sector
|
---|
68 |
|
---|
69 | void InitializeHiGainHists(MHCalibrationChargeHiGainPix &hist, MBadPixelsPix &bad, const Int_t i);
|
---|
70 | void InitializeLoGainHists(MHCalibrationChargeLoGainPix &hist, MBadPixelsPix &bad, const Int_t i);
|
---|
71 |
|
---|
72 | void FinalizeHiGainHists(MHCalibrationChargeHiGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
|
---|
73 | void FinalizeLoGainHists(MHCalibrationChargeLoGainPix &hist, MCalibrationChargePix &pix, MBadPixelsPix &bad);
|
---|
74 | void DrawAverageSigma(Bool_t sat, Bool_t inner,
|
---|
75 | Float_t sigma, Float_t sigmaerr,
|
---|
76 | Float_t relsigma, Float_t relsigmaerr) const;
|
---|
77 |
|
---|
78 | public:
|
---|
79 |
|
---|
80 | MHCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
|
---|
81 | ~MHCalibrationChargeCam();
|
---|
82 |
|
---|
83 | void SetAverageNbins( const Int_t bins=fgAverageNbins ) { fAverageNbins = bins; }
|
---|
84 | void SetNumLoGainSaturationLimit( const Float_t lim=fgNumLoGainSaturationLimit) { fNumLoGainSaturationLimit = lim; }
|
---|
85 | void SetNumHiGainSaturationLimit( const Float_t lim=fgNumHiGainSaturationLimit) { fNumHiGainSaturationLimit = lim; }
|
---|
86 | void SetPulserFrequency ( const Int_t f=fgPulserFrequency) { fPulserFrequency = f; }
|
---|
87 |
|
---|
88 | Float_t GetNumHiGainSaturationLimit() const { return fNumHiGainSaturationLimit; }
|
---|
89 | Float_t GetNumLoGainSaturationLimit() const { return fNumLoGainSaturationLimit; }
|
---|
90 |
|
---|
91 | MHCalibrationChargeHiGainPix &operator[](UInt_t i);
|
---|
92 | const MHCalibrationChargeHiGainPix &operator[](UInt_t i) const;
|
---|
93 |
|
---|
94 | MHCalibrationChargeLoGainPix &operator()(UInt_t i);
|
---|
95 | const MHCalibrationChargeLoGainPix &operator()(UInt_t i) const;
|
---|
96 |
|
---|
97 | MHCalibrationChargeHiGainPix &GetAverageHiGainArea(UInt_t i);
|
---|
98 | const MHCalibrationChargeHiGainPix &GetAverageHiGainArea(UInt_t i) const;
|
---|
99 |
|
---|
100 | MHCalibrationChargeLoGainPix &GetAverageLoGainArea(UInt_t i);
|
---|
101 | const MHCalibrationChargeLoGainPix &GetAverageLoGainArea(UInt_t i) const;
|
---|
102 |
|
---|
103 | MHCalibrationChargeHiGainPix &GetAverageHiGainSector(UInt_t i);
|
---|
104 | const MHCalibrationChargeHiGainPix &GetAverageHiGainSector(UInt_t i) const;
|
---|
105 |
|
---|
106 | MHCalibrationChargeLoGainPix &GetAverageLoGainSector(UInt_t i);
|
---|
107 | const MHCalibrationChargeLoGainPix &GetAverageLoGainSector(UInt_t i) const;
|
---|
108 |
|
---|
109 | Bool_t SetupFill(const MParList *pList);
|
---|
110 | Bool_t ReInit ( MParList *pList);
|
---|
111 | Bool_t Fill (const MParContainer *par, const Stat_t w=1);
|
---|
112 | Bool_t Finalize ( );
|
---|
113 |
|
---|
114 | // Clone
|
---|
115 | TObject *Clone(const char *) const;
|
---|
116 |
|
---|
117 | // Draw
|
---|
118 | void Draw(const Option_t *opt);
|
---|
119 |
|
---|
120 | Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
|
---|
121 | void DrawPixelContent( Int_t num ) const;
|
---|
122 |
|
---|
123 | ClassDef(MHCalibrationChargeCam, 1) // Histogram class for camera calibration
|
---|
124 | };
|
---|
125 |
|
---|
126 | #endif
|
---|
127 |
|
---|
128 |
|
---|
129 |
|
---|
130 |
|
---|
131 |
|
---|
132 |
|
---|
133 |
|
---|
134 |
|
---|
135 |
|
---|