31 #include <TMatrixDSym.h> 32 #include <TPolyMarker3D.h> 53 for (Int_t i = 0; i < 5; i++) fP[i] = 0;
54 for (Int_t i = 0; i < 15; i++) fC[i] = 0;
66 for (Int_t i = 0; i < 5; i++)
fP[i] = track.
fP[i];
67 for (Int_t i = 0; i < 15; i++)
fC[i] = track.
fC[i];
83 for (Int_t i = 0; i < 5; i++)
fP[i] = trkPar.
fP[i];
84 for (Int_t i = 0; i < 15; i++)
fC[i] = trkPar.
fC[i];
93 const Double_t param[5],
94 const Double_t covar[15]) :
102 for (Int_t i = 0; i < 5; i++)
fP[i] = param[i];
103 for (Int_t i = 0; i < 15; i++)
fC[i] = covar[i];
119 AliError(
"Copy of itself is requested");
123 if (vTrack->InheritsFrom(AliExternalTrackParam::Class())) {
124 AliDebug(1,
"Source itself is AliExternalTrackParam, using assignment operator");
131 Double_t xyz[3],pxpypz[3],cv[21];
133 pxpypz[0]=vTrack->
Px();
134 pxpypz[1]=vTrack->
Py();
135 pxpypz[2]=vTrack->
Pz();
137 Short_t sign = (Short_t)vTrack->
Charge();
138 Set(xyz,pxpypz,cv,sign);
152 if (vTrack->InheritsFrom(
"AliExternalTrackParam")) {
153 AliError(
"This is not a copy constructor. Use AliExternalTrackParam(const AliExternalTrackParam &) !");
154 AliWarning(
"Calling the default constructor...");
159 Double_t xyz[3],pxpypz[3],cv[21];
161 pxpypz[0]=vTrack->
Px();
162 pxpypz[1]=vTrack->
Py();
163 pxpypz[2]=vTrack->
Pz();
165 Short_t sign = (Short_t)vTrack->
Charge();
167 Set(xyz,pxpypz,cv,sign);
172 Double_t cv[21],Short_t sign) :
181 Set(xyz,pxpypz,cv,sign);
308 Double_t cv[21],Short_t sign)
324 const double kSafe = 1e-5;
325 Double_t radPos2 = xyz[0]*xyz[0]+xyz[1]*xyz[1];
326 Double_t radMax = 45.;
327 if (radPos2 < radMax*radMax) {
328 fAlpha = TMath::ATan2(pxpypz[1],pxpypz[0]);
330 Float_t phiPos = TMath::Pi()+TMath::ATan2(-xyz[1], -xyz[0]);
332 TMath::DegToRad()*(20*((((Int_t)(phiPos*TMath::RadToDeg()))/20))+10);
337 if (TMath::Abs(sn)<2*kSafe) {
339 else fAlpha +=
fAlpha>-TMath::Pi()/2. ? -2*kSafe : 2*kSafe;
343 else if (TMath::Abs(cs)<2*kSafe) {
345 else fAlpha +=
fAlpha>-TMath::Pi()/2. ? 2*kSafe : -2*kSafe;
350 TVector3 ver(xyz[0],xyz[1],xyz[2]);
351 TVector3 mom(pxpypz[0],pxpypz[1],pxpypz[2]);
361 Double_t charge = (Double_t)sign;
365 fP[2] = TMath::Sin(mom.Phi());
366 fP[3] = mom.Pz()/mom.Pt();
367 fP[4] = TMath::Sign(1/mom.Pt(),charge);
369 if (TMath::Abs( 1-fP[2]) < kSafe) fP[2] = 1.- kSafe;
370 else if (TMath::Abs(-1-fP[2]) < kSafe) fP[2] =-1.+ kSafe;
373 Double_t pt=1./TMath::Abs(fP[4]);
374 Double_t r=TMath::Sqrt((1.-fP[2])*(1.+fP[2]));
376 Double_t cv34 = TMath::Sqrt(cv[3 ]*cv[3 ]+cv[4 ]*cv[4 ]);
379 double sgcheck = r*sn + fP[2]*cs;
380 if (TMath::Abs(sgcheck)>=1-kSafe) {
382 sgcheck = TMath::Sign(1.0,sgcheck);
384 else if (TMath::Abs(sgcheck)<kSafe) {
385 sgcheck = TMath::Sign(1.0,cs);
389 fC[0 ] = cv[0 ]+cv[2 ];
390 fC[1 ] = TMath::Sign(cv34,-cv[3 ]*sn);
395 double pti2 = pti*pti;
398 fC[4 ] = -sgcheck*cv[8]*r*pti;
399 fC[5 ] = TMath::Abs(cv[9]*r*r*pti2);
400 fC[6 ] = (cv[10]*fP[3]-sgcheck*cv[15])*pti/r;
401 fC[7 ] = (cv[17]-sgcheck*cv[12]*fP[3])*pti;
402 fC[8 ] = (-sgcheck*cv[18]+cv[13]*fP[3])*r*pti2;
403 fC[9 ] = TMath::Abs( cv[20]-2*sgcheck*cv[19]*fP[3]+cv[14]*fP[3]*fP[3])*pti2;
404 fC[10] = cv[10]*pti2/r*q;
405 fC[11] = -sgcheck*cv[12]*pti2*q;
406 fC[12] = cv[13]*r*pti*pti2*q;
407 fC[13] = (-sgcheck*cv[19]+cv[14]*fP[3])*r*pti2*pti;
408 fC[14] = TMath::Abs(cv[14]*pti2*pti2);
409 }
else if (special==2) {
411 double pti2 = pti*pti;
413 fC[3 ] = -cv[10]*pti*cs/sn;
414 fC[4 ] = cv[12]*cs*pti;
415 fC[5 ] = TMath::Abs(cv[14]*cs*cs*pti2);
416 fC[6 ] = (sgcheck*cv[6]*fP[3]-cv[15])*pti/sn;
417 fC[7 ] = (cv[17]-sgcheck*cv[8]*fP[3])*pti;
418 fC[8 ] = (cv[19]-sgcheck*cv[13]*fP[3])*cs*pti2;
419 fC[9 ] = TMath::Abs( cv[20]-2*sgcheck*cv[18]*fP[3]+cv[9]*fP[3]*fP[3])*pti2;
420 fC[10] = sgcheck*cv[6]*pti2/sn*q;
421 fC[11] = -sgcheck*cv[8]*pti2*q;
422 fC[12] = -sgcheck*cv[13]*cs*pti*pti2*q;
423 fC[13] = (-sgcheck*cv[18]+cv[9]*fP[3])*pti2*pti*q;
424 fC[14] = TMath::Abs(cv[9]*pti2*pti2);
428 Double_t m23=-pt*(sn + fP[2]*cs/r), m43=-pt*pt*(r*cs - fP[2]*sn);
429 Double_t m24= pt*(cs - fP[2]*sn/r), m44=-pt*pt*(r*sn + fP[2]*cs);
430 Double_t m35=pt, m45=-pt*pt*fP[3];
436 Double_t a1=cv[13]-cv[9]*(m23*m44+m43*m24)/m23/m43;
437 Double_t a2=m23*m24-m23*(m23*m44+m43*m24)/m43;
438 Double_t a3=m43*m44-m43*(m23*m44+m43*m24)/m23;
439 Double_t a4=cv[14]+2.*cv[9];
440 Double_t a5=m24*m24-2.*m24*m44*m23/m43;
441 Double_t a6=m44*m44-2.*m24*m44*m43/m23;
443 fC[3 ] = (cv[10]*m43-cv[6]*m44)/(m24*m43-m23*m44)/m00;
444 fC[10] = (cv[6]/m00-
fC[3 ]*m23)/m43;
445 fC[6 ] = (cv[15]/m00-
fC[10]*m45)/m35;
446 fC[4 ] = (cv[12]*m43-cv[8]*m44)/(m24*m43-m23*m44);
447 fC[11] = (cv[8]-
fC[4]*m23)/m43;
448 fC[7 ] = cv[17]/m35-
fC[11]*m45/m35;
449 fC[5 ] = TMath::Abs((a4*a3-a6*a1)/(a5*a3-a6*a2));
450 fC[14] = TMath::Abs((a1-a2*
fC[5])/a3);
451 fC[12] = (cv[9]-fC[5]*m23*m23-fC[14]*m43*m43)/m23/m43;
452 Double_t b1=cv[18]-fC[12]*m23*m45-fC[14]*m43*m45;
455 Double_t b4=cv[19]-fC[12]*m24*m45-fC[14]*m44*m45;
458 fC[8 ] = (b4-b6*b1/b3)/(b5-b6*b2/b3);
459 fC[13] = b1/b3-b2*fC[8]/b3;
460 fC[9 ] = TMath::Abs((cv[20]-fC[14]*(m45*m45)-fC[13]*2.*m35*m45)/(m35*m35));
473 for (Int_t i = 0; i < 5; i++)
fP[i] = 0;
474 for (Int_t i = 0; i < 15; i++)
fC[i] = 0;
484 fC[1] +=c[1];
fC[2] +=c[2];
485 fC[3] +=c[3];
fC[4] +=c[4];
fC[5] +=c[5];
486 fC[6] +=c[6];
fC[7] +=c[7];
fC[8] +=c[8];
fC[9] +=c[9];
487 fC[10]+=c[10];
fC[11]+=c[11];
fC[12]+=c[12];
fC[13]+=c[13];
fC[14]+=c[14];
498 return TMath::Sqrt(1.+
fP[3]*
fP[3])/TMath::Abs(fP[4]);
505 return TMath::Abs(
fP[4])/TMath::Sqrt(1.+
fP[3]*
fP[3]);
516 Double_t rp4=
GetC(b);
518 Double_t xt=
fX, yt=
fP[0];
521 Double_t a = x*cs + y*sn;
522 y = -x*sn + y*cs; x=a;
525 sn=rp4*xt -
fP[2]; cs=rp4*yt + TMath::Sqrt((1.- fP[2])*(1.+fP[2]));
526 a=2*(xt*fP[2] - yt*TMath::Sqrt((1.-fP[2])*(1.+fP[2])))-rp4*(xt*xt + yt*yt);
527 return -a/(1 + TMath::Sqrt(sn*sn + cs*cs));
532 GetDZ(Double_t x, Double_t y, Double_t z, Double_t
b, Float_t dz[2])
const {
538 Double_t f1 =
fP[2], r1 = TMath::Sqrt((1.-f1)*(1.+f1));
539 Double_t xt=
fX, yt=
fP[0];
541 Double_t a = x*cs + y*sn;
542 y = -x*sn + y*cs; x=a;
545 Double_t rp4=
GetC(b);
547 dz[0] = -(xt*f1 - yt*r1);
548 dz[1] =
fP[1] + (dz[0]*f1 - xt)/r1*
fP[3] - z;
552 sn=rp4*xt - f1; cs=rp4*yt + r1;
553 a=2*(xt*f1 - yt*r1)-rp4*(xt*xt + yt*yt);
554 Double_t rr=TMath::Sqrt(sn*sn + cs*cs);
556 Double_t f2 = -sn/rr, r2 = TMath::Sqrt((1.-f2)*(1.+f2));
557 dz[1] =
fP[1] +
fP[3]/rp4*TMath::ASin(f2*r1 - f1*r2) - z;
568 Double_t x= xv*cs + yv*sn;
569 Double_t y=-xv*sn + yv*cs;
571 Double_t d = (
fX-x)*
fP[2] - (
fP[0]-y)*TMath::Sqrt((1.-
fP[2])*(1.+
fP[2]));
577 (Double_t xOverX0, Double_t xTimesRho, Double_t mass,
594 Double_t &fC22=
fC[5];
595 Double_t &fC33=
fC[9];
596 Double_t &fC43=
fC[13];
597 Double_t &fC44=
fC[14];
601 Double_t angle=TMath::Sqrt((1.+ fP3*fP3)/((1-fP2)*(1.+fP2)));
609 Double_t beta2=p2/(p2 + mass*mass);
618 Double_t theta2=0.0136*0.0136/(beta2*p2)*TMath::Abs(xOverX0);
620 double lt = 1+0.038*TMath::Log(TMath::Abs(xOverX0));
621 if (lt>0) theta2 *= lt*lt;
623 if (mass<0) theta2 *= 4;
624 if(theta2>TMath::Pi()*TMath::Pi())
return kFALSE;
625 cC22 = theta2*((1.-fP2)*(1.+fP2))*(1. + fP3*fP3);
626 cC33 = theta2*(1. + fP3*fP3)*(1. + fP3*fP3);
627 cC43 = theta2*fP3*fP4*(1. + fP3*fP3);
628 cC44 = theta2*fP3*fP4*fP3*fP4;
633 if ((xTimesRho != 0.) && (beta2 < 1.)) {
634 Double_t dE=dEdx*xTimesRho;
635 Double_t e=TMath::Sqrt(p2 + mass*mass);
636 if ( TMath::Abs(dE) > 0.3*e )
return kFALSE;
637 if ( (1.+ dE/p2*(dE + 2*e)) < 0. )
return kFALSE;
638 cP4 = 1./TMath::Sqrt(1.+ dE/p2*(dE + 2*e));
639 if (TMath::Abs(fP4*cP4)>100.)
return kFALSE;
643 const Double_t knst=0.07;
644 Double_t sigmadE=knst*TMath::Sqrt(TMath::Abs(dE));
645 cC44 += ((sigmadE*e/p2*fP4)*(sigmadE*e/p2*fP4));
662 (Double_t xOverX0, Double_t xTimesRho, Double_t mass,
664 Double_t (*Bethe)(Double_t)) {
679 AliDebug(2,Form(
"Mass %f corresponds to unknown PID particle",mass));
684 Double_t dEdx=Bethe(bg);
685 if (mass<0) dEdx *= 4;
691 (Double_t xOverX0, Double_t xTimesRho, Double_t mass,
720 AliDebug(2,Form(
"Mass %f corresponds to unknown PID particle",mass));
727 if (mass<0) dEdx *= 4;
734 (Double_t d, Double_t x0, Double_t mass, Double_t (*Bethe)(Double_t)) {
767 Double_t beta = bg/TMath::Sqrt(1.+ bg*bg);
769 Double_t aa = TMath::Power(beta,kp4);
770 Double_t bb = TMath::Power(1./bg,kp5);
772 bb=TMath::Log(kp3+bb);
774 return (kp2-aa-bb)*kp1/aa;
797 const Double_t mK = 0.307075e-3;
798 const Double_t me = 0.511e-3;
799 const Double_t rho = kp0;
800 const Double_t x0 = kp1*2.303;
801 const Double_t x1 = kp2*2.303;
802 const Double_t mI = kp3;
803 const Double_t mZA = kp4;
804 const Double_t bg2 = bg*
bg;
805 const Double_t maxT= 2*me*bg2;
809 const Double_t x=TMath::Log(bg);
810 const Double_t lhwI=TMath::Log(28.816*1e-9*TMath::Sqrt(rho*mZA)/mI);
814 const Double_t r=(x1-x)/(x1-x0);
815 d2 = lhwI + x - 0.5 + (0.5 - lhwI - x0)*r*r*r;
818 return mK*mZA*(1+bg2)/bg2*
819 (0.5*TMath::Log(2*me*bg2*maxT/(mI*mI)) - bg2/(1+bg2) - d2);
841 const Double_t rho = 0.9e-3;
842 const Double_t x0 = 2.;
843 const Double_t x1 = 4.;
844 const Double_t mI = 140.e-9;
845 const Double_t mZA = 0.49555;
856 AliError(Form(
"Precondition is not satisfied: |sin(phi)|>1 ! %f",
fP[2]));
860 if (alpha < -TMath::Pi()) alpha += 2*TMath::Pi();
861 else if (alpha >= TMath::Pi()) alpha -= 2*TMath::Pi();
865 Double_t &fC00=
fC[0];
866 Double_t &fC10=
fC[1];
867 Double_t &fC20=
fC[3];
868 Double_t &fC21=
fC[4];
869 Double_t &fC22=
fC[5];
870 Double_t &fC30=
fC[6];
871 Double_t &fC32=
fC[8];
872 Double_t &fC40=
fC[10];
873 Double_t &fC42=
fC[12];
876 Double_t ca=TMath::Cos(alpha-
fAlpha), sa=TMath::Sin(alpha-
fAlpha);
877 Double_t sf=fP2, cf=TMath::Sqrt((1.- fP2)*(1.+fP2));
880 if ((cf*ca+sf*sa)<0) {
881 AliDebug(1,Form(
"Rotation failed: local cos(phi) would become %.2f",cf*ca+sf*sa));
885 Double_t tmp=sf*ca - cf*sa;
888 if (TMath::Abs(tmp) > 1.+ Double_t(FLT_EPSILON))
889 AliWarning(Form(
"Rotation failed ! %.10e",tmp));
898 AliError(Form(
"Too small cosine value %f",cf));
902 Double_t rr=(ca+sf/cf*sa);
924 AliError(Form(
"Precondition is not satisfied: |sin(phi)|>1 ! %f",
fP[2]));
928 if (alpha < -TMath::Pi()) alpha += 2*TMath::Pi();
929 else if (alpha >= TMath::Pi()) alpha -= 2*TMath::Pi();
935 Double_t ca=TMath::Cos(alpha-
fAlpha), sa=TMath::Sin(alpha-
fAlpha);
936 Double_t sf=fP2, cf=TMath::Sqrt((1.- fP2)*(1.+fP2));
939 if ((cf*ca+sf*sa)<0) {
940 AliDebug(1,Form(
"Rotation failed: local cos(phi) would become %.2f",cf*ca+sf*sa));
944 Double_t tmp=sf*ca - cf*sa;
947 if (TMath::Abs(tmp) > 1.+ Double_t(FLT_EPSILON))
948 AliWarning(Form(
"Rotation failed ! %.10e",tmp));
987 if (TMath::Abs(dx)<=
kAlmost0)
return kTRUE;
989 Double_t crv=
GetC(b);
992 Double_t x2r = crv*dx;
993 Double_t f1=
fP[2], f2=f1 + x2r;
994 if (TMath::Abs(f1) >=
kAlmost1)
return kFALSE;
995 if (TMath::Abs(f2) >=
kAlmost1)
return kFALSE;
996 if (TMath::Abs(
fP[4])<
kAlmost0)
return kFALSE;
998 Double_t &fP0=
fP[0], &fP1=
fP[1], &fP2=
fP[2], &fP3=
fP[3], &fP4=
fP[4];
1001 &fC10=
fC[1], &fC11=
fC[2],
1002 &fC20=
fC[3], &fC21=
fC[4], &fC22=
fC[5],
1003 &fC30=
fC[6], &fC31=
fC[7], &fC32=
fC[8], &fC33=
fC[9],
1004 &fC40=
fC[10], &fC41=
fC[11], &fC42=
fC[12], &fC43=
fC[13], &fC44=
fC[14];
1006 Double_t r1=TMath::Sqrt((1.-f1)*(1.+f1)), r2=TMath::Sqrt((1.-f2)*(1.+f2));
1007 if (TMath::Abs(r1)<
kAlmost0)
return kFALSE;
1008 if (TMath::Abs(r2)<
kAlmost0)
return kFALSE;
1011 double dy2dx = (f1+f2)/(r1+r2);
1014 if (TMath::Abs(x2r)<0.05) fP1 += dx*(r2 + f2*dy2dx)*fP3;
1024 double rot = TMath::ASin(r1*f2 - r2*f1);
1025 if (f1*f1+f2*f2>1 && f1*f2<0) {
1026 if (f2>0) rot = TMath::Pi() - rot;
1027 else rot = -TMath::Pi() - rot;
1041 Double_t rinv = 1./r1;
1042 Double_t r3inv = rinv*rinv*rinv;
1043 Double_t f24= x2r/fP4;
1044 Double_t f02= dx*r3inv;
1045 Double_t f04=0.5*f24*f02;
1046 Double_t f12= f02*fP3*f1;
1047 Double_t f14=0.5*f24*f02*fP3*f1;
1048 Double_t f13= dx*rinv;
1051 Double_t b00=f02*fC20 + f04*fC40, b01=f12*fC20 + f14*fC40 + f13*fC30;
1052 Double_t b02=f24*fC40;
1053 Double_t b10=f02*fC21 + f04*fC41, b11=f12*fC21 + f14*fC41 + f13*fC31;
1054 Double_t b12=f24*fC41;
1055 Double_t b20=f02*fC22 + f04*fC42, b21=f12*fC22 + f14*fC42 + f13*fC32;
1056 Double_t b22=f24*fC42;
1057 Double_t b40=f02*fC42 + f04*fC44, b41=f12*fC42 + f14*fC44 + f13*fC43;
1058 Double_t b42=f24*fC44;
1059 Double_t b30=f02*fC32 + f04*fC43, b31=f12*fC32 + f14*fC43 + f13*fC33;
1060 Double_t b32=f24*fC43;
1063 Double_t a00=f02*b20+f04*b40,a01=f02*b21+f04*b41,a02=f02*b22+f04*b42;
1064 Double_t a11=f12*b21+f14*b41+f13*b31,a12=f12*b22+f14*b42+f13*b32;
1065 Double_t a22=f24*b42;
1068 fC00 += b00 + b00 + a00;
1069 fC10 += b10 + b01 + a01;
1070 fC20 += b20 + b02 + a02;
1073 fC11 += b11 + b11 + a11;
1074 fC21 += b21 + b12 + a12;
1077 fC22 += b22 + b22 + a22;
1093 if (TMath::Abs(dx)<=
kAlmost0)
return kTRUE;
1095 Double_t crv=
GetC(b);
1098 Double_t x2r = crv*dx;
1099 Double_t f1=
fP[2], f2=f1 + x2r;
1100 if (TMath::Abs(f1) >=
kAlmost1)
return kFALSE;
1101 if (TMath::Abs(f2) >=
kAlmost1)
return kFALSE;
1102 if (TMath::Abs(
fP[4])<
kAlmost0)
return kFALSE;
1104 Double_t r1=TMath::Sqrt((1.-f1)*(1.+f1)), r2=TMath::Sqrt((1.-f2)*(1.+f2));
1105 if (TMath::Abs(r1)<
kAlmost0)
return kFALSE;
1106 if (TMath::Abs(r2)<
kAlmost0)
return kFALSE;
1109 double dy2dx = (f1+f2)/(r1+r2);
1112 if (TMath::Abs(x2r)<0.05)
fP[1] += dx*(r2 + f2*dy2dx)*
fP[3];
1122 double rot = TMath::ASin(r1*f2 - r2*f1);
1123 if (f1*f1+f2*f2>1 && f1*f2<0) {
1124 if (f2>0) rot = TMath::Pi() - rot;
1125 else rot = -TMath::Pi() - rot;
1127 fP[1] +=
fP[3]/crv*rot;
1143 Double_t ps[5], cs[15];
1144 for (Int_t i=0; i<5; i++) ps[i]=
fP[i];
1145 for (Int_t i=0; i<15; i++) cs[i]=
fC[i];
1153 for (Int_t i=0; i<5; i++)
fP[i]=ps[i];
1154 for (Int_t i=0; i<15; i++)
fC[i]=cs[i];
1159 (Double_t alpha, Double_t x, Double_t
b[3]) {
1170 Double_t ps[5], cs[15];
1171 for (Int_t i=0; i<5; i++) ps[i]=
fP[i];
1172 for (Int_t i=0; i<15; i++) cs[i]=
fC[i];
1180 for (Int_t i=0; i<5; i++)
fP[i]=ps[i];
1181 for (Int_t i=0; i<15; i++)
fC[i]=cs[i];
1187 Double_t
p[3], Double_t bz)
const {
1211 Double_t rho = a/pp;
1212 x[0] += p[0]*TMath::Sin(rho*len)/a - p[1]*(1-TMath::Cos(rho*len))/a;
1213 x[1] += p[1]*TMath::Sin(rho*len)/a + p[0]*(1-TMath::Cos(rho*len))/a;
1214 x[2] += p[2]*len/pp;
1217 p[0] = p0 *TMath::Cos(rho*len) - p[1]*TMath::Sin(rho*len);
1218 p[1] = p[1]*TMath::Cos(rho*len) + p0 *TMath::Sin(rho*len);
1223 Double_t bz)
const {
1232 Double_t x0[3];
GetXYZ(x0);
1236 (pnt[0]-x0[0])*norm[0] + (pnt[1]-x0[1])*norm[1] + (pnt[2]-x0[2])*norm[2];
1237 Double_t dist=99999,distPrev=dist;
1239 while(TMath::Abs(dist)>0.00001){
1244 dist=(x[0]-pnt[0])*norm[0]+(x[1]-pnt[1])*norm[1]+(x[2]-pnt[2])*norm[2];
1246 if(TMath::Abs(dist) >= TMath::Abs(distPrev)) {
return kFALSE;}
1252 for (Int_t i=0; i<3; i++) {pnt[i]=x[i]; norm[i]=p[i];}
1261 Double_t sdd =
fC[0] + cov[0];
1262 Double_t sdz =
fC[1] + cov[1];
1263 Double_t szz =
fC[2] + cov[2];
1264 Double_t det = sdd*szz - sdz*sdz;
1268 Double_t d =
fP[0] - p[0];
1269 Double_t z =
fP[1] - p[1];
1271 return (d*szz*d - 2*d*sdz*z + z*sdd*z)/det;
1293 Double_t r=TMath::Sqrt((1.-f)*(1.+f));
1294 Double_t a=f/r, b=
GetTgl()/r;
1296 Double_t s2=333.*333.;
1299 v(0,0)= s2; v(0,1)= a*s2; v(0,2)= b*s2;;
1303 v(0,0)+=covxyz[0]; v(0,1)+=covxyz[1]; v(0,2)+=covxyz[2];
1304 v(1,0)+=covxyz[1]; v(1,1)+=covyz[0]; v(1,2)+=covyz[1];
1305 v(2,0)+=covxyz[2]; v(2,1)+=covyz[1]; v(2,2)+=covyz[2];
1311 for (Int_t i = 0; i < 3; i++)
1312 for (Int_t j = 0; j < 3; j++) chi2 += res[i]*res[j]*v(i,j);
1327 AliError(
"The reference systems of the tracks differ !");
1330 if (TMath::Abs(t->
GetX()-
GetX()) > FLT_EPSILON) {
1331 AliError(
"The reference of the tracks planes differ !");
1348 c(0,2)=c(2,0); c(1,2)=c(2,1);
1349 c(0,3)=c(3,0); c(1,3)=c(3,1); c(2,3)=c(3,2);
1350 c(0,4)=c(4,0); c(1,4)=c(4,1); c(2,4)=c(4,2); c(3,4)=c(4,3);
1365 for (Int_t i = 0; i < 5; i++)
1366 for (Int_t j = 0; j < 5; j++) chi2 += res[i]*res[j]*c(i,j);
1372 PropagateTo(Double_t
p[3],Double_t covyz[3],Double_t covxyz[3],Double_t bz) {
1385 if (TMath::Abs(f) >=
kAlmost1)
return kFALSE;
1386 Double_t r=TMath::Sqrt((1.-f)*(1.+f));
1387 Double_t a=f/r, b=
GetTgl()/r;
1389 Double_t s2=333.*333.;
1392 tV(0,0)= s2; tV(0,1)= a*s2; tV(0,2)= b*s2;
1393 tV(1,0)=a*s2; tV(1,1)=a*a*s2; tV(1,2)=a*b*s2;
1394 tV(2,0)=b*s2; tV(2,1)=a*b*s2; tV(2,2)=b*b*s2;
1397 pV(0,0)=covxyz[0]; pV(0,1)=covxyz[1]; pV(0,2)=covxyz[2];
1398 pV(1,0)=covxyz[1]; pV(1,1)=covyz[0]; pV(1,2)=covyz[1];
1399 pV(2,0)=covxyz[2]; pV(2,1)=covyz[1]; pV(2,2)=covyz[2];
1401 TMatrixDSym tpV(tV);
1404 if (!tpV.IsValid())
return kFALSE;
1406 TMatrixDSym pW(3),tW(3);
1407 for (Int_t i=0; i<3; i++)
1408 for (Int_t j=0; j<3; j++) {
1410 for (Int_t k=0; k<3; k++) {
1411 pW(i,j) += tV(i,k)*tpV(k,j);
1412 tW(i,j) += pV(i,k)*tpV(k,j);
1419 for (Int_t i=0; i<3; i++) x += (tW(0,i)*t[i] + pW(0,i)*p[i]);
1420 Double_t crv=
GetC(bz);
1423 if (TMath::Abs(f) >=
kAlmost1)
return kFALSE;
1427 for (Int_t i=0; i<3; i++)
fP[0] += (tW(1,i)*t[i] + pW(1,i)*p[i]);
1429 for (Int_t i=0; i<3; i++)
fP[1] += (tW(2,i)*t[i] + pW(2,i)*p[i]);
1435 Double_t *
p,Double_t *cov,Bool_t updated)
const {
1442 static Double_t
res[2];
1444 Double_t r00=cov[0], r01=cov[1], r11=cov[2];
1446 r00-=
fC[0]; r01-=
fC[1]; r11-=
fC[2];
1448 r00+=
fC[0]; r01+=
fC[1]; r11+=
fC[2];
1450 Double_t det=r00*r11 - r01*r01;
1452 if (TMath::Abs(det) <
kAlmost0)
return 0;
1454 Double_t tmp=r00; r00=r11/det; r11=tmp/det;
1456 if (r00 < 0.)
return 0;
1457 if (r11 < 0.)
return 0;
1459 Double_t dy =
fP[0] - p[0];
1460 Double_t dz =
fP[1] - p[1];
1462 res[0]=dy*TMath::Sqrt(r00);
1463 res[1]=dz*TMath::Sqrt(r11);
1473 Double_t &fP0=
fP[0], &fP1=
fP[1], &fP2=
fP[2], &fP3=
fP[3], &fP4=
fP[4];
1476 &fC10=
fC[1], &fC11=
fC[2],
1477 &fC20=
fC[3], &fC21=
fC[4], &fC22=
fC[5],
1478 &fC30=
fC[6], &fC31=
fC[7], &fC32=
fC[8], &fC33=
fC[9],
1479 &fC40=
fC[10], &fC41=
fC[11], &fC42=
fC[12], &fC43=
fC[13], &fC44=
fC[14];
1481 Double_t r00=cov[0], r01=cov[1], r11=cov[2];
1482 r00+=fC00; r01+=fC10; r11+=fC11;
1483 Double_t det=r00*r11 - r01*r01;
1485 if (TMath::Abs(det) <
kAlmost0)
return kFALSE;
1488 Double_t tmp=r00; r00=r11/det; r11=tmp/det; r01=-r01/det;
1490 Double_t k00=fC00*r00+fC10*r01, k01=fC00*r01+fC10*r11;
1491 Double_t k10=fC10*r00+fC11*r01, k11=fC10*r01+fC11*r11;
1492 Double_t k20=fC20*r00+fC21*r01, k21=fC20*r01+fC21*r11;
1493 Double_t k30=fC30*r00+fC31*r01, k31=fC30*r01+fC31*r11;
1494 Double_t k40=fC40*r00+fC41*r01, k41=fC40*r01+fC41*r11;
1496 Double_t dy=p[0] - fP0, dz=p[1] - fP1;
1497 Double_t sf=fP2 + k20*dy + k21*dz;
1498 if (TMath::Abs(sf) >
kAlmost1)
return kFALSE;
1500 fP0 += k00*dy + k01*dz;
1501 fP1 += k10*dy + k11*dz;
1503 fP3 += k30*dy + k31*dz;
1504 fP4 += k40*dy + k41*dz;
1506 Double_t c01=fC10, c02=fC20, c03=fC30, c04=fC40;
1507 Double_t c12=fC21, c13=fC31, c14=fC41;
1509 fC00-=k00*fC00+k01*fC10; fC10-=k00*c01+k01*fC11;
1510 fC20-=k00*c02+k01*c12; fC30-=k00*c03+k01*c13;
1511 fC40-=k00*c04+k01*c14;
1513 fC11-=k10*c01+k11*fC11;
1514 fC21-=k10*c02+k11*c12; fC31-=k10*c03+k11*c13;
1515 fC41-=k10*c04+k11*c14;
1517 fC22-=k20*c02+k21*c12; fC32-=k20*c03+k21*c13;
1518 fC42-=k20*c04+k21*c14;
1520 fC33-=k30*c03+k31*c13;
1521 fC43-=k30*c04+k31*c14;
1523 fC44-=k40*c04+k41*c14;
1538 hlx[0]=
fP[0]; hlx[1]=
fP[1]; hlx[2]=
fP[2]; hlx[3]=
fP[3];
1540 hlx[5]=
fX*cs - hlx[0]*sn;
1541 hlx[0]=
fX*sn + hlx[0]*cs;
1543 hlx[2]=TMath::ASin(hlx[2]) +
fAlpha;
1557 Double_t phase=h[4]*t+h[2];
1558 Double_t sn=TMath::Sin(phase), cs=TMath::Cos(phase);
1563 r[0] += (sn - h[6])/h[4];
1564 r[1] -= (cs - h[7])/h[4];
1569 r[2] = h[1] + h[3]*t;
1571 g[0] = cs; g[1]=sn; g[2]=h[3];
1573 gg[0]=-h[4]*sn; gg[1]=h[4]*cs; gg[2]=0.;
1577 Double_t b, Double_t &xthis, Double_t &xp)
const {
1589 p1[6]=TMath::Sin(p1[2]); p1[7]=TMath::Cos(p1[2]);
1591 p2[6]=TMath::Sin(p2[2]); p2[7]=TMath::Cos(p2[2]);
1594 Double_t r1[3],g1[3],gg1[3]; Double_t t1=0.;
1596 Double_t r2[3],g2[3],gg2[3]; Double_t t2=0.;
1599 Double_t dx=r2[0]-r1[0], dy=r2[1]-r1[1], dz=r2[2]-r1[2];
1600 Double_t dm=dx*dx/dx2 + dy*dy/dy2 + dz*dz/dz2;
1604 Double_t gt1=-(dx*g1[0]/dx2 + dy*g1[1]/dy2 + dz*g1[2]/dz2);
1605 Double_t gt2=+(dx*g2[0]/dx2 + dy*g2[1]/dy2 + dz*g2[2]/dz2);
1606 Double_t h11=(g1[0]*g1[0] - dx*gg1[0])/dx2 +
1607 (g1[1]*g1[1] - dy*gg1[1])/dy2 +
1608 (g1[2]*g1[2] - dz*gg1[2])/dz2;
1609 Double_t h22=(g2[0]*g2[0] + dx*gg2[0])/dx2 +
1610 (g2[1]*g2[1] + dy*gg2[1])/dy2 +
1611 (g2[2]*g2[2] + dz*gg2[2])/dz2;
1612 Double_t h12=-(g1[0]*g2[0]/dx2 + g1[1]*g2[1]/dy2 + g1[2]*g2[2]/dz2);
1614 Double_t det=h11*h22-h12*h12;
1617 if (TMath::Abs(det)<1.e-33) {
1621 dt1=-(gt1*h22 - gt2*h12)/det;
1622 dt2=-(h11*gt2 - h12*gt1)/det;
1625 if ((dt1*gt1+dt2*gt2)>0) {dt1=-dt1; dt2=-dt2;}
1630 if (TMath::Abs(dt1)/(TMath::Abs(t1)+1.e-3) < 1.e-4)
1631 if (TMath::Abs(dt2)/(TMath::Abs(t2)+1.e-3) < 1.e-4) {
1632 if ((gt1*gt1+gt2*gt2) > 1.e-4/dy2/dy2)
1633 AliDebug(1,
" stopped at not a stationary point !");
1634 Double_t lmb=h11+h22; lmb=lmb-TMath::Sqrt(lmb*lmb-4*det);
1636 AliDebug(1,
" stopped at not a minimum !");
1641 for (Int_t div=1 ; ; div*=2) {
1644 dx=r2[0]-r1[0]; dy=r2[1]-r1[1]; dz=r2[2]-r1[2];
1645 dd=dx*dx/dx2 + dy*dy/dy2 + dz*dz/dz2;
1659 if (max<=0)
AliDebug(1,
" too many iterations !");
1661 Double_t cs=TMath::Cos(
GetAlpha());
1662 Double_t sn=TMath::Sin(
GetAlpha());
1663 xthis=r1[0]*cs + r1[1]*sn;
1667 xp=r2[0]*cs + r2[1]*sn;
1669 return TMath::Sqrt(dm*TMath::Sqrt(dy2*dz2));
1680 Double_t dca=
GetDCA(p,b,xthis,xp);
1697 Double_t b, Double_t maxd, Double_t dz[2], Double_t covar[3]) {
1710 Double_t sn=TMath::Sin(alpha), cs=TMath::Cos(alpha);
1712 Double_t xv= vtx->
GetX()*cs + vtx->
GetY()*sn;
1713 Double_t yv=-vtx->
GetX()*sn + vtx->
GetY()*cs, zv=vtx->
GetZ();
1717 Double_t d=TMath::Abs(x*snp - y*TMath::Sqrt((1.-snp)*(1.+snp)));
1718 if (d > maxd)
return kFALSE;
1721 Double_t crv=
GetC(b);
1724 Double_t tgfv=-(crv*x - snp)/(crv*y + TMath::Sqrt((1.-snp)*(1.+snp)));
1725 sn=tgfv/TMath::Sqrt(1.+ tgfv*tgfv); cs=TMath::Sqrt((1.-sn)*(1.+sn));
1726 if (TMath::Abs(tgfv)>0.) cs = sn/tgfv;
1730 yv=-xv*sn + yv*cs; xv=x;
1732 if (!
Propagate(alpha+TMath::ASin(sn),xv,b))
return kFALSE;
1734 if (dz==0)
return kTRUE;
1738 if (covar==0)
return kTRUE;
1742 alpha=
GetAlpha(); sn=TMath::Sin(alpha); cs=TMath::Cos(alpha);
1743 Double_t s2ylocvtx = cov[0]*sn*sn + cov[2]*cs*cs - 2.*cov[1]*cs*sn;
1753 Double_t b[3], Double_t maxd, Double_t dz[2], Double_t covar[3]) {
1768 Double_t sn=TMath::Sin(alpha), cs=TMath::Cos(alpha);
1770 Double_t xv= vtx->
GetX()*cs + vtx->
GetY()*sn;
1771 Double_t yv=-vtx->
GetX()*sn + vtx->
GetY()*cs, zv=vtx->
GetZ();
1775 Double_t d=TMath::Abs(x*snp - y*TMath::Sqrt((1.-snp)*(1.+snp)));
1776 if (d > maxd)
return kFALSE;
1779 Double_t crv=
GetC(b[2]);
1782 Double_t tgfv=-(crv*x - snp)/(crv*y + TMath::Sqrt((1.-snp)*(1.+snp)));
1783 sn=tgfv/TMath::Sqrt(1.+ tgfv*tgfv); cs=TMath::Sqrt((1.-sn)*(1.+sn));
1784 if (TMath::Abs(tgfv)>0.) cs = sn/tgfv;
1788 yv=-xv*sn + yv*cs; xv=x;
1792 if (dz==0)
return kTRUE;
1796 if (covar==0)
return kTRUE;
1800 alpha=
GetAlpha(); sn=TMath::Sin(alpha); cs=TMath::Cos(alpha);
1801 Double_t s2ylocvtx = cov[0]*sn*sn + cov[2]*cs*cs - 2.*cov[1]*cs*sn;
1817 Double_t csp =TMath::Sqrt((1.-snp)*(1.+snp));
1818 Double_t norm=TMath::Sqrt(1.+
fP[3]*
fP[3]);
1819 d[0]=(csp*cs - snp*sn)/norm;
1820 d[1]=(snp*cs + csp*sn)/norm;
1829 p[0]=
fP[4]; p[1]=
fP[2]; p[2]=
fP[3];
1862 Double_t r[3]={0.,0.,0.};
1873 Double_t r[3]={0.,0.,0.};
1882 return 0.5*TMath::Pi() - TMath::ATan(
fP[3]);
1891 Double_t phi=TMath::ASin(
fP[2]) +
fAlpha;
1892 if (phi<0.) phi+=2.*TMath::Pi();
1893 else if (phi>=2.*TMath::Pi()) phi-=2.*TMath::Pi();
1903 Double_t r[3]={0.,0.,0.};
1905 Double_t phi=TMath::ATan2(r[1],r[0]);
1906 if (phi<0.) phi+=2.*TMath::Pi();
1932 return -TMath::Log(TMath::Tan(0.5 *
Theta()));
1948 r[0]=
fX; r[1]=
fP[0]; r[2]=
fP[1];
1966 for (Int_t i=0; i<21; i++) cv[i]=0.;
1970 for (Int_t i=0; i<21; i++) cv[i]=0.;
1973 Double_t pt=1./TMath::Abs(
fP[4]);
1975 Double_t r=TMath::Sqrt((1.-
fP[2])*(1.+
fP[2]));
1977 Double_t m00=-sn, m10=cs;
1978 Double_t m23=-pt*(sn +
fP[2]*cs/r), m43=-pt*pt*(r*cs -
fP[2]*sn);
1979 Double_t m24= pt*(cs -
fP[2]*sn/r), m44=-pt*pt*(r*sn +
fP[2]*cs);
1980 Double_t m35=pt, m45=-pt*pt*
fP[3];
1986 cv[0 ] =
fC[0]*m00*m00;
1987 cv[1 ] =
fC[0]*m00*m10;
1988 cv[2 ] =
fC[0]*m10*m10;
1992 cv[6 ] = m00*(
fC[3]*m23 +
fC[10]*m43);
1993 cv[7 ] = m10*(
fC[3]*m23 +
fC[10]*m43);
1994 cv[8 ] =
fC[4]*m23 +
fC[11]*m43;
1995 cv[9 ] = m23*(
fC[5]*m23 +
fC[12]*m43) + m43*(
fC[12]*m23 +
fC[14]*m43);
1996 cv[10] = m00*(
fC[3]*m24 +
fC[10]*m44);
1997 cv[11] = m10*(
fC[3]*m24 +
fC[10]*m44);
1998 cv[12] =
fC[4]*m24 +
fC[11]*m44;
1999 cv[13] = m23*(
fC[5]*m24 +
fC[12]*m44) + m43*(
fC[12]*m24 +
fC[14]*m44);
2000 cv[14] = m24*(
fC[5]*m24 +
fC[12]*m44) + m44*(
fC[12]*m24 +
fC[14]*m44);
2001 cv[15] = m00*(
fC[6]*m35 +
fC[10]*m45);
2002 cv[16] = m10*(
fC[6]*m35 +
fC[10]*m45);
2003 cv[17] =
fC[7]*m35 +
fC[11]*m45;
2004 cv[18] = m23*(
fC[8]*m35 +
fC[12]*m45) + m43*(
fC[13]*m35 +
fC[14]*m45);
2005 cv[19] = m24*(
fC[8]*m35 +
fC[12]*m45) + m44*(
fC[13]*m35 +
fC[14]*m45);
2006 cv[20] = m35*(
fC[9]*m35 +
fC[13]*m45) + m45*(
fC[13]*m35 +
fC[14]*m45);
2038 double f1=
fP[2], x2r = crv*dx, f2=f1 + x2r;
2042 double r1=TMath::Sqrt((1.-f1)*(1.+f1)), r2=TMath::Sqrt((1.-f2)*(1.+f2));
2043 double dy2dx = (f1+f2)/(r1+r2);
2044 yz[0] =
fP[0] + dx*dy2dx;
2045 if (TMath::Abs(x2r)<0.05) yz[1] =
fP[1] + dx*(r2 + f2*dy2dx)*
fP[3];
2047 double chord = dx*TMath::Sqrt(1+dy2dx*dy2dx);
2048 double rot = 2*TMath::ASin(0.5*chord*crv);
2049 yz[1] =
fP[1] + rot/crv*
fP[3];
2063 if(TMath::Abs(dx)<=
kAlmost0) {y=
fP[0];
return kTRUE;}
2065 Double_t f1=
fP[2], f2=f1 + dx*
GetC(b);
2067 if (TMath::Abs(f1) >=
kAlmost1)
return kFALSE;
2068 if (TMath::Abs(f2) >=
kAlmost1)
return kFALSE;
2070 Double_t r1=TMath::Sqrt((1.-f1)*(1.+f1)), r2=TMath::Sqrt((1.-f2)*(1.+f2));
2071 y =
fP[0] + dx*(f1+f2)/(r1+r2);
2083 if(TMath::Abs(dx)<=
kAlmost0) {z=
fP[1];
return kTRUE;}
2085 Double_t crv=
GetC(b);
2086 Double_t x2r = crv*dx;
2087 Double_t f1=
fP[2], f2=f1 + x2r;
2089 if (TMath::Abs(f1) >=
kAlmost1)
return kFALSE;
2090 if (TMath::Abs(f2) >=
kAlmost1)
return kFALSE;
2092 Double_t r1=sqrt((1.-f1)*(1.+f1)), r2=sqrt((1.-f2)*(1.+f2));
2093 double dy2dx = (f1+f2)/(r1+r2);
2094 if (TMath::Abs(x2r)<0.05) {
2095 z =
fP[1] + dx*(r2 + f2*dy2dx)*
fP[3];
2103 double chord = dx*TMath::Sqrt(1+dy2dx*dy2dx);
2104 double rot = 2*TMath::ASin(0.5*chord*crv);
2105 z =
fP[1] + rot/crv*
fP[3];
2119 Double_t crv=
GetC(b);
2120 Double_t x2r = crv*dx;
2121 Double_t f1=
fP[2], f2=f1 + dx*crv;
2123 if (TMath::Abs(f1) >=
kAlmost1)
return kFALSE;
2124 if (TMath::Abs(f2) >=
kAlmost1)
return kFALSE;
2126 Double_t r1=TMath::Sqrt((1.-f1)*(1.+f1)), r2=TMath::Sqrt((1.-f2)*(1.+f2));
2127 double dy2dx = (f1+f2)/(r1+r2);
2129 r[1] =
fP[0] + dx*dy2dx;
2130 if (TMath::Abs(x2r)<0.05) {
2131 r[2] =
fP[1] + dx*(r2 + f2*dy2dx)*
fP[3];
2139 double chord = dx*TMath::Sqrt(1+dy2dx*dy2dx);
2140 double rot = 2*TMath::ASin(0.5*chord*crv);
2141 r[2] =
fP[1] + rot/crv*
fP[3];
2152 printf(
"AliExternalTrackParam: x = %-12g alpha = %-12g\n",
fX,
fAlpha);
2153 printf(
" parameters: %12g %12g %12g %12g %12g\n",
2155 printf(
" covariance: %12g\n",
fC[0]);
2158 printf(
" %12g %12g %12g %12g\n",
2160 printf(
" %12g %12g %12g %12g %12g\n",
2168 Double_t crv=
GetC(b);
2171 Double_t
res =
fP[2]+dx*crv;
2184 if (!
GetYAt(x,bz,xyz[1]))
return kFALSE;
2185 if (!
GetZAt(x,bz,xyz[2]))
return kFALSE;
2190 if (!param2->
GetYAt(x,bz,xyz2[1]))
return kFALSE;
2191 if (!param2->
GetZAt(x,bz,xyz2[2]))
return kFALSE;
2196 Double_t ca = TMath::Cos(dfi), sa = TMath::Sin(dfi);
2197 xyz2[0] = xyz[0]*ca+xyz[1]*sa;
2198 xyz2[1] = -xyz[0]*sa+xyz[1]*ca;
2201 if (!param2->
GetYAt(xyz2[0],bz,xyz1[1]))
return kFALSE;
2202 if (!param2->
GetZAt(xyz2[0],bz,xyz1[2]))
return kFALSE;
2204 xyz2[0] = xyz1[0]*ca-xyz1[1]*sa;
2205 xyz2[1] = +xyz1[0]*sa+xyz1[1]*ca;
2208 dist[0] = xyz[0]-xyz2[0];
2209 dist[1] = xyz[1]-xyz2[1];
2210 dist[2] = xyz[2]-xyz2[2];
2227 Int_t
npoints = TMath::Nint((maxR-minR)/stepR)+1;
2228 if (npoints<1)
return;
2229 TPolyMarker3D *polymarker =
new TPolyMarker3D(npoints);
2240 for (Double_t r=minR; r<maxR; r+=stepR){
2243 pol->SetPoint(counter,point[0],point[1], point[2]);
2251 Int_t min = TMath::Min(i,j);
2252 Int_t max = TMath::Max(i,j);
2254 return min+(max+1)*max/2;
2278 const Int_t ix=0, iy=1, iz=2, ipx=3, ipy=4, ipz=5, ipp=6;
2279 const Double_t kOvSqSix=TMath::Sqrt(1./6.);
2281 Double_t cosx=vect[ipx], cosy=vect[ipy], cosz=vect[ipz];
2283 Double_t rho = qfield*
kB2C/vect[ipp];
2284 Double_t tet = rho*step;
2286 Double_t tsint, sintt, sint, cos1t;
2287 if (TMath::Abs(tet) > 0.03) {
2288 sint = TMath::Sin(tet);
2290 tsint = (tet - sint)/tet;
2291 Double_t t=TMath::Sin(0.5*tet);
2295 sintt = (1.-tet*kOvSqSix)*(1.+tet*kOvSqSix);
2300 Double_t f1 = step*sintt;
2301 Double_t f2 = step*cos1t;
2302 Double_t f3 = step*tsint*cosz;
2303 Double_t f4 = -tet*cos1t;
2306 vect[ix] += f1*cosx - f2*cosy;
2307 vect[iy] += f1*cosy + f2*cosx;
2308 vect[iz] += f1*cosz + f3;
2310 vect[ipx] += f4*cosx - f5*cosy;
2311 vect[ipy] += f4*cosy + f5*cosx;
2324 if (TMath::Abs(dx)<=
kAlmost0)
return kTRUE;
2325 if (TMath::Abs(
fP[4])<=
kAlmost0)
return kFALSE;
2327 if (TMath::Abs(dx)>1e5 ||
2328 TMath::Abs(
GetY())>1e5 ||
2329 TMath::Abs(
GetZ())>1e5) {
2330 AliWarning(Form(
"Anomalous track, target X:%f",xk));
2335 Double_t crv=
GetC(b[2]);
2338 Double_t x2r = crv*dx;
2339 Double_t f1=
fP[2], f2=f1 + x2r;
2340 if (TMath::Abs(f1) >=
kAlmost1)
return kFALSE;
2341 if (TMath::Abs(f2) >=
kAlmost1)
return kFALSE;
2345 Double_t &fP3=
fP[3], &fP4=
fP[4];
2348 &fC10=
fC[1], &fC11=
fC[2],
2349 &fC20=
fC[3], &fC21=
fC[4], &fC22=
fC[5],
2350 &fC30=
fC[6], &fC31=
fC[7], &fC32=
fC[8], &fC33=
fC[9],
2351 &fC40=
fC[10], &fC41=
fC[11], &fC42=
fC[12], &fC43=
fC[13], &fC44=
fC[14];
2353 Double_t r1=TMath::Sqrt((1.-f1)*(1.+f1)), r2=TMath::Sqrt((1.-f2)*(1.+f2));
2364 Double_t rinv = 1./r1;
2365 Double_t r3inv = rinv*rinv*rinv;
2366 Double_t f24= x2r/fP4;
2367 Double_t f02= dx*r3inv;
2368 Double_t f04=0.5*f24*f02;
2369 Double_t f12= f02*fP3*f1;
2370 Double_t f14=0.5*f24*f02*fP3*f1;
2371 Double_t f13= dx*rinv;
2374 Double_t b00=f02*fC20 + f04*fC40, b01=f12*fC20 + f14*fC40 + f13*fC30;
2375 Double_t b02=f24*fC40;
2376 Double_t b10=f02*fC21 + f04*fC41, b11=f12*fC21 + f14*fC41 + f13*fC31;
2377 Double_t b12=f24*fC41;
2378 Double_t b20=f02*fC22 + f04*fC42, b21=f12*fC22 + f14*fC42 + f13*fC32;
2379 Double_t b22=f24*fC42;
2380 Double_t b40=f02*fC42 + f04*fC44, b41=f12*fC42 + f14*fC44 + f13*fC43;
2381 Double_t b42=f24*fC44;
2382 Double_t b30=f02*fC32 + f04*fC43, b31=f12*fC32 + f14*fC43 + f13*fC33;
2383 Double_t b32=f24*fC43;
2386 Double_t a00=f02*b20+f04*b40,a01=f02*b21+f04*b41,a02=f02*b22+f04*b42;
2387 Double_t a11=f12*b21+f14*b41+f13*b31,a12=f12*b22+f14*b42+f13*b32;
2388 Double_t a22=f24*b42;
2391 fC00 += b00 + b00 + a00;
2392 fC10 += b10 + b01 + a01;
2393 fC20 += b20 + b02 + a02;
2396 fC11 += b11 + b11 + a11;
2397 fC21 += b21 + b12 + a12;
2400 fC22 += b22 + b22 + a22;
2407 double dy2dx = (f1+f2)/(r1+r2);
2408 Double_t step = (TMath::Abs(x2r)<0.05) ? dx*TMath::Abs(r2 + f2*dy2dx)
2409 : 2.*TMath::ASin(0.5*dx*TMath::Sqrt(1.+dy2dx*dy2dx)*crv)/crv;
2413 Double_t r[3];
GetXYZ(r);
2422 Double_t bt=TMath::Sqrt(b[0]*b[0] + b[1]*b[1]);
2423 Double_t cosphi=1., sinphi=0.;
2424 if (bt >
kAlmost0) {cosphi=b[0]/bt; sinphi=b[1]/bt;}
2425 Double_t bb=TMath::Sqrt(b[0]*b[0] + b[1]*b[1] + b[2]*b[2]);
2426 Double_t costet=1., sintet=0.;
2427 if (bb >
kAlmost0) {costet=b[2]/bb; sintet=bt/bb;}
2430 vect[0] = costet*cosphi*r[0] + costet*sinphi*r[1] - sintet*r[2];
2431 vect[1] = -sinphi*r[0] + cosphi*r[1];
2432 vect[2] = sintet*cosphi*r[0] + sintet*sinphi*r[1] + costet*r[2];
2434 vect[3] = costet*cosphi*p[0] + costet*sinphi*p[1] - sintet*p[2];
2435 vect[4] = -sinphi*p[0] + cosphi*p[1];
2436 vect[5] = sintet*cosphi*p[0] + sintet*sinphi*p[1] + costet*p[2];
2446 r[0] = cosphi*costet*vect[0] - sinphi*vect[1] + cosphi*sintet*vect[2];
2447 r[1] = sinphi*costet*vect[0] + cosphi*vect[1] + sinphi*sintet*vect[2];
2448 r[2] = -sintet*vect[0] + costet*vect[2];
2450 p[0] = cosphi*costet*vect[3] - sinphi*vect[4] + cosphi*sintet*vect[5];
2451 p[1] = sinphi*costet*vect[3] + cosphi*vect[4] + sinphi*sintet*vect[5];
2452 p[2] = -sintet*vect[3] + costet*vect[5];
2456 Double_t cosalp = TMath::Cos(
fAlpha);
2457 Double_t sinalp =-TMath::Sin(
fAlpha);
2460 t = cosalp*r[0] - sinalp*r[1];
2461 r[1] = sinalp*r[0] + cosalp*r[1];
2464 t = cosalp*p[0] - sinalp*p[1];
2465 p[1] = sinalp*p[0] + cosalp*p[1];
2470 Double_t x=r[0], y=r[1], z=r[2];
2472 if (TMath::Abs(p[0]) <
kAlmost0)
return kFALSE;
2481 t=TMath::Sqrt(p[0]*p[0] + p[1]*p[1]);
2501 if (TMath::Abs(dx)<=
kAlmost0)
return kTRUE;
2502 if (TMath::Abs(
fP[4])<=
kAlmost0)
return kFALSE;
2504 if (TMath::Abs(dx)>1e5 ||
2505 TMath::Abs(
GetY())>1e5 ||
2506 TMath::Abs(
GetZ())>1e5) {
2507 AliWarning(Form(
"Anomalous track, target X:%f",xk));
2512 Double_t crv=
GetC(b[2]);
2515 Double_t x2r = crv*dx;
2516 Double_t f1=
fP[2], f2=f1 + x2r;
2517 if (TMath::Abs(f1) >=
kAlmost1)
return kFALSE;
2518 if (TMath::Abs(f2) >=
kAlmost1)
return kFALSE;
2520 Double_t r1=TMath::Sqrt((1.-f1)*(1.+f1)), r2=TMath::Sqrt((1.-f2)*(1.+f2));
2523 double dy2dx = (f1+f2)/(r1+r2);
2524 Double_t step = (TMath::Abs(x2r)<0.05) ? dx*TMath::Abs(r2 + f2*dy2dx)
2525 : 2.*TMath::ASin(0.5*dx*TMath::Sqrt(1.+dy2dx*dy2dx)*crv)/crv;
2529 Double_t r[3];
GetXYZ(r);
2537 Double_t bt=TMath::Sqrt(b[0]*b[0] + b[1]*b[1]);
2538 Double_t cosphi=1., sinphi=0.;
2539 if (bt >
kAlmost0) {cosphi=b[0]/bt; sinphi=b[1]/bt;}
2540 Double_t bb=TMath::Sqrt(b[0]*b[0] + b[1]*b[1] + b[2]*b[2]);
2541 Double_t costet=1., sintet=0.;
2542 if (bb >
kAlmost0) {costet=b[2]/bb; sintet=bt/bb;}
2545 vect[0] = costet*cosphi*r[0] + costet*sinphi*r[1] - sintet*r[2];
2546 vect[1] = -sinphi*r[0] + cosphi*r[1];
2547 vect[2] = sintet*cosphi*r[0] + sintet*sinphi*r[1] + costet*r[2];
2549 vect[3] = costet*cosphi*p[0] + costet*sinphi*p[1] - sintet*p[2];
2550 vect[4] = -sinphi*p[0] + cosphi*p[1];
2551 vect[5] = sintet*cosphi*p[0] + sintet*sinphi*p[1] + costet*p[2];
2559 r[0] = cosphi*costet*vect[0] - sinphi*vect[1] + cosphi*sintet*vect[2];
2560 r[1] = sinphi*costet*vect[0] + cosphi*vect[1] + sinphi*sintet*vect[2];
2561 r[2] = -sintet*vect[0] + costet*vect[2];
2563 p[0] = cosphi*costet*vect[3] - sinphi*vect[4] + cosphi*sintet*vect[5];
2564 p[1] = sinphi*costet*vect[3] + cosphi*vect[4] + sinphi*sintet*vect[5];
2565 p[2] = -sintet*vect[3] + costet*vect[5];
2568 Double_t cosalp = TMath::Cos(
fAlpha);
2569 Double_t sinalp =-TMath::Sin(
fAlpha);
2572 t = cosalp*r[0] - sinalp*r[1];
2573 r[1] = sinalp*r[0] + cosalp*r[1];
2576 t = cosalp*p[0] - sinalp*p[1];
2577 p[1] = sinalp*p[0] + cosalp*p[1];
2581 Double_t x=r[0], y=r[1], z=r[2];
2583 if (TMath::Abs(p[0]) <
kAlmost0)
return kFALSE;
2592 t=TMath::Sqrt(p[0]*p[0] + p[1]*p[1]);
2612 TVector3 translation;
2614 translation.SetXYZ(vTrasl[0],vTrasl[1],vTrasl[2]);
2615 translation.RotateZ(-
fAlpha);
2616 translation.GetXYZ(vTrasl);
2619 Double_t newX=
fX-vTrasl[0];
2620 Double_t newY=
fP[0]-vTrasl[1];
2621 Double_t newZ=
fP[1]-vTrasl[2];
2624 Double_t newParam[5];
2633 Double_t cosRot=TMath::Cos(
fAlpha), sinRot=TMath::Sin(
fAlpha);
2654 if(uUi.Determinant() <= 0.) {
return kFALSE;}
2655 TMatrixD uUiQi(uUi,TMatrixD::kMult,qQi);
2656 TMatrixD m(qQi,TMatrixD::kTransposeMult,uUiQi);
2659 Double_t sigmaXX=m(0,0);
2660 Double_t sigmaXZ=m(2,0);
2661 Double_t sigmaXY=m(1,0);
2663 Double_t sigmaYZ=
fC[1]+m(1,2);
2664 Double_t sigmaZZ=
fC[2]+m(2,2);
2665 Double_t covarianceYY=sigmaYY + (-1.)*((sigmaXY*sigmaXY)/sigmaXX);
2666 Double_t covarianceYZ=sigmaYZ-(sigmaXZ*sigmaXY/sigmaXX);
2667 Double_t covarianceZZ=sigmaZZ-((sigmaXZ*sigmaXZ)/sigmaXX);
2669 Double_t newCov[15];
2670 newCov[0]=covarianceYY;
2671 newCov[1]=covarianceYZ;
2672 newCov[2]=covarianceZZ;
2673 for(Int_t i=3;i<15;i++){
2690 fC[0] = TMath::Abs(
fC[0]);
2692 double scl = TMath::Sqrt(
kC0max/
fC[0]);
2699 fC[2] = TMath::Abs(
fC[2]);
2701 double scl = TMath::Sqrt(
kC2max/
fC[2]);
2708 fC[5] = TMath::Abs(
fC[5]);
2710 double scl = TMath::Sqrt(
kC5max/
fC[5]);
2717 fC[9] = TMath::Abs(
fC[9]);
2719 double scl = TMath::Sqrt(
kC9max/
fC[9]);
2726 fC[14] = TMath::Abs(
fC[14]);
2728 double scl = TMath::Sqrt(
kC14max/
fC[14]);
2767 Double_t dz[2], cov[3];
2774 Double_t
p[2]= {
fP[0] - dz[0],
fP[1] - dz[1] };
2775 Double_t c[3]= { covar[2], 0., covar[5] };
2798 const Double_t &fy=
fP[0], &sn =
fP[2];
2799 const double kEps = 1.e-6;
2801 double crv =
GetC(bz);
2805 double cs = TMath::Sqrt((1-sn)*(1+sn));
2806 double x0 =
fX - sn*tR;
2807 double y0 = fy + cs*tR;
2808 double r0 = TMath::Sqrt(x0*x0+y0*y0);
2812 tR = TMath::Abs(tR);
2813 double tR2r0=1.,g=0,tmp=0;
2814 if (TMath::Abs(tR-r0)>kEps) {
2816 g = 0.5*(r*r/(r0*tR) - tR2r0 - 1./tR2r0);
2821 g = 0.5*r*r/(r0*tR) - 1;
2822 tmp = 0.5*r*r/(r0*r0);
2824 double det = (1.-g)*(1.+g);
2825 if (det<0)
return kFALSE;
2826 det = TMath::Sqrt(det);
2835 double dfx = tR2r0*TMath::Abs(y0)*det;
2836 double dfy = tR2r0*x0*TMath::Sign(det,y0);
2838 double delta = (x-
fX)*dfx-(y-fy)*dfy;
2839 if (delta<0) x += dfx;
2844 double dfeps =
fX-x;
2845 if (dfeps<-kEps)
return kTRUE;
2846 if (TMath::Abs(dfeps)<kEps &&
2847 TMath::Abs(
fX*
fX+fy*fy - r*r)<kEps)
return fX;
2849 if (x-
fX>0)
return kTRUE;
2850 if (x-
fX<-kEps)
return kFALSE;
2855 double dfeps = x-
fX;
2856 if (dfeps<-kEps)
return kTRUE;
2857 if (TMath::Abs(dfeps)<kEps &&
2858 TMath::Abs(fX*fX+fy*fy - r*r)<kEps)
return fX;
2860 if (x-fX<0)
return kTRUE;
2861 if (x-fX>kEps)
return kFALSE;
2866 if ( (dir>0&&x<
fX) || (dir<0&&x>
fX) )
return kFALSE;
2871 double det = (r-
fX)*(r+
fX);
2872 if (det<0)
return kFALSE;
2874 if (dir==0)
return kTRUE;
2875 det = TMath::Sqrt(det);
2877 if (sn>0) {
if (fy>det)
return kFALSE;}
2878 else {
if (fy<-det)
return kFALSE;}
2881 if (sn>0) {
if (fy<-det)
return kFALSE;}
2882 else if (fy>det)
return kFALSE;
2885 else if (TMath::Abs(sn)<=
kAlmost0) {
2886 double det = (r-fy)*(r+fy);
2887 if (det<0)
return kFALSE;
2888 det = TMath::Sqrt(det);
2890 x =
fX>0 ? det : -det;
2894 if (
fX > det)
return kFALSE;
2895 else if (
fX <-det) x = -det;
2899 if (
fX <-det)
return kFALSE;
2900 else if (
fX > det) x = det;
2905 double cs = TMath::Sqrt((1-sn)*(1+sn));
2906 double xsyc =
fX*sn-fy*cs;
2907 double det = (r-xsyc)*(r+xsyc);
2908 if (det<0)
return kFALSE;
2909 det = TMath::Sqrt(det);
2910 double xcys =
fX*cs+fy*sn;
2912 if (dir==0) t += t>0 ? -det:det;
2914 if (t>=-det) t += -det;
2918 if (t<det) t -= det;
2939 double crv =
GetC(bz);
2941 const double &fy =
fP[0];
2942 const double &fz =
fP[1];
2943 const double &sn =
fP[2];
2944 const double &tgl =
fP[3];
2953 double cs = TMath::Sqrt((1-sn)*(1+sn));
2954 double x0 =
fX - sn*tR;
2955 double y0 = fy + cs*tR;
2956 double phi0 = TMath::ATan2(y0,x0);
2957 if (tR<0) phi0 += TMath::Pi();
2958 if (phi0 > TMath::Pi()) phi0 -= 2.*TMath::Pi();
2959 else if (phi0 <-TMath::Pi()) phi0 += 2.*TMath::Pi();
2960 double cs0 = TMath::Cos(phi0);
2961 double sn0 = TMath::Sin(phi0);
2962 double r0 = x0*cs0 + y0*sn0 - tR;
2963 double r2R = 1.+r0/tR;
2967 if (!xyz && !alpSect)
return kTRUE;
2968 double xr2R = xr/tR;
2969 double r2Ri = 1./r2R;
2971 double cosT = 0.5*(r2R + (1-xr2R*xr2R)*r2Ri);
2977 double t = TMath::ACos(cosT);
2981 xyzi[0] = x0 - tR*TMath::Cos(t+phi0);
2982 xyzi[1] = y0 - tR*TMath::Sin(t+phi0);
2984 double t0 = TMath::ATan2(cs,-sn) - phi0;
2985 double z0 = fz - t0*tR*tgl;
2986 xyzi[2] = z0 + tR*t*tgl;
2999 double &alp = *alpSect;
3001 double phiPos = TMath::Pi()+TMath::ATan2(-xyzi[1],-xyzi[0]);
3002 int sect = ((Int_t)(phiPos*TMath::RadToDeg()))/20;
3003 alp = TMath::DegToRad()*(20*sect+10);
3004 double x2r,f1,f2,r1,r2,dx,dy2dx,yloc=0, ylocMax = xr*TMath::Tan(TMath::Pi()/18);
3007 Double_t ca=TMath::Cos(alp-
fAlpha), sa=TMath::Sin(alp-
fAlpha);
3008 if ((cs*ca+sn*sa)<0) {
3009 AliDebug(1,Form(
"Rotation to target sector impossible: local cos(phi) would become %.2f",cs*ca+sn*sa));
3015 AliDebug(1,Form(
"Rotation to target sector impossible: local sin(phi) would become %.2f",f1));
3019 double tmpX =
fX*ca + fy*sa;
3020 double tmpY = -
fX*sa + fy*ca;
3027 AliDebug(1,Form(
"Propagation in target sector failed ! %.10e",f2));
3030 r1 = TMath::Sqrt((1.-f1)*(1.+f1));
3031 r2 = TMath::Sqrt((1.-f2)*(1.+f2));
3032 dy2dx = (f1+f2)/(r1+r2);
3033 yloc = tmpY + dx*dy2dx;
3034 if (yloc>ylocMax) {alp += 2*TMath::Pi()/18; sect++;}
3035 else if (yloc<-ylocMax) {alp -= 2*TMath::Pi()/18; sect--;}
3037 if (alp >= TMath::Pi()) alp -= 2*TMath::Pi();
3038 else if (alp < -TMath::Pi()) alp += 2*TMath::Pi();
3047 if (TMath::Abs(x2r)<0.05) xyz[2] = fz + dx*(r2 + f2*dy2dx)*tgl;
3054 double chord = dx*TMath::Sqrt(1+dy2dx*dy2dx);
3055 double rot = 2*TMath::ASin(0.5*chord*crv);
3056 xyz[2] = fz + rot/crv*tgl;
3109 return xyz[parType];
3112 if (parType==6)
return TMath::Sqrt(xyz[0]*xyz[0]+xyz[1]*xyz[1]);
3113 if (parType==7)
return TMath::ATan2(xyz[1],xyz[0]);
3118 if (parType==8)
return TMath::ATan2(pxyz[1],pxyz[0]);
3120 Double_t diff = TMath::ATan2(pxyz[1],pxyz[0])-TMath::ATan2(xyz[1],xyz[0]);
3121 if (diff>TMath::Pi()) diff-=TMath::TwoPi();
3122 if (diff<-TMath::Pi()) diff+=TMath::TwoPi();
3125 if (parType>=3&&parType<6) {
3126 return pxyz[parType%3];
3149 if (!vtx)
return kFALSE;
3155 Double_t c[3]={covar[2],0.,covar[5]};
3160 if (!cParam)
return kTRUE;
3163 if (!cParam->
Update(p,c))
return kFALSE;
Double_t GetSigmaZY() const
printf("Chi2/npoints = %f\n", TMath::Sqrt(chi2/npoints))
Bool_t GetPxPyPzAt(Double_t x, Double_t b, Double_t p[3]) const
void GetDZ(Double_t x, Double_t y, Double_t z, Double_t b, Float_t dz[2]) const
Bool_t Propagate(Double_t alpha, Double_t x, Double_t b)
Bool_t Intersect(Double_t pnt[3], Double_t norm[3], Double_t bz) const
Double_t GetSigma1PtSnp() const
void Print(Option_t *option="") const
Double_t GetSigmaZ2() const
Bool_t Rotate(Double_t alpha)
virtual Short_t Charge() const =0
Double_t GetSigmaTglZ() const
Bool_t Update(const Double_t p[2], const Double_t cov[3])
void Set(T x, T alpha, const T param[5], const T covar[15])
Bool_t GetXYZatR(Double_t xr, Double_t bz, Double_t *xyz=0, Double_t *alpSect=0) const
Bool_t GetYAt(Double_t x, Double_t b, Double_t &y) const
Bool_t GetXYZ(Double_t *p) const
static Int_t GetIndex(Int_t i, Int_t j)
virtual void DrawTrack(Float_t magF, Float_t minR, Float_t maxR, Float_t stepR)
virtual void GetCovarianceMatrix(Double_t covmatrix[6]) const =0
static Double_t BetheBlochGeant(Double_t bg, Double_t kp0=2.33, Double_t kp1=0.20, Double_t kp2=3.00, Double_t kp3=173e-9, Double_t kp4=0.49848)
Double_t * GetResiduals(Double_t *p, Double_t *cov, Bool_t updated=kTRUE) const
Bool_t RelateToVVertexBxByBzDCA(const AliVVertex *vtx, Double_t b[3], Double_t maxd, AliExternalTrackParam *cParam=NULL, Double_t dz[2]=NULL, Double_t dzcov[3]=NULL)
static Double_t BetheBlochSolid(Double_t bg)
Double_t OneOverPt() const
static Bool_t GetUseLogTermMS()
virtual Double_t Y() const
Double_t GetAlpha() const
Double_t GetSigmaSnpY() const
Bool_t Local2GlobalMomentum(Double_t p[3], Double_t alpha) const
Bool_t PropagateToDCABxByBz(const AliVVertex *vtx, Double_t b[3], Double_t maxd, Double_t dz[2]=0, Double_t cov[3]=0)
virtual Double_t GetZ() const =0
Bool_t GetCovarianceXYZPxPyPz(Double_t cv[21]) const
Bool_t RotateParamOnly(Double_t alpha)
virtual Double_t GetTgl() const
Bool_t PropagateParamOnlyTo(Double_t xk, Double_t b)
Double_t PropagateToDCA(AliExternalTrackParam *p, Double_t b)
const Double_t * GetParameter() const
Double_t GetLinearD(Double_t xv, Double_t yv) const
void GetHelixParameters(Double_t h[6], Double_t b) const
virtual Bool_t GetCovarianceXYZPxPyPz(Double_t cv[21]) const =0
static Double_t BetheBlochGas(Double_t bg)
virtual Double_t Px() const =0
#define AliWarning(message)
Double_t GetSigmaTglSnp() const
static void g3helx3(Double_t qfield, Double_t step, Double_t vect[7])
void CopyFromVTrack(const AliVTrack *vTrack)
Bool_t CorrectForMeanMaterialZA(Double_t xOverX0, Double_t xTimesRho, Double_t mass, Double_t zOverA=0.49848, Double_t density=2.33, Double_t exEnergy=173e-9, Double_t jp1=0.20, Double_t jp2=3.00, Bool_t anglecorr=kFALSE)
virtual Double_t GetX() const =0
Bool_t GetXatLabR(Double_t r, Double_t &x, Double_t bz, Int_t dir=0) const
Double_t GetSigned1Pt() const
virtual Double_t E() const
virtual Double_t Pz() const =0
Double_t GetSigmaY2() const
Double_t GetSigma1PtY() const
Bool_t ConstrainToVertex(const AliVVertex *vtx, Double_t b[3])
Double_t GetSigma1Pt2() const
Double_t GetSigmaTglY() const
virtual Bool_t GetXYZ(Double_t *p) const =0
virtual Bool_t Translate(Double_t *vTrasl, Double_t *covV)
const Double_t * GetCovariance() const
Bool_t PropagateBxByBz(Double_t alpha, Double_t x, Double_t b[3])
Bool_t GetPxPyPz(Double_t *p) const
const Double_t kAlmost0Field
Double_t GetSigma1PtZ() const
Double_t GetSigma1PtTgl() const
Bool_t PropagateParamOnlyBxByBzTo(Double_t xk, const Double_t b[3])
virtual Double_t M() const
Bool_t GetZAt(Double_t x, Double_t b, Double_t &z) const
Bool_t CorrectForMaterial(Double_t d, Double_t x0, Double_t mass, Double_t(*f)(Double_t)=AliExternalTrackParam::BetheBlochSolid)
#define AliDebug(logLevel, message)
Bool_t GetDistance(AliExternalTrackParam *param2, Double_t x, Double_t dist[3], Double_t b)
Bool_t CorrectForMeanMaterial(Double_t xOverX0, Double_t xTimesRho, Double_t mass, Bool_t anglecorr=kFALSE, Double_t(*f)(Double_t)=AliExternalTrackParam::BetheBlochSolid)
AliExternalTrackParam & operator=(const AliExternalTrackParam &trkPar)
Double_t GetPredictedChi2(const Double_t p[2], const Double_t cov[3]) const
Double_t GetSigmaTgl2() const
Double_t GetParameterAtRadius(Double_t r, Double_t bz, Int_t parType) const
virtual Double_t GetC(Double_t b) const
const Double_t kMostProbablePt
void AddCovariance(const Double_t cov[15])
Bool_t PropagateToBxByBz(Double_t x, const Double_t b[3])
#define AliError(message)
virtual void FillPolymarker(TPolyMarker3D *pol, Float_t magf, Float_t minR, Float_t maxR, Float_t stepR)
Double_t GetSigmaSnp2() const
Bool_t Local2GlobalPosition(Double_t r[3], Double_t alpha) const
Double_t GetDCA(const AliExternalTrackParam *p, Double_t b, Double_t &xthis, Double_t &xp) const
Double_t GetSnpAt(Double_t x, Double_t b) const
Bool_t PropagateTo(Double_t p[3], Double_t covyz[3], Double_t covxyz[3], Double_t b)
Bool_t CorrectForMeanMaterialdEdx(Double_t xOverX0, Double_t xTimesRho, Double_t mass, Double_t dEdx, Bool_t anglecorr=kFALSE)
for(Int_t itree=0;itree< arrInputTreesDistortionCalib->GetEntriesFast();++itree)
virtual Double_t GetY() const =0
static void Evaluate(const Double_t *h, Double_t t, Double_t r[3], Double_t g[3], Double_t gg[3])
Double_t GetSigmaSnpZ() const
void GetDirection(Double_t d[3]) const
static Double_t BetheBlochAleph(Double_t bg, Double_t kp1=0.76176e-1, Double_t kp2=10.632, Double_t kp3=0.13279e-4, Double_t kp4=1.8631, Double_t kp5=1.9479)
virtual Double_t Py() const =0
AliVTrack & operator=(const AliVTrack &vTrack)
Double_t GetD(Double_t xv, Double_t yv, Double_t b) const
Bool_t GetXYZAt(Double_t x, Double_t b, Double_t r[3]) const
Bool_t GetYZAt(Double_t x, Double_t b, Double_t *yz) const