]>
Commit | Line | Data |
---|---|---|
4347b38f | 1 | #ifndef ALIFMDDIGIT_H |
2 | #define ALIFMDDIGIT_H | |
56b1929b | 3 | //___________________________________________________________________ |
4347b38f | 4 | // |
088f8e79 | 5 | // Digits classes for the FMD |
6 | // AliFMDBaseDigit - base class | |
7 | // AliFMDDigit - Normal (smeared) digit | |
8 | // AliFMDSDigit - Summable (non-smeared) digit | |
4347b38f | 9 | // |
4347b38f | 10 | #ifndef ROOT_TObject |
11 | # include <TObject.h> | |
12 | #endif | |
13 | ||
14 | //____________________________________________________________________ | |
9f662337 | 15 | /** @class AliFMDBaseDigit AliFMDDigit.h <FMD/AliFMDDigit.h> |
16 | @brief base class for digits | |
17 | @ingroup FMD_base | |
18 | */ | |
4347b38f | 19 | class AliFMDBaseDigit : public TObject |
20 | { | |
4347b38f | 21 | public: |
9f662337 | 22 | /** CTOR */ |
4347b38f | 23 | AliFMDBaseDigit(); |
9f662337 | 24 | /** Constrctor |
25 | @param detector Detector | |
26 | @param ring Ring | |
27 | @param sector Sector | |
28 | @param strip Strip */ | |
4347b38f | 29 | AliFMDBaseDigit(UShort_t detector, |
30 | Char_t ring='\0', | |
31 | UShort_t sector=0, | |
32 | UShort_t strip=0); | |
9f662337 | 33 | /** DTOR */ |
4347b38f | 34 | virtual ~AliFMDBaseDigit() {} |
9f662337 | 35 | /** @return Detector # */ |
4347b38f | 36 | UShort_t Detector() const { return fDetector; } |
9f662337 | 37 | /** @return Ring ID */ |
4347b38f | 38 | Char_t Ring() const { return fRing; } |
9f662337 | 39 | /** @return sector # */ |
4347b38f | 40 | UShort_t Sector() const { return fSector; } |
9f662337 | 41 | /** @return strip # */ |
4347b38f | 42 | UShort_t Strip() const { return fStrip; } |
9f662337 | 43 | /** Print information |
44 | @param opt Not used */ | |
4347b38f | 45 | virtual void Print(Option_t* opt="") const; |
9f662337 | 46 | /** @return Name */ |
8f6ee336 | 47 | const char* GetName() const; |
42403906 | 48 | protected: |
49 | UShort_t fDetector; // (Sub) Detector # (1,2, or 3) | |
50 | Char_t fRing; // Ring ID ('I' or 'O') | |
51 | UShort_t fSector; // Sector # (phi division) | |
52 | UShort_t fStrip; // Strip # (radial division) | |
4347b38f | 53 | ClassDef(AliFMDBaseDigit, 1) // Base class for FMD digits |
54 | }; | |
55 | ||
56 | //____________________________________________________________________ | |
9f662337 | 57 | /** @class AliFMDDigit AliFMDDigit.h <FMD/AliFMDDigit.h> |
58 | @brief class for digits | |
59 | @ingroup FMD_base | |
60 | */ | |
4347b38f | 61 | class AliFMDDigit : public AliFMDBaseDigit |
62 | { | |
4347b38f | 63 | public: |
9f662337 | 64 | /** CTOR */ |
4347b38f | 65 | AliFMDDigit(); |
9f662337 | 66 | /** Constrctor |
67 | @param detector Detector | |
68 | @param ring Ring | |
69 | @param sector Sector | |
70 | @param strip Strip | |
71 | @param count1 ADC (first sample) | |
72 | @param count2 ADC (second sample, or -1 if not used) | |
73 | @param count3 ADC (third sample, or -1 if not used) */ | |
4347b38f | 74 | AliFMDDigit(UShort_t detector, |
75 | Char_t ring='\0', | |
76 | UShort_t sector=0, | |
77 | UShort_t strip=0, | |
78 | UShort_t count=0, | |
79 | Short_t count2=-1, | |
80 | Short_t count3=-1); | |
9f662337 | 81 | /** DTOR */ |
4347b38f | 82 | virtual ~AliFMDDigit() {} |
9f662337 | 83 | /** @return ADC count (first sample) */ |
4347b38f | 84 | UShort_t Count1() const { return fCount1; } |
9f662337 | 85 | /** @return ADC count (second sample, or -1 if not used) */ |
4347b38f | 86 | Short_t Count2() const { return fCount2; } |
9f662337 | 87 | /** @return ADC count (third sample, or -1 if not used) */ |
4347b38f | 88 | Short_t Count3() const { return fCount3; } |
9f662337 | 89 | /** @return Canonical ADC counts */ |
4347b38f | 90 | UShort_t Counts() const; |
9f662337 | 91 | /** Print info |
92 | @param opt Not used */ | |
4347b38f | 93 | void Print(Option_t* opt="") const; |
9f662337 | 94 | /** @return Title */ |
bf000c32 | 95 | const char* GetTitle() const; |
088f8e79 | 96 | protected: |
97 | UShort_t fCount1; // Digital signal | |
98 | Short_t fCount2; // Digital signal (-1 if not used) | |
99 | Short_t fCount3; // Digital signal (-1 if not used) | |
4347b38f | 100 | ClassDef(AliFMDDigit,1) // Normal FMD digit |
101 | }; | |
102 | ||
103 | inline UShort_t | |
104 | AliFMDDigit::Counts() const | |
105 | { | |
106 | return fCount1 | |
107 | + (fCount2 >= 0 ? fCount2 : 0) | |
108 | + (fCount3 >= 0 ? fCount3 : 0); | |
109 | } | |
110 | ||
111 | //____________________________________________________________________ | |
9f662337 | 112 | /** @class AliFMDSDigit AliFMDDigit.h <FMD/AliFMDDigit.h> |
113 | @brief class for summable digits | |
114 | @ingroup FMD_base | |
115 | */ | |
4347b38f | 116 | class AliFMDSDigit : public AliFMDBaseDigit |
117 | { | |
4347b38f | 118 | public: |
9f662337 | 119 | /** CTOR */ |
4347b38f | 120 | AliFMDSDigit(); |
9f662337 | 121 | /** Constrctor |
122 | @param detector Detector | |
123 | @param ring Ring | |
124 | @param sector Sector | |
125 | @param strip Strip | |
126 | @param count1 ADC (first sample) | |
127 | @param count2 ADC (second sample, or -1 if not used) | |
128 | @param count3 ADC (third sample, or -1 if not used) */ | |
4347b38f | 129 | AliFMDSDigit(UShort_t detector, |
130 | Char_t ring='\0', | |
131 | UShort_t sector=0, | |
132 | UShort_t strip=0, | |
133 | Float_t edep=0, | |
134 | UShort_t count=0, | |
135 | Short_t count2=-1, | |
136 | Short_t count3=-1); | |
9f662337 | 137 | /** DTOR */ |
4347b38f | 138 | virtual ~AliFMDSDigit() {} |
9f662337 | 139 | /** @return ADC count (first sample) */ |
4347b38f | 140 | UShort_t Count1() const { return fCount1; } |
9f662337 | 141 | /** @return ADC count (second sample, or -1 if not used) */ |
4347b38f | 142 | Short_t Count2() const { return fCount2; } |
9f662337 | 143 | /** @return ADC count (third sample, or -1 if not used) */ |
4347b38f | 144 | Short_t Count3() const { return fCount3; } |
9f662337 | 145 | /** @return Canonical ADC counts */ |
4347b38f | 146 | UShort_t Counts() const; |
9f662337 | 147 | /** @return Energy deposited */ |
148 | Float_t Edep() const { return fEdep; } | |
149 | /** Print info | |
150 | @param opt Not used */ | |
4347b38f | 151 | void Print(Option_t* opt="") const; |
088f8e79 | 152 | protected: |
153 | Float_t fEdep; // Energy deposited | |
154 | UShort_t fCount1; // Digital signal | |
155 | Short_t fCount2; // Digital signal (-1 if not used) | |
156 | Short_t fCount3; // Digital signal (-1 if not used) | |
4347b38f | 157 | ClassDef(AliFMDSDigit,1) // Summable FMD digit |
158 | }; | |
159 | ||
160 | inline UShort_t | |
161 | AliFMDSDigit::Counts() const | |
162 | { | |
163 | return fCount1 | |
164 | + (fCount2 >= 0 ? fCount2 : 0) | |
165 | + (fCount3 >= 0 ? fCount3 : 0); | |
166 | } | |
167 | ||
168 | ||
169 | #endif | |
170 | //____________________________________________________________________ | |
171 | // | |
0d0e6995 | 172 | // Local Variables: |
173 | // mode: C++ | |
174 | // End: | |
175 | // | |
176 | // | |
4347b38f | 177 | // EOF |
178 | // |