Skip to content

Commit

Permalink
fix: Robust perigee propagation in HelicalTrackLinearizer (acts-pro…
Browse files Browse the repository at this point in the history
…ject#2930)

This fixes another case where the overstepping tolerance bites us from behind. Perigee surfaces are prone to the issue of bad path length estimation so we need a special treatment.

discovered in acts-project#2917
  • Loading branch information
andiwand authored and asalzburger committed May 21, 2024
1 parent 66d6d19 commit bf4f665
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 5 deletions.
Binary file modified CI/physmon/reference/performance_ivf_orthogonal_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_seeded_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_truth_estimated_hist.root
Binary file not shown.
Binary file modified CI/physmon/reference/performance_ivf_truth_smeared_hist.root
Binary file not shown.
29 changes: 24 additions & 5 deletions Core/include/Acts/Propagator/Propagator.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

#include "Acts/EventData/TrackParametersConcept.hpp"
#include "Acts/Propagator/ActionList.hpp"
#include "Acts/Propagator/ConstrainedStep.hpp"
#include "Acts/Propagator/PropagatorError.hpp"
#include "Acts/Propagator/StandardAborters.hpp"
#include "Acts/Propagator/detail/LoopProtection.hpp"

#include <type_traits>
Expand Down Expand Up @@ -327,13 +329,30 @@ Acts::Result<Acts::BoundTrackParameters>
Acts::detail::BasePropagatorHelper<derived_t>::propagateToSurface(
const BoundTrackParameters& start, const Surface& target,
const Options& options) const {
auto res = static_cast<const derived_t*>(this)
->template propagate<BoundTrackParameters, PropagatorOptions<>,
SurfaceReached, PathLimitReached>(
start, target, options);
using ResultType = Result<typename derived_t::template action_list_t_result_t<
BoundTrackParameters, ActionList<>>>;

// dummy initialization
ResultType res = ResultType::failure(PropagatorError::Failure);

// Due to the geometry of the perigee surface the overstepping tolerance
// is sometimes not met.
if (target.type() == Surface::SurfaceType::Perigee) {
res = static_cast<const derived_t*>(this)
->template propagate<BoundTrackParameters, PropagatorOptions<>,
ForcedSurfaceReached, PathLimitReached>(
start, target, options);
} else {
res = static_cast<const derived_t*>(this)
->template propagate<BoundTrackParameters, PropagatorOptions<>,
SurfaceReached, PathLimitReached>(
start, target, options);
}

if (res.ok()) {
// @TODO: Return optional?
// Without errors we can expect a valid endParameters when propagating to a
// target surface
assert((*res).endParameters);
return std::move((*res).endParameters.value());
} else {
return res.error();
Expand Down
8 changes: 8 additions & 0 deletions Core/include/Acts/Propagator/StandardAborters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ struct SurfaceReached {
}
};

/// Similar to SurfaceReached, but with an infinite overstep limit.
///
/// This can be used to force the propagation to the target surface.
struct ForcedSurfaceReached : SurfaceReached {
ForcedSurfaceReached()
: SurfaceReached(std::numeric_limits<double>::lowest()) {}
};

/// This is the condition that the end of World has been reached
/// it then triggers an propagation abort
struct EndOfWorldReached {
Expand Down

0 comments on commit bf4f665

Please sign in to comment.