source: trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h@ 3269

Last change on this file since 3269 was 3264, checked in by gaug, 21 years ago
*** empty log message ***
File size: 4.7 KB
Line 
1#ifndef MARS_MCalibrationChargeCam
2#define MARS_MCalibrationChargeCam
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7#ifndef MARS_MCamEvent
8#include "MCamEvent.h"
9#endif
10
11class TH1D;
12class TH2D;
13class TClonesArray;
14
15class MCalibrationBlindPix;
16class MCalibrationChargePINDiode;
17class MCalibrationChargePix;
18class MCalibrationChargeCam : public MParContainer, public MCamEvent
19{
20private:
21
22 static const Int_t gkBlindPixelId;
23 static const Int_t gkPINDiodeId;
24 static const Float_t gkBlindPixelArea; // The Blind Pixel area in mm^2
25
26 static const Float_t gkCalibrationBlindPixelQEGreen;
27 static const Float_t gkCalibrationBlindPixelQEBlue ;
28 static const Float_t gkCalibrationBlindPixelQEUV ;
29 static const Float_t gkCalibrationBlindPixelQECT1 ;
30
31 static const Float_t gkCalibrationBlindPixelQEGreenErr;
32 static const Float_t gkCalibrationBlindPixelQEBlueErr ;
33 static const Float_t gkCalibrationBlindPixelQEUVErr ;
34 static const Float_t gkCalibrationBlindPixelQECT1Err ;
35
36 static const Float_t gkCalibrationBlindPixelAttGreen;
37 static const Float_t gkCalibrationBlindPixelAttBlue ;
38 static const Float_t gkCalibrationBlindPixelAttUV ;
39 static const Float_t gkCalibrationBlindPixelAttCT1 ;
40
41 Int_t fNumPixels;
42 TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
43
44 MCalibrationBlindPix *fBlindPixel; //-> Pointer to the Blind Pixel with fit results
45 const MCalibrationChargePINDiode *fPINDiode; //! Pointer to the PIN Diode with fit results
46
47 const MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer
48
49 TH1D* fOffsets; //!
50 TH1D* fSlopes; //!
51
52 TH2D* fOffvsSlope; //!
53
54 Float_t fMeanFluxInsidePlexiglass; // The mean number of photons in an INNER PIXEL inside the plexiglass
55 Float_t fMeanFluxErrInsidePlexiglass; // The uncertainty about the number of photons in an INNER PIXEL
56
57 UInt_t fNumExcludedPixels;
58
59 Byte_t fFlags;
60
61 enum { kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid,
62 kFluxInsidePlexiglassAvailable };
63
64public:
65
66 enum PulserColor_t { kEBlue, kEGreen, kEUV, kECT1 } ;
67
68private:
69
70 PulserColor_t fColor;
71
72public:
73
74 MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
75 ~MCalibrationChargeCam();
76
77 void Clear( Option_t *o="" );
78 void InitSize( const UInt_t i );
79
80 // Setters
81 void SetColor( const PulserColor_t color ) { fColor = color; }
82 void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; }
83 void SetGeomCam( const MGeomCam *geom) { fGeomCam = geom; }
84 void SetPINDiode( const MCalibrationChargePINDiode *d ) { fPINDiode = d; }
85
86 // Setters only for MC!!
87 void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
88 void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
89
90 // Getters
91 Int_t GetSize() const;
92 UInt_t GetNumPixels() const { return fNumPixels; }
93
94 MCalibrationBlindPix *GetBlindPixel() { return fBlindPixel; }
95 const MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
96
97 Float_t GetMeanFluxInsidePlexiglass() const { return fMeanFluxInsidePlexiglass; }
98 Float_t GetMeanFluxErrInsidePlexiglass() const { return fMeanFluxErrInsidePlexiglass; }
99
100 Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
101 Bool_t GetConversionFactorBlindPixel( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
102 Bool_t GetConversionFactorPINDiode( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
103 Bool_t GetConversionFactorCombined( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
104
105 Bool_t IsBlindPixelMethodValid() const;
106 Bool_t IsPINDiodeMethodValid() const;
107
108 Bool_t IsFluxInsidePlexiglassAvailable() const;
109
110 // Others
111 MCalibrationChargePix &operator[](UInt_t i);
112 const MCalibrationChargePix &operator[](UInt_t i) const;
113
114 void CutEdges();
115 Bool_t CheckBounds(Int_t i) const;
116
117 // Prints
118 void Print(Option_t *o="") const;
119
120 // Draws
121 void DrawPixelContent(Int_t num) const;
122// void DrawHiLoFits();
123
124 // Others
125 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
126
127 Bool_t CalcFluxInsidePlexiglass();
128 void ApplyPINDiodeCalibration();
129
130 ClassDef(MCalibrationChargeCam, 1) // Container for calibration information of the camera
131};
132
133#endif
134
135
136
Note: See TracBrowser for help on using the repository browser.