diff --git a/Simulation/Digitization/python/DigitizationParametersConfig.py b/Simulation/Digitization/python/DigitizationParametersConfig.py index 1750134ad465f0c3bc84740624640dc7085d12b5..87f1fc7848f82c7dd1a44dd9e4050abce941e975 100644 --- a/Simulation/Digitization/python/DigitizationParametersConfig.py +++ b/Simulation/Digitization/python/DigitizationParametersConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon.Logging import logging logDigitizationWriteMetadata = logging.getLogger( 'DigitizationParametersConfig' ) @@ -39,7 +39,7 @@ def writeDigitizationMetadata(ConfigFlags): 'DetDescrVersion' : 'GeoModel.AtlasVersion' } logDigitizationWriteMetadata.info('Filling Digitization MetaData') - for testKey, testFlag in digitMetaDataKeys.iteritems(): + for testKey, testFlag in digitMetaDataKeys.items(): if ConfigFlags.hasFlag(testFlag): testValue = ConfigFlags._get(testFlag) if not isinstance(testValue, str): diff --git a/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas.py b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas.py index 39b292a2a46167304427d8b2e63de187366e4c7f..ad90fb5964ad389fda6a5aead98ed6041c095cf3 100644 --- a/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas.py +++ b/Simulation/G4Atlas/G4AtlasApps/share/jobOptions.G4Atlas.py @@ -1,4 +1,7 @@ +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration + ## Job options file for Geant4 ATLAS detector simulations +from __future__ import print_function ## Algorithm sequence from AthenaCommon.AlgSequence import AlgSequence @@ -74,7 +77,7 @@ pg = PG.ParticleGun(randomSvcName=simFlags.RandomSvc.get_Value(), randomStream=" pg.sampler.pid = 999 #Geantino pg.sampler.mom = PG.EEtaMPhiSampler(energy=50000, eta=[-3,3]) topSeq += pg -print topSeq.ParticleGun +print (topSeq.ParticleGun) # This should only be used when evgen is run in the simulation step include('G4AtlasApps/fragment.SimCopyWeights.py') @@ -90,4 +93,4 @@ topSeq += getAlgorithm("BeamEffectsAlg", tryDefaultConfigurable=True) ## Add the G4 sim to the alg sequence after the generator from AthenaCommon.CfgGetter import getAlgorithm topSeq += getAlgorithm("G4AtlasAlg",tryDefaultConfigurable=True) -print topSeq +print (topSeq) diff --git a/Simulation/G4Utilities/G4DebuggingTools/python/G4DebuggingToolsConfig.py b/Simulation/G4Utilities/G4DebuggingTools/python/G4DebuggingToolsConfig.py index e884a92cb8349fad76c7a5350c7f271584ecb9a5..ba14dbdcb07eaeec6208f99c73eeff1e49ee91fe 100644 --- a/Simulation/G4Utilities/G4DebuggingTools/python/G4DebuggingToolsConfig.py +++ b/Simulation/G4Utilities/G4DebuggingTools/python/G4DebuggingToolsConfig.py @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration from AthenaCommon import CfgMgr, Logging from G4AtlasServices import G4AtlasServicesConfig @@ -7,7 +7,7 @@ def getVerboseSelectorTool(name="G4UA::VerboseSelectorTool", **kwargs): from G4AtlasApps.SimFlags import simFlags # example custom configuration if name in simFlags.UserActionConfig.get_Value().keys(): - for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems(): + for prop,value in simFlags.UserActionConfig.get_Value()[name].items(): kwargs.setdefault(prop,value) return CfgMgr.G4UA__VerboseSelectorTool(name, **kwargs) @@ -21,7 +21,7 @@ def getHyperspaceCatcherTool(name="G4UA::HyperspaceCatcherTool", **kwargs): from G4AtlasApps.SimFlags import simFlags # example custom configuration if name in simFlags.UserActionConfig.get_Value().keys(): - for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems(): + for prop,value in simFlags.UserActionConfig.get_Value()[name].items(): kwargs.setdefault(prop,value) return CfgMgr.G4UA__HyperspaceCatcherTool(name, **kwargs) @@ -41,7 +41,7 @@ def getVolumeDebuggerTool(name="G4UA::VolumeDebuggerTool", **kwargs): from G4AtlasApps.SimFlags import simFlags # example custom configuration if name in simFlags.UserActionConfig.get_Value().keys(): - for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems(): + for prop,value in simFlags.UserActionConfig.get_Value()[name].items(): kwargs.setdefault(prop,value) return CfgMgr.G4UA__VolumeDebuggerTool(name, **kwargs) @@ -56,7 +56,7 @@ def getGeant4SetupCheckerTool(name="G4UA::Geant4SetupCheckerTool", **kwargs): kwargs.setdefault('ReferenceFile',default_file) # Grab the properties that were already set if name in simFlags.UserActionConfig.get_Value().keys(): - for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems(): + for prop,value in simFlags.UserActionConfig.get_Value()[name].items(): kwargs.setdefault(prop,value) # Set up the user action return CfgMgr.G4UA__Geant4SetupCheckerTool(name, **kwargs) @@ -69,7 +69,7 @@ def getStepHistogramTool(name="G4UA::StepHistogramTool", **kwargs): return False from G4AtlasApps.SimFlags import simFlags if name in simFlags.UserActionConfig.get_Value().keys(): - for prop,value in simFlags.UserActionConfig.get_Value()[name].iteritems(): + for prop,value in simFlags.UserActionConfig.get_Value()[name].items(): kwargs.setdefault(prop,value) return CfgMgr.G4UA__StepHistogramTool(name, **kwargs)