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

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