Skip to content

Commit

Permalink
Merge branch 'main' into ckf-targetlimit-after-reset
Browse files Browse the repository at this point in the history
  • Loading branch information
andiwand authored Dec 16, 2024
2 parents 1d91992 + f2dec17 commit 7938bd9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 36 deletions.
31 changes: 14 additions & 17 deletions CI/codespell_ignore.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
aline
ans
boxs
bu
strack
compres
coner
dependees
dthe
iself
sortings
exprot
gaus
te
parm
writet
localy
iself
lastr
exprot
localy
millepede
parm
pixelx
pring
aline
boxs
ans
dthe
dthe
sortings
strack
te
vart
pixelx
millepede
dependees
writet
19 changes: 2 additions & 17 deletions Core/include/Acts/TrackFitting/GaussianSumFitter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,6 @@ struct GaussianSumFitter {
/// The actor type
using GsfActor = detail::GsfActor<bethe_heitler_approx_t, traj_t>;

/// This allows to break the propagation by setting the navigationBreak
/// TODO refactor once we can do this more elegantly
struct NavigationBreakAborter {
NavigationBreakAborter() = default;

template <typename propagator_state_t, typename stepper_t,
typename navigator_t>
bool checkAbort(propagator_state_t& state, const stepper_t& /*stepper*/,
const navigator_t& navigator,
const Logger& /*logger*/) const {
return navigator.navigationBreak(state.navigation);
}
};

/// @brief The fit function for the Direct navigator
template <typename source_link_it_t, typename start_parameters_t,
TrackContainerFrontend track_container_t>
Expand All @@ -105,7 +91,7 @@ struct GaussianSumFitter {

// Initialize the forward propagation with the DirectNavigator
auto fwdPropInitializer = [&sSequence, this](const auto& opts) {
using Actors = ActorList<GsfActor, NavigationBreakAborter>;
using Actors = ActorList<GsfActor>;
using PropagatorOptions = typename propagator_t::template Options<Actors>;

PropagatorOptions propOptions(opts.geoContext, opts.magFieldContext);
Expand Down Expand Up @@ -151,8 +137,7 @@ struct GaussianSumFitter {

// Initialize the forward propagation with the DirectNavigator
auto fwdPropInitializer = [this](const auto& opts) {
using Actors =
ActorList<GsfActor, EndOfWorldReached, NavigationBreakAborter>;
using Actors = ActorList<GsfActor, EndOfWorldReached>;
using PropagatorOptions = typename propagator_t::template Options<Actors>;

PropagatorOptions propOptions(opts.geoContext, opts.magFieldContext);
Expand Down
11 changes: 9 additions & 2 deletions Core/include/Acts/TrackFitting/detail/GsfActor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -317,13 +317,20 @@ struct GsfActor {
applyMultipleScattering(state, stepper, navigator,
MaterialUpdateStage::PostUpdate);
}
}

// Break the navigation if we found all measurements
template <typename propagator_state_t, typename stepper_t,
typename navigator_t>
bool checkAbort(propagator_state_t& /*state*/, const stepper_t& /*stepper*/,
const navigator_t& /*navigator*/, const result_type& result,
const Logger& /*logger*/) const {
if (m_cfg.numberMeasurements &&
result.measurementStates == m_cfg.numberMeasurements) {
ACTS_VERBOSE("Stop navigation because all measurements are found");
navigator.navigationBreak(state.navigation, true);
return true;
}

return false;
}

template <typename propagator_state_t, typename stepper_t,
Expand Down

0 comments on commit 7938bd9

Please sign in to comment.