1 | #ifndef MARS_MCalibrationChargeCalc
|
---|
2 | #define MARS_MCalibrationChargeCalc
|
---|
3 |
|
---|
4 | /////////////////////////////////////////////////////////////////////////////
|
---|
5 | // //
|
---|
6 | // MCalibrationChargeCalc //
|
---|
7 | // //
|
---|
8 | // Integrates the time slices of the all pixels of a calibration event //
|
---|
9 | // and substract the pedestal value //
|
---|
10 | // //
|
---|
11 | /////////////////////////////////////////////////////////////////////////////
|
---|
12 |
|
---|
13 | #ifndef MARS_MTask
|
---|
14 | #include "MTask.h"
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | class MRawEvtData;
|
---|
18 | class MRawRunHeader;
|
---|
19 | class MPedestalCam;
|
---|
20 | class MPedestalPix;
|
---|
21 | class MCalibrationChargePINDiode;
|
---|
22 | class MCalibrationChargeBlindPix;
|
---|
23 | class MCalibrationChargePix;
|
---|
24 | class MCalibrationChargeCam;
|
---|
25 | class MCalibrationQECam;
|
---|
26 | class MGeomCam;
|
---|
27 | class MExtractedSignalCam;
|
---|
28 | class MBadPixelsCam;
|
---|
29 | class MBadPixelsPix;
|
---|
30 | class MTime;
|
---|
31 | class MCalibrationChargeCalc : public MTask
|
---|
32 | {
|
---|
33 | private:
|
---|
34 |
|
---|
35 | MPedestalCam *fPedestals; //! Pedestals of all pixels in the camera
|
---|
36 | MCalibrationChargeCam *fCam; // Calibration events of all pixels in the camera
|
---|
37 | MCalibrationQECam *fQECam; // Derived Quantum efficiency of all pixels in the camera
|
---|
38 | MRawEvtData *fRawEvt; //! raw event data (time slices)
|
---|
39 | MRawRunHeader *fRunHeader; //! RunHeader information
|
---|
40 | MGeomCam *fGeom; //! Geometry information
|
---|
41 | MBadPixelsCam *fBadPixels; //! Bad Pixels information
|
---|
42 |
|
---|
43 | MTime *fEvtTime; //! Time of the event
|
---|
44 |
|
---|
45 | MExtractedSignalCam *fSignals; // Extracted signal of all pixels in the camera
|
---|
46 | MCalibrationChargePINDiode *fPINDiode; // Calibration results of the PIN Diode
|
---|
47 | MCalibrationChargeBlindPix *fBlindPixel; // Calibration results of the Blind Pixel
|
---|
48 |
|
---|
49 | Float_t fNumHiGainSamples;
|
---|
50 | Float_t fNumLoGainSamples;
|
---|
51 | Float_t fSqrtHiGainSamples;
|
---|
52 | Float_t fSqrtLoGainSamples;
|
---|
53 |
|
---|
54 | Float_t fConversionHiLo;
|
---|
55 | Int_t fFlags; // Flag for the fits used
|
---|
56 |
|
---|
57 | enum { kUseQualityChecks,
|
---|
58 | kHiLoGainCalibration };
|
---|
59 |
|
---|
60 | Int_t PreProcess(MParList *pList);
|
---|
61 | Bool_t ReInit(MParList *pList);
|
---|
62 | Int_t Process();
|
---|
63 | Int_t PostProcess();
|
---|
64 |
|
---|
65 | void FinalizePedestals(const MPedestalPix &ped, MCalibrationChargePix &cal,
|
---|
66 | Float_t &avped, Float_t &avrms);
|
---|
67 | void FinalizeAvPedestals(MCalibrationChargePix &cal, Float_t avped, Float_t avrms, Int_t avnum);
|
---|
68 |
|
---|
69 | Bool_t FinalizeCharges(MCalibrationChargePix &cal, MBadPixelsPix &bad);
|
---|
70 |
|
---|
71 | public:
|
---|
72 |
|
---|
73 | MCalibrationChargeCalc(const char *name=NULL, const char *title=NULL);
|
---|
74 |
|
---|
75 | void Clear(const Option_t *o="");
|
---|
76 |
|
---|
77 | void SkipQualityChecks(Bool_t b=kTRUE)
|
---|
78 | {b ? CLRBIT(fFlags, kUseQualityChecks) : SETBIT(fFlags, kUseQualityChecks);}
|
---|
79 | void SkipHiLoGainCalibration(Bool_t b=kTRUE)
|
---|
80 | {b ? CLRBIT(fFlags, kHiLoGainCalibration) : SETBIT(fFlags, kHiLoGainCalibration);}
|
---|
81 |
|
---|
82 | ClassDef(MCalibrationChargeCalc, 1) // Task to fill the Calibration Containers from raw data
|
---|
83 | };
|
---|
84 |
|
---|
85 | #endif
|
---|