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