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

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

Collaboration diagram for ActsFatrasG4Tool::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::SingleParticleSimulationResult > 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 ActsFatrasG4Tool::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 131 of file ActsFatrasG4Tool.h.

Constructor & Destructor Documentation

◆ SingleParticleSimulation()

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
ActsFatrasG4Tool::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 158 of file ActsFatrasG4Tool.h.

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

Member Function Documentation

◆ logger()

template<typename propagator_t, typename interactions_t, typename hit_surface_selector_t, typename decay_t>
const Acts::Logger & ActsFatrasG4Tool::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 162 of file ActsFatrasG4Tool.h.

162{ 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::SingleParticleSimulationResult > ActsFatrasG4Tool::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 174 of file ActsFatrasG4Tool.h.

177 {
178 assert(localLogger and "Missing local logger");
179 ACTS_VERBOSE("Using ActsFatrasSimTool simulate()");
180 // propagator-related additional types
183 using Result = typename SimulationActor::result_type;
186
187 // Construct per-call options.
189 // setup the interactor as part of the propagator options
190 auto &actor = options.actorList.template get<SimulationActor>();
191 actor.generator = &generator;
192 actor.decay = decay;
195 actor.initialParticle = particle;
196 // use AnyCharge to be able to handle neutral and charged parameters
198 particle.direction(),
199 particle.qOverP(), std::nullopt,
200 particle.hypothesis()
201 );
204 options.maxSteps = maxStep;
206 auto result = propagator.propagate(startPoint, options);
207 if (not result.ok()) {return result.error();}
208 return result.value().template get<Result>();
209 }
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition hcg.cxx:132
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 ActsFatrasG4Tool::SingleParticleSimulation< propagator_t, interactions_t, hit_surface_selector_t, decay_t >::decay

Decay module.

Definition at line 135 of file ActsFatrasG4Tool.h.

◆ includeGgradient

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

Definition at line 151 of file ActsFatrasG4Tool.h.

◆ interactions

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

Interaction list containing the simulated interactions.

Definition at line 137 of file ActsFatrasG4Tool.h.

◆ localLogger

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

Local logger for debug output.

Definition at line 155 of file ActsFatrasG4Tool.h.

◆ loopFraction

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

Definition at line 146 of file ActsFatrasG4Tool.h.

◆ loopProtection

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

Definition at line 145 of file ActsFatrasG4Tool.h.

◆ maxRungeKuttaStepTrials

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

Definition at line 143 of file ActsFatrasG4Tool.h.

◆ maxStep

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

Definition at line 142 of file ActsFatrasG4Tool.h.

◆ maxStepSize

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

parameters for propagator options

Definition at line 141 of file ActsFatrasG4Tool.h.

◆ meanEnergyLoss

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

Definition at line 150 of file ActsFatrasG4Tool.h.

◆ momentumCutOff

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

Definition at line 152 of file ActsFatrasG4Tool.h.

◆ pathLimit

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

Definition at line 144 of file ActsFatrasG4Tool.h.

◆ propagator

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

How and within which geometry to propagate the particle.

Definition at line 133 of file ActsFatrasG4Tool.h.

◆ selectHitSurface

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

Selector for surfaces that should generate hits.

Definition at line 139 of file ActsFatrasG4Tool.h.

◆ stepSizeCutOff

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

Definition at line 148 of file ActsFatrasG4Tool.h.

◆ targetTolerance

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

Definition at line 147 of file ActsFatrasG4Tool.h.


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