]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSRawCluster.h
Implement fixed due to Boris Batyunya. Including a fix for a bug with the
[u/mrichter/AliRoot.git] / ITS / AliITSRawCluster.h
1 #ifndef ALIITSRAWCLUSTER_H
2 #define ALIITSRAWCLUSTER_H 
3
4
5 ////////////////////////////////////////////////////
6 //  Cluster classes for set:ITS                   //
7 ////////////////////////////////////////////////////
8
9 #include <TObject.h>
10
11
12 class AliITSRawCluster : public TObject {
13   
14   // this class is subject to changes ! - info used for declustering 
15   // and  eventual debugging
16   
17 public:
18   
19   AliITSRawCluster() {
20     fMultiplicity=0;
21     /*
22       for (int k=0;k<100;k++) {
23           fIndexMap[k]=-1;
24       }
25       fNcluster[0]=fNcluster[1]=-1;
26       fChi2=-1; 
27     */
28   }
29   
30   virtual ~AliITSRawCluster() {
31     // destructor
32   }
33   virtual Bool_t IsSortable() const {
34     // is sortable
35     return kTRUE;
36   }
37   
38 public:
39
40   Int_t       fMultiplicity;        // cluster multiplicity
41   //Int_t       fIndexMap[100];     // indices of digits
42   //Int_t       fNcluster[2];
43   //Float_t     fChi2;
44   
45   ClassDef(AliITSRawCluster,1)  // AliITSRawCluster class
46     };
47
48 //---------------------------------------------
49 class AliITSRawClusterSPD : public AliITSRawCluster {
50   
51   // these classes are subject to changes - keep them temporarily for
52   // compatibility !!!
53   
54 public:
55   
56   AliITSRawClusterSPD() {
57     // constructor
58     fX=fZ=fQ;
59     fZStart=fZStop;
60     fNClZ=fNClX=fXStart=fXStop=fXStartf=fXStopf=fZend=fNTracks;
61        }
62   
63   AliITSRawClusterSPD(Float_t clz,Float_t clx,Float_t Charge,Int_t ClusterSizeZ,Int_t ClusterSizeX,Int_t xstart,Int_t xstop,Int_t xstartf,Int_t xstopf,Float_t zstart,Float_t zstop,Int_t zend);
64   virtual ~AliITSRawClusterSPD() {
65     // destructor
66   }
67   
68   void Add(AliITSRawClusterSPD* clJ); 
69   Bool_t Brother(AliITSRawClusterSPD* cluster,Float_t dz,Float_t dx);
70   void PrintInfo();
71   // Getters
72   Float_t Q() const {
73     // Q
74     return fQ ;
75   }
76   Float_t Z() const {
77     // Z
78     return fZ ;
79   }
80   Float_t X() const {
81     // X
82     return fX ;
83   }
84   //  Float_t NclZ() const {
85   Int_t NclZ() const {
86     // NclZ
87     return fNClZ ;
88   }
89   //  Float_t NclX() const {
90   Int_t NclX() const {
91     // NclX
92     return fNClX ;
93   }
94   Int_t   XStart() const {
95     //XStart
96     return fXStart;
97   }
98   Int_t   XStop() const {
99     //XStop
100     return fXStop;
101   }
102   Int_t   XStartf() const {
103     //XStartf
104     return fXStartf;
105   }
106   Int_t   XStopf() const {
107     //XStopf
108     return fXStopf;
109   }
110   Float_t ZStart() const {
111     //ZStart
112     return fZStart;
113   }
114   Float_t ZStop() const {
115     //ZStop
116     return fZStop;
117   }
118   Int_t   Zend() const {
119     //Zend
120     return fZend;
121   }
122   Int_t   NTracks() const {
123     //NTracks
124     return fNTracks;
125   }
126
127   void GetTracks(Int_t &track0,Int_t &track1,Int_t &track2) const {
128                // returns tracks created a cluster
129
130               track0=fTracks[0];
131               track1=fTracks[1];
132               track2=fTracks[2];
133               return;
134   };
135  
136   void   SetTracks(Int_t track0, Int_t track1, Int_t track2) {
137     // set tracks in cluster (not more than three ones)
138     fTracks[0]=track0;
139     fTracks[1]=track1;
140     fTracks[2]=track2;
141   }
142   void   SetNTracks(Int_t ntracks) {
143     // set ntracks
144     fNTracks=ntracks;
145   }
146   
147 protected:
148   
149   Float_t   fX;                 // X of cluster
150   Float_t   fZ;                 // Z of cluster
151   Float_t   fQ;                 // Q of cluster
152   Int_t     fNClZ;        // Cluster size in Z direction
153   Int_t     fNClX;        // Cluster size in X direction
154   Int_t     fXStart;      // number of first pixel in cluster
155   Int_t     fXStop;       // number of last pixel in cluster
156   Int_t     fXStartf;     // number of first pixel in full cluster
157   Int_t     fXStopf;      // number of last pixel in full cluster
158   Float_t   fZStart;      // number of first pixel in cluster
159   Float_t   fZStop;       // number of last pixel in cluster
160   Int_t     fZend;        // Zend
161   Int_t     fNTracks;     // number of tracks created a cluster
162   Int_t     fTracks[3];   // tracks created a cluster
163   
164   ClassDef(AliITSRawClusterSPD,1)  // AliITSRawCluster class for SPD
165
166     };
167
168 //---------------------------------------------
169 class AliITSRawClusterSDD : public AliITSRawCluster {
170   
171 public:
172   
173   AliITSRawClusterSDD() {
174     // constructor
175     fX=fZ=fQ;
176     fWing=fNsamples=0;
177     fNanodes=1;
178     fAnode=fTime=fPeakAmplitude=0;
179   }
180   
181   AliITSRawClusterSDD(Int_t wing, Float_t Anode,Float_t Time,Float_t Charge,
182                       Float_t PeakAmplitude,Float_t Asigma, Float_t Tsigma,Float_t DriftPath, Float_t AnodeOffset,Int_t Samples);
183   virtual ~AliITSRawClusterSDD() {
184     // destructor
185   }
186   
187   void Add(AliITSRawClusterSDD* clJ); 
188   Bool_t Brother(AliITSRawClusterSDD* cluster,Float_t dz,Float_t dx);
189   void PrintInfo();
190   // Getters
191   Float_t X() const {
192     //X
193     return fX ;
194   }
195   Float_t Z() const {
196     //Z
197     return fZ ;
198   }
199   Float_t Q() const {
200     //Q
201     return fQ ;
202   }
203   Float_t A() const {
204     //A
205     return fAnode ;
206   }
207   Float_t T() const {
208     //T
209     return fTime ;
210   }
211   Float_t W() const {
212     //W
213     return fWing ;
214   }
215   Int_t Anodes() const {
216     //Anodes
217     return fNanodes ;
218   }
219   Int_t Samples() const {
220     //Samples
221     return fNsamples ;
222   }
223   Float_t PeakAmpl() const {
224     //PeakAmpl
225     return fPeakAmplitude ;
226   }
227   
228 protected:
229   
230   Float_t   fX;                 // X of cluster
231   Float_t   fZ;                 // Z of cluster
232   Float_t   fQ;                 // Q of cluster
233   Int_t     fWing;              // Wing number
234   Float_t   fAnode;             // Anode number
235   Float_t   fTime;              // Drift Time
236   Float_t   fPeakAmplitude;     // Peak Amplitude
237   Int_t     fNanodes;           // N of anodes used for the cluster
238   Int_t     fNsamples;          // N of samples used for the cluster
239   
240   ClassDef(AliITSRawClusterSDD,1)  // AliITSRawCluster class for SDD
241     };
242
243 //-----------------------------------------
244 class AliITSRawClusterSSD : public AliITSRawCluster {
245     
246 public:
247   
248   AliITSRawClusterSSD() {
249     fMultiplicityN=0;
250     fQErr=0; 
251     fStatus=-1;
252     /*
253       for (int k=0;k<100;k++) {
254          fIndexMapN[k]=-1;
255       }
256       fProbability=0;
257       fChi2N=-1;
258     */
259   }
260   AliITSRawClusterSSD(Float_t Prob,Int_t Sp,Int_t Sn);
261   virtual ~AliITSRawClusterSSD() {
262     // destructor
263   }
264   
265   Int_t  GetStatus() const {
266     // get status
267     return fStatus;
268   }
269   void   SetStatus(Int_t status) {
270     // set status
271     fStatus=status;
272   }
273
274    
275 public:
276   Int_t   fMultiplicityN;  // The number of N side strips involved 
277                            // in this point calculations
278   Float_t fQErr;           // Total charge error
279   Int_t   fStatus;         // Flag status : 0 - real point
280                            //               1 - ghost 
281                            //               2 - EIC ? 
282                            //               3 - single side 
283   
284   // Float_t fProbability;    // The probability that this is a "real" point
285   // Int_t  fIndexMapN[100];  // indices of digits for Nside - the corresponding
286                                 // info for P side is carried in the base class
287   // Float_t fChi2N;
288   ClassDef(AliITSRawClusterSSD,1)  // AliITSRawCluster class for SSD
289
290 };
291
292
293 #endif