k4SimGeant4
|
Main Geant simulation service. More...
#include <SimG4Components/src/SimG4Svc.h>
Public Member Functions | |
SimG4Svc (const std::string &aName, ISvcLocator *aSL) | |
Standard constructor. | |
virtual | ~SimG4Svc () |
Standard destructor. | |
virtual StatusCode | initialize () final |
Initialize the Geant simulation service. | |
virtual StatusCode | finalize () final |
Finalize the Geant simulation service. | |
StatusCode | processEvent (G4Event &aEvent) |
Simulate the event with Geant. | |
StatusCode | retrieveEvent (G4Event *&aEvent) |
Retrieve the processed event. | |
StatusCode | terminateEvent () |
Terminate the event simulation. | |
Private Attributes | |
SmartIF< IToolSvc > | m_toolSvc |
Pointer to the tool service. | |
SmartIF< IRndmGenSvc > | m_randSvc |
Pointer to the random numbers service. | |
ToolHandle< ISimG4DetectorConstruction > | m_detectorTool {"SimG4DD4hepDetector", this, true} |
Handle for the detector construction tool. | |
ToolHandle< ISimG4PhysicsList > | m_physicsListTool {"SimG4FtfpBert", this, true} |
Handle for the Geant physics list tool. | |
ToolHandle< ISimG4ActionTool > | m_actionsTool {"SimG4FullSimActions", this, true} |
Handle for the user action initialization. | |
ToolHandle< ISimG4MagneticFieldTool > | m_magneticFieldTool {"SimG4ConstantMagneticFieldTool", this, true} |
Handle for the magnetic field initialization. | |
Gaudi::Property< std::vector< std::string > > | m_g4PreInitCommands |
Geant4 commands to be executed before user initialization. | |
Gaudi::Property< std::vector< std::string > > | m_g4PostInitCommands |
Geant4 commands to be executed after user initialization. | |
std::vector< ISimG4RegionTool * > | m_regionTools |
Handles to the tools creating regions and fast simulation models to be replaced with the ToolHandleArray<ISimG4RegionTool> m_regionTools. | |
Gaudi::Property< std::vector< std::string > > | m_regionToolNames |
Names of the tools that create regions and fast simulation models to be deleted once the ToolHandleArray<ISimG4RegionTool> m_regionTools is in place. | |
Gaudi::Property< bool > | m_rndmFromGaudi {this, "randomNumbersFromGaudi", true, "Whether random numbers should be taken from Gaudi"} |
Flag whether random numbers seeds should be taken from Gaudi (default: true) | |
Gaudi::Property< long > | m_seedValue {this, "seedValue", 1234567, "Seed to be used in RndmGenSvc engine (randomNumbersFromGaudi must be set to false)"} |
Gaudi::Property< bool > | m_interactiveMode {this, "InteractiveMode", false, "Enter the interactive mode"} |
sim::RunManager | m_runManager |
Run Manager. | |
std::unique_ptr< G4VisManager > | m_visManager {nullptr} |
std::unique_ptr< G4UIsession > | m_session {nullptr} |
Main Geant simulation service.
It handles Geant initialization (via tools) and communication with the G4RunManager. For more information please see.
|
explicit |
Standard constructor.
|
virtual |
Standard destructor.
|
finalvirtual |
Finalize the Geant simulation service.
|
finalvirtual |
Initialize the Geant simulation service.
Tools set in the configuration file need to specify the detector construction, physics list and user action initialization to initialize G4RunManager.
StatusCode SimG4Svc::processEvent | ( | G4Event & | aEvent | ) |
Simulate the event with Geant.
[in] | aEvent | An event to be processed. |
StatusCode SimG4Svc::retrieveEvent | ( | G4Event *& | aEvent | ) |
Retrieve the processed event.
[out] | aEvent | The processed event. |
StatusCode SimG4Svc::terminateEvent | ( | ) |
Terminate the event simulation.
|
private |
Handle for the user action initialization.
|
private |
Handle for the detector construction tool.
|
private |
Geant4 commands to be executed after user initialization.
|
private |
Geant4 commands to be executed before user initialization.
|
private |
|
private |
Handle for the magnetic field initialization.
|
private |
Handle for the Geant physics list tool.
|
private |
Pointer to the random numbers service.
|
private |
Names of the tools that create regions and fast simulation models to be deleted once the ToolHandleArray<ISimG4RegionTool> m_regionTools is in place.
|
private |
Handles to the tools creating regions and fast simulation models to be replaced with the ToolHandleArray<ISimG4RegionTool> m_regionTools.
|
private |
Flag whether random numbers seeds should be taken from Gaudi (default: true)
|
private |
Run Manager.
|
private |
|
private |
|
private |
Pointer to the tool service.
|
private |