25 template <
typename simulator_t>
65 const auto& inputParticles =
68 SimParticleContainer::sequence_type particlesInitialUnordered;
69 SimParticleContainer::sequence_type particlesFinalUnordered;
70 SimHitContainer::sequence_type hitsUnordered;
72 constexpr
auto meanHitsPerParticle = 16
u;
73 particlesInitialUnordered.reserve(inputParticles.size());
74 particlesFinalUnordered.reserve(inputParticles.size());
75 hitsUnordered.reserve(meanHitsPerParticle * inputParticles.size());
80 ctx.geoContext, ctx.magFieldContext, rng, inputParticles,
81 particlesInitialUnordered, particlesFinalUnordered, hitsUnordered);
84 ACTS_FATAL(
"event " << ctx.eventNumber <<
" simulation failed with error "
86 return ProcessCode::ABORT;
91 for (
const auto& failed : ret.value()) {
92 ACTS_ERROR(
"event " << ctx.eventNumber <<
" particle " << failed.particle
93 <<
" failed to simulate with error " << failed.error
94 <<
": " << failed.error.message());
100 ACTS_DEBUG(inputParticles.size() <<
" input particles");
102 <<
" simulated particles (initial state)");
104 <<
" simulated particles (final state)");
111 particlesInitial.adopt_sequence(std::move(particlesInitialUnordered));
112 particlesFinal.adopt_sequence(std::move(particlesFinalUnordered));
113 hits.adopt_sequence(std::move(hitsUnordered));
117 std::move(particlesInitial));