]>
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;} | |
41c52850 | 43 | /// Return the plane type 0=Bending 1=NonBending |
44 | Int_t GetPadPlaneType() const {return fPadPlaneType;} | |
45 | /// Set the plane type 0=Bending 1=NonBending | |
46 | void SetPadPlaneType(Int_t planeType) {fPadPlaneType = planeType;} | |
faa8d921 | 47 | |
48 | /// Set pad coordinates (cm) | |
49 | void SetPadXY(Double_t x, Double_t y) {fPadX = x; fPadY = y;} | |
50 | /// Return pad X-position (cm) | |
51 | Double_t GetPadX() const {return fPadX;} | |
52 | /// Return pad Y-position (cm) | |
53 | Double_t GetPadY() const {return fPadY;} | |
54 | ||
55 | /// Set pad dimension (cm) | |
56 | void SetPadDimXY(Double_t dX, Double_t dY) {fPadDimX = dX; fPadDimY = dY;} | |
57 | /// Return pad X-dimension (cm) | |
58 | Double_t GetPadDimX() const {return fPadDimX;} | |
59 | /// Return pad Y-dimension (cm) | |
60 | Double_t GetPadDimY() const {return fPadDimY;} | |
61 | ||
62 | /// Set the calibrated charge | |
63 | void SetPadCharge(Double_t charge) {fPadCharge = charge;} | |
64 | /// Return the calibrated charge | |
65 | Double_t GetPadCharge() const {return fPadCharge;} | |
66 | ||
67 | /// Set the raw charge | |
68 | void SetPadADC(Int_t adc) {fPadADC = adc;} | |
69 | /// Return the raw charge | |
70 | Int_t GetPadADC() const {return fPadADC;} | |
71 | ||
72 | /// Set the pad as being calibrated or not | |
73 | void SetCalibrated(Bool_t calibrated = kTRUE) {fPadCalibrated = calibrated;} | |
74 | /// Return kTRUE if the pad is calibrated | |
75 | Bool_t IsCalibrated() const {return fPadCalibrated;} | |
76 | /// Set the pad as being saturated or not | |
77 | void SetSaturated(Bool_t saturated = kTRUE) {fPadSaturated = saturated;} | |
78 | /// Return kTRUE if the pad is saturated | |
79 | Bool_t IsSaturated() const {return fPadSaturated;} | |
80 | ||
81 | ||
82 | // ------ calibration parameters ------ | |
83 | /// Set pedestal parameters | |
84 | void SetPedestal(Float_t mean, Float_t sigma) {fPedMean = mean; fPedSigma = sigma;} | |
85 | /// Return the mean value of the pedestal | |
86 | Float_t GetPedMean() const {return fPedMean;} | |
87 | /// Return the sigma of the pedestal | |
88 | Float_t GetPedSigma() const {return fPedSigma;} | |
89 | ||
90 | /// Set gain parameters | |
91 | void SetGain(Float_t a0, Float_t a1, Int_t thres, Int_t qual) {fGainA0 = a0; fGainA1 = a1; fGainThres = thres; fGainQual = qual;} | |
92 | /// Return the linear parameter of the gain | |
93 | Float_t GetGainA0() const {return fGainA0;} | |
94 | /// Return the quadratic parameter of the gain | |
95 | Float_t GetGainA1() const {return fGainA1;} | |
96 | /// Return the threshold of the quadratic behaviour of the gain | |
97 | Int_t GetGainThres() const {return fGainThres;} | |
98 | /// Return the quality of the gain parameters | |
99 | Int_t GetGainQual() const {return fGainQual;} | |
100 | ||
101 | ||
102 | protected: | |
103 | ||
104 | // pad info | |
105 | UInt_t fPadId; ///< pad ID | |
41c52850 | 106 | Int_t fPadPlaneType; ///< pad plane tye (0=Bending; 1=NonBending) |
faa8d921 | 107 | Double32_t fPadX; ///< pad X position |
108 | Double32_t fPadY; ///< pad Y position | |
109 | Double32_t fPadDimX; ///< pad X dimension | |
110 | Double32_t fPadDimY; ///< pad Y dimension | |
111 | Double32_t fPadCharge; ///< pad calibrated charge | |
112 | Int_t fPadADC; ///< pad raw charge | |
113 | Bool_t fPadSaturated; ///< pad saturation flag | |
114 | Bool_t fPadCalibrated; ///< pad calibration flag | |
115 | ||
116 | // calibration parameters | |
117 | Float_t fPedMean; ///< mean value of pedestal | |
118 | Float_t fPedSigma; ///< sigma of pedestal | |
119 | Float_t fGainA0; ///< linear parameter of gain | |
120 | Float_t fGainA1; ///< quadratic parameter of gain | |
121 | Int_t fGainThres; ///< threshold of quadratic behaviour of gain | |
122 | Int_t fGainQual; ///< quality of gain parameters | |
123 | ||
41c52850 | 124 | ClassDef(AliMUONPadInfo, 2) |
faa8d921 | 125 | }; |
126 | ||
127 | #endif |