3 /** @file AliFMDDigit.h
4 @author Christian Holm Christensen <cholm@nbi.dk>
5 @date Mon Mar 27 12:37:41 2006
6 @brief Digits for the FMD
8 //___________________________________________________________________
10 // Digits classes for the FMD
11 // AliFMDBaseDigit - base class
12 // AliFMDDigit - Normal (smeared) digit
13 // AliFMDSDigit - Summable (non-smeared) digit
19 //____________________________________________________________________
20 /** @class AliFMDBaseDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
21 @brief base class for digits
24 class AliFMDBaseDigit : public TObject
30 @param detector Detector
34 AliFMDBaseDigit(UShort_t detector,
39 virtual ~AliFMDBaseDigit() {}
40 /** @return Detector # */
41 UShort_t Detector() const { return fDetector; }
42 /** @return Ring ID */
43 Char_t Ring() const { return fRing; }
44 /** @return sector # */
45 UShort_t Sector() const { return fSector; }
46 /** @return strip # */
47 UShort_t Strip() const { return fStrip; }
49 @param opt Not used */
50 virtual void Print(Option_t* opt="") const;
52 const char* GetName() const;
54 UShort_t fDetector; // (Sub) Detector # (1,2, or 3)
55 Char_t fRing; // Ring ID ('I' or 'O')
56 UShort_t fSector; // Sector # (phi division)
57 UShort_t fStrip; // Strip # (radial division)
58 ClassDef(AliFMDBaseDigit, 1) // Base class for FMD digits
61 //____________________________________________________________________
62 /** @class AliFMDDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
63 @brief class for digits
66 class AliFMDDigit : public AliFMDBaseDigit
72 @param detector Detector
76 @param count ADC (first sample)
77 @param count2 ADC (second sample, or -1 if not used)
78 @param count3 ADC (third sample, or -1 if not used) */
79 AliFMDDigit(UShort_t detector,
87 virtual ~AliFMDDigit() {}
88 /** @param i # of sample to get
89 @return sample # @a i */
90 Int_t Count(size_t i=0) const;
91 /** @return ADC count (first sample) */
92 UShort_t Count1() const { return fCount1; }
93 /** @return ADC count (second sample, or -1 if not used) */
94 Short_t Count2() const { return fCount2; }
95 /** @return ADC count (third sample, or -1 if not used) */
96 Short_t Count3() const { return fCount3; }
97 /** @return Canonical ADC counts */
98 UShort_t Counts() const;
100 @param opt Not used */
101 void Print(Option_t* opt="") const;
103 const char* GetTitle() const;
105 UShort_t fCount1; // Digital signal
106 Short_t fCount2; // Digital signal (-1 if not used)
107 Short_t fCount3; // Digital signal (-1 if not used)
108 ClassDef(AliFMDDigit,1) // Normal FMD digit
112 AliFMDDigit::Counts() const
115 + (fCount2 >= 0 ? fCount2 : 0)
116 + (fCount3 >= 0 ? fCount3 : 0);
120 AliFMDDigit::Count(size_t i) const
123 case 0: return fCount1;
124 case 1: return fCount2;
125 case 2: return fCount3;
130 //____________________________________________________________________
131 /** @class AliFMDSDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
132 @brief class for summable digits
135 class AliFMDSDigit : public AliFMDBaseDigit
141 @param detector Detector
145 @param edep Energy deposited
146 @param count ADC (first sample)
147 @param count2 ADC (second sample, or -1 if not used)
148 @param count3 ADC (third sample, or -1 if not used) */
149 AliFMDSDigit(UShort_t detector,
158 virtual ~AliFMDSDigit() {}
159 /** @return ADC count (first sample) */
160 UShort_t Count1() const { return fCount1; }
161 /** @return ADC count (second sample, or -1 if not used) */
162 Short_t Count2() const { return fCount2; }
163 /** @return ADC count (third sample, or -1 if not used) */
164 Short_t Count3() const { return fCount3; }
165 /** @return Canonical ADC counts */
166 UShort_t Counts() const;
167 /** @return Energy deposited */
168 Float_t Edep() const { return fEdep; }
170 @param opt Not used */
171 void Print(Option_t* opt="") const;
173 Float_t fEdep; // Energy deposited
174 UShort_t fCount1; // Digital signal
175 Short_t fCount2; // Digital signal (-1 if not used)
176 Short_t fCount3; // Digital signal (-1 if not used)
177 ClassDef(AliFMDSDigit,1) // Summable FMD digit
181 AliFMDSDigit::Counts() const
184 + (fCount2 >= 0 ? fCount2 : 0)
185 + (fCount3 >= 0 ? fCount3 : 0);
190 //____________________________________________________________________