Ensure that various G4 Manager member variables are properly set in Athena implementations of G4UserActions
See explanation from Mihaly Novak on ATLASSIM-6165:
When Geant4 is used from Athena, real G4 user actions of a given type are registered in the
G4RunManager
(and their interface methods are eventually invoked) through a wrapper G4 user
action of that type. Therefore, some fields are set only for the wrapper user action but not
for the real wrapped user actions.
As an example, G4UserTrackingAction
implementations (such as AthenaTrackingAction
) are
wrapped in the G4AtlasTrackingAction
:
-
G4AtlasTrackingAction
also derives fromG4UserTrackingAction
and actually this will be the only one registered in theG4RunManger
and thus invoked during the event processing. - the real tracking actions (e.g.
AthenaTrackingAction
) are added to this wrapper (stored in a vector field) - Whenever the (
Pre/PostUserTrackingAction
) interface ofG4AtlasTrackingAction
is invoked by the run manager, it just iterates over all registered real user tracking actions and invokes the corresponding interface method. - As only the wrapper
G4AtlasTrackingAction
is registered directly in theG4RunManager
, only itsfpTrackingManager
field is set properly (during registration) while all real user tracking actionfpTrakingManager
field are unset, i.e. left to be null as initialised.
In addition to the G4UserTrackingAction
fix, also set manager properties in the other UserAction types.
No effect on output expected, but improving the initialization robustness will allow other developments discussed in ATLASSIM-6165 to proceed.