]> git.uio.no Git - u/mrichter/AliRoot.git/blob - FMD/AliFMDBaseDigit.h
changes for Vertex and Tracks classes
[u/mrichter/AliRoot.git] / FMD / AliFMDBaseDigit.h
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 //
16 #ifndef ALIDIGIT_H
17 # include <AliDigit.h>
18 #endif
19 #ifndef ROOT_TString
20 # include <TString.h>
21 #endif
22
23 //____________________________________________________________________
24 /** 
25  * @class AliFMDBaseDigit AliFMDDigit.h <FMD/AliFMDDigit.h>
26  * 
27  * @brief base class for digits 
28  * 
29  * @ingroup FMD_base
30  */
31 class AliFMDBaseDigit : public AliDigit 
32 {
33 public: 
34   /** 
35    * CTOR 
36    */
37   AliFMDBaseDigit();
38   /** 
39    * Constrctor 
40    * 
41    * @param detector Detector 
42    * @param ring     Ring
43    * @param sector   Sector
44    * @param strip    Strip 
45    */
46   AliFMDBaseDigit(UShort_t detector, 
47                   Char_t   ring='\0', 
48                   UShort_t sector=0, 
49                   UShort_t strip=0);
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    */
67   virtual ~AliFMDBaseDigit() {}
68   /** 
69    * 
70    * @return Detector # 
71    */
72   UShort_t     Detector()          const { return fDetector; }
73   /** 
74    * 
75    * @return Ring ID 
76    */
77   Char_t       Ring()              const { return fRing;     }
78   /** 
79    * 
80    * @return sector # 
81    */
82   UShort_t     Sector()            const { return fSector;   }
83   /** 
84    * 
85    * @return strip # 
86    */
87   UShort_t     Strip()             const { return fStrip;    }
88   /** 
89    * Print information 
90    *
91    * @param opt Not used 
92    */
93   virtual void Print(Option_t* opt="") const;
94   /** 
95    * 
96    * @return Name 
97    */
98   const char*  GetName() const;
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    */
105   Int_t Compare(const TObject* o) const;
106   /** 
107    * 
108    * @return Always true 
109    */ 
110   Bool_t IsSortable() const { return kTRUE; }
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;
134 protected:
135   /** 
136    * Calculate the hash value
137    * 
138    * 
139    * @return Hash value 
140    */  
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) 
147   ClassDef(AliFMDBaseDigit, 3) // Base class for FMD digits 
148 };
149
150 #endif
151 //____________________________________________________________________
152 //
153 // Local Variables:
154 //   mode: C++
155 // End:
156 //
157 //
158 // EOF
159 //