3.10.1.9. opengate.engines¶
3.10.1.9.1. Classes¶
Base class for all engines (SimulationEngine, VolumeEngine, etc.) |
|
Source Engine manages the G4 objects of sources at runtime |
|
Class that contains all the information and mechanism regarding physics |
|
Main object to manage all actions during a simulation. |
|
This object manages all actors G4 objects at runtime |
|
Base class for all engines (SimulationEngine, VolumeEngine, etc.) |
|
FIXME: Doc ParallelWorldEngine |
|
Engine that will create all G4 elements for the hierarchy of volumes. |
|
Main class to manage visualisation |
|
FIXME |
|
Main class to execute a Simulation. Can only be created once per process because Geant4 dictates so. |
3.10.1.9.2. Functions¶
|
|
|
|
|
3.10.1.9.3. Module Contents¶
- class opengate.engines.EngineBase(simulation_engine)[source]¶
Base class for all engines (SimulationEngine, VolumeEngine, etc.)
- class opengate.engines.SourceEngine(simulation_engine)[source]¶
Bases:
EngineBaseSource Engine manages the G4 objects of sources at runtime
- initialize_actors()[source]¶
3.10.1.9. Parameters¶
- actorsdict
The dictionary ActorEngine.actors which contains key-value pairs “actor_name” : “Actor object”
- class opengate.engines.PhysicsEngine(*args)[source]¶
Bases:
EngineBaseClass that contains all the information and mechanism regarding physics to actually run a simulation. It is associated with a simulation engine.
- close_physics_constructors()[source]¶
This method removes PhysicsConstructors defined in python from the physics list.
It should be called after a simulation run, i.e. when a simulation engine closes, because the RunManager will otherwise attempt to delete the PhysicsConstructor and cause a segfault.
- class opengate.engines.ActionEngine(*args)[source]¶
Bases:
opengate_core.G4VUserActionInitialization,EngineBaseMain object to manage all actions during a simulation.
- class opengate.engines.ActorEngine(*args, **kwargs)[source]¶
Bases:
EngineBaseThis object manages all actors G4 objects at runtime
- class opengate.engines.FilterEngine(*args, **kwargs)[source]¶
Bases:
EngineBaseBase class for all engines (SimulationEngine, VolumeEngine, etc.)
- class opengate.engines.ParallelWorldEngine(parallel_world_name, *args)[source]¶
Bases:
opengate_core.G4VUserParallelWorld,EngineBaseFIXME: Doc ParallelWorldEngine
- class opengate.engines.VolumeEngine(simulation_engine)[source]¶
Bases:
opengate_core.G4VUserDetectorConstruction,EngineBaseEngine that will create all G4 elements for the hierarchy of volumes. Correspond to the G4VUserDetectorConstruction (inherit) Also manage the list of parallel worlds.
- class opengate.engines.VisualisationEngine(simulation_engine)[source]¶
Bases:
EngineBaseMain class to manage visualisation
- class opengate.engines.SimulationEngine(simulation, new_process=False)[source]¶
Bases:
opengate.base.GateSingletonFatalMain class to execute a Simulation. Can only be created once per process because Geant4 dictates so.
- run_engine()[source]¶
When the simulation is about to init, if the Simulation object is in a separate process (with ‘spawn’), it has been pickled (copied) and the G4 phys list classes does not exist anymore, so we need to recreate them with ‘create_physics_list_classes’ Also, the StateManager must be recreated.
NK: Yes, but not this way. Each class should take care of recreating attributes which where set to None during pickling by implementing a __setstate__ method. Implementing the resetting somewhere else (maybe in multiple places…) in the code will make it very difficult to maintain.
-> removed the lines and implemented __setstate__ methods for the classes in question