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