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