Fixed some coding style violations.
[u/mrichter/AliRoot.git] / FMD / AliFMDDigit.h
CommitLineData
4347b38f 1#ifndef ALIFMDDIGIT_H
2#define ALIFMDDIGIT_H
56b1929b 3//___________________________________________________________________
4347b38f 4//
088f8e79 5// Digits classes for the FMD
6// AliFMDBaseDigit - base class
7// AliFMDDigit - Normal (smeared) digit
8// AliFMDSDigit - Summable (non-smeared) digit
4347b38f 9//
4347b38f 10#ifndef ROOT_TObject
11# include <TObject.h>
12#endif
13
14//____________________________________________________________________
15class AliFMDBaseDigit : public TObject
16{
4347b38f 17public:
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;
42403906 29
30protected:
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)
4347b38f 35 ClassDef(AliFMDBaseDigit, 1) // Base class for FMD digits
36};
37
38//____________________________________________________________________
39class AliFMDDigit : public AliFMDBaseDigit
40{
4347b38f 41public:
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;
088f8e79 56protected:
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)
4347b38f 60 ClassDef(AliFMDDigit,1) // Normal FMD digit
61};
62
63inline UShort_t
64AliFMDDigit::Counts() const
65{
66 return fCount1
67 + (fCount2 >= 0 ? fCount2 : 0)
68 + (fCount3 >= 0 ? fCount3 : 0);
69}
70
71//____________________________________________________________________
72class AliFMDSDigit : public AliFMDBaseDigit
73{
4347b38f 74public:
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;
088f8e79 91protected:
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)
4347b38f 96 ClassDef(AliFMDSDigit,1) // Summable FMD digit
97};
98
99inline UShort_t
100AliFMDSDigit::Counts() const
101{
102 return fCount1
103 + (fCount2 >= 0 ? fCount2 : 0)
104 + (fCount3 >= 0 ? fCount3 : 0);
105}
106
107
108#endif
109//____________________________________________________________________
110//
0d0e6995 111// Local Variables:
112// mode: C++
113// End:
114//
115//
4347b38f 116// EOF
117//