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

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