source: trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h@ 2933

Last change on this file since 2933 was 2931, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.3 KB
Line 
1#ifndef MARS_MCalibrationCam
2#define MARS_MCalibrationCam
3
4#ifndef MARS_MCamEvent
5#include "MCamEvent.h"
6#endif
7
8class TH1D;
9class TH2D;
10class TClonesArray;
11
12class MCalibrationPix;
13class MCalibrationBlindPix;
14class MCalibrationPINDiode;
15
16class MCalibrationCam : public MCamEvent
17{
18private:
19
20 Int_t fNumPixels;
21 TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
22
23 MCalibrationBlindPix *fBlindPixel; //-> Pointer to the Blind Pixel with fit results
24 MCalibrationPINDiode *fPINDiode; //-> Pointer to the PIN Diode with fit results
25
26 Bool_t fNumPhotInsidePlexiglassAvailable; // TRUE: Blind Pixel could have been fitted well
27 Float_t fMeanPhotInsidePlexiglass; // The mean number of photons in an INNER PIXEL inside the plexiglass
28 Float_t fMeanPhotErrInsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
29
30 Bool_t fNumPhotOutsidePlexiglassAvailable; // TRUE: PIN Diode could have been fitted well
31 Float_t fMeanPhotOutsidePlexiglass; // The mean number of photons in an INNER PIXEL outside the plexiglass
32 Float_t fMeanPhotErrOutsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
33
34 TH1D* fOffsets; //!
35 TH1D* fSlopes; //!
36
37 TH2D* fOffvsSlope; //!
38
39 UInt_t fNumExcludedPixels;
40
41public:
42
43 enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
44
45private:
46
47 CalibrationColor_t fColor;
48
49public:
50
51 MCalibrationCam(const char *name=NULL, const char *title=NULL);
52 ~MCalibrationCam();
53
54 void Clear(Option_t *o="");
55 void InitSize(const UInt_t i);
56
57 // Setters
58 void SetColor(const CalibrationColor_t color) { fColor = color; }
59 void SetNumPixelsExcluded(const UInt_t n) { fNumExcludedPixels = n; }
60
61 // Getters
62 Int_t GetSize() const;
63 UInt_t GetNumPixels() const { return fNumPixels; }
64
65 MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
66 MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
67 MCalibrationBlindPix *GetBlindPixel() { return fBlindPixel; }
68 MCalibrationPINDiode *GetPINDiode() { return fPINDiode; }
69
70 Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
71 Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
72 Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
73 Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
74
75 Bool_t IsPixelUsed(Int_t idx) const;
76 Bool_t IsPixelFitted(Int_t idx) const;
77
78 // Others
79 MCalibrationPix &operator[](Int_t i);
80 MCalibrationPix &operator[](Int_t i) const;
81
82 void CutEdges();
83 Bool_t CheckBounds(Int_t i) const;
84
85 // Prints
86 void Print(Option_t *o="") const;
87
88 // Draws
89 void DrawPixelContent(Int_t num) const;
90 void DrawHiLoFits();
91
92 // Others
93 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
94
95 Bool_t CalcNumPhotInsidePlexiglass();
96 Bool_t CalcNumPhotOutsidePlexiglass();
97
98 ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
99};
100
101#endif
102
Note: See TracBrowser for help on using the repository browser.