source: tags/Mars-V1.0/mcalib/MCalibrationRelTimeCalc.h

Last change on this file was 8142, checked in by tbretz, 18 years ago
*** empty log message ***
File size: 3.9 KB
Line 
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
21class MCalibrationIntensityRelTimeCam;
22class MCalibrationRelTimeCam;
23class MGeomCam;
24class MBadPixelsIntensityCam;
25class MBadPixelsCam;
26
27class MCalibrationRelTimeCalc : public MTask
28{
29private:
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
36 // Pointers
37 MBadPixelsIntensityCam *fIntensBad; // Bad Pixels Intensity Cam
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 // enums
44 enum Check_t
45 {
46 kCheckHistOverflow,
47 kCheckDeviatingBehavior,
48 kCheckOscillations,
49 kCheckFitResults
50 }; // Possible Checks
51
52 Byte_t fCheckFlags; // Bit-field to hold the possible check flags
53
54 enum { kDebug }; // Possible flags
55
56 Byte_t fFlags; // Bit-field for the general flags
57
58 // functions
59 const char* GetOutputFile ();
60 void FinalizeAverageResolution();
61 void FinalizeRelTimes ();
62 void FinalizeBadPixels ();
63 void FinalizeUnsuitablePixels ();
64
65 void PrintUncalibrated(const char *text, Int_t in, Int_t out) const;
66 void PrintUncalibrated(MBadPixelsPix::UncalibratedType_t typ, const char *text) const;
67
68 // Query checks
69 Bool_t IsCheckDeviatingBehavior() const { return TESTBIT(fCheckFlags,kCheckDeviatingBehavior); }
70 Bool_t IsCheckHistOverflow () const { return TESTBIT(fCheckFlags,kCheckHistOverflow); }
71 Bool_t IsCheckOscillations () const { return TESTBIT(fCheckFlags,kCheckOscillations); }
72 Bool_t IsCheckFitResults () const { return TESTBIT(fCheckFlags,kCheckFitResults); }
73
74 // MTask
75 Bool_t ReInit (MParList *pList);
76 Int_t Process () { return kTRUE; }
77 Int_t PostProcess();
78
79 // MParContainer
80 Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
81
82public:
83 MCalibrationRelTimeCalc(const char *name=NULL, const char *title=NULL);
84
85 // TObject
86 void Clear(const Option_t *o="");
87
88 // MCalibrationRelTimeCalc
89 Int_t Finalize();
90
91 // Getter
92 Bool_t IsDebug() const { return TESTBIT(fFlags,kDebug); }
93
94 // Setter
95 void SetRelTimeResolutionLimit( const Float_t f=fgRelTimeResolutionLimit ) { fRelTimeResolutionLimit = f; }
96
97 // Checks
98 void SetCheckFitResults(const Bool_t b=kTRUE) { b ? SETBIT(fCheckFlags,kCheckFitResults) : CLRBIT(fCheckFlags,kCheckFitResults); }
99 void SetCheckDeviatingBehavior(const Bool_t b=kTRUE) { b ? SETBIT(fCheckFlags,kCheckDeviatingBehavior) : CLRBIT(fCheckFlags,kCheckDeviatingBehavior); }
100 void SetCheckHistOverflow(const Bool_t b=kTRUE) { b ? SETBIT(fCheckFlags,kCheckHistOverflow) : CLRBIT(fCheckFlags,kCheckHistOverflow); }
101 void SetCheckOscillations(const Bool_t b=kTRUE) { b ? SETBIT(fCheckFlags,kCheckOscillations) : CLRBIT(fCheckFlags,kCheckOscillations); }
102 void SetDebug(const Bool_t b=kTRUE) { b ? SETBIT(fFlags, kDebug) : CLRBIT(fFlags, kDebug); }
103
104 ClassDef(MCalibrationRelTimeCalc, 3) // Task finalizing the relative time Calibration
105};
106
107#endif
Note: See TracBrowser for help on using the repository browser.