Skip to content

Commit

Permalink
fix: GSF handles another case of empty components correctly (#1970)
Browse files Browse the repository at this point in the history
If the weight cutoff is very high, it could happen that components are empty after applying the energy loss, and an assertion triggers. This fixes this and prints out a warning.
  • Loading branch information
benjaminhuth committed Mar 21, 2023
1 parent 6ba881e commit a6b3d6a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Core/include/Acts/TrackFitting/detail/GsfActor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,15 @@ struct GsfActor {
std::vector<ComponentCache> componentCache;
convoluteComponents(state, stepper, tmpStates, componentCache);

if (componentCache.empty()) {
ACTS_WARNING(
"No components left after applying energy loss. "
"Is the weight cutoff "
<< m_cfg.weightCutoff << " too high?");
ACTS_WARNING("Return to propagator without applying energy loss");
return;
}

reduceComponents(stepper, surface, componentCache);

removeLowWeightComponents(componentCache);
Expand Down

0 comments on commit a6b3d6a

Please sign in to comment.