source: trunk/MagicSoft/Mars/mcalib/MCalibrationCalc.h@ 2987

Last change on this file since 2987 was 2971, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.7 KB
Line 
1#ifndef MARS_MCalibrationCalc
2#define MARS_MCalibrationCalc
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MCalibrationCalc //
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 ROOT_TArrayI
18#include "TArrayI.h"
19#endif
20
21#ifndef MARS_MCalibrationCam
22#include "MCalibrationCam.h"
23#endif
24
25#include "TString.h"
26
27class MRawEvtData;
28class MRawRunHeader;
29
30class MPedestalCam;
31class MCalibrationCam;
32class MExtractedSignalCam;
33class MArrivalTime;
34
35class MTime;
36
37class MCalibrationCalc : public MTask
38{
39private:
40
41 static const Int_t fBlindPixelId; // ID of the blind pixel
42 static const Int_t fPINDiodeId; // ID of the PIN Diode
43
44 MPedestalCam *fPedestals; // Pedestals of all pixels in the camera
45 MCalibrationCam *fCalibrations; // Calibration events of all pixels in the camera
46 MExtractedSignalCam *fSignals; // Calibration events of all pixels in the camera
47
48 MRawEvtData *fRawEvt; // raw event data (time slices)
49 MRawRunHeader *fRunHeader; // RunHeader information
50
51 MArrivalTime *fArrivalTime; // Calculated Arrival Times
52
53 MTime *fEvtTime; // Time of the event
54
55 Int_t fEvents; // Number of events
56 Int_t fCosmics; // Number of events due to supposed cosmics
57
58 Byte_t fNumHiGainSamples;
59 Byte_t fNumLoGainSamples;
60 Float_t fSqrtHiGainSamples;
61
62 Float_t fConversionHiLo;
63 Byte_t fFlags; // Flag for the fits used
64
65 TString fExcludedPixelsFile;
66 UInt_t fNumExcludedPixels;
67
68 enum { kUseTimes, kUseBlindPixelFit, kUsePinDiodeFit,
69 kUseCosmicsRejection, kUseQualityChecks };
70
71public:
72
73 enum PulserColor_t { kEGreen, kEBlue, kEUV, kECT1 };
74
75private:
76
77 PulserColor_t fColor;
78
79 Bool_t ReInit(MParList *pList);
80 Int_t PreProcess(MParList *pList);
81 Int_t Process();
82 Int_t PostProcess();
83
84public:
85
86 MCalibrationCalc(const char *name=NULL, const char *title=NULL);
87
88 void Clear(const Option_t *o="");
89
90 // Skipping parts of the work
91 void SkipTime(Bool_t b=kTRUE)
92 {b ? CLRBIT(fFlags, kUseTimes) : SETBIT(fFlags, kUseTimes);}
93 void SkipBlindPixelFit(Bool_t b=kTRUE)
94 {b ? CLRBIT(fFlags, kUseBlindPixelFit) : SETBIT(fFlags, kUseBlindPixelFit);}
95 void SkipPinDiodeFit(Bool_t b=kTRUE)
96 {b ? CLRBIT(fFlags, kUsePinDiodeFit) : SETBIT(fFlags, kUsePinDiodeFit);}
97 void SkipCosmicsRejection(Bool_t b=kTRUE)
98 {b ? CLRBIT(fFlags, kUseCosmicsRejection) : SETBIT(fFlags, kUseCosmicsRejection);}
99 void SkipQualityChecks(Bool_t b=kTRUE)
100 {b ? CLRBIT(fFlags, kUseQualityChecks) : SETBIT(fFlags, kUseQualityChecks);}
101
102
103 // Setters
104 void SetPulserColor(PulserColor_t color) { fColor = color; }
105 void SetConversionHiLo(Float_t conv) { fConversionHiLo = conv; }
106
107 // Getters
108 MCalibrationBlindPix *GetBlindPixel() const;
109 MCalibrationPINDiode *GetPINDiode() const;
110
111 // Exclude pixels from configuration file
112 void ExcludePixelsFromAsciiFile(const char *file) { fExcludedPixelsFile = file; }
113
114 ClassDef(MCalibrationCalc, 1) // Task to fill the Calibration Containers from raw data
115};
116
117#endif
Note: See TracBrowser for help on using the repository browser.