Skip to content

Commit

Permalink
Merge pull request #34103 from slava77/patch-94
Browse files Browse the repository at this point in the history
improve precision in jacobianCurvilinearToCartesian
  • Loading branch information
cmsbuild committed Jun 15, 2021
2 parents c362a61 + 17b12fe commit 3cfe754
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions DataFormats/GeometryVector/src/TrackingJacobians.cc
Expand Up @@ -36,10 +36,8 @@ AlgebraicMatrix65 jacobianCurvilinearToCartesian(const GlobalVector& momentum, i
R(5, 5) = 1.;

double p = pvec.mag(), p2 = p * p;
double lambda = 0.5 * M_PI - pvec.theta();
double phi = pvec.phi();
double sinlambda = sin(lambda), coslambda = cos(lambda);
double sinphi = sin(phi), cosphi = cos(phi);
double sinlambda = pvec.z() / p, coslambda = pt / p;
double sinphi = pvec.y() / pt, cosphi = pvec.x() / pt;

theJacobian(1, 3) = 1.;
theJacobian(2, 4) = 1.;
Expand Down

0 comments on commit 3cfe754

Please sign in to comment.