Analysis Software
Documentation for sPHENIX simulation software
|
Allows easy instantiation of a Geant4Handle object. More...
#include <acts/blob/sPHENIX/Examples/Algorithms/Geant4/include/ActsExamples/Geant4/Geant4Manager.hpp>
Public Member Functions | |
std::shared_ptr< Geant4Handle > | currentHandle () const |
std::shared_ptr< Geant4Handle > | createHandle (int logLevel, const std::string &physicsList) |
This can only be called once due to Geant4 limitations. | |
std::shared_ptr< Geant4Handle > | createHandle (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 Geant4Manager & | instance () |
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< Geant4Handle > | m_handle |
std::unordered_map < std::string, std::shared_ptr < PhysicsListFactory > > | m_physicsListFactories |
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
|
private |
Definition at line 136 of file Geant4Manager.cpp.
View newest version in sPHENIX GitHub at line 136 of file Geant4Manager.cpp
References registerPhysicsListFactory().
|
privatedefault |
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().
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().
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().
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.
|
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().
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().
|
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().
|
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().
|
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().
|
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().