20 namespace ActsExamples {
25 template <
typename simulator_t>
52 m_cfg(std::move(cfg)) {
67 const auto& inputParticles =
70 SimParticleContainer::sequence_type particlesInitialUnordered;
71 SimParticleContainer::sequence_type particlesFinalUnordered;
72 SimHitContainer::sequence_type hitsUnordered;
74 constexpr
auto meanHitsPerParticle = 16
u;
75 particlesInitialUnordered.reserve(inputParticles.size());
76 particlesFinalUnordered.reserve(inputParticles.size());
77 hitsUnordered.reserve(meanHitsPerParticle * inputParticles.size());
82 ctx.geoContext, ctx.magFieldContext, rng, inputParticles,
83 particlesInitialUnordered, particlesFinalUnordered, hitsUnordered);
86 ACTS_FATAL(
"event " << ctx.eventNumber <<
" simulation failed with error "
88 return ProcessCode::ABORT;
93 for (
const auto& failed : ret.value()) {
94 ACTS_ERROR(
"event " << ctx.eventNumber <<
" particle " << failed.particle
95 <<
" failed to simulate with error " << failed.error
96 <<
": " << failed.error.message());
102 ACTS_DEBUG(inputParticles.size() <<
" input particles");
104 <<
" simulated particles (initial state)");
106 <<
" simulated particles (final state)");
113 particlesInitial.adopt_sequence(std::move(particlesInitialUnordered));
114 particlesFinal.adopt_sequence(std::move(particlesFinalUnordered));
115 hits.adopt_sequence(std::move(hitsUnordered));
119 std::move(particlesInitial));