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

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