Skip to content

Sim mag field svc

R D Schaffer requested to merge ATLAS-EGamma/athena:Sim_MagField_svc into master

With @christos, we have implemented a version of G4Sim which is now independent of AtlasFieldSvc. It uses a thread-safe access to the AtlasFieldCache objects, and the map initialization is not done explicitly inside StandardFieldSvc. (It is difficult to do this via the existing reco-side infrastructure because the map is created now in a conditions alg, which cannot be run directly in the G4Sim.) The current assumption is that the default map files are used and the current scale factors are always 1. This is probably safe. One can always change the map file name or turn off solenoid or toroid by setting their currents to 0.

More work is probably needed for the configuration. At the moment, a minimal setup is done which just creates a default StandardFieldSvc. So not special config is added to the svc. But one should check that this is done for all use cases. As well, if one might want to configure the field in the central magField config in MagFieldServicesConfig.py or SetupField.py (the old version for config), more work would be needed.

Adding on @jchapman to have a look. A local Sim_tf.py ran ok. Let's see the others.

Discussed in jira: https://its.cern.ch/jira/browse/ATLASSIM-4516

Edited by R D Schaffer

Merge request reports