![Logo](../../ATLAS-Logo-Square-Blue-RGB.png) |
ATLAS Offline Software
|
Go to the documentation of this file.
5 #ifndef ISF_ACTSTOOLS_ACTSFATRASSIMTOOL_H
6 #define ISF_ACTSTOOLS_ACTSFATRASSIMTOOL_H
9 #include "GaudiKernel/ServiceHandle.h"
10 #include "GaudiKernel/ToolHandle.h"
23 #include "Acts/Utilities/UnitVectors.hpp"
25 #include "Acts/Geometry/GeometryContext.hpp"
26 #include "Acts/MagneticField/MagneticFieldContext.hpp"
27 #include "Acts/EventData/GenericCurvilinearTrackParameters.hpp"
28 #include "Acts/Propagator/Navigator.hpp"
29 #include "Acts/Propagator/EigenStepper.hpp"
30 #include "Acts/Propagator/StraightLineStepper.hpp"
31 #include "Acts/Propagator/detail/SteppingLogger.hpp"
32 #include "Acts/Propagator/ActionList.hpp"
33 #include "Acts/Propagator/Propagator.hpp"
34 #include "Acts/Definitions/ParticleData.hpp"
35 #include "ActsFatras/EventData/ProcessType.hpp"
36 #include "ActsFatras/Kernel/InteractionList.hpp"
37 #include "ActsFatras/Kernel/Simulation.hpp"
38 #include "ActsFatras/Kernel/SimulationResult.hpp"
39 #include "ActsFatras/Physics/Decay/NoDecay.hpp"
40 #include "ActsFatras/Physics/StandardInteractions.hpp"
41 #include "ActsFatras/Selectors/SurfaceSelectors.hpp"
57 class IParticleHelper;
72 bool isSensitive = surface.associatedDetectorElement();
83 template <
typename propagator_t,
typename interactions_t,
84 typename hit_surface_selector_t,
typename decay_t>
113 std::shared_ptr<const Acts::Logger> localLogger_)
128 template <
typename generator_t>
129 Acts::Result<ActsFatras::SimulationResult>
simulate(
130 const Acts::GeometryContext &geoCtx,
131 const Acts::MagneticFieldContext &magCtx, generator_t &
generator,
134 ACTS_VERBOSE(
"Using ActsFatrasSimTool simulate()");
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>;
145 PropagatorOptions
options(geoCtx, magCtx);
147 auto &actor =
options.actionList.template get<Actor>();
154 Acts::GenericCurvilinearTrackParameters startPoint(
166 return result.value().template get<Result>();
176 Acts::DefaultExtension,
177 Acts::DenseEnvironmentExtension
190 ActsFatras::StandardChargedElectroMagneticInteractions;
193 ActsFatras::NoDecay>;
199 ActsFatras::NoDecay>;
206 const IInterface*
parent);
218 return StatusCode::SUCCESS; };
220 return StatusCode::SUCCESS; };
225 const EventContext&)
const;
231 if (!thandle.empty() && thandle.retrieve().isFailure()) {
233 return StatusCode::FAILURE;
235 return StatusCode::SUCCESS;
242 "RandomEngineName",
"Name of random number stream"};
246 this,
"TrackingGeometryTool",
"ActsTrackingGeometryTool"};
253 std::shared_ptr<const Acts::Logger>
m_logger{
nullptr};
257 this,
"ParticleFilter",
"",
"Particle filter kinematic cuts, etc."};
260 "Min pT of the interactions (MeV)"};
263 Gaudi::Property<bool>
m_meanEnergyLoss{
this,
"MeanEnergyLoss",
true,
"Toggle between mean and mode evaluation of energy loss"};
264 Gaudi::Property<bool>
m_includeGgradient{
this,
"IncludeGgradient",
true,
"Boolean flag for inclusion of d(dEds)d(q/p) into energy loss"};
265 Gaudi::Property<double>
m_momentumCutOff{
this,
"MomentumCutOff", 0.,
"Cut-off value for the momentum in SI units"};
267 Gaudi::Property<double>
m_maxStep{
this,
"MaxSteps", 1000,
268 "Max number of steps"};
270 "Maximum number of Runge-Kutta steps for the stepper step call"};
272 "Max step size (converted to Acts::UnitConstants::m)"};
274 "Track path limit (converted to Acts::UnitConstants::cm)"};
276 "Loop protection, it adapts the pathLimit"};
278 "Allowed loop fraction, 1 is a full loop"};
280 "Tolerance for the error of the integration"};
282 "Cut-off value for the step size"};
285 {{0,0}, {1,201}, {2,14}, {3,3}, {4,121}},
"proessType map <ActsFatras,G4>"};
std::list< ISF::ISFParticle * > ISFParticleContainer
generic ISFParticle container (not necessarily a std::list!)
std::shared_ptr< const Acts::Logger > localLogger
Local logger for debug output.
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
const Acts::Logger & logger() const
Provide access to the local logger instance, e.g. for logging macros.
interactions_t interactions
Interaction list containing the simulated interactions.
SingleParticleSimulation(propagator_t &&propagator_, std::shared_ptr< const Acts::Logger > localLogger_)
Alternatively construct the simulator with an external logger.
Particle_v1 Particle
Define the latest version of the particle class.
propagator_t propagator
How and within which geometry to propagate the particle.
double maxRungeKuttaStepTrials
::StatusCode StatusCode
StatusCode definition for legacy code.
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.
std::vector< ISF::ISFParticle * > ISFParticleVector
ISFParticle vector.
Single particle simulation with fixed propagator, interactions, and decay.
This defines the McEventCollection, which is really just an ObjectVector of McEvent objects.
A wrapper class for event-slot-local random engines.
hit_surface_selector_t selectHitSurface
Selector for surfaces that should generate hits.
generator
Configure Herwig7 These are the commands corresponding to what would go into the regular Herwig infil...
decay_t decay
Decay module.
double maxStepSize
parameters for propagator options
Define macros for attributes used to control the static checker.
int SimulationFlavor
Identifier type for simulation flavor.
This class provides an interface to generate or decode an identifier for the upper levels of the dete...