Added ITS Alignment interface to MillePede2 and related supermodule class
[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
b2e6f0b0 18#ifndef ROOT_TArrayI
19# include <TArrayI.h>
20#endif
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:
30 /** CTOR */
31 AliFMDSDigit();
32 /** Constrctor
33 @param detector Detector
34 @param ring Ring
35 @param sector Sector
36 @param strip Strip
37 @param edep Energy deposited
38 @param count ADC (first sample)
39 @param count2 ADC (second sample, or -1 if not used)
40 @param count3 ADC (third sample, or -1 if not used) */
b2e6f0b0 41 AliFMDSDigit(UShort_t detector,
42 Char_t ring='\0',
43 UShort_t sector=0,
44 UShort_t strip=0,
45 Float_t edep=0,
46 UShort_t count=0,
47 Short_t count2=-1,
48 Short_t count3=-1,
49 Short_t count4=-1,
50 UShort_t npart=0,
51 UShort_t nprim=0,
52 const TArrayI& refs=TArrayI());
02a27b50 53 /** DTOR */
54 virtual ~AliFMDSDigit() {}
55 /** @return ADC count (first sample) */
56 UShort_t Count1() const { return fCount1; }
57 /** @return ADC count (second sample, or -1 if not used) */
58 Short_t Count2() const { return fCount2; }
59 /** @return ADC count (third sample, or -1 if not used) */
60 Short_t Count3() const { return fCount3; }
2aeec17d 61 /** @return ADC count (third sample, or -1 if not used) */
62 Short_t Count4() const { return fCount4; }
02a27b50 63 /** @return Canonical ADC counts */
64 UShort_t Counts() const;
65 /** @return Energy deposited */
66 Float_t Edep() const { return fEdep; }
83ad576a 67 /** @return Number of particles that hit this strip */
68 UShort_t NParticles() const { return fNParticles; }
69 /** @return Number of primary particles that hit this strip */
70 UShort_t NPrimaries() const { return fNPrimaries; }
b2e6f0b0 71 /** @return the track labels */
72 const TArrayI& TrackLabels() const { return fLabels; }
02a27b50 73 /** Print info
74 @param opt Not used */
75 void Print(Option_t* opt="") const;
76protected:
77 Float_t fEdep; // Energy deposited
78 UShort_t fCount1; // Digital signal
79 Short_t fCount2; // Digital signal (-1 if not used)
80 Short_t fCount3; // Digital signal (-1 if not used)
2aeec17d 81 Short_t fCount4; // Digital signal (-1 if not used)
83ad576a 82 UShort_t fNParticles; // Total number of particles that hit this strip
83 UShort_t fNPrimaries; // Number of primary particles that his this strip
b2e6f0b0 84 TArrayI fLabels; // MC-truth track labels
85 ClassDef(AliFMDSDigit,4) // Summable FMD digit
02a27b50 86};
87
88inline UShort_t
89AliFMDSDigit::Counts() const
90{
2aeec17d 91 if (fCount4 >= 0) return fCount3;
92 if (fCount3 >= 0) return fCount2;
93 if (fCount2 >= 0) return fCount2;
94 return fCount1;
02a27b50 95}
96
97
98#endif
99//____________________________________________________________________
100//
101// Local Variables:
102// mode: C++
103// End:
104//
105//
106// EOF
107//