Skip to content

Commit

Permalink
feat: Wire tolerance to bound parameter factory (#2563)
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand authored Oct 25, 2023
1 parent a07ffcd commit be4433c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Core/include/Acts/EventData/GenericBoundTrackParameters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#pragma once

#include "Acts/Definitions/Tolerance.hpp"
#include "Acts/EventData/detail/PrintParameters.hpp"
#include "Acts/EventData/detail/TransformationFreeToBound.hpp"
#include "Acts/Surfaces/Surface.hpp"
Expand Down Expand Up @@ -82,16 +83,19 @@ class GenericBoundTrackParameters {
/// @param qOverP Charge over momentum
/// @param cov Bound parameters covariance matrix
/// @param particleHypothesis Particle hypothesis
/// @param tolerance Tolerance used for globalToLocal
///
/// @note The returned result indicates whether the free parameters could
/// successfully be converted to on-surface parameters.
static Result<GenericBoundTrackParameters> create(
std::shared_ptr<const Surface> surface, const GeometryContext& geoCtx,
const Vector4& pos4, const Vector3& dir, Scalar qOverP,
std::optional<CovarianceMatrix> cov,
ParticleHypothesis particleHypothesis) {
ParticleHypothesis particleHypothesis,
ActsScalar tolerance = s_onSurfaceTolerance) {
Result<BoundVector> bound = detail::transformFreeToBoundParameters(
pos4.segment<3>(ePos0), pos4[eTime], dir, qOverP, *surface, geoCtx);
pos4.segment<3>(ePos0), pos4[eTime], dir, qOverP, *surface, geoCtx,
tolerance);

if (!bound.ok()) {
return bound.error();
Expand Down

0 comments on commit be4433c

Please sign in to comment.