}
//Energy losses************************
- if (x0!=0.) {
+ if (x0!=0. && beta2<1) {
d*=x0;
Double_t dE=0.153e-3/beta2*(log(5940*beta2/(1-beta2)) - beta2)*d;
if (beta2/(1-beta2)>3.5*3.5)
// Propagate this track to the plane X=xk (cm) in the field "b" (kG)
//----------------------------------------------------------------
Double_t dx=xk-fX;
- if (TMath::Abs(dx)<=0) return kTRUE;
+ if (TMath::Abs(dx)<=kAlmost0) return kTRUE;
Double_t crv=kB2C*b*fP[4];
if (TMath::Abs(b) < kAlmost0Field) crv=0.;
// p[2] = pz
// Results for (nearly) straight tracks are meaningless !
//----------------------------------------------------------------
- if (TMath::Abs(p[0])<=0) return kFALSE;
+ if (TMath::Abs(p[0])<=kAlmost0) return kFALSE;
if (TMath::Abs(p[1])> kAlmost1) return kFALSE;
Double_t pt=1./TMath::Abs(p[0]);
//
// Results for (nearly) straight tracks are meaningless !
//---------------------------------------------------------------------
- if (TMath::Abs(fP[4])<=0) {
+ if (TMath::Abs(fP[4])<=kAlmost0) {
for (Int_t i=0; i<21; i++) cv[i]=0.;
return kFALSE;
}
// the radial position "x" (cm) in the magnetic field "b" (kG)
//---------------------------------------------------------------------
Double_t dx=x-fX;
+ if(TMath::Abs(dx)<=kAlmost0) return GetXYZ(r);
+
Double_t f1=fP[2], f2=f1 + dx*fP[4]*b*kB2C;
+ if (TMath::Abs(f1) >= kAlmost1) return kFALSE;
if (TMath::Abs(f2) >= kAlmost1) return kFALSE;
Double_t r1=TMath::Sqrt(1.- f1*f1), r2=TMath::Sqrt(1.- f2*f2);
Double_t dir = (xpos<xToGo) ? 1.:-1.;
//
while ( (xToGo-xpos)*dir > kEpsilon){
- if (TMath::Abs(fP[2]) >= kAlmost1) { return kFALSE;}
+ if (TMath::Abs(fP[2]) >= kAlmost1) return kFALSE;
Double_t step = dir*TMath::Min(TMath::Abs(xToGo-xpos), maxStep);
Double_t x = xpos+step;
Double_t xyz0[3],xyz1[3],param[7];
if (!CorrectForMaterial(d,x0,mass)) return kFALSE;
if (rotateTo){
+ if (TMath::Abs(fP[2]) >= kAlmost1) return kFALSE;
GetXYZ(xyz0); // global position
Double_t alphan = TMath::ATan2(xyz0[1], xyz0[0]);
if (!Rotate(alphan)) return kFALSE;