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

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

120 { 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 132 of file ActsFatrasSimTool.h.

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

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 92 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 108 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 94 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 112 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 103 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 102 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 100 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 99 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 98 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 107 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 109 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 101 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 90 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 96 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 105 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 104 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:112
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:94
taskman.template
dictionary template
Definition: taskman.py:317
ISF::ActsFatrasSimTool::SingleParticleSimulation::propagator
propagator_t propagator
How and within which geometry to propagate the particle.
Definition: ActsFatrasSimTool.h:90
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:102
Result
Definition: fbtTestBasics.cxx:49
ISF::ActsFatrasSimTool::SingleParticleSimulation::pathLimit
double pathLimit
Definition: ActsFatrasSimTool.h:101
ISF::ActsFatrasSimTool::SingleParticleSimulation::selectHitSurface
hit_surface_selector_t selectHitSurface
Selector for surfaces that should generate hits.
Definition: ActsFatrasSimTool.h:96
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:92
ISF::ActsFatrasSimTool::SingleParticleSimulation::maxStepSize
double maxStepSize
parameters for propagator options
Definition: ActsFatrasSimTool.h:98
ISF::ActsFatrasSimTool::SingleParticleSimulation::maxStep
double maxStep
Definition: ActsFatrasSimTool.h:99