Main Geant simulation service.
More...
#include <SimG4Components/src/SimG4Svc.h>
|
| 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.
|
|
|
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 |
| Flag whether random numbers seeds should be taken from Gaudi (default: true)
|
|
Gaudi::Property< long > | m_seedValue |
|
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.
- Author
- Anna Zaborowska
◆ SimG4Svc()
SimG4Svc::SimG4Svc |
( |
const std::string & | aName, |
|
|
ISvcLocator * | aSL ) |
|
explicit |
◆ ~SimG4Svc()
◆ finalize()
StatusCode SimG4Svc::finalize |
( |
| ) |
|
|
finalvirtual |
Finalize the Geant simulation service.
- Returns
- status code
◆ initialize()
StatusCode SimG4Svc::initialize |
( |
| ) |
|
|
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.
- Returns
- status code
◆ processEvent()
StatusCode SimG4Svc::processEvent |
( |
G4Event & | aEvent | ) |
|
Simulate the event with Geant.
- Parameters
-
[in] | aEvent | An event to be processed. |
- Returns
- status code
◆ retrieveEvent()
StatusCode SimG4Svc::retrieveEvent |
( |
G4Event *& | aEvent | ) |
|
Retrieve the processed event.
- Parameters
-
[out] | aEvent | The processed event. |
- Returns
- status code
◆ terminateEvent()
StatusCode SimG4Svc::terminateEvent |
( |
| ) |
|
Terminate the event simulation.
- Returns
- status code
◆ m_actionsTool
ToolHandle<ISimG4ActionTool> SimG4Svc::m_actionsTool {"SimG4FullSimActions", this, true} |
|
private |
Handle for the user action initialization.
◆ m_detectorTool
Handle for the detector construction tool.
◆ m_g4PostInitCommands
Gaudi::Property<std::vector<std::string> > SimG4Svc::m_g4PostInitCommands |
|
private |
Initial value:{
this, "g4PostInitCommands", {}, "Geant4 commands to be executed after user initialization"}
Geant4 commands to be executed after user initialization.
◆ m_g4PreInitCommands
Gaudi::Property<std::vector<std::string> > SimG4Svc::m_g4PreInitCommands |
|
private |
Initial value:{
this, "g4PreInitCommands", {}, "Geant4 commands to be executed before user initialization"}
Geant4 commands to be executed before user initialization.
◆ m_interactiveMode
Gaudi::Property<bool> SimG4Svc::m_interactiveMode {this, "InteractiveMode", false, "Enter the interactive mode"} |
|
private |
◆ m_magneticFieldTool
Handle for the magnetic field initialization.
◆ m_physicsListTool
ToolHandle<ISimG4PhysicsList> SimG4Svc::m_physicsListTool {"SimG4FtfpBert", this, true} |
|
private |
Handle for the Geant physics list tool.
◆ m_randSvc
SmartIF<IRndmGenSvc> SimG4Svc::m_randSvc |
|
private |
Pointer to the random numbers service.
◆ m_regionToolNames
Gaudi::Property<std::vector<std::string> > SimG4Svc::m_regionToolNames |
|
private |
Initial value:{
this, "regions", {}, "Names of the tools that create regions and fast simulation models"}
Names of the tools that create regions and fast simulation models to be deleted once the ToolHandleArray<ISimG4RegionTool> m_regionTools is in place.
◆ m_regionTools
Handles to the tools creating regions and fast simulation models to be replaced with the ToolHandleArray<ISimG4RegionTool> m_regionTools.
◆ m_rndmFromGaudi
Gaudi::Property<bool> SimG4Svc::m_rndmFromGaudi |
|
private |
Initial value:{this, "randomNumbersFromGaudi", true,
"Whether random numbers should be taken from Gaudi"}
Flag whether random numbers seeds should be taken from Gaudi (default: true)
◆ m_runManager
◆ m_seedValue
Gaudi::Property<long> SimG4Svc::m_seedValue |
|
private |
Initial value:{
this, "seedValue", 1234567, "Seed to be used in RndmGenSvc engine (randomNumbersFromGaudi must be set to false)"}
◆ m_session
std::unique_ptr<G4UIsession> SimG4Svc::m_session {nullptr} |
|
private |
◆ m_toolSvc
SmartIF<IToolSvc> SimG4Svc::m_toolSvc |
|
private |
Pointer to the tool service.
◆ m_visManager
std::unique_ptr<G4VisManager> SimG4Svc::m_visManager {nullptr} |
|
private |
The documentation for this class was generated from the following files: