]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - FMD/AliFMDDigit.h
Simple scripts to run various steps.
[u/mrichter/AliRoot.git] / FMD / AliFMDDigit.h
... / ...
CommitLineData
1#ifndef ALIFMDDIGIT_H
2#define ALIFMDDIGIT_H
3/** @file AliFMDDigit.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//____________________________________________________________________
20/** @class AliFMDDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
21 @brief class for digits
22 @ingroup FMD_base
23 */
24class AliFMDDigit : public AliFMDBaseDigit
25{
26public:
27 /** CTOR */
28 AliFMDDigit();
29 /** Constrctor
30 @param detector Detector
31 @param ring Ring
32 @param sector Sector
33 @param strip Strip
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 AliFMDDigit(UShort_t detector,
38 Char_t ring='\0',
39 UShort_t sector=0,
40 UShort_t strip=0,
41 UShort_t count=0,
42 Short_t count2=-1,
43 Short_t count3=-1,
44 Short_t count4=-1);
45 /** DTOR */
46 virtual ~AliFMDDigit() {}
47 /** @param i # of sample to get
48 @return sample # @a i */
49 Int_t Count(UShort_t i=0) const;
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; }
56 /** @return ADC count (third sample, or -1 if not used) */
57 Short_t Count4() const { return fCount4; }
58 /** @return Canonical ADC counts */
59 UShort_t Counts() const;
60 /** Print info
61 @param opt Not used */
62 void Print(Option_t* opt="") const;
63 /** @return Title */
64 const char* GetTitle() const;
65protected:
66 UShort_t fCount1; // Digital signal
67 Short_t fCount2; // Digital signal (-1 if not used)
68 Short_t fCount3; // Digital signal (-1 if not used)
69 Short_t fCount4; // Digital signal (-1 if not used)
70 ClassDef(AliFMDDigit,2) // Normal FMD digit
71};
72
73inline UShort_t
74AliFMDDigit::Counts() const
75{
76 if (fCount4 >= 0) return fCount3;
77 if (fCount3 >= 0) return fCount2;
78 if (fCount2 >= 0) return fCount2;
79 return fCount1;
80}
81
82inline Int_t
83AliFMDDigit::Count(UShort_t i) const
84{
85 switch (i) {
86 case 0: return fCount1;
87 case 1: return fCount2;
88 case 2: return fCount3;
89 case 3: return fCount4;
90 }
91 return -1;
92}
93
94#endif
95//____________________________________________________________________
96//
97// Local Variables:
98// mode: C++
99// End:
100//
101//
102// EOF
103//