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

Last change on this file since 2677 was 2665, checked in by gaug, 22 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
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; //! FIXME: Change TClonesArray away from a pointer?
47
48 MCalibrationBlindPix *fBlindPixel; //! containing blind pixel data with fitresults
49 MCalibrationPINDiode *fPINDiode; //! containing PIN Diode data with fit results
50
51 Bool_t fMeanNrPhotAvailable;
52 Float_t fMeanNrPhotInnerPix; // The mean number of photons in an inner pixel
53 Float_t fMeanNrPhotInnerPixErr; // The uncertainty about the number of photons in an inner pixel
54
55 TH1F* fHChargeAllPixels;
56 TH1F* fHChargeErrAllPixels;
57 TH1F* fHChargeSigmaAllPixels;
58 TH1F* fHChargeProbAllPixels;
59
60 TH1F* fHTimeAllPixels;
61 TH1F* fHTimeSigmaAllPixels;
62 TH1F* fHTimeProbAllPixels;
63
64 TH1F* fHPedAllPixels;
65 TH1F* fHPedRMSAllPixels;
66
67 TH1F* fHSigmaPerChargeAllPixels;
68 TH1F* fHPhEAllPixels;
69
70 TH1F* fHConvPhEperFADCAllPixels;
71 TH1F* fHConvPhperFADCAllPixels;
72
73 TH1D* fOffsets;
74 TH1D* fSlopes;
75
76 TH2D* fOffvsSlope;
77
78public:
79
80 enum CalibrationColor_t { kECGreen, kECBlue, kECUV, kECCT1 };
81
82private:
83
84 CalibrationColor_t fColor;
85
86public:
87
88 MCalibrationCam(const char *name=NULL, const char *title=NULL);
89 ~MCalibrationCam();
90
91 void Clear(Option_t *o="");
92
93 void InitSize(const Int_t i);
94 Int_t GetSize() const;
95
96 UInt_t GetNumPixels() const { return fNumPixels; }
97
98 Bool_t IsPixelUsed(Int_t idx) const;
99 Bool_t IsPixelFitted(Int_t idx) const;
100
101 MCalibrationPix &operator[](Int_t i);
102 MCalibrationPix &operator[](Int_t i) const;
103
104 UShort_t FitCharge(Int_t i=-1);
105 UShort_t FitAllCharge();
106 UShort_t FitTime(Int_t i=-1);
107 UShort_t FitAllTime();
108
109 Bool_t CheckBounds(Int_t i) const;
110
111 void Print(Option_t *o="") const;
112
113 void CutEdges();
114
115 Bool_t CalcNrPhotInnerPixel();
116 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
117 void DrawPixelContent(Int_t num) const;
118
119 MCalibrationPix *GetCalibrationPix(Int_t idx) const;
120 MCalibrationBlindPix *GetBlindPixel() const { return fBlindPixel; }
121 MCalibrationPINDiode *GetPINDiode() const { return fPINDiode; }
122
123 void SetColor(CalibrationColor_t color) { fColor = color; }
124
125 Bool_t GetConversionFactorFFactor(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
126 Bool_t GetConversionFactorBlindPixel(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
127 Bool_t GetConversionFactorPINDiode(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
128 Bool_t GetConversionFactorCombined(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma);
129
130 void DrawHiLoFits();
131
132 ClassDef(MCalibrationCam, 1) // Storage Container for all calibration information of the camera
133};
134
135#endif
136
Note: See TracBrowser for help on using the repository browser.