1 | #ifndef MARS_MCalibCalcFromPast
|
---|
2 | #define MARS_MCalibCalcFromPast
|
---|
3 |
|
---|
4 | #ifndef MARS_MTask
|
---|
5 | #include "MTask.h"
|
---|
6 | #endif
|
---|
7 |
|
---|
8 | #ifndef ROOT_TArrayF
|
---|
9 | #include <TArrayF.h>
|
---|
10 | #endif
|
---|
11 |
|
---|
12 | class MParList;
|
---|
13 | class MGeomCam;
|
---|
14 | class MRawRunHeader;
|
---|
15 | class MPedCalcFromLoGain;
|
---|
16 | class MCalibrationChargeCalc;
|
---|
17 | class MCalibrationRelTimeCalc;
|
---|
18 | class MCalibrateData;
|
---|
19 | class MCalibrationIntensityChargeCam;
|
---|
20 | class MCalibrationIntensityBlindCam;
|
---|
21 | class MCalibrationIntensityQECam;
|
---|
22 | class MCalibrationIntensityRelTimeCam;
|
---|
23 | class MCalibrationIntensityConstCam;
|
---|
24 | class MBadPixelsIntensityCam;
|
---|
25 |
|
---|
26 | class MCalibCalcFromPast : public MTask
|
---|
27 | {
|
---|
28 | private:
|
---|
29 | static const UInt_t fgNumEventsDump; //! Default for fNumEventsDump
|
---|
30 | static const UInt_t fgNumPhesDump; //! Default for fNumPhesDump
|
---|
31 |
|
---|
32 | MGeomCam *fGeom; //! Camera Geometry
|
---|
33 | MParList *fParList; //! Parameter List
|
---|
34 | MRawRunHeader *fRunHeader; //! Run header storing the run number
|
---|
35 | MCalibrationIntensityChargeCam *fIntensCharge; //! Intensity Charge Cam (to be created)
|
---|
36 | MCalibrationIntensityBlindCam *fIntensBlind; //! Intensity Blind Cam (to be created)
|
---|
37 | MCalibrationIntensityQECam *fIntensQE; //! Intensity QE Cam (to be created)
|
---|
38 | MCalibrationIntensityRelTimeCam *fIntensRelTime; //! Intensity Rel. Time Cam (to be created)
|
---|
39 | MCalibrationIntensityConstCam *fIntensConst; //! Intensity Rel. Time Cam (to be created)
|
---|
40 | MBadPixelsIntensityCam *fIntensBad; //! Intensity Bad Pixels Cam (to be created)
|
---|
41 |
|
---|
42 | MCalibrationChargeCalc *fChargeCalc; //! Charge Calibration Task
|
---|
43 | MCalibrationRelTimeCalc *fRelTimeCalc; //! Rel. Times Calibratio Task
|
---|
44 | MCalibrateData *fCalibrate; //! Data Calibration Task
|
---|
45 |
|
---|
46 | UInt_t fNumCam; //! Number of currently used Calibration Cam
|
---|
47 | UInt_t fNumEventsDump; // Number of event after which the MCalibrationCams gets updated
|
---|
48 | UInt_t fNumEvents; //! Event counter only for calibration events
|
---|
49 | UInt_t fNumPhesDump; // Number of cams after which the number of phes gets averaged
|
---|
50 | UInt_t fNumPhes; //! Event counter for photo-electron updates
|
---|
51 |
|
---|
52 | Float_t fMeanPhes;
|
---|
53 | Float_t fMeanPhesRelVar;
|
---|
54 |
|
---|
55 | Bool_t fUpdateWithFFactorMethod; // Update the interlaced calib events with the full F-Factor method
|
---|
56 | Bool_t fUpdateNumPhes; // Update the number of photo-electrons only after fNumPhesDump number of Cams
|
---|
57 |
|
---|
58 | TArrayF fPhes;
|
---|
59 | TArrayF fPhesVar;
|
---|
60 |
|
---|
61 | Int_t fNumFails; //! How often got the update skipped?
|
---|
62 |
|
---|
63 | // MTask
|
---|
64 | Int_t PreProcess(MParList *pList);
|
---|
65 | Int_t Process();
|
---|
66 | Int_t PostProcess();
|
---|
67 | Bool_t ReInit(MParList *pList);
|
---|
68 |
|
---|
69 | // MCalibCalcFromPast
|
---|
70 | Bool_t ReInitialize();
|
---|
71 | Bool_t Finalize(const char* name, Bool_t finalize=kTRUE);
|
---|
72 |
|
---|
73 | Bool_t UpdateMeanPhes();
|
---|
74 |
|
---|
75 | // MParContainer
|
---|
76 | Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
|
---|
77 |
|
---|
78 | public:
|
---|
79 | MCalibCalcFromPast(const char *name=NULL, const char *title=NULL);
|
---|
80 |
|
---|
81 | // Getter
|
---|
82 | UInt_t GetNumEventsDump() const { return fNumEventsDump; }
|
---|
83 |
|
---|
84 | // Setter
|
---|
85 | void SetNumEventsDump( const UInt_t i=fgNumEventsDump ) { fNumEventsDump = i; }
|
---|
86 | void SetNumPhesDump ( const UInt_t i=fgNumPhesDump ) { fNumPhesDump = i; }
|
---|
87 |
|
---|
88 | void SetCalibrate ( MCalibrateData *c ) { fCalibrate = c; }
|
---|
89 | void SetChargeCalc ( MCalibrationChargeCalc *c ) { fChargeCalc = c; }
|
---|
90 | void SetRelTimeCalc ( MCalibrationRelTimeCalc *c ) { fRelTimeCalc = c; }
|
---|
91 | void SetUpdateNumPhes ( const Bool_t b=kTRUE ) { fUpdateNumPhes = b; }
|
---|
92 |
|
---|
93 | void SetUpdateWithFFactorMethod(const Bool_t b=kTRUE){ fUpdateWithFFactorMethod = b; }
|
---|
94 |
|
---|
95 | ClassDef(MCalibCalcFromPast, 2) // Task to steer the processing of interlace calibration events
|
---|
96 | };
|
---|
97 |
|
---|
98 | #endif
|
---|
99 |
|
---|