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

Last change on this file since 2765 was 2765, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.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#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
64public:
65
66 enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
67
68private:
69
70 CalibrationColor_t fColor;
71
72public:
73
74 MCalibrationCam(const char *name=NULL, const char *title=NULL);
75 ~MCalibrationCam();
76
77 void Clear(Option_t *o="");
78
79 void InitSize(const Int_t i);
80 Int_t GetSize() const;
81
82 UInt_t GetNumPixels() const { return fNumPixels; }
83
84 Bool_t IsPixelUsed(Int_t idx) const;
85 Bool_t IsPixelFitted(Int_t idx) const;
86
87 MCalibrationPix &operator[](Int_t i);
88 MCalibrationPix &operator[](Int_t i) const;
89
90 Bool_t CheckBounds(Int_t i) const;
91
92 void Print(Option_t *o="") const;
93
94 void CutEdges();
95
96 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
97 void DrawPixelContent(Int_t num) const;
98
99 MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
100 MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
101
102 void SetColor(CalibrationColor_t color) { fColor = color; }
103
104 Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
105 Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
106 Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
107 Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
108
109 Bool_t CalcNumPhotInsidePlexiglass();
110 Bool_t CalcNumPhotOutsidePlexiglass();
111
112 void DrawHiLoFits();
113
114 ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
115};
116
117#endif
118
Note: See TracBrowser for help on using the repository browser.