ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
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. More...
 
const Acts::Logger & logger () const
 Provide access to the local logger instance, e.g. for logging macros. More...
 
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. More...
 

Public Attributes

propagator_t propagator
 How and within which geometry to propagate the particle. More...
 
decay_t decay
 Decay module. More...
 
interactions_t interactions
 Interaction list containing the simulated interactions. More...
 
hit_surface_selector_t selectHitSurface
 Selector for surfaces that should generate hits. More...
 
double maxStepSize = 3.0
 parameters for propagator options More...
 
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. More...
 

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 85 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 112 of file ActsFatrasSimTool.h.

114  : propagator(propagator_), localLogger(localLogger_) {}

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 117 of file ActsFatrasSimTool.h.

117 { 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 129 of file ActsFatrasSimTool.h.

132  {
133  assert(localLogger and "Missing local logger");
134  ACTS_VERBOSE("Using ActsFatrasSimTool simulate()");
135  // propagator-related additional types
136  using SteppingLogger = Acts::detail::SteppingLogger;
137  using Actor = ActsFatras::detail::SimulationActor<generator_t, decay_t, interactions_t, hit_surface_selector_t>;
138  using Aborter = typename Actor::ParticleNotAlive;
139  using Result = typename Actor::result_type;
140  using Actions = Acts::ActionList<SteppingLogger, Actor>;
141  using Abort = Acts::AbortList<Aborter, Acts::EndOfWorldReached>;
142  using PropagatorOptions = Acts::DenseStepperPropagatorOptions<Actions, Abort>;
143 
144  // Construct per-call options.
145  PropagatorOptions options(geoCtx, magCtx);
146  // setup the interactor as part of the propagator options
147  auto &actor = options.actionList.template get<Actor>();
148  actor.generator = &generator;
149  actor.decay = decay;
150  actor.interactions = interactions;
151  actor.selectHitSurface = selectHitSurface;
152  actor.initialParticle = particle;
153  // use AnyCharge to be able to handle neutral and charged parameters
154  Acts::GenericCurvilinearTrackParameters startPoint(
155  particle.fourPosition(), particle.direction(),
156  particle.qOverP(), std::nullopt, particle.hypothesis());
158  options.loopProtection = loopProtection;
160  options.maxSteps = maxStep;
161 
162  auto result = propagator.propagate(startPoint, options);
163  if (not result.ok()) {
164  return result.error();
165  }
166  return result.value().template get<Result>();
167  }

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 89 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 105 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 91 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 109 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 100 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 99 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 97 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 96 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 95 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 104 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 106 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 98 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 87 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 93 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 102 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 101 of file ActsFatrasSimTool.h.


The documentation for this struct was generated from the following file:
ISF::ActsFatrasSimTool::SingleParticleSimulation::localLogger
std::shared_ptr< const Acts::Logger > localLogger
Local logger for debug output.
Definition: ActsFatrasSimTool.h:109
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
get_generator_info.result
result
Definition: get_generator_info.py:21
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
ISF::ActsFatrasSimTool::SingleParticleSimulation::interactions
interactions_t interactions
Interaction list containing the simulated interactions.
Definition: ActsFatrasSimTool.h:91
ISF::ActsFatrasSimTool::SingleParticleSimulation::propagator
propagator_t propagator
How and within which geometry to propagate the particle.
Definition: ActsFatrasSimTool.h:87
cm
const double cm
Definition: Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimParametrization/tools/FCAL_ChannelMap.cxx:25
python.AtlRunQueryLib.options
options
Definition: AtlRunQueryLib.py:379
ISF::ActsFatrasSimTool::SingleParticleSimulation::loopProtection
bool loopProtection
Definition: ActsFatrasSimTool.h:99
Result
Definition: fbtTestBasics.cxx:47
ISF::ActsFatrasSimTool::SingleParticleSimulation::pathLimit
double pathLimit
Definition: ActsFatrasSimTool.h:98
ISF::ActsFatrasSimTool::SingleParticleSimulation::selectHitSurface
hit_surface_selector_t selectHitSurface
Selector for surfaces that should generate hits.
Definition: ActsFatrasSimTool.h:93
mc.generator
generator
Configure Herwig7 These are the commands corresponding to what would go into the regular Herwig infil...
Definition: mc.MGH7_FxFx_H71-DEFAULT_test.py:18
ISF::ActsFatrasSimTool::SingleParticleSimulation::decay
decay_t decay
Decay module.
Definition: ActsFatrasSimTool.h:89
ISF::ActsFatrasSimTool::SingleParticleSimulation::maxStepSize
double maxStepSize
parameters for propagator options
Definition: ActsFatrasSimTool.h:95
ISF::ActsFatrasSimTool::SingleParticleSimulation::maxStep
double maxStep
Definition: ActsFatrasSimTool.h:96