11 simMDlog = logging.getLogger(
'Sim_Metadata')
15 for flag
in sorted(flags._flagdict):
16 if flag.startswith(
"Sim."):
17 if "GenerationConfiguration" in flag:
20 if "Twiss" in flag
and not flags.Detector.GeometryForward:
23 if "UseShadowEvent" in flag
and not flags.Sim.UseShadowEvent:
26 if "VertexTimeWidth" in flag
and not flags.Sim.VertexTimeSmearing:
29 if "RunOnGPU" in flag
and not flags.Sim.ISF.Simulator.usesFastCaloSim():
32 if "FastCalo.ParamsInputFilename" in flag
and not flags.Sim.ISF.Simulator.usesFastCaloSim():
35 if "SimplifiedGeoPath" in flag
and not flags.Sim.SimplifiedGeoPath:
38 if "FastCalo.doEMECFCS" in flag
and not flags.Sim.FastCalo.doEMECFCS:
42 key = flag.split(
".")[-1]
43 value = flags._get(flag)
44 if isinstance(value, FlagEnum):
46 if not isinstance(value, str):
48 dbFiller.addSimParam(key, value)
49 simMDlog.info(
'SimulationMetaData: setting "%s" to be %s', key, value)
51 dbFiller.addSimParam(
'G4Version', flags.Sim.G4Version)
52 dbFiller.addSimParam(
'RunType',
'atlas')
53 dbFiller.addSimParam(
'beamType', flags.Beam.Type.value)
54 dbFiller.addSimParam(
'SimLayout', flags.GeoModel.AtlasVersion)
55 dbFiller.addSimParam(
'MagneticField',
'AtlasFieldSvc')
59 from AthenaConfiguration.DetectorConfigFlags
import getEnabledDetectors
61 simMDlog.info(
"Setting 'SimulatedDetectors' = %r", simDets)
62 dbFiller.addSimParam(
'SimulatedDetectors',
repr(simDets))
65 dbFiller.addSimParam(
'hitFileMagicNumber',
'0')
68 dbFiller.addSimParam(
'Simulator', flags.Sim.ISF.Simulator.value)
69 dbFiller.addSimParam(
'SimulationFlavour', flags.Sim.ISF.Simulator.value.replace(
'MT',
''))
72 dbFiller.addSimParam(
'Simulator',
'AtlasG4')
73 dbFiller.addSimParam(
'SimulationFlavour',
'AtlasG4')