Template Struct Simulation¶
Defined in File Simulation.hpp
Struct Documentation¶
-
template<typename
charged_selector_t
, typenamecharged_simulator_t
, typenameneutral_selector_t
, typenameneutral_simulator_t
>
structActsFatras
::
Simulation
¶ Multi-particle/event simulation.
The selector types for charged and neutral particles
do not need to check for the particle charge. This is done automatically by the simulator to ensure consistency.- Template Parameters
charged_selector_t
: Callable selector type for charged particlescharged_simulator_t
: Single particle simulator for charged particlesneutral_selector_t
: Callable selector type for neutral particlesneutral_simulator_t
: Single particle simulator for neutral particles
Public Functions
-
Simulation
(charged_simulator_t &&charged_, neutral_simulator_t &&neutral_)¶ Construct from the single charged/neutral particle simulators.
-
template<typename
generator_t
, typenameinput_particles_t
, typenameoutput_particles_t
, typenamehits_t
>
Acts::Result<std::vector<FailedParticle>>simulate
(const Acts::GeometryContext &geoCtx, const Acts::MagneticFieldContext &magCtx, generator_t &generator, const input_particles_t &inputParticles, output_particles_t &simulatedParticlesInitial, output_particles_t &simulatedParticlesFinal, hits_t &hits) const¶ Simulate multiple particles and generated secondaries.
This takes all input particles and simulates those passing the selection using the appropriate simulator. All selected particle states including additional ones generated from interactions are stored in separate output containers; both the initial state at the production vertex and the final state after propagation are stored. Hits generated from selected input and generated particles are stored in the hit container.
- Warning
Particle-hit association is based on particle ids generated during the simulation. This requires that all input particles must have generation and sub-particle number set to zero.
- Note
Parameter edge-cases can lead to errors in the underlying propagator and thus to particles that fail to simulate. Here, full events are simulated and the failure to simulate one particle should not be considered a general failure of the simulator. Instead, a list of particles that fail to simulate is provided to the user. It is the users responsibility to handle them.
- Note
Failed particles are removed from the regular output, i.e. they do not appear in the simulated particles containers nor do they generate hits.
- Parameters
geoCtx
: is the geometry context to access surface geometriesmagCtx
: is the magnetic field context to access field valuesinputParticles
: contains all particles that should be simulatedsimulatedParticlesInitial
: contains initial particle statessimulatedParticlesFinal
: contains final particle stateshits
: contains all generated hits
- Return Value
Acts::Result::Error
: if there is a fundamental issueActs::Result::Success
: with all particles that failed to simulate
- Template Parameters
generator_t
: is the type of the random number generatorinput_particles_t
: is a Container for particlesoutput_particles_t
: is a SequenceContainer for particleshits_t
: is a SequenceContainer for hits
Public Members
-
charged_simulator_t
charged
¶
-
neutral_simulator_t
neutral
¶
-
charged_selector_t
selectCharged
¶
-
neutral_selector_t
selectNeutral
¶