1 | #ifndef MARS_MCalibrationCalc
|
---|
2 | #define MARS_MCalibrationCalc
|
---|
3 |
|
---|
4 | /////////////////////////////////////////////////////////////////////////////
|
---|
5 | // //
|
---|
6 | // MCalibrationCalc //
|
---|
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 | #ifndef ROOT_TArrayI
|
---|
18 | #include "TArrayI.h"
|
---|
19 | #endif
|
---|
20 |
|
---|
21 | #ifndef MARS_MCalibrationCam
|
---|
22 | #include "MCalibrationCam.h"
|
---|
23 | #endif
|
---|
24 |
|
---|
25 | #include "TString.h"
|
---|
26 |
|
---|
27 | class MRawEvtData;
|
---|
28 | class MRawRunHeader;
|
---|
29 |
|
---|
30 | class MPedestalCam;
|
---|
31 | class MCalibrationCam;
|
---|
32 | class MExtractedSignalCam;
|
---|
33 |
|
---|
34 | class MTime;
|
---|
35 |
|
---|
36 | class MCalibrationCalc : public MTask
|
---|
37 | {
|
---|
38 | private:
|
---|
39 |
|
---|
40 | MPedestalCam *fPedestals; // Pedestals of all pixels in the camera
|
---|
41 | MCalibrationCam *fCalibrations; // Calibration events of all pixels in the camera
|
---|
42 | MExtractedSignalCam *fSignals; // Calibration events of all pixels in the camera
|
---|
43 |
|
---|
44 | MRawEvtData *fRawEvt; // raw event data (time slices)
|
---|
45 | MRawRunHeader *fRunHeader; // RunHeader information
|
---|
46 |
|
---|
47 | MTime *fEvtTime; // Time of the event
|
---|
48 |
|
---|
49 | Int_t fEvents; // Number of events
|
---|
50 | Int_t fHistOverFlow; // Number of events with saturated Low Gain
|
---|
51 | Int_t fCosmics; // Number of events due to supposed cosmics
|
---|
52 |
|
---|
53 | Byte_t fNumHiGainSamples;
|
---|
54 | Byte_t fNumLoGainSamples;
|
---|
55 | Float_t fSqrtHiGainSamples;
|
---|
56 |
|
---|
57 | Float_t fConversionHiLo;
|
---|
58 | Byte_t fFlags; // Flag for the fits used
|
---|
59 |
|
---|
60 | TString fExcludedPixelsFile;
|
---|
61 | UInt_t fNumExcludedPixels;
|
---|
62 |
|
---|
63 | public:
|
---|
64 |
|
---|
65 | enum PulserColor_t { kEGreen, kEBlue, kEUV, kECT1 };
|
---|
66 |
|
---|
67 | private:
|
---|
68 |
|
---|
69 | PulserColor_t fColor;
|
---|
70 |
|
---|
71 | Bool_t ReInit(MParList *pList);
|
---|
72 | Int_t PreProcess(MParList *pList);
|
---|
73 | Int_t Process();
|
---|
74 | Int_t PostProcess();
|
---|
75 |
|
---|
76 | public:
|
---|
77 |
|
---|
78 | MCalibrationCalc(const char *name=NULL, const char *title=NULL);
|
---|
79 |
|
---|
80 |
|
---|
81 | private:
|
---|
82 |
|
---|
83 | enum { kUseTimeFits, kUseBlindPixelFit, kUsePinDiodeFit };
|
---|
84 |
|
---|
85 | public:
|
---|
86 |
|
---|
87 | // Skipping fits
|
---|
88 | void SkipTimeFits(Bool_t b=kTRUE)
|
---|
89 | {b ? CLRBIT(fFlags, kUseTimeFits) : SETBIT(fFlags, kUseTimeFits);}
|
---|
90 | void SkipBlindPixelFit(Bool_t b=kTRUE)
|
---|
91 | {b ? CLRBIT(fFlags, kUseBlindPixelFit) : SETBIT(fFlags, kUseBlindPixelFit);}
|
---|
92 | void SkipPinDiodeFit(Bool_t b=kTRUE)
|
---|
93 | {b ? CLRBIT(fFlags, kUsePinDiodeFit) : SETBIT(fFlags, kUsePinDiodeFit);}
|
---|
94 |
|
---|
95 | // Setters
|
---|
96 | void SetPulserColor(PulserColor_t color) { fColor = color; }
|
---|
97 | void SetConversionHiLo(Float_t conv) { fConversionHiLo = conv; }
|
---|
98 |
|
---|
99 | // Getters
|
---|
100 | MCalibrationBlindPix *GetBlindPixel() const { return fCalibrations->GetBlindPixel(); }
|
---|
101 | MCalibrationPINDiode *GetPINDiode() const { return fCalibrations->GetPINDiode(); }
|
---|
102 |
|
---|
103 | // Exclude pixels from configuration file
|
---|
104 | void ExcludePixelsFromAsciiFile(const char *file) { fExcludedPixelsFile = file; }
|
---|
105 |
|
---|
106 | ClassDef(MCalibrationCalc, 1) // Task to fill the Calibration Containers from raw data
|
---|
107 | };
|
---|
108 |
|
---|
109 | #endif
|
---|