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

Last change on this file since 2527 was 2525, checked in by gaug, 21 years ago
*** empty log message ***
File size: 2.4 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 Float_t fMeanNrPhotInnerPix; // The mean number of photons in an inner pixel
41 Float_t fMeanNrPhotInnerPixErr; // The uncertainty about the number of photons in an inner pixel
42 Bool_t fMeanNrPhotAvailable;
43
44 Bool_t CalcNrPhotInnerPixel();
45
46public:
47
48 enum CalibrationColor_t { kECGreen, kECBlue, kECUV };
49
50private:
51
52 CalibrationColor_t fColor;
53
54public:
55
56 MCalibrationCam(const char *name=NULL, const char *title=NULL);
57 ~MCalibrationCam();
58
59 void Clear(Option_t *o="");
60
61 void InitSize(const Int_t i);
62 Int_t GetSize() const;
63
64 UInt_t GetNumPixels() const { return fNumPixels; }
65
66 Bool_t IsPixelUsed(Int_t idx) const;
67 Bool_t IsPixelFitted(Int_t idx) const;
68
69 MCalibrationPix &operator[](Int_t i);
70 MCalibrationPix &operator[](Int_t i) const;
71
72 UShort_t FitQ(Int_t i=-1);
73 UShort_t FitAllQ();
74 UShort_t FitT(Int_t i=-1);
75 UShort_t FitAllT();
76
77 Bool_t CheckBounds(Int_t i) const;
78
79 Bool_t AddPixel(Int_t idx);
80
81 void Print(Option_t *o="") const;
82
83 void CutEdges();
84
85 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
86 void DrawPixelContent(Int_t num) const;
87
88 MCalibrationPix *GetCalibrationPix(Int_t idx) const;
89 MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
90 MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
91
92 void SetColor(CalibrationColor_t color) { fColor = color; }
93
94 Bool_t GetConversionFactor(Int_t ipx, Float_t &mean, Float_t &err);
95
96 ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
97};
98
99#endif
100
Note: See TracBrowser for help on using the repository browser.