Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::Geant4Simulation Exception Referencefinal

Algorithm to run Geant4 simulation in the ActsExamples framework. More...

#include <acts/blob/sPHENIX/Examples/Algorithms/Geant4/include/ActsExamples/Geant4/Geant4Simulation.hpp>

+ Inheritance diagram for ActsExamples::Geant4Simulation:
+ Collaboration diagram for ActsExamples::Geant4Simulation:

Classes

struct  Config
 

Public Member Functions

 Geant4Simulation (const Config &cfg, Acts::Logging::Level level=Acts::Logging::INFO)
 
 ~Geant4Simulation () override
 
ActsExamples::ProcessCode execute (const ActsExamples::AlgorithmContext &ctx) const final
 
const Configconfig () const final
 Readonly access to the configuration.
 
- Public Member Functions inherited from ActsExamples::Geant4SimulationBase
 Geant4SimulationBase (const Config &cfg, std::string name, Acts::Logging::Level level)
 
 ~Geant4SimulationBase () override
 
ProcessCode initialize () final
 Initialize the algorithm.
 
std::shared_ptr< Geant4Handlegeant4Handle () const
 
- Public Member Functions inherited from ActsExamples::IAlgorithm
 IAlgorithm (std::string name, Acts::Logging::Level level=Acts::Logging::INFO)
 
std::string name () const override
 The algorithm name.
 
ProcessCode internalExecute (const AlgorithmContext &context) final
 
ProcessCode initialize () override
 Initialize the algorithm.
 
ProcessCode finalize () override
 Finalize the algorithm.
 

Private Attributes

Config m_cfg
 
std::unique_ptr< G4MagneticField > m_magneticField
 The (wrapped) ACTS Magnetic field provider as a Geant4 module.
 
std::unique_ptr< G4FieldManager > m_fieldManager
 
WriteDataHandle
< SimParticleContainer
m_outputParticlesInitial
 
WriteDataHandle
< SimParticleContainer
m_outputParticlesFinal
 
WriteDataHandle< SimHitContainerm_outputSimHits {this, "OutputSimHIts"}
 

Additional Inherited Members

- Protected Member Functions inherited from ActsExamples::Geant4SimulationBase
void commonInitialization ()
 
G4RunManager & runManager () const
 
EventStoreeventStore () const
 
- Protected Attributes inherited from ActsExamples::Geant4SimulationBase
std::unique_ptr< const
Acts::Logger
m_logger
 
std::shared_ptr< EventStorem_eventStore
 
int m_geant4Level {}
 
std::shared_ptr< Geant4Handlem_geant4Instance
 
G4VUserDetectorConstruction * m_detectorConstruction {}
 
ReadDataHandle
< SimParticleContainer
m_inputParticles {this, "InputParticles"}
 

Detailed Description

Algorithm to run Geant4 simulation in the ActsExamples framework.

Definition at line 112 of file Geant4Simulation.hpp.

View newest version in sPHENIX GitHub at line 112 of file Geant4Simulation.hpp

Constructor & Destructor Documentation

ActsExamples::Geant4Simulation::Geant4Simulation ( const Config cfg,
Acts::Logging::Level  level = Acts::Logging::INFO 
)

Simulation constructor

Parameters
configis the configuration struct
levelis the logging level to be used

Definition at line 174 of file Geant4Simulation.cpp.

View newest version in sPHENIX GitHub at line 174 of file Geant4Simulation.cpp

References ActsExamples::SteppingActionList::Config::actions, ACTS_INFO, ActsExamples::SensitiveSteppingAction::Config::charged, ActsExamples::Geant4SimulationBase::commonInitialization(), ActsExamples::Geant4Manager::createHandle(), ActsExamples::SensitiveSteppingAction::Config::eventStore, ActsExamples::ParticleTrackingAction::Config::eventStore, ActsExamples::SimParticleTranslation::Config::eventStore, ActsExamples::Geant4SimulationBase::Config::geant4Handle, ActsExamples::WriteDataHandle< T >::initialize(), ActsExamples::ReadDataHandle< T >::initialize(), ActsExamples::Geant4SimulationBase::Config::inputParticles, ActsExamples::Geant4Manager::instance(), ActsExamples::ParticleTrackingAction::Config::keepParticlesWithoutHits, m_cfg, ActsExamples::Geant4SimulationBase::m_detectorConstruction, ActsExamples::Geant4SimulationBase::m_eventStore, m_fieldManager, ActsExamples::Geant4SimulationBase::m_geant4Instance, ActsExamples::Geant4SimulationBase::m_geant4Level, ActsExamples::Geant4SimulationBase::m_inputParticles, ActsExamples::Geant4SimulationBase::m_logger, m_magneticField, m_outputParticlesFinal, m_outputParticlesInitial, m_outputSimHits, ActsExamples::MagneticFieldWrapper::Config::magneticField, ActsExamples::SensitiveSurfaceMapper::Config::materialMappings, ActsExamples::ParticleKillAction::Config::maxTime, ActsExamples::SensitiveSteppingAction::Config::neutral, ActsExamples::Geant4Simulation::Config::physicsList, ActsExamples::SensitiveSteppingAction::Config::primary, ActsExamples::SensitiveSurfaceMapper::remapSensitiveNames(), ActsExamples::Geant4SimulationBase::runManager(), ActsExamples::ParticleKillAction::Config::secondaries, ActsExamples::SensitiveSteppingAction::Config::secondary, ActsExamples::SensitiveSurfaceMapper::Config::trackingGeometry, ActsExamples::ParticleKillAction::Config::volume, and ActsExamples::SensitiveSurfaceMapper::Config::volumeMappings.

+ Here is the call graph for this function:

ActsExamples::Geant4Simulation::~Geant4Simulation ( )
overridedefault

Member Function Documentation

const Config& ActsExamples::Geant4Simulation::config ( ) const
inlinefinalvirtual

Readonly access to the configuration.

Implements ActsExamples::Geant4SimulationBase.

Definition at line 162 of file Geant4Simulation.hpp.

View newest version in sPHENIX GitHub at line 162 of file Geant4Simulation.hpp

References m_cfg.

ActsExamples::ProcessCode ActsExamples::Geant4Simulation::execute ( const ActsExamples::AlgorithmContext ctx) const
finalvirtual

Algorithm execute method, called once per event with context

Parameters
ctxthe AlgorithmContext for this event

Reimplemented from ActsExamples::Geant4SimulationBase.

Definition at line 299 of file Geant4Simulation.cpp.

View newest version in sPHENIX GitHub at line 299 of file Geant4Simulation.cpp

References container, ActsExamples::Geant4SimulationBase::execute(), testing::internal::move(), and SUCCESS.

+ Here is the call graph for this function:

Member Data Documentation

Config ActsExamples::Geant4Simulation::m_cfg
private

Definition at line 165 of file Geant4Simulation.hpp.

View newest version in sPHENIX GitHub at line 165 of file Geant4Simulation.hpp

Referenced by config(), and Geant4Simulation().

std::unique_ptr<G4FieldManager> ActsExamples::Geant4Simulation::m_fieldManager
private

Definition at line 169 of file Geant4Simulation.hpp.

View newest version in sPHENIX GitHub at line 169 of file Geant4Simulation.hpp

Referenced by Geant4Simulation().

std::unique_ptr<G4MagneticField> ActsExamples::Geant4Simulation::m_magneticField
private

The (wrapped) ACTS Magnetic field provider as a Geant4 module.

Definition at line 168 of file Geant4Simulation.hpp.

View newest version in sPHENIX GitHub at line 168 of file Geant4Simulation.hpp

Referenced by Geant4Simulation().

WriteDataHandle<SimParticleContainer> ActsExamples::Geant4Simulation::m_outputParticlesFinal
private
Initial value:
{
this, "OutputParticlesFinal"}

Definition at line 173 of file Geant4Simulation.hpp.

View newest version in sPHENIX GitHub at line 173 of file Geant4Simulation.hpp

Referenced by Geant4Simulation().

WriteDataHandle<SimParticleContainer> ActsExamples::Geant4Simulation::m_outputParticlesInitial
private
Initial value:
{
this, "OutputParticlesInitial"}

Definition at line 171 of file Geant4Simulation.hpp.

View newest version in sPHENIX GitHub at line 171 of file Geant4Simulation.hpp

Referenced by Geant4Simulation().

WriteDataHandle<SimHitContainer> ActsExamples::Geant4Simulation::m_outputSimHits {this, "OutputSimHIts"}
private

Definition at line 175 of file Geant4Simulation.hpp.

View newest version in sPHENIX GitHub at line 175 of file Geant4Simulation.hpp

Referenced by Geant4Simulation().


The documentation for this exception was generated from the following files: