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

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