AliRoot Core  3dc7879 (3dc7879)
AliFMDSDigit.h
Go to the documentation of this file.
1 #ifndef ALIFMDSDIGIT_H
2 #define ALIFMDSDIGIT_H
3 
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
18 // #ifndef ROOT_TArrayI
19 // # include <TArrayI.h>
20 // #endif
21 
22 //____________________________________________________________________
28 {
29 public:
33  AliFMDSDigit();
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,
57  const Int_t* refs=0);
61  virtual ~AliFMDSDigit() {}
66  UShort_t Count1() const { return fCount1; }
71  Short_t Count2() const { return fCount2; }
76  Short_t Count3() const { return fCount3; }
81  Short_t Count4() const { return fCount4; }
86  UShort_t Counts() const;
91  Float_t Edep() const { return fEdep; }
96  UShort_t NParticles() const { return fNParticles; }
101  UShort_t NPrimaries() const { return fNPrimaries; }
102 #if 0
103 
104  const TArrayI& TrackLabels() const { return fLabels; }
105 #endif
106 
111  void Print(Option_t* opt="") const;
118  void SetCount(UShort_t s, Short_t c);
119 protected:
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
127 #if 0
128  TArrayI fLabels; // MC-truth track labels
129 #endif
130  ClassDef(AliFMDSDigit,5) // Summable FMD digit
131 };
132 
133 inline UShort_t
135 {
136  if (fCount4 >= 0) return fCount3;
137  if (fCount3 >= 0) return fCount2;
138  if (fCount2 >= 0) return fCount2;
139  return fCount1;
140 }
141 
142 inline void
143 AliFMDSDigit::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 }
152 
153 #endif
154 //____________________________________________________________________
155 //
156 // Local Variables:
157 // mode: C++
158 // End:
159 //
160 //
161 // EOF
162 //
Short_t fCount4
Definition: AliFMDSDigit.h:124
virtual ~AliFMDSDigit()
Definition: AliFMDSDigit.h:61
UShort_t fNPrimaries
Definition: AliFMDSDigit.h:126
Short_t fCount2
Definition: AliFMDSDigit.h:122
UShort_t Counts() const
Definition: AliFMDSDigit.h:134
UShort_t fCount1
Definition: AliFMDSDigit.h:121
Short_t Count4() const
Definition: AliFMDSDigit.h:81
base class for digits
UShort_t NPrimaries() const
Definition: AliFMDSDigit.h:101
Short_t fCount3
Definition: AliFMDSDigit.h:123
Short_t Count3() const
Definition: AliFMDSDigit.h:76
Float_t Edep() const
Definition: AliFMDSDigit.h:91
UShort_t NParticles() const
Definition: AliFMDSDigit.h:96
Float_t fEdep
Definition: AliFMDSDigit.h:120
Digits for the FMD.
void SetCount(UShort_t s, Short_t c)
Definition: AliFMDSDigit.h:143
UShort_t Count1() const
Definition: AliFMDSDigit.h:66
UShort_t fNParticles
Definition: AliFMDSDigit.h:125
Short_t Count2() const
Definition: AliFMDSDigit.h:71
void Print(Option_t *opt="") const
class for summable digits
Definition: AliFMDSDigit.h:27