Skip to content

New magnetic field switch class

Vangelis Kourlitis requested to merge ekourlit/athena:master into master

Addition of a new class for tailored magnetic field switch-off in ATLAS simulation in order to save CPU power. This switch is operating in the area inside the EM barrel calorimeter region, where the magnetic field is low anyways, and for all particles except of muons.

The modifications include:

  1. Addition of a new class SwitchingFieldManager, inheriting from G4FieldManager.
  2. Modification of the DetectorFieldManagerTool.cxx to use the alternative G4FieldManager when requested. Here there was a previous attempt to achieve the same effect by the TightMuonElseNoFieldManager and it has been commented out.
  3. Modification of the DetectorFieldManagerTool to be able to attach a G4FieldManager to a G4VPhysicalVolume as well, instead of G4LogicalVolume only as it was before.
  4. Modification in G4FieldConfig.py to attach the SwitchingFieldManager to the LArBarrel physical volume. Μodifications have not been applied in G4FieldConfigNew.py. (maybe we should?)

The switch can be enabled with the pre-include: simFlags.MuonFieldOnlyInCalo=True;simFlags.MuonFieldOnlyInCalo(). Without this flag the developments should not affect the simulation jobs.

The idea and the development progress is documented in ATLASSIM-4749.

Merge request reports