source: trunk/MagicSoft/Mars/mcalib/MCalibrationIntensityCam.h@ 7022

Last change on this file since 7022 was 7005, checked in by tbretz, 20 years ago
*** empty log message ***
File size: 4.1 KB
Line 
1#ifndef MARS_MCalibrationIntensityCam
2#define MARS_MCalibrationIntensityCam
3
4#ifndef MARS_MCamEvent
5#include "MCamEvent.h"
6#endif
7
8#ifndef MARS_MArrayD
9#include "MArrayD.h"
10#endif
11
12#ifndef MARS_MCalibrationCam
13#include "MCalibrationCam.h"
14#endif
15
16class TOrdCollection;
17class MCalibrationPix;
18class MBadPixelsPix;
19class MGeomCam;
20class MHCalibrationCam;
21
22class MCalibrationIntensityCam : public MParContainer, public MCamEvent
23{
24private:
25 MArrayD fOffsets; //! Arrays of Higain-vs-LoGain fit result Offsets
26 MArrayD fSlopes; //! Arrays of Higain-vs-LoGain fit result Slopes
27
28protected:
29 TOrdCollection *fCams; // Array of MCalibrationCams, one per pulse colour and intensity
30 TOrdCollection *fHists; // Array of MHCalibrationCam's, containing the mean charges per area histograms
31
32 virtual void Add(const UInt_t from, const UInt_t to);
33 virtual void InitSize( const UInt_t n );
34
35public:
36 MCalibrationIntensityCam(const char *name=NULL, const char *title=NULL);
37 ~MCalibrationIntensityCam();
38
39 void Clear ( Option_t *o="" );
40 void Copy(TObject& object) const;
41
42 void AddToList(const char* name, const MGeomCam &geom);
43 void AddHist(const MHCalibrationCam *cam);
44
45 Int_t CountNumEntries(const MCalibrationCam::PulserColor_t col) const;
46
47 // Draws
48 void DrawHiLoFits();
49 void DrawPixelContent( Int_t num) const;
50
51 // Getters
52 Bool_t GetPixelContent( Double_t &val, Int_t idx, const MGeomCam &cam,Int_t type=0) const;
53 const Int_t GetSize() const;
54
55 const Int_t GetAverageAreas () const;
56 MCalibrationPix &GetAverageArea ( UInt_t i );
57 const MCalibrationPix &GetAverageArea ( UInt_t i ) const;
58 MBadPixelsPix &GetAverageBadArea ( UInt_t i );
59 const MBadPixelsPix &GetAverageBadArea ( UInt_t i ) const;
60 const Int_t GetAverageSectors () const;
61 MCalibrationPix &GetAverageSector ( UInt_t i );
62 const MCalibrationPix &GetAverageSector ( UInt_t i ) const;
63 MBadPixelsPix &GetAverageBadSector ( UInt_t i );
64 const MBadPixelsPix &GetAverageBadSector ( UInt_t i ) const;
65
66 MCalibrationCam *GetCam ( Int_t i=-1);
67 const MCalibrationCam *GetCam ( Int_t i=-1) const;
68
69 MCalibrationCam *GetCam ( const char *name );
70 const MCalibrationCam *GetCam ( const char *name ) const;
71
72 MHCalibrationCam *GetHist ( Int_t i=-1);
73 const MHCalibrationCam *GetHist ( Int_t i=-1) const;
74
75 MHCalibrationCam *GetHist ( const char *name );
76 const MHCalibrationCam *GetHist ( const char *name ) const;
77
78 MCalibrationPix &operator[] ( UInt_t i );
79 const MCalibrationPix &operator[] ( UInt_t i ) const;
80
81 const Float_t GetNumHiGainFADCSlices ( const Int_t aidx=0 ) const { return GetCam()->GetNumHiGainFADCSlices(aidx); }
82 const Float_t GetNumLoGainFADCSlices ( const Int_t aidx=0 ) const { return GetCam()->GetNumLoGainFADCSlices(aidx); }
83 const Int_t GetNumUnsuitable ( const Int_t aidx=-1) const { return GetCam()->GetNumUnsuitable(aidx); }
84 const Int_t GetNumUnreliable ( const Int_t aidx=-1) const { return GetCam()->GetNumUnreliable(aidx); }
85
86 // Inits
87 void Init ( const MGeomCam &geom );
88
89 // Prints
90 void Print(Option_t *o="") const;
91
92 // Setters
93 void SetNumHiGainFADCSlices( const Float_t f, const Int_t aidx=0) { GetCam()->SetNumHiGainFADCSlices(f,aidx); }
94 void SetNumLoGainFADCSlices( const Float_t f, const Int_t aidx=0) { GetCam()->SetNumLoGainFADCSlices(f,aidx); }
95 void SetNumUnsuitable ( const UInt_t i, const Int_t aidx ) { GetCam()->SetNumUnsuitable(i,aidx); }
96 void SetNumUnreliable ( const UInt_t i, const Int_t aidx ) { GetCam()->SetNumUnreliable(i,aidx); }
97 void SetPulserColor ( const MCalibrationCam::PulserColor_t col=MCalibrationCam::kCT1) {
98 GetCam()->SetPulserColor(col); }
99
100 ClassDef(MCalibrationIntensityCam, 2) // Base Container Intensity Calibration Results
101};
102
103#endif
Note: See TracBrowser for help on using the repository browser.