ATLAS Offline Software
Loading...
Searching...
No Matches
ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t > Struct Template Reference

Single particle simulation with fixed propagator, interactions, and decay. More...

#include <ActsFatrasSimTool.h>

Collaboration diagram for ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >:

Public Member Functions

 SingleParticleSimulation (propagator_t &&propagator_, std::shared_ptr< const Acts::Logger > localLogger_)
 Alternatively construct the simulator with an external logger.
const Acts::Logger & logger () const
 Provide access to the local logger instance, e.g. for logging macros.
template<typename generator_t>
Acts::Result< ActsFatras::SimulationResult > simulate (const Acts::GeometryContext &geoCtx, const Acts::MagneticFieldContext &magCtx, generator_t &generator, const ActsFatras::Particle &particle) const
 Simulate a single particle without secondaries.

Public Attributes

propagator_t propagator
 How and within which geometry to propagate the particle.
decay_t decay
 Decay module.
interactions_t interactions
 Interaction list containing the simulated interactions.
hit_surface_selector_t selectHitSurface
 Selector for surfaces that should generate hits.
double maxStepSize = 3.0
 parameters for propagator options
double maxStep = 1000
double maxRungeKuttaStepTrials = 10000
double pathLimit = 100.0
bool loopProtection = true
double loopFraction = 0.5
double targetTolerance = 0.0001
double stepSizeCutOff = 0.
double meanEnergyLoss = true
bool includeGgradient = true
double momentumCutOff = 0.
std::shared_ptr< const Acts::Logger > localLogger = nullptr
 Local logger for debug output.

Detailed Description

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
struct ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >

Single particle simulation with fixed propagator, interactions, and decay.

Template Parameters
generator_trandom number generator
interactions_tinteraction list
hit_surface_selector_tselector for hit surfaces
decay_tdecay module

Definition at line 90 of file ActsFatrasSimTool.h.

Constructor & Destructor Documentation

◆ SingleParticleSimulation()

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::SingleParticleSimulation ( propagator_t && propagator_,
std::shared_ptr< const Acts::Logger > localLogger_ )
inline

Alternatively construct the simulator with an external logger.

Definition at line 117 of file ActsFatrasSimTool.h.

Single particle simulation with fixed propagator, interactions, and decay.
propagator_t propagator
How and within which geometry to propagate the particle.
std::shared_ptr< const Acts::Logger > localLogger
Local logger for debug output.

Member Function Documentation

◆ logger()

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
const Acts::Logger & ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::logger ( ) const
inline

Provide access to the local logger instance, e.g. for logging macros.

Definition at line 122 of file ActsFatrasSimTool.h.

122{ return *localLogger; }

◆ simulate()

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
template<typename generator_t>
Acts::Result< ActsFatras::SimulationResult > ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::simulate ( const Acts::GeometryContext & geoCtx,
const Acts::MagneticFieldContext & magCtx,
generator_t & generator,
const ActsFatras::Particle & particle ) const
inline

Simulate a single particle without secondaries.

Template Parameters
generator_tis the type of the random number generator
Parameters
geoCtxis the geometry context to access surface geometries
magCtxis the magnetic field context to access field values
generatoris the random number generator
particleis the initial particle state
Returns
Simulated particle state, hits, and generated particles.

Definition at line 134 of file ActsFatrasSimTool.h.

137 {
138 assert(localLogger and "Missing local logger");
139 ACTS_VERBOSE("Using ActsFatrasSimTool simulate()");
140 // propagator-related additional types
143 using Result = typename SimulationActor::result_type;
146
147 // Construct per-call options.
149 // setup the interactor as part of the propagator options
150 auto &actor = options.actorList.template get<SimulationActor>();
151 actor.generator = &generator;
152 actor.decay = decay;
155 actor.initialParticle = particle;
156 // use AnyCharge to be able to handle neutral and charged parameters
158 particle.fourPosition(), particle.direction(),
159 particle.qOverP(), std::nullopt, particle.hypothesis());
162 options.maxSteps = maxStep;
164
165 auto result = propagator.propagate(startPoint, options);
166 if (not result.ok()) {
167 return result.error();
168 }
169 return result.value().template get<Result>();
170 }
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:130
hit_surface_selector_t selectHitSurface
Selector for surfaces that should generate hits.
interactions_t interactions
Interaction list containing the simulated interactions.
double maxStepSize
parameters for propagator options

Member Data Documentation

◆ decay

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
decay_t ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::decay

Decay module.

Definition at line 94 of file ActsFatrasSimTool.h.

◆ includeGgradient

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
bool ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::includeGgradient = true

Definition at line 110 of file ActsFatrasSimTool.h.

◆ interactions

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
interactions_t ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::interactions

Interaction list containing the simulated interactions.

Definition at line 96 of file ActsFatrasSimTool.h.

◆ localLogger

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
std::shared_ptr<const Acts::Logger> ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::localLogger = nullptr

Local logger for debug output.

Definition at line 114 of file ActsFatrasSimTool.h.

◆ loopFraction

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
double ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::loopFraction = 0.5

Definition at line 105 of file ActsFatrasSimTool.h.

◆ loopProtection

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
bool ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::loopProtection = true

Definition at line 104 of file ActsFatrasSimTool.h.

◆ maxRungeKuttaStepTrials

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
double ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::maxRungeKuttaStepTrials = 10000

Definition at line 102 of file ActsFatrasSimTool.h.

◆ maxStep

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
double ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::maxStep = 1000

Definition at line 101 of file ActsFatrasSimTool.h.

◆ maxStepSize

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
double ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::maxStepSize = 3.0

parameters for propagator options

Definition at line 100 of file ActsFatrasSimTool.h.

◆ meanEnergyLoss

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
double ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::meanEnergyLoss = true

Definition at line 109 of file ActsFatrasSimTool.h.

◆ momentumCutOff

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
double ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::momentumCutOff = 0.

Definition at line 111 of file ActsFatrasSimTool.h.

◆ pathLimit

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
double ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::pathLimit = 100.0

Definition at line 103 of file ActsFatrasSimTool.h.

◆ propagator

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
propagator_t ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::propagator

How and within which geometry to propagate the particle.

Definition at line 92 of file ActsFatrasSimTool.h.

◆ selectHitSurface

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
hit_surface_selector_t ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::selectHitSurface

Selector for surfaces that should generate hits.

Definition at line 98 of file ActsFatrasSimTool.h.

◆ stepSizeCutOff

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
double ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::stepSizeCutOff = 0.

Definition at line 107 of file ActsFatrasSimTool.h.

◆ targetTolerance

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
double ISF::ActsFatrasSimTool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::targetTolerance = 0.0001

Definition at line 106 of file ActsFatrasSimTool.h.


The documentation for this struct was generated from the following file: