1 | #ifndef MARS_MCalibrationRelTimeCalc
|
---|
2 | #define MARS_MCalibrationRelTimeCalc
|
---|
3 |
|
---|
4 | /////////////////////////////////////////////////////////////////////////////
|
---|
5 | //
|
---|
6 | // MCalibrationRelTimeCalc
|
---|
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 MARS_MBadPixelsPix
|
---|
18 | #include "MBadPixelsPix.h"
|
---|
19 | #endif
|
---|
20 |
|
---|
21 | class MCalibrationIntensityRelTimeCam;
|
---|
22 | class MCalibrationRelTimeCam;
|
---|
23 | class MGeomCam;
|
---|
24 | class MBadPixelsIntensityCam;
|
---|
25 | class MBadPixelsCam;
|
---|
26 |
|
---|
27 | class MCalibrationRelTimeCalc : public MTask
|
---|
28 | {
|
---|
29 | private:
|
---|
30 |
|
---|
31 | static const Float_t fgRelTimeResolutionLimit; //! Default for fRelTimeResolutionLimit (now set to: 0.75)
|
---|
32 |
|
---|
33 | // Variables
|
---|
34 | Float_t fRelTimeResolutionLimit; // Limit acceptance rel. time resolution (in FADC slices)
|
---|
35 | TString fOutputPath; // Path to the output file
|
---|
36 | TString fOutputFile; // Name of the output file
|
---|
37 |
|
---|
38 | // Pointers
|
---|
39 | MBadPixelsIntensityCam *fIntensBad; // Bad Pixels Intensity Cam
|
---|
40 | MBadPixelsCam *fBadPixels; // Bad Pixels
|
---|
41 | MCalibrationIntensityRelTimeCam *fIntensCam; // Calibrated RelTimes for different intensities
|
---|
42 | MCalibrationRelTimeCam *fCam; // Calibrated RelTimes of all pixels
|
---|
43 | MGeomCam *fGeom; //! Camera geometry
|
---|
44 |
|
---|
45 | enum { kDebug }; // Possible flags
|
---|
46 |
|
---|
47 | Byte_t fFlags; // Bit-field for the general flags
|
---|
48 |
|
---|
49 | // functions
|
---|
50 | const char* GetOutputFile ();
|
---|
51 | void FinalizeAverageResolution();
|
---|
52 | void FinalizeRelTimes ();
|
---|
53 | void FinalizeBadPixels ();
|
---|
54 | void FinalizeUnsuitablePixels ();
|
---|
55 |
|
---|
56 | void PrintUncalibrated( MBadPixelsPix::UncalibratedType_t typ, const char *text) const;
|
---|
57 |
|
---|
58 | Bool_t ReInit (MParList *pList);
|
---|
59 | Int_t Process () { return kTRUE; }
|
---|
60 | Int_t PostProcess();
|
---|
61 |
|
---|
62 | public:
|
---|
63 |
|
---|
64 | MCalibrationRelTimeCalc(const char *name=NULL, const char *title=NULL);
|
---|
65 |
|
---|
66 | void Clear(const Option_t *o="");
|
---|
67 |
|
---|
68 | Int_t Finalize();
|
---|
69 |
|
---|
70 | Bool_t IsDebug() const { return TESTBIT(fFlags,kDebug); }
|
---|
71 |
|
---|
72 | void SetDebug ( const Bool_t b=kTRUE ) { b ? SETBIT(fFlags,kDebug) : CLRBIT(fFlags,kDebug); }
|
---|
73 | void SetOutputPath ( TString path="." );
|
---|
74 | void SetOutputFile ( TString file="TimeCalibStat.txt" ) { fOutputFile = file; }
|
---|
75 | void SetRelTimeResolutionLimit( const Float_t f=fgRelTimeResolutionLimit ) { fRelTimeResolutionLimit = f; }
|
---|
76 |
|
---|
77 | ClassDef(MCalibrationRelTimeCalc, 1) // Task finalizing the relative time Calibration
|
---|
78 | };
|
---|
79 |
|
---|
80 | #endif
|
---|