Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ActsExamples::Geant4Manager Class Reference

Allows easy instantiation of a Geant4Handle object. More...

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

+ Collaboration diagram for ActsExamples::Geant4Manager:

Public Member Functions

std::shared_ptr< Geant4HandlecurrentHandle () const
 
std::shared_ptr< Geant4HandlecreateHandle (int logLevel, const std::string &physicsList)
 This can only be called once due to Geant4 limitations.
 
std::shared_ptr< Geant4HandlecreateHandle (int logLevel, std::unique_ptr< G4VUserPhysicsList > physicsList, std::string physicsListName)
 This can only be called once due to Geant4 limitations.
 
void registerPhysicsListFactory (std::string name, std::shared_ptr< PhysicsListFactory > physicsListFactory)
 
std::unique_ptr
< G4VUserPhysicsList > 
createPhysicsList (const std::string &name) const
 
const std::unordered_map
< std::string, std::shared_ptr
< PhysicsListFactory > > & 
getPhysicsListFactories () const
 Get the current list of physics list factories.
 

Static Public Member Functions

static Geant4Managerinstance ()
 
static void tweakLogging (G4RunManager &runManager, int level)
 Set logging consistently across common Geant4 modules.
 

Private Member Functions

 Geant4Manager ()
 
 ~Geant4Manager ()
 

Private Attributes

bool m_created = false
 
std::weak_ptr< Geant4Handlem_handle
 
std::unordered_map
< std::string, std::shared_ptr
< PhysicsListFactory > > 
m_physicsListFactories
 

Detailed Description

Allows easy instantiation of a Geant4Handle object.

Definition at line 59 of file Geant4Manager.hpp.

View newest version in sPHENIX GitHub at line 59 of file Geant4Manager.hpp

Constructor & Destructor Documentation

ActsExamples::Geant4Manager::Geant4Manager ( )
private

Definition at line 136 of file Geant4Manager.cpp.

View newest version in sPHENIX GitHub at line 136 of file Geant4Manager.cpp

References registerPhysicsListFactory().

+ Here is the call graph for this function:

ActsExamples::Geant4Manager::~Geant4Manager ( )
privatedefault

Member Function Documentation

std::shared_ptr< Geant4Handle > ActsExamples::Geant4Manager::createHandle ( int  logLevel,
const std::string &  physicsList 
)

This can only be called once due to Geant4 limitations.

Definition at line 84 of file Geant4Manager.cpp.

View newest version in sPHENIX GitHub at line 84 of file Geant4Manager.cpp

References createPhysicsList().

Referenced by ActsExamples::Geant4MaterialRecording::Geant4MaterialRecording(), and ActsExamples::Geant4Simulation::Geant4Simulation().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

std::shared_ptr< Geant4Handle > ActsExamples::Geant4Manager::createHandle ( int  logLevel,
std::unique_ptr< G4VUserPhysicsList >  physicsList,
std::string  physicsListName 
)

This can only be called once due to Geant4 limitations.

Definition at line 89 of file Geant4Manager.cpp.

View newest version in sPHENIX GitHub at line 89 of file Geant4Manager.cpp

References telescope_simulation::logLevel, m_created, m_handle, and testing::internal::move().

+ Here is the call graph for this function:

std::unique_ptr< G4VUserPhysicsList > ActsExamples::Geant4Manager::createPhysicsList ( const std::string &  name) const

Definition at line 122 of file Geant4Manager.cpp.

View newest version in sPHENIX GitHub at line 122 of file Geant4Manager.cpp

References it, and m_physicsListFactories.

Referenced by createHandle().

+ Here is the caller graph for this function:

std::shared_ptr< Geant4Handle > ActsExamples::Geant4Manager::currentHandle ( ) const

Definition at line 80 of file Geant4Manager.cpp.

View newest version in sPHENIX GitHub at line 80 of file Geant4Manager.cpp

References m_handle.

const std::unordered_map< std::string, std::shared_ptr< PhysicsListFactory > > & ActsExamples::Geant4Manager::getPhysicsListFactories ( ) const

Get the current list of physics list factories.

Definition at line 132 of file Geant4Manager.cpp.

View newest version in sPHENIX GitHub at line 132 of file Geant4Manager.cpp

References m_physicsListFactories.

Geant4Manager & ActsExamples::Geant4Manager::instance ( )
static

Definition at line 60 of file Geant4Manager.cpp.

View newest version in sPHENIX GitHub at line 60 of file Geant4Manager.cpp

Referenced by ActsExamples::Geant4MaterialRecording::Geant4MaterialRecording(), and ActsExamples::Geant4Simulation::Geant4Simulation().

+ Here is the caller graph for this function:

void ActsExamples::Geant4Manager::registerPhysicsListFactory ( std::string  name,
std::shared_ptr< PhysicsListFactory physicsListFactory 
)

Registers a named physics list factory to the manager for easy instantiation when needed.

Definition at line 113 of file Geant4Manager.cpp.

View newest version in sPHENIX GitHub at line 113 of file Geant4Manager.cpp

References m_physicsListFactories, and testing::internal::move().

Referenced by Geant4Manager().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ActsExamples::Geant4Manager::tweakLogging ( G4RunManager &  runManager,
int  level 
)
static

Set logging consistently across common Geant4 modules.

Definition at line 65 of file Geant4Manager.cpp.

View newest version in sPHENIX GitHub at line 65 of file Geant4Manager.cpp

Referenced by ActsExamples::Geant4Handle::tweakLogging().

+ Here is the caller graph for this function:

Member Data Documentation

bool ActsExamples::Geant4Manager::m_created = false
private

Definition at line 92 of file Geant4Manager.hpp.

View newest version in sPHENIX GitHub at line 92 of file Geant4Manager.hpp

Referenced by createHandle().

std::weak_ptr<Geant4Handle> ActsExamples::Geant4Manager::m_handle
private

Definition at line 93 of file Geant4Manager.hpp.

View newest version in sPHENIX GitHub at line 93 of file Geant4Manager.hpp

Referenced by createHandle(), and currentHandle().

std::unordered_map<std::string, std::shared_ptr<PhysicsListFactory> > ActsExamples::Geant4Manager::m_physicsListFactories
private

Definition at line 95 of file Geant4Manager.hpp.

View newest version in sPHENIX GitHub at line 95 of file Geant4Manager.hpp

Referenced by createPhysicsList(), getPhysicsListFactories(), and registerPhysicsListFactory().


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