]>
Commit | Line | Data |
---|---|---|
faa8d921 | 1 | #ifndef ALIMUONPADINFO_H |
2 | #define ALIMUONPADINFO_H | |
3 | ||
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
7 | // $Id$ | |
8 | ||
9 | /// \class AliMUONPadInfo | |
10 | /// \brief Class to summarize ESD data at cluster | |
11 | // Author Philippe Pillot, Subatech | |
12 | ||
13 | ||
14 | #include <TObject.h> | |
15 | ||
16 | class AliMUONPadInfo : public TObject { | |
17 | public: | |
18 | AliMUONPadInfo(); // Constructor | |
19 | virtual ~AliMUONPadInfo(); //< Destructor | |
20 | AliMUONPadInfo(const AliMUONPadInfo& pad); | |
21 | AliMUONPadInfo& operator=(const AliMUONPadInfo& pad); | |
22 | ||
23 | /// Clear method (used by TClonesArray) | |
24 | virtual void Clear(Option_t* = "") {} | |
25 | ||
26 | void Print(Option_t * option = "") const; | |
27 | ||
28 | ||
29 | // ------ pad info ------ | |
30 | /// Set pad ID | |
31 | void SetPadId(UInt_t padId) {fPadId = padId; SetUniqueID(fPadId);} | |
32 | /// Return pad ID | |
33 | UInt_t GetPadId() const {return fPadId;} | |
34 | ||
35 | /// Return detection element id, part of the uniqueID | |
36 | Int_t GetDetElemId() const {return (fPadId & 0x00000FFF);} | |
37 | /// Return electronic card id, part of the uniqueID | |
38 | Int_t GetManuId() const {return (fPadId & 0x00FFF000) >> 12;} | |
39 | /// Return the channel within ManuId(), part of the uniqueID | |
40 | Int_t GetManuChannel() const {return (fPadId & 0x3F000000) >> 24;} | |
41 | /// Return the cathode number, part of the uniqueID | |
42 | Int_t GetCathode() const {return (fPadId & 0x40000000) >> 30;} | |
43 | ||
44 | /// Set pad coordinates (cm) | |
45 | void SetPadXY(Double_t x, Double_t y) {fPadX = x; fPadY = y;} | |
46 | /// Return pad X-position (cm) | |
47 | Double_t GetPadX() const {return fPadX;} | |
48 | /// Return pad Y-position (cm) | |
49 | Double_t GetPadY() const {return fPadY;} | |
50 | ||
51 | /// Set pad dimension (cm) | |
52 | void SetPadDimXY(Double_t dX, Double_t dY) {fPadDimX = dX; fPadDimY = dY;} | |
53 | /// Return pad X-dimension (cm) | |
54 | Double_t GetPadDimX() const {return fPadDimX;} | |
55 | /// Return pad Y-dimension (cm) | |
56 | Double_t GetPadDimY() const {return fPadDimY;} | |
57 | ||
58 | /// Set the calibrated charge | |
59 | void SetPadCharge(Double_t charge) {fPadCharge = charge;} | |
60 | /// Return the calibrated charge | |
61 | Double_t GetPadCharge() const {return fPadCharge;} | |
62 | ||
63 | /// Set the raw charge | |
64 | void SetPadADC(Int_t adc) {fPadADC = adc;} | |
65 | /// Return the raw charge | |
66 | Int_t GetPadADC() const {return fPadADC;} | |
67 | ||
68 | /// Set the pad as being calibrated or not | |
69 | void SetCalibrated(Bool_t calibrated = kTRUE) {fPadCalibrated = calibrated;} | |
70 | /// Return kTRUE if the pad is calibrated | |
71 | Bool_t IsCalibrated() const {return fPadCalibrated;} | |
72 | /// Set the pad as being saturated or not | |
73 | void SetSaturated(Bool_t saturated = kTRUE) {fPadSaturated = saturated;} | |
74 | /// Return kTRUE if the pad is saturated | |
75 | Bool_t IsSaturated() const {return fPadSaturated;} | |
76 | ||
77 | ||
78 | // ------ calibration parameters ------ | |
79 | /// Set pedestal parameters | |
80 | void SetPedestal(Float_t mean, Float_t sigma) {fPedMean = mean; fPedSigma = sigma;} | |
81 | /// Return the mean value of the pedestal | |
82 | Float_t GetPedMean() const {return fPedMean;} | |
83 | /// Return the sigma of the pedestal | |
84 | Float_t GetPedSigma() const {return fPedSigma;} | |
85 | ||
86 | /// Set gain parameters | |
87 | void SetGain(Float_t a0, Float_t a1, Int_t thres, Int_t qual) {fGainA0 = a0; fGainA1 = a1; fGainThres = thres; fGainQual = qual;} | |
88 | /// Return the linear parameter of the gain | |
89 | Float_t GetGainA0() const {return fGainA0;} | |
90 | /// Return the quadratic parameter of the gain | |
91 | Float_t GetGainA1() const {return fGainA1;} | |
92 | /// Return the threshold of the quadratic behaviour of the gain | |
93 | Int_t GetGainThres() const {return fGainThres;} | |
94 | /// Return the quality of the gain parameters | |
95 | Int_t GetGainQual() const {return fGainQual;} | |
96 | ||
97 | ||
98 | protected: | |
99 | ||
100 | // pad info | |
101 | UInt_t fPadId; ///< pad ID | |
102 | Double32_t fPadX; ///< pad X position | |
103 | Double32_t fPadY; ///< pad Y position | |
104 | Double32_t fPadDimX; ///< pad X dimension | |
105 | Double32_t fPadDimY; ///< pad Y dimension | |
106 | Double32_t fPadCharge; ///< pad calibrated charge | |
107 | Int_t fPadADC; ///< pad raw charge | |
108 | Bool_t fPadSaturated; ///< pad saturation flag | |
109 | Bool_t fPadCalibrated; ///< pad calibration flag | |
110 | ||
111 | // calibration parameters | |
112 | Float_t fPedMean; ///< mean value of pedestal | |
113 | Float_t fPedSigma; ///< sigma of pedestal | |
114 | Float_t fGainA0; ///< linear parameter of gain | |
115 | Float_t fGainA1; ///< quadratic parameter of gain | |
116 | Int_t fGainThres; ///< threshold of quadratic behaviour of gain | |
117 | Int_t fGainQual; ///< quality of gain parameters | |
118 | ||
119 | ClassDef(AliMUONPadInfo, 1) | |
120 | }; | |
121 | ||
122 | #endif |