prepare for the new tracklet fit/attach
[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
18//____________________________________________________________________
19/** @class AliFMDSDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
20 @brief class for summable digits
21 @ingroup FMD_base
22 */
23class AliFMDSDigit : public AliFMDBaseDigit
24{
25public:
26 /** CTOR */
27 AliFMDSDigit();
28 /** Constrctor
29 @param detector Detector
30 @param ring Ring
31 @param sector Sector
32 @param strip Strip
33 @param edep Energy deposited
34 @param count ADC (first sample)
35 @param count2 ADC (second sample, or -1 if not used)
36 @param count3 ADC (third sample, or -1 if not used) */
37 AliFMDSDigit(UShort_t detector,
38 Char_t ring='\0',
39 UShort_t sector=0,
40 UShort_t strip=0,
41 Float_t edep=0,
42 UShort_t count=0,
43 Short_t count2=-1,
2aeec17d 44 Short_t count3=-1,
83ad576a 45 Short_t count4=-1,
46 UShort_t npart=0,
47 UShort_t nprim=0);
02a27b50 48 /** DTOR */
49 virtual ~AliFMDSDigit() {}
50 /** @return ADC count (first sample) */
51 UShort_t Count1() const { return fCount1; }
52 /** @return ADC count (second sample, or -1 if not used) */
53 Short_t Count2() const { return fCount2; }
54 /** @return ADC count (third sample, or -1 if not used) */
55 Short_t Count3() const { return fCount3; }
2aeec17d 56 /** @return ADC count (third sample, or -1 if not used) */
57 Short_t Count4() const { return fCount4; }
02a27b50 58 /** @return Canonical ADC counts */
59 UShort_t Counts() const;
60 /** @return Energy deposited */
61 Float_t Edep() const { return fEdep; }
83ad576a 62 /** @return Number of particles that hit this strip */
63 UShort_t NParticles() const { return fNParticles; }
64 /** @return Number of primary particles that hit this strip */
65 UShort_t NPrimaries() const { return fNPrimaries; }
66
02a27b50 67 /** Print info
68 @param opt Not used */
69 void Print(Option_t* opt="") const;
70protected:
71 Float_t fEdep; // Energy deposited
72 UShort_t fCount1; // Digital signal
73 Short_t fCount2; // Digital signal (-1 if not used)
74 Short_t fCount3; // Digital signal (-1 if not used)
2aeec17d 75 Short_t fCount4; // Digital signal (-1 if not used)
83ad576a 76 UShort_t fNParticles; // Total number of particles that hit this strip
77 UShort_t fNPrimaries; // Number of primary particles that his this strip
78 ClassDef(AliFMDSDigit,3) // Summable FMD digit
02a27b50 79};
80
81inline UShort_t
82AliFMDSDigit::Counts() const
83{
2aeec17d 84 if (fCount4 >= 0) return fCount3;
85 if (fCount3 >= 0) return fCount2;
86 if (fCount2 >= 0) return fCount2;
87 return fCount1;
02a27b50 88}
89
90
91#endif
92//____________________________________________________________________
93//
94// Local Variables:
95// mode: C++
96// End:
97//
98//
99// EOF
100//