|
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"
25 #include "Acts/Utilities/UnitVectors.hpp"
27 #include "Acts/Geometry/GeometryContext.hpp"
28 #include "Acts/MagneticField/MagneticFieldContext.hpp"
29 #include "Acts/EventData/GenericCurvilinearTrackParameters.hpp"
30 #include "Acts/Propagator/Navigator.hpp"
31 #include "Acts/Propagator/EigenStepper.hpp"
32 #include "Acts/Propagator/EigenStepperDefaultExtension.hpp"
33 #include "Acts/Propagator/StraightLineStepper.hpp"
34 #include "Acts/Propagator/detail/SteppingLogger.hpp"
35 #include "Acts/Propagator/ActorList.hpp"
36 #include "Acts/Propagator/Propagator.hpp"
37 #include "Acts/Definitions/ParticleData.hpp"
38 #include "ActsFatras/EventData/ProcessType.hpp"
39 #include "ActsFatras/Kernel/InteractionList.hpp"
40 #include "ActsFatras/Kernel/Simulation.hpp"
41 #include "ActsFatras/Kernel/SimulationResult.hpp"
42 #include "ActsFatras/Physics/Decay/NoDecay.hpp"
43 #include "ActsFatras/Physics/StandardInteractions.hpp"
44 #include "ActsFatras/Selectors/SurfaceSelectors.hpp"
60 class IParticleHelper;
75 bool isSensitive = surface.associatedDetectorElement();
86 template <
typename propagator_t,
typename interactions_t,
87 typename hit_surface_selector_t,
typename decay_t>
116 std::shared_ptr<const Acts::Logger> localLogger_)
131 template <
typename generator_t>
132 Acts::Result<ActsFatras::SimulationResult>
simulate(
133 const Acts::GeometryContext &geoCtx,
134 const Acts::MagneticFieldContext &magCtx, generator_t &
generator,
137 ACTS_VERBOSE(
"Using ActsFatrasSimTool simulate()");
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>;
146 PropagatorOptions
options(geoCtx, magCtx);
148 auto &actor =
options.actorList.template get<SimulationActor>();
155 Acts::GenericCurvilinearTrackParameters startPoint(
167 return result.value().template get<Result>();
187 ActsFatras::StandardChargedElectroMagneticInteractions;
190 ActsFatras::NoDecay>;
196 ActsFatras::NoDecay>;
203 const IInterface*
parent);
211 const EventContext& ctx,
216 return StatusCode::SUCCESS; };
218 return StatusCode::SUCCESS; };
223 const EventContext&)
const;
229 if (!thandle.empty() && thandle.retrieve().isFailure()) {
231 return StatusCode::FAILURE;
233 return StatusCode::SUCCESS;
240 "RandomEngineName",
"Name of random number stream"};
244 this,
"TrackingGeometryTool",
"ActsTrackingGeometryTool"};
251 std::shared_ptr<const Acts::Logger>
m_logger{
nullptr};
255 this,
"ParticleFilter",
"",
"Particle filter kinematic cuts, etc."};
261 this,
"ActsFatrasWriteHandler",
"ActsFatrasWriteHandler"};
264 "Min pT of the interactions (MeV)"};
267 Gaudi::Property<bool>
m_meanEnergyLoss{
this,
"MeanEnergyLoss",
true,
"Toggle between mean and mode evaluation of energy loss"};
268 Gaudi::Property<bool>
m_includeGgradient{
this,
"IncludeGgradient",
true,
"Boolean flag for inclusion of d(dEds)d(q/p) into energy loss"};
269 Gaudi::Property<double>
m_momentumCutOff{
this,
"MomentumCutOff", 0.,
"Cut-off value for the momentum in SI units"};
271 Gaudi::Property<double>
m_maxStep{
this,
"MaxSteps", 1000,
272 "Max number of steps"};
274 "Maximum number of Runge-Kutta steps for the stepper step call"};
276 "Max step size (converted to Acts::UnitConstants::m)"};
278 "Track path limit (converted to Acts::UnitConstants::cm)"};
280 "Loop protection, it adapts the pathLimit"};
282 "Allowed loop fraction, 1 is a full loop"};
284 "Tolerance for the error of the integration"};
286 "Cut-off value for the step size"};
289 {{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.
Acts::Navigator Navigator
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...