]>
Commit | Line | Data |
---|---|---|
1 | #ifndef ALIFMDDIGIT_H | |
2 | #define ALIFMDDIGIT_H | |
3 | //___________________________________________________________________ | |
4 | // | |
5 | // Digits classes for the FMD | |
6 | // AliFMDBaseDigit - base class | |
7 | // AliFMDDigit - Normal (smeared) digit | |
8 | // AliFMDSDigit - Summable (non-smeared) digit | |
9 | // | |
10 | #ifndef ROOT_TObject | |
11 | # include <TObject.h> | |
12 | #endif | |
13 | ||
14 | //____________________________________________________________________ | |
15 | class AliFMDBaseDigit : public TObject | |
16 | { | |
17 | public: | |
18 | AliFMDBaseDigit(); | |
19 | AliFMDBaseDigit(UShort_t detector, | |
20 | Char_t ring='\0', | |
21 | UShort_t sector=0, | |
22 | UShort_t strip=0); | |
23 | virtual ~AliFMDBaseDigit() {} | |
24 | UShort_t Detector() const { return fDetector; } | |
25 | Char_t Ring() const { return fRing; } | |
26 | UShort_t Sector() const { return fSector; } | |
27 | UShort_t Strip() const { return fStrip; } | |
28 | virtual void Print(Option_t* opt="") const; | |
29 | ||
30 | protected: | |
31 | UShort_t fDetector; // (Sub) Detector # (1,2, or 3) | |
32 | Char_t fRing; // Ring ID ('I' or 'O') | |
33 | UShort_t fSector; // Sector # (phi division) | |
34 | UShort_t fStrip; // Strip # (radial division) | |
35 | ClassDef(AliFMDBaseDigit, 1) // Base class for FMD digits | |
36 | }; | |
37 | ||
38 | //____________________________________________________________________ | |
39 | class AliFMDDigit : public AliFMDBaseDigit | |
40 | { | |
41 | public: | |
42 | AliFMDDigit(); | |
43 | AliFMDDigit(UShort_t detector, | |
44 | Char_t ring='\0', | |
45 | UShort_t sector=0, | |
46 | UShort_t strip=0, | |
47 | UShort_t count=0, | |
48 | Short_t count2=-1, | |
49 | Short_t count3=-1); | |
50 | virtual ~AliFMDDigit() {} | |
51 | UShort_t Count1() const { return fCount1; } | |
52 | Short_t Count2() const { return fCount2; } | |
53 | Short_t Count3() const { return fCount3; } | |
54 | UShort_t Counts() const; | |
55 | void Print(Option_t* opt="") const; | |
56 | protected: | |
57 | UShort_t fCount1; // Digital signal | |
58 | Short_t fCount2; // Digital signal (-1 if not used) | |
59 | Short_t fCount3; // Digital signal (-1 if not used) | |
60 | ClassDef(AliFMDDigit,1) // Normal FMD digit | |
61 | }; | |
62 | ||
63 | inline UShort_t | |
64 | AliFMDDigit::Counts() const | |
65 | { | |
66 | return fCount1 | |
67 | + (fCount2 >= 0 ? fCount2 : 0) | |
68 | + (fCount3 >= 0 ? fCount3 : 0); | |
69 | } | |
70 | ||
71 | //____________________________________________________________________ | |
72 | class AliFMDSDigit : public AliFMDBaseDigit | |
73 | { | |
74 | public: | |
75 | AliFMDSDigit(); | |
76 | AliFMDSDigit(UShort_t detector, | |
77 | Char_t ring='\0', | |
78 | UShort_t sector=0, | |
79 | UShort_t strip=0, | |
80 | Float_t edep=0, | |
81 | UShort_t count=0, | |
82 | Short_t count2=-1, | |
83 | Short_t count3=-1); | |
84 | virtual ~AliFMDSDigit() {} | |
85 | UShort_t Count1() const { return fCount1; } | |
86 | Short_t Count2() const { return fCount2; } | |
87 | Short_t Count3() const { return fCount3; } | |
88 | Float_t Edep() const { return fEdep; } | |
89 | UShort_t Counts() const; | |
90 | void Print(Option_t* opt="") const; | |
91 | protected: | |
92 | Float_t fEdep; // Energy deposited | |
93 | UShort_t fCount1; // Digital signal | |
94 | Short_t fCount2; // Digital signal (-1 if not used) | |
95 | Short_t fCount3; // Digital signal (-1 if not used) | |
96 | ClassDef(AliFMDSDigit,1) // Summable FMD digit | |
97 | }; | |
98 | ||
99 | inline UShort_t | |
100 | AliFMDSDigit::Counts() const | |
101 | { | |
102 | return fCount1 | |
103 | + (fCount2 >= 0 ? fCount2 : 0) | |
104 | + (fCount3 >= 0 ? fCount3 : 0); | |
105 | } | |
106 | ||
107 | ||
108 | #endif | |
109 | //____________________________________________________________________ | |
110 | // | |
111 | // Local Variables: | |
112 | // mode: C++ | |
113 | // End: | |
114 | // | |
115 | // | |
116 | // EOF | |
117 | // |