source: branches/Mars_MC/mcalib/MCalibrationCam.h@ 17063

Last change on this file since 17063 was 7200, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 4.5 KB
Line 
1#ifndef MARS_MCalibrationCam
2#define MARS_MCalibrationCam
3
4#ifndef MARS_MParContainer
5#include "MParContainer.h"
6#endif
7#ifndef MARS_MCamEvent
8#include "MCamEvent.h"
9#endif
10#ifndef ROOT_TArrayI
11#include <TArrayI.h>
12#endif
13#ifndef ROOT_TArrayF
14#include <TArrayF.h>
15#endif
16
17class TOrdCollection;
18
19class MCalibrationPix;
20class MBadPixelsPix;
21class MBadPixelsCam;
22class MGeomCam;
23
24class MCalibrationCam : public MParContainer, public MCamEvent
25{
26public:
27
28 enum PulserColor_t {
29 kCT1 =0,
30 kGREEN=1,
31 kBLUE =2,
32 kUV =3,
33 kNONE =4
34 }; //! Possible Pulser colours
35 static const Int_t gkNumPulserColors; //! Number of Pulser colours (now set to: 4)
36
37protected:
38
39 TArrayI fNumUnsuitable; // Number uncalibrated Pixels per area index
40 TArrayI fNumUnreliable; // Number unreliable Pixels per area index
41
42 TArrayF fNumHiGainFADCSlices; // Number High-Gain FADC slices used by extractor
43 TArrayF fNumLoGainFADCSlices; // Number Low -Gain FADC slices used by extractor
44
45 Int_t fRunNumber; // Store run number for interlaced calib. events
46 PulserColor_t fPulserColor; // Colour of the pulsed LEDs
47
48 TOrdCollection *fPixels; //-> Array of MCalibrationPix, one per pixel
49 TOrdCollection *fAverageAreas; // Array of MCalibrationPix, one per pixel area
50 TOrdCollection *fAverageSectors; // Array of MCalibrationPix, one per camera sector
51 TOrdCollection *fAverageBadAreas; // Array of MBadPixelsPix, one per pixel area
52 TOrdCollection *fAverageBadSectors; // Array of MBadPixelsPix, one per camera sector
53
54 virtual void Add(const UInt_t a, const UInt_t b);
55 virtual void AddArea(const UInt_t a, const UInt_t b);
56 virtual void AddSector(const UInt_t a, const UInt_t b);
57
58 void InitAverageSectors ( const UInt_t i );
59 virtual void InitAverageAreas ( const UInt_t i );
60
61public:
62
63 MCalibrationCam(const char *name=NULL, const char *title=NULL);
64 ~MCalibrationCam();
65
66 void Clear ( Option_t *o="");
67 void Copy(TObject& object) const;
68
69 void DrawPixelContent( Int_t num) const;
70
71 // Getters
72 const Int_t GetAverageAreas () const;
73 MCalibrationPix &GetAverageArea ( const UInt_t i );
74 const MCalibrationPix &GetAverageArea ( const UInt_t i ) const;
75 MBadPixelsPix &GetAverageBadArea ( const UInt_t i );
76 const MBadPixelsPix &GetAverageBadArea ( const UInt_t i ) const;
77 const Int_t GetAverageSectors () const;
78 MCalibrationPix &GetAverageSector ( const UInt_t i );
79 const MCalibrationPix &GetAverageSector ( const UInt_t i ) const;
80 MBadPixelsPix &GetAverageBadSector ( const UInt_t i );
81 const MBadPixelsPix &GetAverageBadSector ( const UInt_t i ) const;
82 const Float_t GetNumHiGainFADCSlices ( const Int_t aidx=0 ) const;
83 const Float_t GetNumLoGainFADCSlices ( const Int_t aidx=0 ) const;
84 const Int_t GetNumUnsuitable ( const Int_t aidx=-1) const;
85 const Int_t GetNumUnreliable ( const Int_t aidx=-1) const;
86
87 Bool_t GetPixelContent ( Double_t &val, Int_t idx, const MGeomCam &cam,
88 Int_t type=0 ) const;
89 const PulserColor_t GetPulserColor () const { return fPulserColor; }
90 const Int_t GetRunNumer () const { return fRunNumber; }
91 const Int_t GetSize () const;
92
93 MCalibrationPix &operator[] ( UInt_t i );
94 const MCalibrationPix &operator[] ( UInt_t i ) const;
95
96 static TString GetPulserColorStr(PulserColor_t col);
97
98 // Inits
99 void Init ( const MGeomCam &geom );
100 void InitSize ( const UInt_t i );
101
102 // Setters
103 void SetNumHiGainFADCSlices ( const Float_t f, const Int_t aidx=0 );
104 void SetNumLoGainFADCSlices ( const Float_t f, const Int_t aidx=0 );
105 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx );
106 void SetNumUnreliable ( const UInt_t i, const Int_t aidx );
107 virtual void SetPulserColor ( const PulserColor_t col=kCT1 ) { fPulserColor = col; }
108 void SetRunNumber ( const Int_t run ) { fRunNumber = run; }
109
110 ClassDef(MCalibrationCam, 6) // Base class Container for Calibration Results Camera
111};
112
113#endif
Note: See TracBrowser for help on using the repository browser.