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

Last change on this file since 2853 was 2852, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.6 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#ifndef ROOT_TH1F
25#include <TH1F.h>
26#endif
27
28#ifndef ROOT_TH1D
29#include <TH1D.h>
30#endif
31
32#ifndef ROOT_TH2D
33#include <TH2D.h>
34#endif
35
36class MGeomCam;
37class MCalibrationPix;
38class MCalibrationBlindPix;
39class MCalibrationPINDiode;
40
41class MCalibrationCam : public MCamEvent
42{
43private:
44
45 Int_t fNumPixels;
46 TClonesArray *fPixels; // Array of MCalibrationPix with fit results
47
48 MCalibrationBlindPix *fBlindPixel; // Pointer to the Blind Pixel with fit results
49 MCalibrationPINDiode *fPINDiode; // Pointer to the PIN Diode with fit results
50
51 Bool_t fNumPhotInsidePlexiglassAvailable; // TRUE: Blind Pixel could have been fitted well
52 Float_t fMeanPhotInsidePlexiglass; // The mean number of photons in an INNER PIXEL inside the plexiglass
53 Float_t fMeanPhotErrInsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
54
55 Bool_t fNumPhotOutsidePlexiglassAvailable; // TRUE: PIN Diode could have been fitted well
56 Float_t fMeanPhotOutsidePlexiglass; // The mean number of photons in an INNER PIXEL outside the plexiglass
57 Float_t fMeanPhotErrOutsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
58
59 TH1D* fOffsets; //!
60 TH1D* fSlopes; //!
61
62 TH2D* fOffvsSlope; //!
63
64 UInt_t fNumExcludedPixels;
65
66public:
67
68 enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
69
70private:
71
72 CalibrationColor_t fColor;
73
74public:
75
76 MCalibrationCam(const char *name=NULL, const char *title=NULL);
77 ~MCalibrationCam();
78
79 void Clear(Option_t *o="");
80
81 void InitSize(const Int_t i);
82
83 // Setters
84 void SetColor(const CalibrationColor_t color) { fColor = color; }
85 void SetNumPixelsExcluded(const UInt_t n) { fNumExcludedPixels = n; }
86
87 // Getters
88 Int_t GetSize() const;
89 UInt_t GetNumPixels() const { return fNumPixels; }
90
91 MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
92 MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
93
94 Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
95 Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
96 Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
97 Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
98
99 Bool_t IsPixelUsed(Int_t idx) const;
100 Bool_t IsPixelFitted(Int_t idx) const;
101
102 // Others
103 MCalibrationPix &operator[](Int_t i);
104 MCalibrationPix &operator[](Int_t i) const;
105
106 void CutEdges();
107 Bool_t CheckBounds(Int_t i) const;
108
109 // Prints
110 void Print(Option_t *o="") const;
111
112 // Draws
113 void DrawPixelContent(Int_t num) const;
114 void DrawHiLoFits();
115
116 // Others
117 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
118
119 Bool_t CalcNumPhotInsidePlexiglass();
120 Bool_t CalcNumPhotOutsidePlexiglass();
121
122 ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
123};
124
125#endif
126
Note: See TracBrowser for help on using the repository browser.