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

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