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
15 #ifndef ALIFMDBASEDIGIT_H
16 # include <AliFMDBaseDigit.h>
23 //____________________________________________________________________
24 /** @class AliFMDDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
25 @brief class for digits
28 class AliFMDDigit : public AliFMDBaseDigit
36 * @param detector Detector
38 * @param sector Sector
40 * @param count ADC (first sample)
41 * @param count2 ADC (second sample, or -1 if not used)
42 * @param count3 ADC (third sample, or -1 if not used)
43 * @param refs Track references
45 AliFMDDigit(UShort_t detector,
53 const TArrayI& refs=TArrayI());
57 virtual ~AliFMDDigit() {}
59 * @param i # of sample to get
61 * @return sample # @a i
63 Int_t Count(UShort_t i=0) const;
66 * @return ADC count (first sample)
68 UShort_t Count1() const { return fCount1; }
71 * @return ADC count (second sample, or -1 if not used)
73 Short_t Count2() const { return fCount2; }
76 * @return ADC count (third sample, or -1 if not used)
78 Short_t Count3() const { return fCount3; }
81 * @return ADC count (third sample, or -1 if not used)
83 Short_t Count4() const { return fCount4; }
86 * @return Canonical ADC counts
88 UShort_t Counts() const;
94 void Print(Option_t* opt="") const;
99 const char* GetTitle() const;
101 * Set the count value
103 * @param s Sample number
106 void SetCount(UShort_t s, Short_t c);
108 UShort_t fCount1; // Digital signal
109 Short_t fCount2; // Digital signal (-1 if not used)
110 Short_t fCount3; // Digital signal (-1 if not used)
111 Short_t fCount4; // Digital signal (-1 if not used)
112 ClassDef(AliFMDDigit,2) // Normal FMD digit
116 AliFMDDigit::Counts() const
118 if (fCount4 >= 0) return fCount3;
119 if (fCount3 >= 0) return fCount2;
120 if (fCount2 >= 0) return fCount2;
125 AliFMDDigit::Count(UShort_t i) const
128 case 0: return fCount1;
129 case 1: return fCount2;
130 case 2: return fCount3;
131 case 3: return fCount4;
136 AliFMDDigit::SetCount(UShort_t i, Short_t c)
139 case 0: fCount1 = c; break;
140 case 1: fCount2 = c; break;
141 case 2: fCount3 = c; break;
142 case 3: fCount4 = c; break;
147 //____________________________________________________________________