5 #ifndef ACTSTRK_CURVILINEARCOVARIANCEHELPER_H
6 #define ACTSTRK_CURVILINEARCOVARIANCEHELPER_H
8 #include "Acts/Geometry/GeometryContext.hpp"
9 #include "Acts/EventData/TrackParameters.hpp"
10 #include "Acts/Propagator/detail/JacobianEngine.hpp"
17 return std::hypot(1.,hypothesis.mass() / hypothesis.extractMomentum(qop));
29 const Acts::Vector3 &bfield,
32 Acts::FreeToPathMatrix path_length_deriv;
33 static_assert(path_length_deriv.cols() == 8);
34 path_length_deriv.segment<3>(Acts::eFreePos0) = direction;
35 path_length_deriv(0,Acts::eFreeTime) =
computeDtDs(particle_hypothesis,qop);
36 path_length_deriv.segment<3>(Acts::eFreeDir0) = (qop * direction.cross(bfield)).transpose();
37 path_length_deriv(0,Acts::eFreeQOverP) = 0.;
38 return path_length_deriv;
62 const Acts::BoundTrackParameters ¶m,
63 const Acts::Vector3 &magnFieldVect,
66 if (param.covariance().has_value()) {
67 Acts::FreeVector freeParams = Acts::transformBoundToFreeParameters(
68 param.referenceSurface(), tgContext, param.parameters());
69 Acts::Vector3 position = freeParams.segment<3>(Acts::eFreePos0);
70 Acts::Vector3 direction = freeParams.segment<3>(Acts::eFreeDir0);
71 Acts::BoundMatrix b2c;
72 Acts::detail::boundToCurvilinearTransportJacobian(direction,
73 param.referenceSurface().boundToFreeJacobian(tgContext, position, direction),
74 Acts::FreeMatrix::Identity(),
76 param.parameters()[Acts::eBoundQOverP],
81 return b2c * param.covariance().value() * b2c.transpose();