]> git.uio.no Git - u/mrichter/AliRoot.git/blame - FMD/AliFMDSDigit.h
Add input files for all centralities
[u/mrichter/AliRoot.git] / FMD / AliFMDSDigit.h
CommitLineData
02a27b50 1#ifndef ALIFMDSDIGIT_H
2#define ALIFMDSDIGIT_H
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
7*/
8//___________________________________________________________________
9//
10// Digits classes for the FMD
11// AliFMDBaseDigit - base class
12// AliFMDDigit - Normal (smeared) digit
13// AliFMDSDigit - Summable (non-smeared) digit
14//
15#ifndef ALIFMDBASEDIGIT_H
16# include <AliFMDBaseDigit.h>
17#endif
8d00dfa3 18// #ifndef ROOT_TArrayI
19// # include <TArrayI.h>
20// #endif
b2e6f0b0 21
02a27b50 22//____________________________________________________________________
23/** @class AliFMDSDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
24 @brief class for summable digits
25 @ingroup FMD_base
26 */
27class AliFMDSDigit : public AliFMDBaseDigit
28{
29public:
faf80567 30 /**
31 * CTOR
32 */
02a27b50 33 AliFMDSDigit();
faf80567 34 /**
35 * Constrctor
36 *
37 * @param detector Detector
38 * @param ring Ring
39 * @param sector Sector
40 * @param strip Strip
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)
45 */
b2e6f0b0 46 AliFMDSDigit(UShort_t detector,
47 Char_t ring='\0',
48 UShort_t sector=0,
49 UShort_t strip=0,
50 Float_t edep=0,
51 UShort_t count=0,
52 Short_t count2=-1,
53 Short_t count3=-1,
54 Short_t count4=-1,
55 UShort_t npart=0,
56 UShort_t nprim=0,
8d00dfa3 57 Int_t* refs=0);
faf80567 58 /**
59 * DTOR
60 */
02a27b50 61 virtual ~AliFMDSDigit() {}
faf80567 62 /**
63 *
64 * @return ADC count (first sample)
65 */
66 UShort_t Count1() const { return fCount1; }
67 /**
68 *
69 * @return ADC count (second sample, or -1 if not used)
70 */
71 Short_t Count2() const { return fCount2; }
72 /**
73 *
74 * @return ADC count (third sample, or -1 if not used)
75 */
76 Short_t Count3() const { return fCount3; }
77 /**
78 *
79 * @return ADC count (third sample, or -1 if not used)
80 */
81 Short_t Count4() const { return fCount4; }
82 /**
83 *
84 * @return Canonical ADC counts
85 */
86 UShort_t Counts() const;
87 /**
88 *
89 * @return Energy deposited
90 */
91 Float_t Edep() const { return fEdep; }
92 /**
93 *
94 * @return Number of particles that hit this strip
95 */
83ad576a 96 UShort_t NParticles() const { return fNParticles; }
faf80567 97 /**
98 *
99 * @return Number of primary particles that hit this strip
100 */
83ad576a 101 UShort_t NPrimaries() const { return fNPrimaries; }
faf80567 102#if 0
b2e6f0b0 103 /** @return the track labels */
104 const TArrayI& TrackLabels() const { return fLabels; }
faf80567 105#endif
106 /**
107 * Print info
108 *
109 * @param opt Not used
110 */
02a27b50 111 void Print(Option_t* opt="") const;
faf80567 112 /**
113 * Set the count value
114 *
115 * @param s Sample number
116 * @param c Counts
117 */
118 void SetCount(UShort_t s, Short_t c);
02a27b50 119protected:
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)
2aeec17d 124 Short_t fCount4; // Digital signal (-1 if not used)
83ad576a 125 UShort_t fNParticles; // Total number of particles that hit this strip
126 UShort_t fNPrimaries; // Number of primary particles that his this strip
faf80567 127#if 0
b2e6f0b0 128 TArrayI fLabels; // MC-truth track labels
faf80567 129#endif
130 ClassDef(AliFMDSDigit,5) // Summable FMD digit
02a27b50 131};
132
133inline UShort_t
134AliFMDSDigit::Counts() const
135{
2aeec17d 136 if (fCount4 >= 0) return fCount3;
137 if (fCount3 >= 0) return fCount2;
138 if (fCount2 >= 0) return fCount2;
139 return fCount1;
02a27b50 140}
141
faf80567 142inline void
143AliFMDSDigit::SetCount(UShort_t i, Short_t c)
144{
145 switch (i) {
146 case 0: fCount1 = c; break;
147 case 1: fCount2 = c; break;
148 case 2: fCount3 = c; break;
149 case 3: fCount4 = c; break;
150 }
151}
02a27b50 152
153#endif
154//____________________________________________________________________
155//
156// Local Variables:
157// mode: C++
158// End:
159//
160//
161// EOF
162//