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

Last change on this file since 3315 was 3313, checked in by gaug, 21 years ago
*** empty log message ***
File size: 3.0 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 Int_t fNumPixels;
23 TClonesArray *fPixels; //-> Array of MCalibrationPix with fit results
24
25 const MCalibrationChargeBlindPix *fBlindPixel; //! Pointer to the Blind Pixel with fit results
26 const MCalibrationChargePINDiode *fPINDiode; //! Pointer to the PIN Diode with fit results
27
28 const MGeomCam *fGeomCam; //! Need geom cam to know which pixel in inner or outer
29
30 TH1D* fOffsets; //!
31 TH1D* fSlopes; //!
32
33 TH2D* fOffvsSlope; //!
34
35 UInt_t fNumExcludedPixels;
36
37 Byte_t fFlags;
38
39 enum { kBlindPixelMethodValid, kPINDiodeMethodValid, kCombinedMethodValid };
40
41public:
42
43 MCalibrationChargeCam(const char *name=NULL, const char *title=NULL);
44 ~MCalibrationChargeCam();
45
46 void Clear( Option_t *o="" );
47 void InitSize( const UInt_t i );
48
49 // Setters
50 void SetNumPixelsExcluded( const UInt_t n ) { fNumExcludedPixels = n; }
51 void SetGeomCam( const MGeomCam *geom) { fGeomCam = geom; }
52
53 void SetPINDiode ( const MCalibrationChargePINDiode *d ) { fPINDiode = d; }
54 void SetBlindPixel( const MCalibrationChargeBlindPix *b ) { fBlindPixel = b; }
55
56 // Setters only for MC!!
57 void SetBlindPixelMethodValid( const Bool_t b = kTRUE );
58 void SetPINDiodeMethodValid( const Bool_t b = kTRUE );
59
60 // Getters
61 Int_t GetSize() const;
62 UInt_t GetNumPixels() const { return fNumPixels; }
63
64 Bool_t GetConversionFactorFFactor( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
65 Bool_t GetConversionFactorBlindPixel( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
66 Bool_t GetConversionFactorPINDiode( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
67 Bool_t GetConversionFactorCombined( Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma );
68
69 Bool_t IsBlindPixelMethodValid() const;
70 Bool_t IsPINDiodeMethodValid() const;
71
72 // Others
73 MCalibrationChargePix &operator[](UInt_t i);
74 const MCalibrationChargePix &operator[](UInt_t i) const;
75
76 Bool_t CheckBounds(Int_t i) 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 void ApplyPINDiodeCalibration();
89 void ApplyBlindPixelCalibration();
90
91 ClassDef(MCalibrationChargeCam, 1) // Container for calibration information of the camera
92};
93
94#endif
95
96
97
98
99
Note: See TracBrowser for help on using the repository browser.