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 | class MArrivalTime;
|
---|
34 |
|
---|
35 | class MTime;
|
---|
36 |
|
---|
37 | class MCalibrationCalc : public MTask
|
---|
38 | {
|
---|
39 | private:
|
---|
40 |
|
---|
41 | MPedestalCam *fPedestals; // Pedestals of all pixels in the camera
|
---|
42 | MCalibrationCam *fCalibrations; // Calibration events of all pixels in the camera
|
---|
43 | MExtractedSignalCam *fSignals; // Calibration events of all pixels in the camera
|
---|
44 |
|
---|
45 | MRawEvtData *fRawEvt; // raw event data (time slices)
|
---|
46 | MRawRunHeader *fRunHeader; // RunHeader information
|
---|
47 |
|
---|
48 | MArrivalTime *fArrivalTime; // Calculated Arrival Times
|
---|
49 |
|
---|
50 | MTime *fEvtTime; // Time of the event
|
---|
51 |
|
---|
52 | Int_t fEvents; // Number of events
|
---|
53 | Int_t fCosmics; // Number of events due to supposed cosmics
|
---|
54 |
|
---|
55 | Byte_t fNumHiGainSamples;
|
---|
56 | Byte_t fNumLoGainSamples;
|
---|
57 | Float_t fSqrtHiGainSamples;
|
---|
58 |
|
---|
59 | Float_t fConversionHiLo;
|
---|
60 | Byte_t fFlags; // Flag for the fits used
|
---|
61 |
|
---|
62 | TString fExcludedPixelsFile;
|
---|
63 | UInt_t fNumExcludedPixels;
|
---|
64 |
|
---|
65 | public:
|
---|
66 |
|
---|
67 | enum PulserColor_t { kEGreen, kEBlue, kEUV, kECT1 };
|
---|
68 |
|
---|
69 | private:
|
---|
70 |
|
---|
71 | PulserColor_t fColor;
|
---|
72 |
|
---|
73 | Bool_t ReInit(MParList *pList);
|
---|
74 | Int_t PreProcess(MParList *pList);
|
---|
75 | Int_t Process();
|
---|
76 | Int_t PostProcess();
|
---|
77 |
|
---|
78 | public:
|
---|
79 |
|
---|
80 | MCalibrationCalc(const char *name=NULL, const char *title=NULL);
|
---|
81 |
|
---|
82 | private:
|
---|
83 |
|
---|
84 | enum { kUseTimes, kUseBlindPixelFit, kUsePinDiodeFit,
|
---|
85 | kUseCosmicsRejection, kUseQualityChecks };
|
---|
86 |
|
---|
87 | public:
|
---|
88 |
|
---|
89 | // Skipping parts of the work
|
---|
90 | void SkipTime(Bool_t b=kTRUE)
|
---|
91 | {b ? CLRBIT(fFlags, kUseTimes) : SETBIT(fFlags, kUseTimes);}
|
---|
92 | void SkipBlindPixelFit(Bool_t b=kTRUE)
|
---|
93 | {b ? CLRBIT(fFlags, kUseBlindPixelFit) : SETBIT(fFlags, kUseBlindPixelFit);}
|
---|
94 | void SkipPinDiodeFit(Bool_t b=kTRUE)
|
---|
95 | {b ? CLRBIT(fFlags, kUsePinDiodeFit) : SETBIT(fFlags, kUsePinDiodeFit);}
|
---|
96 | void SkipCosmicsRejection(Bool_t b=kTRUE)
|
---|
97 | {b ? CLRBIT(fFlags, kUseCosmicsRejection) : SETBIT(fFlags, kUseCosmicsRejection);}
|
---|
98 | void SkipQualityChecks(Bool_t b=kTRUE)
|
---|
99 | {b ? CLRBIT(fFlags, kUseQualityChecks) : SETBIT(fFlags, kUseQualityChecks);}
|
---|
100 |
|
---|
101 | // Setters
|
---|
102 | void SetPulserColor(PulserColor_t color) { fColor = color; }
|
---|
103 | void SetConversionHiLo(Float_t conv) { fConversionHiLo = conv; }
|
---|
104 |
|
---|
105 | // Getters
|
---|
106 | MCalibrationBlindPix *GetBlindPixel() const;
|
---|
107 | MCalibrationPINDiode *GetPINDiode() const;
|
---|
108 |
|
---|
109 | // Exclude pixels from configuration file
|
---|
110 | void ExcludePixelsFromAsciiFile(const char *file) { fExcludedPixelsFile = file; }
|
---|
111 |
|
---|
112 | ClassDef(MCalibrationCalc, 1) // Task to fill the Calibration Containers from raw data
|
---|
113 | };
|
---|
114 |
|
---|
115 | #endif
|
---|