3 /** @file AliFMDSDigit.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>
22 //____________________________________________________________________
23 /** @class AliFMDSDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
24 @brief class for summable digits
27 class AliFMDSDigit : public AliFMDBaseDigit
37 * @param detector Detector
39 * @param sector Sector
41 * @param edep Energy deposited
42 * @param count ADC (first sample)
43 * @param count2 ADC (second sample, or -1 if not used)
44 * @param count3 ADC (third sample, or -1 if not used)
46 AliFMDSDigit(UShort_t detector,
57 const TArrayI& refs=TArrayI());
61 virtual ~AliFMDSDigit() {}
64 * @return ADC count (first sample)
66 UShort_t Count1() const { return fCount1; }
69 * @return ADC count (second sample, or -1 if not used)
71 Short_t Count2() const { return fCount2; }
74 * @return ADC count (third sample, or -1 if not used)
76 Short_t Count3() const { return fCount3; }
79 * @return ADC count (third sample, or -1 if not used)
81 Short_t Count4() const { return fCount4; }
84 * @return Canonical ADC counts
86 UShort_t Counts() const;
89 * @return Energy deposited
91 Float_t Edep() const { return fEdep; }
94 * @return Number of particles that hit this strip
96 UShort_t NParticles() const { return fNParticles; }
99 * @return Number of primary particles that hit this strip
101 UShort_t NPrimaries() const { return fNPrimaries; }
103 /** @return the track labels */
104 const TArrayI& TrackLabels() const { return fLabels; }
109 * @param opt Not used
111 void Print(Option_t* opt="") const;
113 * Set the count value
115 * @param s Sample number
118 void SetCount(UShort_t s, Short_t c);
120 Float_t fEdep; // Energy deposited
121 UShort_t fCount1; // Digital signal
122 Short_t fCount2; // Digital signal (-1 if not used)
123 Short_t fCount3; // Digital signal (-1 if not used)
124 Short_t fCount4; // Digital signal (-1 if not used)
125 UShort_t fNParticles; // Total number of particles that hit this strip
126 UShort_t fNPrimaries; // Number of primary particles that his this strip
128 TArrayI fLabels; // MC-truth track labels
130 ClassDef(AliFMDSDigit,5) // Summable FMD digit
134 AliFMDSDigit::Counts() const
136 if (fCount4 >= 0) return fCount3;
137 if (fCount3 >= 0) return fCount2;
138 if (fCount2 >= 0) return fCount2;
143 AliFMDSDigit::SetCount(UShort_t i, Short_t c)
146 case 0: fCount1 = c; break;
147 case 1: fCount2 = c; break;
148 case 2: fCount3 = c; break;
149 case 3: fCount4 = c; break;
154 //____________________________________________________________________