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,
58 virtual ~AliFMDDigit() {}
60 * @param i # of sample to get
62 * @return sample # @a i
64 Int_t Count(UShort_t i=0) const;
67 * @return ADC count (first sample)
69 UShort_t Count1() const { return fCount1; }
72 * @return ADC count (second sample, or -1 if not used)
74 Short_t Count2() const { return fCount2; }
77 * @return ADC count (third sample, or -1 if not used)
79 Short_t Count3() const { return fCount3; }
82 * @return ADC count (third sample, or -1 if not used)
84 Short_t Count4() const { return fCount4; }
87 * @return Canonical ADC counts
89 UShort_t Counts() const;
95 void Print(Option_t* opt="") const;
100 const char* GetTitle() const;
102 * Set the count value
104 * @param s Sample number
107 void SetCount(UShort_t s, Short_t c);
109 * Initialize all counts to appropriate values for this oversampling
113 * Rate | Sample 1 | Sample 2 | Sample 3 | Sample 4
114 * -----+----------+----------+----------+----------
115 * 1 | 0 | -1 | -1 | -1
116 * 2 | 0 | 0 | -1 | -1
121 * @param rate Oversampling rate
123 void SetDefaultCounts(UShort_t rate);
125 UShort_t fCount1; // Digital signal
126 Short_t fCount2; // Digital signal (-1 if not used)
127 Short_t fCount3; // Digital signal (-1 if not used)
128 Short_t fCount4; // Digital signal (-1 if not used)
129 ClassDef(AliFMDDigit,2) // Normal FMD digit
133 AliFMDDigit::SetDefaultCounts(UShort_t rate)
136 case 4: fCount4 = 0; // Fall through
137 case 3: fCount3 = 0; // Fall through
138 case 2: fCount2 = 0; // Fall through
142 fCount4 = fCount3 = fCount2 = fCount1 = 0;
147 AliFMDDigit::Counts() const
149 if (fCount4 >= 0) return fCount3;
150 if (fCount3 >= 0) return fCount2;
151 if (fCount2 >= 0) return fCount2;
156 AliFMDDigit::Count(UShort_t i) const
159 case 0: return fCount1;
160 case 1: return fCount2;
161 case 2: return fCount3;
162 case 3: return fCount4;
167 AliFMDDigit::SetCount(UShort_t i, Short_t c)
170 case 0: fCount1 = c; break;
171 case 1: fCount2 = c; break;
172 case 2: fCount3 = c; break;
173 case 3: fCount4 = c; break;
178 //____________________________________________________________________