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