New magnetic field switch class
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:
- Addition of a new class
SwitchingFieldManager
, inheriting fromG4FieldManager
. - Modification of the
DetectorFieldManagerTool.cxx
to use the alternativeG4FieldManager
when requested. Here there was a previous attempt to achieve the same effect by theTightMuonElseNoFieldManager
and it has been commented out. - Modification of the
DetectorFieldManagerTool
to be able to attach aG4FieldManager
to aG4VPhysicalVolume
as well, instead ofG4LogicalVolume
only as it was before. - Modification in
G4FieldConfig.py
to attach theSwitchingFieldManager
to theLArBarrel
physical volume. Μodifications have not been applied inG4FieldConfigNew.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.