fix for pid in pr task: sjena
[u/mrichter/AliRoot.git] / FMD / AliFMDBaseDigit.h
CommitLineData
02a27b50 1#ifndef ALIFMDBASEDIGIT_H
2#define ALIFMDBASEDIGIT_H
3/** @file AliFMDBaseDigit.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 @ingroup FMD_base
8*/
9//___________________________________________________________________
10//
11// Digits classes for the FMD
12// AliFMDBaseDigit - base class
13// AliFMDDigit - Normal (smeared) digit
14// AliFMDSDigit - Summable (non-smeared) digit
15//
faf80567 16#ifndef ALIDIGIT_H
17# include <AliDigit.h>
02a27b50 18#endif
19#ifndef ROOT_TString
20# include <TString.h>
21#endif
22
23//____________________________________________________________________
faf80567 24/**
25 * @class AliFMDBaseDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
26 *
27 * @brief base class for digits
28 *
29 * @ingroup FMD_base
02a27b50 30 */
faf80567 31class AliFMDBaseDigit : public AliDigit
02a27b50 32{
33public:
faf80567 34 /**
35 * CTOR
36 */
02a27b50 37 AliFMDBaseDigit();
faf80567 38 /**
39 * Constrctor
40 *
41 * @param detector Detector
42 * @param ring Ring
43 * @param sector Sector
44 * @param strip Strip
45 */
02a27b50 46 AliFMDBaseDigit(UShort_t detector,
47 Char_t ring='\0',
48 UShort_t sector=0,
49 UShort_t strip=0);
faf80567 50 /**
51 * Constrctor
52 *
53 * @param tracks Array of 3 track indicies
54 * @param detector Detector
55 * @param ring Ring
56 * @param sector Sector
57 * @param strip Strip
58 */
59 AliFMDBaseDigit(Int_t* tracks,
60 UShort_t detector,
61 Char_t ring='\0',
62 UShort_t sector=0,
63 UShort_t strip=0);
64 /**
65 * DTOR
66 */
02a27b50 67 virtual ~AliFMDBaseDigit() {}
faf80567 68 /**
69 *
70 * @return Detector #
71 */
02a27b50 72 UShort_t Detector() const { return fDetector; }
faf80567 73 /**
74 *
75 * @return Ring ID
76 */
02a27b50 77 Char_t Ring() const { return fRing; }
faf80567 78 /**
79 *
80 * @return sector #
81 */
02a27b50 82 UShort_t Sector() const { return fSector; }
faf80567 83 /**
84 *
85 * @return strip #
86 */
02a27b50 87 UShort_t Strip() const { return fStrip; }
faf80567 88 /**
89 * Print information
90 *
91 * @param opt Not used
92 */
02a27b50 93 virtual void Print(Option_t* opt="") const;
faf80567 94 /**
95 *
96 * @return Name
97 */
02a27b50 98 const char* GetName() const;
faf80567 99 /**
100 * @param rhs Other digit to compare to
101 *
102 * @return -1 if this is less than @a rhs, 0 if the refer to the
103 * same, and 1 if @a rhs is larger than this
104 */
02a27b50 105 Int_t Compare(const TObject* o) const;
faf80567 106 /**
107 *
108 * @return Always true
109 */
02a27b50 110 Bool_t IsSortable() const { return kTRUE; }
faf80567 111
112 /**
113 * Add a track referenc
114 *
115 * @param trackno The track number
116 */
117 void AddTrack(Int_t trackno);
118
119 /**
120 * Get the number of track references (max 3)
121 *
122 *
123 * @return Number of valid track references.
124 */
125 UShort_t GetNTrack() const;
126
127 /**
128 * Set the count value
129 *
130 * @param s Sample number
131 * @param c Counts
132 */
133 virtual void SetCount(UShort_t s, Short_t c) = 0;
02a27b50 134protected:
faf80567 135 /**
136 * Calculate the hash value
137 *
138 *
139 * @return Hash value
140 */
02a27b50 141 ULong_t Hash() const;
142 UShort_t fDetector; // (Sub) Detector # (1,2, or 3)
143 Char_t fRing; // Ring ID ('I' or 'O')
144 UShort_t fSector; // Sector # (phi division)
145 UShort_t fStrip; // Strip # (radial division)
146 mutable TString fName; //! Name (cached, but not stored)
faf80567 147 ClassDef(AliFMDBaseDigit, 3) // Base class for FMD digits
02a27b50 148};
149
150#endif
151//____________________________________________________________________
152//
153// Local Variables:
154// mode: C++
155// End:
156//
157//
158// EOF
159//