diff --git a/Core/include/Acts/TrackFitting/GaussianSumFitter.hpp b/Core/include/Acts/TrackFitting/GaussianSumFitter.hpp index 4efcd82e4c4..5ab9b688a79 100644 --- a/Core/include/Acts/TrackFitting/GaussianSumFitter.hpp +++ b/Core/include/Acts/TrackFitting/GaussianSumFitter.hpp @@ -150,7 +150,7 @@ struct GaussianSumFitter { static_assert(std::is_same_v); // Initialize the forward propagation with the DirectNavigator - auto fwdPropInitializer = [this](const auto& opts) { + auto fwdPropInitializer = [&](const auto& opts) { using Actors = ActorList; using PropagatorOptions = typename propagator_t::template Options; @@ -159,6 +159,11 @@ struct GaussianSumFitter { propOptions.setPlainOptions(opts.propagatorPlainOptions); + for (auto it = begin; it != end; ++it) { + propOptions.navigation.insertExternalSurface( + options.extensions.surfaceAccessor(SourceLink{*it})->geometryId()); + } + propOptions.actorList.template get() .m_cfg.bethe_heitler_approx = &m_betheHeitlerApproximation; @@ -166,7 +171,7 @@ struct GaussianSumFitter { }; // Initialize the backward propagation with the DirectNavigator - auto bwdPropInitializer = [this](const auto& opts) { + auto bwdPropInitializer = [&](const auto& opts) { using Actors = ActorList; using PropagatorOptions = typename propagator_t::template Options; @@ -174,6 +179,11 @@ struct GaussianSumFitter { propOptions.setPlainOptions(opts.propagatorPlainOptions); + for (auto it = begin; it != end; ++it) { + propOptions.navigation.insertExternalSurface( + options.extensions.surfaceAccessor(SourceLink{*it})->geometryId()); + } + propOptions.actorList.template get() .m_cfg.bethe_heitler_approx = &m_betheHeitlerApproximation;