source: trunk/MagicSoft/Mars/manalysis/MCalibrationCam.h@ 2629

Last change on this file since 2629 was 2627, checked in by gaug, 21 years ago
*** empty log message ***
File size: 2.5 KB
Line 
1#ifndef MARS_MCalibrationCam
2#define MARS_MCalibrationCam
3
4#ifndef MARS_MCamEvent
5#include "MCamEvent.h"
6#endif
7
8#ifndef MARS_MCalibrationPix
9#include "MCalibrationPix.h"
10#endif
11
12#ifndef MARS_MCalibrationBlindPix
13#include "MCalibrationBlindPix.h"
14#endif
15
16#ifndef MARS_MCalibrationPINDiode
17#include "MCalibrationPINDiode.h"
18#endif
19
20#ifndef ROOT_TClonesArray
21#include <TClonesArray.h>
22#endif
23
24
25class MGeomCam;
26class MCalibrationPix;
27class MCalibrationBlindPix;
28class MCalibrationPINDiode;
29
30class MCalibrationCam : public MCamEvent
31{
32private:
33
34 Int_t fNumPixels;
35 TClonesArray *fPixels; //! FIXME: Change TClonesArray away from a pointer?
36
37 MCalibrationBlindPix *fBlindPixel; //! containing blind pixel data with fitresults
38 MCalibrationPINDiode *fPINDiode; //! containing PIN Diode data with fit results
39
40 Bool_t fMeanNrPhotAvailable;
41 Float_t fMeanNrPhotInnerPix; // The mean number of photons in an inner pixel
42 Float_t fMeanNrPhotInnerPixErr; // The uncertainty about the number of photons in an inner pixel
43
44public:
45
46 enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
47
48private:
49
50 CalibrationColor_t fColor;
51
52public:
53
54 MCalibrationCam(const char *name=NULL, const char *title=NULL);
55 ~MCalibrationCam();
56
57 void Clear(Option_t *o="");
58
59 void InitSize(const Int_t i);
60 Int_t GetSize() const;
61
62 UInt_t GetNumPixels() const { return fNumPixels; }
63
64 Bool_t IsPixelUsed(Int_t idx) const;
65 Bool_t IsPixelFitted(Int_t idx) const;
66
67 MCalibrationPix &operator[](Int_t i);
68 MCalibrationPix &operator[](Int_t i) const;
69
70 UShort_t FitCharge(Int_t i=-1);
71 UShort_t FitAllCharge();
72 UShort_t FitTime(Int_t i=-1);
73 UShort_t FitAllTime();
74
75 Bool_t CheckBounds(Int_t i) const;
76
77 void Print(Option_t *o="") const;
78
79 void CutEdges();
80
81 Bool_t CalcNrPhotInnerPixel();
82 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
83 void DrawPixelContent(Int_t num) const;
84
85 MCalibrationPix *GetCalibrationPix(Int_t idx) const;
86 MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
87 MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
88
89 void SetColor(CalibrationColor_t color) { fColor = color; }
90
91 Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
92 Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
93
94 ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
95};
96
97#endif
98
Note: See TracBrowser for help on using the repository browser.