Skip to content

Commit a6b3d6a

Browse files
authored
fix: GSF handles another case of empty components correctly (acts-project#1970)
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.
1 parent 6ba881e commit a6b3d6a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Core/include/Acts/TrackFitting/detail/GsfActor.hpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,6 +296,15 @@ struct GsfActor {
296296
std::vector<ComponentCache> componentCache;
297297
convoluteComponents(state, stepper, tmpStates, componentCache);
298298

299+
if (componentCache.empty()) {
300+
ACTS_WARNING(
301+
"No components left after applying energy loss. "
302+
"Is the weight cutoff "
303+
<< m_cfg.weightCutoff << " too high?");
304+
ACTS_WARNING("Return to propagator without applying energy loss");
305+
return;
306+
}
307+
299308
reduceComponents(stepper, surface, componentCache);
300309

301310
removeLowWeightComponents(componentCache);

0 commit comments

Comments
 (0)