source: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h@ 3556

Last change on this file since 3556 was 3556, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.2 KB
Line 
1#ifndef MARS_MCalibrationChargeCalc
2#define MARS_MCalibrationChargeCalc
3
4/////////////////////////////////////////////////////////////////////////////
5// //
6// MCalibrationChargeCalc //
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
17class MRawEvtData;
18class MRawRunHeader;
19class MPedestalCam;
20class MPedestalPix;
21class MCalibrationChargePINDiode;
22class MCalibrationChargeBlindPix;
23class MCalibrationChargePix;
24class MCalibrationChargeCam;
25class MCalibrationQECam;
26class MGeomCam;
27class MExtractedSignalCam;
28class MBadPixelsCam;
29class MBadPixelsPix;
30class MTime;
31class MCalibrationChargeCalc : public MTask
32{
33private:
34
35 MPedestalCam *fPedestals; //! Pedestals of all pixels in the camera
36 MCalibrationChargeCam *fCam; // Calibration events of all pixels in the camera
37 MCalibrationQECam *fQECam; // Derived Quantum efficiency of all pixels in the camera
38 MRawEvtData *fRawEvt; //! raw event data (time slices)
39 MRawRunHeader *fRunHeader; //! RunHeader information
40 MGeomCam *fGeom; //! Geometry information
41 MBadPixelsCam *fBadPixels; //! Bad Pixels information
42
43 MTime *fEvtTime; //! Time of the event
44
45 MExtractedSignalCam *fSignals; // Extracted signal of all pixels in the camera
46 MCalibrationChargePINDiode *fPINDiode; // Calibration results of the PIN Diode
47 MCalibrationChargeBlindPix *fBlindPixel; // Calibration results of the Blind Pixel
48
49 Float_t fNumHiGainSamples;
50 Float_t fNumLoGainSamples;
51 Float_t fSqrtHiGainSamples;
52 Float_t fSqrtLoGainSamples;
53
54 Float_t fConversionHiLo;
55 Int_t fFlags; // Flag for the fits used
56
57 enum { kUseQualityChecks,
58 kHiLoGainCalibration };
59
60 Int_t PreProcess(MParList *pList);
61 Bool_t ReInit(MParList *pList);
62 Int_t Process();
63 Int_t PostProcess();
64
65 void FinalizePedestals(const MPedestalPix &ped, MCalibrationChargePix &cal,
66 Float_t &avped, Float_t &avrms);
67 void FinalizeAvPedestals(MCalibrationChargePix &cal, Float_t avped, Float_t avrms, Int_t avnum);
68
69 Bool_t FinalizeCharges(MCalibrationChargePix &cal, MBadPixelsPix &bad);
70
71public:
72
73 MCalibrationChargeCalc(const char *name=NULL, const char *title=NULL);
74
75 void Clear(const Option_t *o="");
76
77 void SkipQualityChecks(Bool_t b=kTRUE)
78 {b ? CLRBIT(fFlags, kUseQualityChecks) : SETBIT(fFlags, kUseQualityChecks);}
79 void SkipHiLoGainCalibration(Bool_t b=kTRUE)
80 {b ? CLRBIT(fFlags, kHiLoGainCalibration) : SETBIT(fFlags, kHiLoGainCalibration);}
81
82 ClassDef(MCalibrationChargeCalc, 1) // Task to fill the Calibration Containers from raw data
83};
84
85#endif
Note: See TracBrowser for help on using the repository browser.