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

Last change on this file since 3670 was 3664, checked in by gaug, 21 years ago
*** empty log message ***
File size: 4.9 KB
Line 
1#ifndef MARS_MCalibrationChargeCam
2#define MARS_MCalibrationChargeCam
3
4#ifndef MARS_MCalibrationCam
5#include "MCalibrationCam.h"
6#endif
7
8class TH1D;
9class TH2D;
10
11class MCalibrationChargeBlindPix;
12class MCalibrationChargePINDiode;
13class MCalibrationChargePix;
14class MCalibrationChargeCam : public MCalibrationCam
15{
16private:
17
18 static const Float_t fgAverageQE; //! Default for fAverageQE (now set to: 0.18)
19 static const Float_t fgAverageQEErr; //! Default for fAverageQEErr (now set to: 0.02)
20 static const Float_t fgConvFFactorRelErrLimit; //! Default for fConvFFactorRelErrLimit (now set to: 0.35)
21 static const Float_t fgPheFFactorRelErrLimit; //! Default for fPheFFactorRelErrLimit (now set to: 5.)
22
23 Float_t fAverageQE; // Average quantum efficieny (see Class description)
24 Float_t fAverageQEVar; // Error av. quantum eff. (see Class description)
25 Float_t fConvFFactorRelVarLimit; // Acceptance limit rel. error conv. factor (F-Factor method)
26 Float_t fPheFFactorRelVarLimit; // Acceptance limit number phe's w.r.t its mean (in variances)
27
28 TH1D* fOffsets; //! Histogram with Higain-vs-LoGain fit result Offsets
29 TH1D* fSlopes; //! Histogram with Higain-vs-LoGain fit result Slopes
30 TH2D* fOffvsSlope; //! Histogram with Higain-vs-LoGain fit result Offsets vs. Slopes
31
32 enum { kFFactorMethodValid, kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
33
34 Float_t fFluxPhesInnerPixel; // Mean nr. photo-electrons in INNER PIXEL
35 Float_t fFluxPhesInnerPixelVar; // Variance nr. photo-electrons INNER PIXEL
36 Float_t fFluxPhesOuterPixel; // Mean nr. photo-electrons in an OUTER PIXEL
37 Float_t fFluxPhesOuterPixelVar; // Variance nr, photo-electrons OUTER PIXEL
38 Float_t fFluxPhotonsInnerPixel; // Mean nr. photo-electrons in INNER PIXEL
39 Float_t fFluxPhotonsInnerPixelVar; // Variance nr. photo-electrons INNER PIXEL
40 Float_t fFluxPhotonsOuterPixel; // Mean nr. photo-electrons in OUTER PIXEL
41 Float_t fFluxPhotonsOuterPixelVar; // Variance nr. photo-electrons OUTER PIXEL
42 Byte_t fFlags; // Bit-fieldto hold the flags
43
44public:
45
46 MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
47 ~MCalibrationChargeCam();
48
49 void Clear( Option_t *o="" );
50
51 // Setters
52 void SetAverageQE ( const Float_t q=fgAverageQE,
53 const Float_t e=fgAverageQEErr) { fAverageQE = q; fAverageQEVar = e*e; }
54 void SetBlindPixelMethodValid ( const Bool_t b=kTRUE );
55 void SetConvFFactorRelErrLimit( const Float_t f=fgConvFFactorRelErrLimit ) { fConvFFactorRelVarLimit = f*f; }
56 void SetFFactorMethodValid ( const Bool_t b=kTRUE );
57 void SetPheFFactorRelErrLimit ( const Float_t f=fgPheFFactorRelErrLimit ) { fPheFFactorRelVarLimit = f*f; }
58 void SetPINDiodeMethodValid ( const Bool_t b=kTRUE );
59
60 // Getters
61 Bool_t GetConversionFactorFFactor ( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
62 Bool_t GetConversionFactorBlindPixel ( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
63 Bool_t GetConversionFactorPINDiode ( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
64 Bool_t GetConversionFactorCombined ( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
65
66 Float_t GetFluxPhesInnerPixel() const { return fFluxPhesInnerPixel; }
67 Float_t GetFluxPhesInnerPixelErr() const;
68 Float_t GetFluxPhesOuterPixel() const { return fFluxPhesOuterPixel; }
69 Float_t GetFluxPhesOuterPixelErr() const;
70 Float_t GetFluxPhotonsInnerPixel() const { return fFluxPhotonsInnerPixel; }
71 Float_t GetFluxPhotonsInnerPixelErr() const;
72 Float_t GetFluxPhotonsOuterPixel() const { return fFluxPhotonsOuterPixel; }
73 Float_t GetFluxPhotonsOuterPixelErr() const;
74
75 Bool_t IsBlindPixelMethodValid() const;
76 Bool_t IsPINDiodeMethodValid() const;
77
78 // Prints
79 void Print(Option_t *o="") const;
80
81 // Draws
82 void DrawPixelContent(Int_t num) const;
83// void DrawHiLoFits();
84
85 // Others
86 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
87
88 Bool_t CalcFluxPhotonsFFactorMethod(const MGeomCam &geom, MBadPixelsCam &bad);
89
90 void ApplyPINDiodeCalibration ( const MGeomCam &geom,
91 const MBadPixelsCam &bad,
92 const MCalibrationChargePINDiode &pindiode );
93 void ApplyBlindPixelCalibration ( const MGeomCam &geom,
94 const MBadPixelsCam &bad,
95 const MCalibrationChargeBlindPix &blindpix );
96 void ApplyFFactorCalibration ( const MGeomCam &geom,
97 const MBadPixelsCam &bad );
98
99 ClassDef(MCalibrationChargeCam, 1) // Container Charge Calibration Results Camera
100};
101
102#endif
Note: See TracBrowser for help on using the repository browser.