1 | #ifndef MARS_MCalibrateData
|
---|
2 | #define MARS_MCalibrateData
|
---|
3 |
|
---|
4 | /////////////////////////////////////////////////////////////////////////////
|
---|
5 | // //
|
---|
6 | // MCalibrateData //
|
---|
7 | // //
|
---|
8 | // Integrates the desired ADC time slices of one pixel and apply //
|
---|
9 | // calibration constants //
|
---|
10 | // //
|
---|
11 | // Differences between MCalibrateData and MCalibrate : //
|
---|
12 | // in MCalibrateData //
|
---|
13 | // - in ReInit the MPedPhot container is filled using //
|
---|
14 | // - the pedstals/slice from MPedestalCam //
|
---|
15 | // - the number of used FADC slices from MExtractedSignalCam //
|
---|
16 | // - the photon/ADC conversion factor from MCalibrationCam //
|
---|
17 | // //
|
---|
18 | /////////////////////////////////////////////////////////////////////////////
|
---|
19 | #ifndef MARS_MTask
|
---|
20 | #include "MTask.h"
|
---|
21 | #endif
|
---|
22 |
|
---|
23 | class MGeomCam;
|
---|
24 | class MBadPixelsCam;
|
---|
25 | class MPedestalCam;
|
---|
26 | class MCalibrationChargeCam;
|
---|
27 | class MCalibrationQECam;
|
---|
28 | class MExtractedSignalCam;
|
---|
29 |
|
---|
30 | class MPedPhotCam;
|
---|
31 | class MCerPhotEvt;
|
---|
32 |
|
---|
33 | class MCalibrateData : public MTask
|
---|
34 | {
|
---|
35 | private:
|
---|
36 |
|
---|
37 | MGeomCam *fGeomCam; //! Camera geometry container
|
---|
38 | MPedestalCam *fPedestal; //! Pedestals/slice [ADC counts]
|
---|
39 | MPedestalCam *fPedestalFromData; //! Pedestals/slice [ADC counts]
|
---|
40 | MBadPixelsCam *fBadPixels; //! Bad Pixels information
|
---|
41 | MCalibrationChargeCam *fCalibrations; //! Calibration constants
|
---|
42 | MCalibrationQECam *fQEs; //! Quantum efficiencies
|
---|
43 | MExtractedSignalCam *fSignals; //! Integrated charge in FADCs counts
|
---|
44 |
|
---|
45 | MPedPhotCam *fPedPhot; // Pedestals/(used slices) [photons]
|
---|
46 | MPedPhotCam *fPedPhotFromData; // Pedestals/(used slices) [photons]
|
---|
47 | MCerPhotEvt *fCerPhotEvt; // Cerenkov Photon Event used for calculation
|
---|
48 |
|
---|
49 | UShort_t fCalibrationMode;
|
---|
50 | Float_t fConversionHiLo;
|
---|
51 | Byte_t fPedestalFlag; // Flags defining to calibrate the pedestal each event or each run
|
---|
52 |
|
---|
53 | TString fNamePedADCRunContainer; // name of fPedestal
|
---|
54 | TString fNamePedADCEventContainer; // name of fPedestalFromData
|
---|
55 | TString fNamePedPhotRunContainer; // name of fPedPhot
|
---|
56 | TString fNamePedPhotEventContainer; // name of fPedPhotFromData
|
---|
57 |
|
---|
58 | Float_t fNumUsedHiGainFADCSlices;
|
---|
59 |
|
---|
60 | Bool_t CalibratePedestal ( MPedestalCam *, MPedPhotCam * );
|
---|
61 |
|
---|
62 | Bool_t GetConversionFactor(UInt_t,
|
---|
63 | Float_t &, Float_t &, Float_t &,
|
---|
64 | Float_t &, Float_t &);
|
---|
65 |
|
---|
66 | Int_t PreProcess( MParList *pList );
|
---|
67 | Bool_t ReInit ( MParList *pList );
|
---|
68 | Int_t Process ( );
|
---|
69 |
|
---|
70 | public:
|
---|
71 |
|
---|
72 | enum CalibrationMode_t { kNone=0,kFlatCharge=1,
|
---|
73 | kBlindPixel,kFfactor,kPinDiode,kCombined, kDummy };
|
---|
74 |
|
---|
75 | static const CalibrationMode_t kDefault = kFfactor;
|
---|
76 |
|
---|
77 | enum PedestalType_t {
|
---|
78 | kNo = BIT(0),
|
---|
79 | kRun = BIT(1),
|
---|
80 | kEvent = BIT(2)
|
---|
81 | };
|
---|
82 |
|
---|
83 | MCalibrateData( CalibrationMode_t calmode=kDefault,
|
---|
84 | const char *name=NULL, const char *title=NULL);
|
---|
85 |
|
---|
86 | void DisablePedestalType( PedestalType_t i ) { fPedestalFlag &= ~i; }
|
---|
87 | void EnablePedestalType ( PedestalType_t i ) { fPedestalFlag |= i; }
|
---|
88 | void SetPedestalType ( PedestalType_t i=kRun ) { fPedestalFlag = i; }
|
---|
89 | Bool_t TestFlag ( PedestalType_t i ) const { return fPedestalFlag & i; }
|
---|
90 |
|
---|
91 | void SetCalibrationMode ( CalibrationMode_t calmode=kDefault ) { fCalibrationMode=calmode; }
|
---|
92 | void SetConversionHiLo ( Float_t conv ) { fConversionHiLo = conv; }
|
---|
93 |
|
---|
94 | void SetNamePedADCRunContainer ( const char *name="MPedestalCam" ) {
|
---|
95 | fNamePedADCRunContainer = name; }
|
---|
96 | void SetNamePedADCEventContainer ( const char *name="MPedestalCamFromData" ) {
|
---|
97 | fNamePedADCEventContainer = name; }
|
---|
98 | void SetNamePedPhotRunContainer ( const char *name="MPedPhotCam" ) {
|
---|
99 | fNamePedPhotRunContainer = name; }
|
---|
100 | void SetNamePedPhotEventContainer( const char *name="MPedPhotCamFromData") {
|
---|
101 | fNamePedPhotEventContainer = name; }
|
---|
102 |
|
---|
103 | ClassDef(MCalibrateData, 0) // Task to calibrate FADC counts into Cherenkov photons
|
---|
104 | };
|
---|
105 |
|
---|
106 | #endif /* MCalibrateData */
|
---|
107 |
|
---|
108 |
|
---|
109 |
|
---|
110 |
|
---|
111 |
|
---|
112 |
|
---|