opengate
opengate copied to clipboard
Add InitializeG4PreInitState step in Actors
This commit adds the possibility for actors to execute code near the end of the Geant4 PreInit state, before entering in Idle, but after main simulation elements are initialised (physics, …).
This can be used for example to retrieve particle definitions at actor level.
C++ side: GateVActor exposes a new virtual function (void InitializeG4PreInitState()).
Python side: the actor_engine provides initialize_preinit called in initialize of SimulationEngine which calls the C++ side function.