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

Last change on this file since 3428 was 3426, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.6 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 MCalibrationChargeBlindPix;
16class MCalibrationChargePINDiode;
17class MCalibrationChargePix;
18class MBadPixelsCam;
19class MCalibrationChargeCam : public MParContainer, public MCamEvent
20{
21private:
22
23 Int_t fNumPixels;
24 TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
25 MCalibrationChargePix *fAverageInnerPix; //-> Average Pixel of all events
26 MCalibrationChargePix *fAverageOuterPix; //-> Average Pixel of all events
27
28 const MCalibrationChargeBlindPix *fBlindPixel; //! Pointer to the Blind Pixel with fit results
29 const MCalibrationChargePINDiode *fPINDiode; //! Pointer to the PIN Diode with fit results
30
31 const MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer
32 const MBadPixelsCam *fBadPixels; //! Bad Pixels cam, only for reading
33
34 TH1D* fOffsets; //!
35 TH1D* fSlopes; //!
36
37 TH2D* fOffvsSlope; //!
38
39 UInt_t fNumExcludedPixels;
40
41 Byte_t fFlags;
42
43 enum { kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
44
45public:
46
47 MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
48 ~MCalibrationChargeCam();
49
50 void Clear( Option_t *o="" );
51 void InitSize( const UInt_t i );
52
53 // Setters
54 void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; }
55 void SetGeomCam( const MGeomCam *geom) { fGeomCam = geom; }
56 void SetBadPixelsCam( const MBadPixelsCam *bad) { fBadPixels = bad; }
57
58 void SetPINDiode ( const MCalibrationChargePINDiode *d ) { fPINDiode = d; }
59 void SetBlindPixel( const MCalibrationChargeBlindPix *b ) { fBlindPixel = b; }
60
61 // Setters only for MC!!
62 void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
63 void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
64
65 // Getters
66 Int_t GetSize() const;
67 UInt_t GetNumPixels() const { return fNumPixels; }
68
69 Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
70 Bool_t GetConversionFactorBlindPixel( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
71 Bool_t GetConversionFactorPINDiode( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
72 Bool_t GetConversionFactorCombined( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
73
74 Bool_t IsBlindPixelMethodValid() const;
75 Bool_t IsPINDiodeMethodValid() const;
76
77 // Others
78 MCalibrationChargePix &operator[](UInt_t i);
79 const MCalibrationChargePix &operator[](UInt_t i) const;
80
81 MCalibrationChargePix *GetAverageInnerPix() { return fAverageInnerPix; }
82 const MCalibrationChargePix *GetAverageInnerPix() const { return fAverageInnerPix; }
83
84 MCalibrationChargePix *GetAverageOuterPix() { return fAverageOuterPix; }
85 const MCalibrationChargePix *GetAverageOuterPix() const { return fAverageOuterPix; }
86
87 // Prints
88 void Print(Option_t *o="") const;
89
90 // Draws
91 void DrawPixelContent(Int_t num) const;
92// void DrawHiLoFits();
93
94 // Others
95 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const;
96
97 void ApplyPINDiodeCalibration();
98 void ApplyBlindPixelCalibration();
99
100 ClassDef(MCalibrationChargeCam, 1) // Container for calibration information of the camera
101};
102
103#endif
104
105
106
107
108
Note: See TracBrowser for help on using the repository browser.