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 | #include "TString.h"
|
---|
18 |
|
---|
19 | class MRawEvtData;
|
---|
20 | class MRawRunHeader;
|
---|
21 | class MPedestalCam;
|
---|
22 | class MCalibrationChargePINDiode;
|
---|
23 | class MCalibrationChargeCam;
|
---|
24 | class MGeomCam;
|
---|
25 | class MExtractedSignalCam;
|
---|
26 | class MExtractedSignalBlindPixel;
|
---|
27 | class MTime;
|
---|
28 | class MCalibrationChargeCalc : public MTask
|
---|
29 | {
|
---|
30 |
|
---|
31 | private:
|
---|
32 |
|
---|
33 | static const UInt_t fgBlindPixelIdx; // ID of the blind pixel
|
---|
34 | static const UInt_t fgPINDiodeIdx; // ID of the PIN Diode
|
---|
35 | static const UInt_t fgBlindPixelSinglePheCut; // FADC sum from which on an event is considered as a S.ph. one.
|
---|
36 |
|
---|
37 | MPedestalCam *fPedestals; //! Pedestals of all pixels in the camera
|
---|
38 | MCalibrationChargeCam *fCam; // Calibration events of all pixels in the camera
|
---|
39 | MRawEvtData *fRawEvt; //! raw event data (time slices)
|
---|
40 | MRawRunHeader *fRunHeader; //! RunHeader information
|
---|
41 |
|
---|
42 | MTime *fEvtTime; //! Time of the event
|
---|
43 |
|
---|
44 | MExtractedSignalCam *fSignals; // Extracted signal of all pixels in the camera
|
---|
45 | MExtractedSignalBlindPixel *fBlindPixel; // Extracted signal of the blind pixel
|
---|
46 | MCalibrationChargePINDiode *fPINDiode; // Calibration events of all pixels in the camera
|
---|
47 |
|
---|
48 |
|
---|
49 | UInt_t fBlindPixelIdx;
|
---|
50 | UInt_t fPINDiodeIdx;
|
---|
51 |
|
---|
52 | Byte_t fNumHiGainSamples;
|
---|
53 | Byte_t fNumLoGainSamples;
|
---|
54 | Float_t fSqrtHiGainSamples;
|
---|
55 |
|
---|
56 | UInt_t fBlindPixelSinglePheCut;
|
---|
57 |
|
---|
58 | Int_t fNumBlindPixelSinglePhe;
|
---|
59 | Int_t fNumBlindPixelPedestal;
|
---|
60 |
|
---|
61 | Float_t fConversionHiLo;
|
---|
62 | Int_t fFlags; // Flag for the fits used
|
---|
63 |
|
---|
64 | TString fExcludedPixelsFile;
|
---|
65 | UInt_t fNumExcludedPixels;
|
---|
66 |
|
---|
67 | enum { kUseBlindPixelFit,
|
---|
68 | kUseQualityChecks,
|
---|
69 | kHiLoGainCalibration };
|
---|
70 |
|
---|
71 | Int_t PreProcess(MParList *pList);
|
---|
72 | Bool_t ReInit(MParList *pList);
|
---|
73 | Int_t Process();
|
---|
74 | Int_t PostProcess();
|
---|
75 |
|
---|
76 | public:
|
---|
77 |
|
---|
78 | MCalibrationChargeCalc(const char *name=NULL, const char *title=NULL);
|
---|
79 |
|
---|
80 | void Clear(const Option_t *o="");
|
---|
81 |
|
---|
82 | void SkipBlindPixelFit(Bool_t b=kTRUE)
|
---|
83 | {b ? CLRBIT(fFlags, kUseBlindPixelFit) : SETBIT(fFlags, kUseBlindPixelFit);}
|
---|
84 | void SkipQualityChecks(Bool_t b=kTRUE)
|
---|
85 | {b ? CLRBIT(fFlags, kUseQualityChecks) : SETBIT(fFlags, kUseQualityChecks);}
|
---|
86 | void SkipHiLoGainCalibration(Bool_t b=kTRUE)
|
---|
87 | {b ? CLRBIT(fFlags, kHiLoGainCalibration) : SETBIT(fFlags, kHiLoGainCalibration);}
|
---|
88 |
|
---|
89 |
|
---|
90 | // Setters
|
---|
91 | void SetBlindPixelSinglePheCut ( const Int_t cut=fgBlindPixelSinglePheCut)
|
---|
92 | { fBlindPixelSinglePheCut = cut; }
|
---|
93 |
|
---|
94 | void SetPINDiodeIdx( const UInt_t idx=fgPINDiodeIdx ) { fPINDiodeIdx = idx; }
|
---|
95 | void SetBlindPixelIdx( const UInt_t idx=fgBlindPixelIdx ) { fBlindPixelIdx = idx; }
|
---|
96 |
|
---|
97 | // Exclude pixels from configuration file
|
---|
98 | void ExcludePixelsFromAsciiFile(const char *file) { fExcludedPixelsFile = file; }
|
---|
99 |
|
---|
100 | ClassDef(MCalibrationChargeCalc, 1) // Task to fill the Calibration Containers from raw data
|
---|
101 | };
|
---|
102 |
|
---|
103 | #endif
|
---|