]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDtrack.cxx
Update of tracking code for tilted pads
[u/mrichter/AliRoot.git] / TRD / AliTRDtrack.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
7  * Permission to use, copy, modify and distribute this software and its   *
8  * documentation strictly for non-commercial purposes is hereby granted   *
9  * without fee, provided that the above copyright notice appears in all   *
10  * copies and that both the copyright notice and this permission notice   *
11  * appear in the supporting documentation. The authors make no claims     *
12  * about the suitability of this software for any purpose. It is          *
13  * provided "as is" without express or implied warranty.                  *
14  **************************************************************************/
15
16 /*
17 $Log$
18 Revision 1.13  2002/10/22 15:53:08  alibrary
19 Introducing Riostream.h
20
21 Revision 1.12  2002/10/14 14:57:44  hristov
22 Merging the VirtualMC branch to the main development branch (HEAD)
23
24 Revision 1.8.10.2  2002/07/24 10:09:31  alibrary
25 Updating VirtualMC
26
27 RRevision 1.11  2002/06/13 12:09:58  hristov
28 Minor corrections
29
30 Revision 1.10  2002/06/12 09:54:35  cblume
31 Update of tracking code provided by Sergei
32
33 Revision 1.8  2001/05/30 12:17:47  hristov
34 Loop variables declared once
35
36 Revision 1.7  2001/05/28 17:07:58  hristov
37 Last minute changes; ExB correction in AliTRDclusterizerV1; taking into account of material in G10 TEC frames and material between TEC planes (C.Blume,S.Sedykh)
38
39 Revision 1.4  2000/12/08 16:07:02  cblume
40 Update of the tracking by Sergei
41
42 Revision 1.3  2000/10/15 23:40:01  cblume
43 Remove AliTRDconst
44
45 Revision 1.2  2000/10/06 16:49:46  cblume
46 Made Getters const
47
48 Revision 1.1.2.1  2000/09/22 14:47:52  cblume
49 Add the tracking code
50
51 */                                                        
52
53 #include <Riostream.h>
54 #include <TObject.h>   
55
56 #include "AliTRDgeometry.h" 
57 #include "AliTRDcluster.h" 
58 #include "AliTRDtrack.h"
59 #include "../TPC/AliTPCtrack.h" 
60
61 ClassImp(AliTRDtrack)
62
63
64 //_____________________________________________________________________________
65
66 AliTRDtrack::AliTRDtrack(const AliTRDcluster *c, UInt_t index, 
67                          const Double_t xx[5], const Double_t cc[15], 
68                          Double_t xref, Double_t alpha) : AliKalmanTrack() {
69   //-----------------------------------------------------------------
70   // This is the main track constructor.
71   //-----------------------------------------------------------------
72
73   fSeedLab = -1;
74
75   fAlpha=alpha;
76   if (fAlpha<-TMath::Pi()) fAlpha += 2*TMath::Pi();
77   if (fAlpha>=TMath::Pi()) fAlpha -= 2*TMath::Pi();   
78
79   fX=xref;
80
81   fY=xx[0]; fZ=xx[1]; fC=xx[2]; fE=xx[3]; fT=xx[4];
82
83   fCyy=cc[0];
84   fCzy=cc[1];  fCzz=cc[2];
85   fCcy=cc[3];  fCcz=cc[4];  fCcc=cc[5];
86   fCey=cc[6];  fCez=cc[7];  fCec=cc[8];  fCee=cc[9];
87   fCty=cc[10]; fCtz=cc[11]; fCtc=cc[12]; fCte=cc[13]; fCtt=cc[14];
88
89   fIndex[0]=index;
90   SetNumberOfClusters(1);
91
92   fdEdx=0.;
93
94   Double_t q = TMath::Abs(c->GetQ());
95   Double_t s = fX*fC - fE, t=fT;
96   if(s*s < 1) q *= TMath::Sqrt((1-s*s)/(1+t*t));
97
98   fdQdl[0] = q;
99 }                              
100            
101 //_____________________________________________________________________________
102 AliTRDtrack::AliTRDtrack(const AliTRDtrack& t) : AliKalmanTrack(t) {
103   //
104   // Copy constructor.
105   //
106
107   SetLabel(t.GetLabel());
108   fSeedLab=t.GetSeedLabel();
109
110   SetChi2(t.GetChi2());
111   fdEdx=t.fdEdx;
112
113   fAlpha=t.fAlpha;
114   fX=t.fX;
115
116   fY=t.fY; fZ=t.fZ; fC=t.fC; fE=t.fE; fT=t.fT;
117
118   fCyy=t.fCyy;
119   fCzy=t.fCzy;  fCzz=t.fCzz;
120   fCcy=t.fCcy;  fCcz=t.fCcz;  fCcc=t.fCcc;
121   fCey=t.fCey;  fCez=t.fCez;  fCec=t.fCec;  fCee=t.fCee;
122   fCty=t.fCty;  fCtz=t.fCtz;  fCtc=t.fCtc;  fCte=t.fCte;  fCtt=t.fCtt;
123
124   Int_t n=t.GetNumberOfClusters(); 
125   SetNumberOfClusters(n);
126   for (Int_t i=0; i<n; i++) {
127     fIndex[i]=t.fIndex[i];
128     fdQdl[i]=t.fdQdl[i];
129   }
130 }                                
131
132 //_____________________________________________________________________________
133 AliTRDtrack::AliTRDtrack(const AliKalmanTrack& t, Double_t alpha) {
134   //
135   // Constructor from AliTPCtrack or AliITStrack .
136   //
137
138   SetLabel(t.GetLabel());
139   SetChi2(0.);
140   SetNumberOfClusters(0);
141
142   fdEdx=0;
143
144   fAlpha = alpha;
145   if      (fAlpha < -TMath::Pi()) fAlpha += 2*TMath::Pi();
146   else if (fAlpha >= TMath::Pi()) fAlpha -= 2*TMath::Pi();
147
148   Double_t x, p[5]; t.GetExternalParameters(x,p);
149
150   fX=x;
151
152   x = GetConvConst();  
153
154   fY=p[0]; fZ=p[1]; fC=p[4]/x;
155   fE=fX*fC-p[2]; fT=p[3];
156
157   //Conversion of the covariance matrix
158   Double_t c[15]; t.GetExternalCovariance(c);
159
160   c[10]/=x; c[11]/=x; c[12]/=x; c[13]/=x; c[14]/=x*x;
161
162   Double_t c22=fX*fX*c[14] - 2*fX*c[12] + c[5];
163   Double_t c32=fX*c[13] - c[8];
164   Double_t c20=fX*c[10] - c[3], c21=fX*c[11] - c[4], c42=fX*c[14] - c[12];
165
166   fCyy=c[0 ];
167   fCzy=c[1 ];   fCzz=c[2 ];
168   fCcy=c[10];   fCcz=c[11];   fCcc=c[14];
169   fCey=c20;     fCez=c21;     fCec=c42;     fCee=c22;
170   fCty=c[6 ];   fCtz=c[7 ];   fCtc=c[13];   fCte=c32;   fCtt=c[9 ];
171
172 }              
173
174 //____________________________________________________________________________
175 void AliTRDtrack::GetExternalParameters(Double_t& xr, Double_t x[5]) const {
176   //
177   // This function returns external TRD track representation
178   //
179      xr=fX;
180      x[0]=GetY();
181      x[1]=GetZ();
182      x[2]=GetSnp();
183      x[3]=GetTgl();
184      x[4]=fC*GetConvConst();
185 }           
186
187 //_____________________________________________________________________________
188 void AliTRDtrack::GetExternalCovariance(Double_t cc[15]) const {
189   //
190   // This function returns external representation of the covriance matrix.
191   //
192   Double_t a=GetConvConst();
193
194   Double_t c22=fX*fX*fCcc-2*fX*fCec+fCee;
195   Double_t c32=fX*fCtc-fCte;
196   Double_t c20=fX*fCcy-fCey, c21=fX*fCcz-fCez, c42=fX*fCcc-fCec;
197
198   cc[0 ]=fCyy;
199   cc[1 ]=fCzy;   cc[2 ]=fCzz;
200   cc[3 ]=c20;    cc[4 ]=c21;    cc[5 ]=c22;
201   cc[6 ]=fCty;   cc[7 ]=fCtz;   cc[8 ]=c32;   cc[9 ]=fCtt;
202   cc[10]=fCcy*a; cc[11]=fCcz*a; cc[12]=c42*a; cc[13]=fCtc*a; cc[14]=fCcc*a*a;
203 }               
204                        
205
206 //_____________________________________________________________________________
207 void AliTRDtrack::GetCovariance(Double_t cc[15]) const {
208   cc[0]=fCyy;
209   cc[1]=fCzy;  cc[2]=fCzz;
210   cc[3]=fCcy;  cc[4]=fCcz;  cc[5]=fCcc;
211   cc[6]=fCey;  cc[7]=fCez;  cc[8]=fCec;  cc[9]=fCee;
212   cc[10]=fCty; cc[11]=fCtz; cc[12]=fCtc; cc[13]=fCte; cc[14]=fCtt;
213 }    
214
215 //_____________________________________________________________________________
216 Int_t AliTRDtrack::Compare(const TObject *o) const {
217
218 // Compares tracks according to their Y2 or curvature
219
220   AliTRDtrack *t=(AliTRDtrack*)o;
221   //  Double_t co=t->GetSigmaY2();
222   //  Double_t c =GetSigmaY2();
223
224   Double_t co=TMath::Abs(t->GetC());
225   Double_t c =TMath::Abs(GetC());  
226
227   if (c>co) return 1;
228   else if (c<co) return -1;
229   return 0;
230 }                
231
232 //_____________________________________________________________________________
233 void AliTRDtrack::CookdEdx(Double_t low, Double_t up) {
234   //-----------------------------------------------------------------
235   // Calculates dE/dX within the "low" and "up" cuts.
236   //-----------------------------------------------------------------
237
238   Int_t i;
239   Int_t nc=GetNumberOfClusters(); 
240
241   Float_t sorted[kMAX_CLUSTERS_PER_TRACK];
242   for (i=0; i < nc; i++) {
243     sorted[i]=fdQdl[i];
244   }
245
246   Int_t swap; 
247
248   do {
249     swap=0;
250     for (i=0; i<nc-1; i++) {
251       if (sorted[i]<=sorted[i+1]) continue;
252       Float_t tmp=sorted[i];
253       sorted[i]=sorted[i+1]; sorted[i+1]=tmp;
254       swap++;
255     }
256   } while (swap);
257
258   Int_t nl=Int_t(low*nc), nu=Int_t(up*nc);
259   Float_t dedx=0;
260   for (i=nl; i<=nu; i++) dedx += sorted[i];
261   dedx /= (nu-nl+1);
262
263   SetdEdx(dedx);
264 }                     
265
266
267
268
269 //_____________________________________________________________________________
270 Int_t AliTRDtrack::PropagateTo(Double_t xk,Double_t x0,Double_t rho,Double_t pm)
271 {
272   // Propagates a track of particle with mass=pm to a reference plane 
273   // defined by x=xk through media of density=rho and radiationLength=x0
274
275   
276   if (TMath::Abs(fC*xk - fE) >= 0.99999) {
277     Int_t n=GetNumberOfClusters(); 
278     if (n>4) cerr<<n<<" AliTRDtrack warning: Propagation failed !\n";
279     return 0;
280   }
281
282   Double_t x1=fX, x2=x1+(xk-x1), dx=x2-x1, y1=fY, z1=fZ;
283   Double_t c1=fC*x1 - fE;
284   if((c1*c1) > 1) return 0;
285   Double_t r1=sqrt(1.- c1*c1);
286   Double_t c2=fC*x2 - fE;
287   if((c2*c2) > 1) return 0;
288   Double_t r2=sqrt(1.- c2*c2);
289
290   fY += dx*(c1+c2)/(r1+r2);
291   fZ += dx*(c1+c2)/(c1*r2 + c2*r1)*fT;
292
293   //f = F - 1
294   Double_t rr=r1+r2, cc=c1+c2, xx=x1+x2;
295   Double_t f02= dx*(rr*xx + cc*(c1*x1/r1+c2*x2/r2))/(rr*rr);
296   Double_t f03=-dx*(2*rr + cc*(c1/r1 + c2/r2))/(rr*rr);
297   Double_t cr=c1*r2+c2*r1;
298   Double_t f12= dx*fT*(cr*xx-cc*(r1*x2-c2*c1*x1/r1+r2*x1-c1*c2*x2/r2))/(cr*cr);
299   Double_t f13=-dx*fT*(2*cr + cc*(c2*c1/r1-r1 + c1*c2/r2-r2))/(cr*cr);
300   Double_t f14= dx*cc/cr;
301
302   //b = C*ft
303   Double_t b00=f02*fCcy + f03*fCey, b01=f12*fCcy + f13*fCey + f14*fCty;
304   Double_t b10=f02*fCcz + f03*fCez, b11=f12*fCcz + f13*fCez + f14*fCtz;
305   Double_t b20=f02*fCcc + f03*fCec, b21=f12*fCcc + f13*fCec + f14*fCtc;
306   Double_t b30=f02*fCec + f03*fCee, b31=f12*fCec + f13*fCee + f14*fCte;
307   Double_t b40=f02*fCtc + f03*fCte, b41=f12*fCtc + f13*fCte + f14*fCtt;
308
309   //a = f*b = f*C*ft
310   Double_t a00=f02*b20+f03*b30,a01=f02*b21+f03*b31,a11=f12*b21+f13*b31+f14*b41;
311
312   //F*C*Ft = C + (a + b + bt)
313   fCyy += a00 + 2*b00;
314   fCzy += a01 + b01 + b10;
315   fCcy += b20;
316   fCey += b30;
317   fCty += b40;
318   fCzz += a11 + 2*b11;
319   fCcz += b21;
320   fCez += b31;
321   fCtz += b41;                  
322
323   fX=x2;
324
325
326   //Multiple scattering  ******************
327
328   Double_t d=sqrt((x1-fX)*(x1-fX)+(y1-fY)*(y1-fY)+(z1-fZ)*(z1-fZ));
329   Double_t p2=GetPt()*GetPt()*(1.+fT*fT);
330   p2 = TMath::Min(p2,1e+08);  // to avoid division by (1-1) for stiff tracks
331   Double_t beta2=p2/(p2 + pm*pm);
332
333   Double_t ey=fC*fX - fE, ez=fT;
334   Double_t xz=fC*ez, zz1=ez*ez+1, xy=fE+ey;
335
336   Double_t theta2=14.1*14.1/(beta2*p2*1e6)*d/x0*rho;
337   fCcc += xz*xz*theta2;
338   fCec += xz*ez*xy*theta2;
339   fCtc += xz*zz1*theta2;
340   fCee += (2*ey*ez*ez*fE+1-ey*ey+ez*ez+fE*fE*ez*ez)*theta2;
341   fCte += ez*zz1*xy*theta2;
342   fCtt += zz1*zz1*theta2;
343
344
345   //Energy losses************************
346   if (x1 < x2) d=-d;
347   Double_t dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2)) - beta2)*d*rho;
348   //PH  SetLength(GetLength()+d);
349
350   cc = fC;
351   fC*=(1.- sqrt(p2+pm*pm)/p2*dE);
352   fE+=fX*(fC-cc);
353
354   return 1;        
355
356 }     
357
358
359 //_____________________________________________________________________________
360 Int_t AliTRDtrack::Update(const AliTRDcluster *c, Double_t chisq, UInt_t index,                          Double_t h01)
361 {
362   // Assignes found cluster to the track and updates track information
363
364
365   Double_t r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2()*100.0;
366
367   r00+=(fCyy+2.0*h01*fCzy+h01*h01*fCzz);
368   r01+=(fCzy+h01*fCzz);
369   r11+=fCzz;
370
371   Double_t det=r00*r11 - r01*r01;
372   Double_t tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
373
374 //  Double_t k00=fCyy*r00+fCzy*r01, k01=fCyy*r01+fCzy*r11;
375 //  Double_t k10=fCzy*r00+fCzz*r01, k11=fCzy*r01+fCzz*r11;
376 //  Double_t k20=fCcy*r00+fCcz*r01, k21=fCcy*r01+fCcz*r11;
377 //  Double_t k30=fCey*r00+fCez*r01, k31=fCey*r01+fCez*r11;
378 //  Double_t k40=fCty*r00+fCtz*r01, k41=fCty*r01+fCtz*r11;
379
380   Double_t k00=fCyy*r00+fCzy*(r01+h01*r00),k01=fCyy*r01+fCzy*(r11+h01*r01);
381   Double_t k10=fCzy*r00+fCzz*(r01+h01*r00),k11=fCzy*r01+fCzz*(r11+h01*r01);
382   Double_t k20=fCcy*r00+fCcz*(r01+h01*r00),k21=fCcy*r01+fCcz*(r11+h01*r01);
383   Double_t k30=fCey*r00+fCez*(r01+h01*r00),k31=fCey*r01+fCez*(r11+h01*r01);
384   Double_t k40=fCty*r00+fCtz*(r01+h01*r00),k41=fCty*r01+fCtz*(r11+h01*r01);
385
386   Double_t dy=c->GetY() - fY, dz=c->GetZ() - fZ;
387
388   dy=dy+h01*dz;
389
390   Double_t cur=fC + k20*dy + k21*dz, eta=fE + k30*dy + k31*dz;
391   if (TMath::Abs(cur*fX-eta) >= 0.99999) {
392   //  if (fN>4) cerr<<fN<<" AliTRDtrack warning: Filtering failed !\n";
393     return 0;
394   }
395
396   fY += k00*dy + k01*dz;
397   fZ += k10*dy + k11*dz;
398   fC  = cur;
399   fE  = eta;
400   fT += k40*dy + k41*dz;
401
402
403   k01+=h01*k00;
404   k11+=h01*k10;
405   k21+=h01*k20;
406   k31+=h01*k30;
407   k41+=h01*k40;
408
409   Double_t c01=fCzy, c02=fCcy, c03=fCey, c04=fCty;
410   Double_t c12=fCcz, c13=fCez, c14=fCtz;
411
412   fCyy-=k00*fCyy+k01*fCzy; fCzy-=k00*c01+k01*fCzz;
413   fCcy-=k00*c02+k01*c12; fCey-=k00*c03+k01*c13;
414   fCty-=k00*c04+k01*c14;
415
416   fCzz-=k10*c01+k11*fCzz;
417   fCcz-=k10*c02+k11*c12; fCez-=k10*c03+k11*c13;
418   fCtz-=k10*c04+k11*c14;
419
420   fCcc-=k20*c02+k21*c12; fCec-=k20*c03+k21*c13;
421   fCtc-=k20*c04+k21*c14;
422
423   fCee-=k30*c03+k31*c13;
424   fCte-=k30*c04+k31*c14;        
425
426   fCtt-=k40*c04+k41*c14;
427
428   Int_t n=GetNumberOfClusters();  
429   fIndex[n]=index;
430   SetNumberOfClusters(n+1);  
431
432   SetChi2(GetChi2()+chisq); 
433
434   //  cerr<<"in update: fIndex["<<fN<<"] = "<<index<<endl;
435
436   return 1;
437
438 }                     
439
440
441 //_____________________________________________________________________________
442 Int_t AliTRDtrack::Rotate(Double_t alpha)
443 {
444   // Rotates track parameters in R*phi plane
445
446   fAlpha += alpha;
447
448   Double_t x1=fX, y1=fY;
449   Double_t ca=cos(alpha), sa=sin(alpha);
450   Double_t r1=fC*fX - fE;
451
452   if (TMath::Abs(r1) >= 0.99999) {
453     Int_t n=GetNumberOfClusters(); 
454     if (n>4) cerr<<n<<" AliTRDtrack warning: Rotation failed !\n";
455     return 0;
456   }
457
458   fX = x1*ca + y1*sa;
459   fY=-x1*sa + y1*ca;
460   fE=fE*ca + (fC*y1 + sqrt(1.- r1*r1))*sa;
461
462   Double_t r2=fC*fX - fE;
463   if (TMath::Abs(r2) >= 0.99999) {
464     Int_t n=GetNumberOfClusters(); 
465     if (n>4) cerr<<n<<" AliTRDtrack warning: Rotation failed !\n";
466     return 0;
467   }
468
469   Double_t y0=fY + sqrt(1.- r2*r2)/fC;
470   if ((fY-y0)*fC >= 0.) {
471     Int_t n=GetNumberOfClusters(); 
472     if (n>4) cerr<<n<<" AliTRDtrack warning: Rotation failed !!!\n";
473     return 0;
474   }
475
476   //f = F - 1
477   Double_t f00=ca-1,    f32=(y1 - r1*x1/sqrt(1.- r1*r1))*sa,
478            f30=fC*sa, f33=(ca + sa*r1/sqrt(1.- r1*r1))-1;
479
480   //b = C*ft
481   Double_t b00=fCyy*f00, b03=fCyy*f30+fCcy*f32+fCey*f33;
482   Double_t b10=fCzy*f00, b13=fCzy*f30+fCcz*f32+fCez*f33;
483   Double_t b20=fCcy*f00, b23=fCcy*f30+fCcc*f32+fCec*f33;
484   Double_t b30=fCey*f00, b33=fCey*f30+fCec*f32+fCee*f33;
485   Double_t b40=fCty*f00, b43=fCty*f30+fCtc*f32+fCte*f33;
486
487   //a = f*b = f*C*ft
488   Double_t a00=f00*b00, a03=f00*b03, a33=f30*b03+f32*b23+f33*b33;
489
490   // *** Double_t dy2=fCyy;  
491           
492   //F*C*Ft = C + (a + b + bt)
493   fCyy += a00 + 2*b00;
494   fCzy += b10;
495   fCcy += b20;
496   fCey += a03+b30+b03;
497   fCty += b40;
498   fCez += b13;
499   fCec += b23;
500   fCee += a33 + 2*b33;
501   fCte += b43;
502
503   // *** fCyy+=dy2*sa*sa*r1*r1/(1.- r1*r1);
504   // *** fCzz+=d2y*sa*sa*fT*fT/(1.- r1*r1);   
505
506   return 1;
507 }                         
508
509
510 //_____________________________________________________________________________
511 Double_t AliTRDtrack::GetPredictedChi2(const AliTRDcluster *c, Double_t h01) const
512 {
513   
514   Double_t r00=c->GetSigmaY2(), r01=0., r11=c->GetSigmaZ2();
515
516   r00+=fCyy; r01+=fCzy; r11+=fCzz;
517
518   Double_t det=r00*r11 - r01*r01;
519   if (TMath::Abs(det) < 1.e-10) {
520     Int_t n=GetNumberOfClusters(); 
521     if (n>4) cerr<<n<<" AliTRDtrack warning: Singular matrix !\n";
522     return 1e10;
523   }
524   Double_t tmp=r00; r00=r11; r11=tmp; r01=-r01;
525
526   Double_t dy=c->GetY() - fY, dz=c->GetZ() - fZ;
527
528   dy=dy+h01*dz;
529
530   return (dy*r00*dy + 2*r01*dy*dz + dz*r11*dz)/det; 
531
532 }      
533
534
535 //_________________________________________________________________________
536 void AliTRDtrack::GetPxPyPz(Double_t& px, Double_t& py, Double_t& pz) const
537 {
538   // Returns reconstructed track momentum in the global system.
539
540   Double_t pt=TMath::Abs(GetPt()); // GeV/c
541   Double_t r=fC*fX-fE;
542
543   Double_t y0; 
544   if(r > 1) { py = pt; px = 0; }
545   else if(r < -1) { py = -pt; px = 0; }
546   else {
547     y0=fY + sqrt(1.- r*r)/fC;  
548     px=-pt*(fY-y0)*fC;    //cos(phi);
549     py=-pt*(fE-fX*fC);   //sin(phi);
550   }
551   pz=pt*fT;
552   Double_t tmp=px*TMath::Cos(fAlpha) - py*TMath::Sin(fAlpha);
553   py=px*TMath::Sin(fAlpha) + py*TMath::Cos(fAlpha);
554   px=tmp;            
555
556 }                                
557
558 //_________________________________________________________________________
559 void AliTRDtrack::GetGlobalXYZ(Double_t& x, Double_t& y, Double_t& z) const
560 {
561   // Returns reconstructed track coordinates in the global system.
562
563   x = fX; y = fY; z = fZ; 
564   Double_t tmp=x*TMath::Cos(fAlpha) - y*TMath::Sin(fAlpha);
565   y=x*TMath::Sin(fAlpha) + y*TMath::Cos(fAlpha);
566   x=tmp;            
567
568 }                                
569
570 //_________________________________________________________________________
571 void AliTRDtrack::ResetCovariance() {
572   //
573   // Resets covariance matrix
574   //
575
576   fCyy*=10.;
577   fCzy=0.;   fCzz*=10.;
578   fCcy=0.;   fCcz=0.;   fCcc*=10.;
579   fCey=0.;   fCez=0.;   fCec=0.;   fCee*=10.;
580   fCty=0.;   fCtz=0.;   fCtc=0.;   fCte=0.;   fCtt*=10.;
581
582 }