Additiona TOF data members (S.Arcelli)
[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//____________________________________________________________________
9f662337 15/** @class AliFMDBaseDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
16 @brief base class for digits
17 @ingroup FMD_base
18 */
4347b38f 19class AliFMDBaseDigit : public TObject
20{
4347b38f 21public:
9f662337 22 /** CTOR */
4347b38f 23 AliFMDBaseDigit();
9f662337 24 /** Constrctor
25 @param detector Detector
26 @param ring Ring
27 @param sector Sector
28 @param strip Strip */
4347b38f 29 AliFMDBaseDigit(UShort_t detector,
30 Char_t ring='\0',
31 UShort_t sector=0,
32 UShort_t strip=0);
9f662337 33 /** DTOR */
4347b38f 34 virtual ~AliFMDBaseDigit() {}
9f662337 35 /** @return Detector # */
4347b38f 36 UShort_t Detector() const { return fDetector; }
9f662337 37 /** @return Ring ID */
4347b38f 38 Char_t Ring() const { return fRing; }
9f662337 39 /** @return sector # */
4347b38f 40 UShort_t Sector() const { return fSector; }
9f662337 41 /** @return strip # */
4347b38f 42 UShort_t Strip() const { return fStrip; }
9f662337 43 /** Print information
44 @param opt Not used */
4347b38f 45 virtual void Print(Option_t* opt="") const;
9f662337 46 /** @return Name */
8f6ee336 47 const char* GetName() const;
42403906 48protected:
49 UShort_t fDetector; // (Sub) Detector # (1,2, or 3)
50 Char_t fRing; // Ring ID ('I' or 'O')
51 UShort_t fSector; // Sector # (phi division)
52 UShort_t fStrip; // Strip # (radial division)
4347b38f 53 ClassDef(AliFMDBaseDigit, 1) // Base class for FMD digits
54};
55
56//____________________________________________________________________
9f662337 57/** @class AliFMDDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
58 @brief class for digits
59 @ingroup FMD_base
60 */
4347b38f 61class AliFMDDigit : public AliFMDBaseDigit
62{
4347b38f 63public:
9f662337 64 /** CTOR */
4347b38f 65 AliFMDDigit();
9f662337 66 /** Constrctor
67 @param detector Detector
68 @param ring Ring
69 @param sector Sector
70 @param strip Strip
f8616692 71 @param count ADC (first sample)
9f662337 72 @param count2 ADC (second sample, or -1 if not used)
73 @param count3 ADC (third sample, or -1 if not used) */
4347b38f 74 AliFMDDigit(UShort_t detector,
75 Char_t ring='\0',
76 UShort_t sector=0,
77 UShort_t strip=0,
78 UShort_t count=0,
79 Short_t count2=-1,
80 Short_t count3=-1);
9f662337 81 /** DTOR */
4347b38f 82 virtual ~AliFMDDigit() {}
9f662337 83 /** @return ADC count (first sample) */
4347b38f 84 UShort_t Count1() const { return fCount1; }
9f662337 85 /** @return ADC count (second sample, or -1 if not used) */
4347b38f 86 Short_t Count2() const { return fCount2; }
9f662337 87 /** @return ADC count (third sample, or -1 if not used) */
4347b38f 88 Short_t Count3() const { return fCount3; }
9f662337 89 /** @return Canonical ADC counts */
4347b38f 90 UShort_t Counts() const;
9f662337 91 /** Print info
92 @param opt Not used */
4347b38f 93 void Print(Option_t* opt="") const;
9f662337 94 /** @return Title */
bf000c32 95 const char* GetTitle() const;
088f8e79 96protected:
97 UShort_t fCount1; // Digital signal
98 Short_t fCount2; // Digital signal (-1 if not used)
99 Short_t fCount3; // Digital signal (-1 if not used)
4347b38f 100 ClassDef(AliFMDDigit,1) // Normal FMD digit
101};
102
103inline UShort_t
104AliFMDDigit::Counts() const
105{
106 return fCount1
107 + (fCount2 >= 0 ? fCount2 : 0)
108 + (fCount3 >= 0 ? fCount3 : 0);
109}
110
111//____________________________________________________________________
9f662337 112/** @class AliFMDSDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
113 @brief class for summable digits
114 @ingroup FMD_base
115 */
4347b38f 116class AliFMDSDigit : public AliFMDBaseDigit
117{
4347b38f 118public:
9f662337 119 /** CTOR */
4347b38f 120 AliFMDSDigit();
9f662337 121 /** Constrctor
122 @param detector Detector
123 @param ring Ring
124 @param sector Sector
125 @param strip Strip
f8616692 126 @param edep Energy deposited
127 @param count ADC (first sample)
9f662337 128 @param count2 ADC (second sample, or -1 if not used)
129 @param count3 ADC (third sample, or -1 if not used) */
4347b38f 130 AliFMDSDigit(UShort_t detector,
131 Char_t ring='\0',
132 UShort_t sector=0,
133 UShort_t strip=0,
134 Float_t edep=0,
135 UShort_t count=0,
136 Short_t count2=-1,
137 Short_t count3=-1);
9f662337 138 /** DTOR */
4347b38f 139 virtual ~AliFMDSDigit() {}
9f662337 140 /** @return ADC count (first sample) */
4347b38f 141 UShort_t Count1() const { return fCount1; }
9f662337 142 /** @return ADC count (second sample, or -1 if not used) */
4347b38f 143 Short_t Count2() const { return fCount2; }
9f662337 144 /** @return ADC count (third sample, or -1 if not used) */
4347b38f 145 Short_t Count3() const { return fCount3; }
9f662337 146 /** @return Canonical ADC counts */
4347b38f 147 UShort_t Counts() const;
9f662337 148 /** @return Energy deposited */
149 Float_t Edep() const { return fEdep; }
150 /** Print info
151 @param opt Not used */
4347b38f 152 void Print(Option_t* opt="") const;
088f8e79 153protected:
154 Float_t fEdep; // Energy deposited
155 UShort_t fCount1; // Digital signal
156 Short_t fCount2; // Digital signal (-1 if not used)
157 Short_t fCount3; // Digital signal (-1 if not used)
4347b38f 158 ClassDef(AliFMDSDigit,1) // Summable FMD digit
159};
160
161inline UShort_t
162AliFMDSDigit::Counts() const
163{
164 return fCount1
165 + (fCount2 >= 0 ? fCount2 : 0)
166 + (fCount3 >= 0 ? fCount3 : 0);
167}
168
169
170#endif
171//____________________________________________________________________
172//
0d0e6995 173// Local Variables:
174// mode: C++
175// End:
176//
177//
4347b38f 178// EOF
179//