diff --git a/Simulation/G4Extensions/Charginos/CMakeLists.txt b/Simulation/G4Extensions/Charginos/CMakeLists.txt index b866ccfacf0b8a63ebe66b7d5ef55ad4cdcf2c6a..4be31ef34417b9f2711850a19a69ceaf6f8fada2 100644 --- a/Simulation/G4Extensions/Charginos/CMakeLists.txt +++ b/Simulation/G4Extensions/Charginos/CMakeLists.txt @@ -18,5 +18,5 @@ atlas_add_component( Charginos LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps G4AtlasInterfaces ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Simulation/G4Extensions/Charginos/python/CharginosConfig.py b/Simulation/G4Extensions/Charginos/python/CharginosConfig.py index fd9fb0e31a9bbe5ef15ea15a39803f11fbbc089b..eaa569b12f4ba3f1ccbca5425a40e0dbcd07d4a3 100644 --- a/Simulation/G4Extensions/Charginos/python/CharginosConfig.py +++ b/Simulation/G4Extensions/Charginos/python/CharginosConfig.py @@ -1,9 +1,9 @@ -# 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 def getCharginosPhysicsTool(name="CharginosPhysicsTool", **kwargs): from G4AtlasApps.SimFlags import simFlags - from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns + from AthenaCommon.SystemOfUnits import MeV,ns C1Mass = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1Mass", None)) N1Mass = eval(simFlags.specialConfiguration.get_Value().get("AMSBN1Mass", None)) C1Lifetime = eval(simFlags.specialConfiguration.get_Value().get("AMSBC1Lifetime", "-1.0")) diff --git a/Simulation/G4Extensions/ExtraParticles/CMakeLists.txt b/Simulation/G4Extensions/ExtraParticles/CMakeLists.txt index 79f825bcaf4930a6cb18f01f764d7b22f0096768..27bf93ab287971161a54813d2287795db6edaf0a 100644 --- a/Simulation/G4Extensions/ExtraParticles/CMakeLists.txt +++ b/Simulation/G4Extensions/ExtraParticles/CMakeLists.txt @@ -18,5 +18,5 @@ atlas_add_component( ExtraParticles LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps G4AtlasInterfaces ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py b/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py index f9ad4b63c9a619ba502d15e604546d592b4c7ff8..4de1f36931fdf87d98359073756ba5077359486b 100644 --- a/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py +++ b/Simulation/G4Extensions/ExtraParticles/python/PDGParser.py @@ -27,7 +27,6 @@ """ import os -import re from AthenaCommon.SystemOfUnits import MeV, joule from AthenaCommon.PhysicalConstants import hbar_Planck, h_Planck @@ -150,7 +149,7 @@ class PDGParser(object): self.extraParticles[name] = ExtraParticle(**kwargs) else: if getattr(self.extraParticles[name], prop) != -1: - self.log.warning("Property %s is already set for particle %s. Current value is %s and incoming value is %s." % + self.log.warning("Property %s is already set for particle %s. Current value is %s and incoming value is %s." , (prop, name, getattr(self.extraParticles[name], prop), value)) continue setattr(self.extraParticles[name], prop, value) diff --git a/Simulation/G4Extensions/G4CosmicFilter/CMakeLists.txt b/Simulation/G4Extensions/G4CosmicFilter/CMakeLists.txt index 9d5392cd43137d47dfea31c8119f00f336632556..aee29b9559524b49ef85b8d84907445a32cc9522 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/CMakeLists.txt +++ b/Simulation/G4Extensions/G4CosmicFilter/CMakeLists.txt @@ -18,5 +18,4 @@ atlas_add_component( G4CosmicFilter LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps StoreGateLib SGtests GaudiKernel G4AtlasInterfaces G4AtlasToolsLib MCTruth TrackRecordLib ) # Install files from the package: -atlas_install_headers( G4CosmicFilter ) -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfig.py b/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfig.py index 52a991fb6357a43f46ae343a1a6901aef38ccb9e..ea33e2c144fbce777ced3b282ed1e1be4d446e08 100644 --- a/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfig.py +++ b/Simulation/G4Extensions/G4CosmicFilter/python/G4CosmicFilterConfig.py @@ -3,7 +3,6 @@ from __future__ import print_function from AthenaCommon import CfgMgr -from G4AtlasApps import PyG4Atlas, AtlasG4Eng from G4AtlasApps.SimFlags import simFlags def configCosmicFilterVolumeNames(): diff --git a/Simulation/G4Extensions/G4HitFilter/CMakeLists.txt b/Simulation/G4Extensions/G4HitFilter/CMakeLists.txt index cbe21dd05489386e8d1ce445a9f538be5a102112..cc72adde6dd01408abd08ae8721d52ea8a8de345 100644 --- a/Simulation/G4Extensions/G4HitFilter/CMakeLists.txt +++ b/Simulation/G4Extensions/G4HitFilter/CMakeLists.txt @@ -18,4 +18,4 @@ atlas_add_component( G4HitFilter LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel CaloSimEvent AthenaBaseComps StoreGateLib SGtests LUCID_SimEvent InDetSimEvent LArSimEvent MuonSimEvent G4AtlasInterfaces G4AtlasToolsLib TileSimEvent ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Simulation/G4Extensions/G4ScoringProcess/CMakeLists.txt b/Simulation/G4Extensions/G4ScoringProcess/CMakeLists.txt index fa4d1e4c4a50e5d266a93b038d9d5a840409a6a6..fe2cb5b79379e9eb42f6fdb1ae46bf8b89b1219a 100644 --- a/Simulation/G4Extensions/G4ScoringProcess/CMakeLists.txt +++ b/Simulation/G4Extensions/G4ScoringProcess/CMakeLists.txt @@ -18,5 +18,5 @@ atlas_add_component( G4ScoringProcess LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps G4AtlasInterfaces ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Simulation/G4Extensions/Gauginos/CMakeLists.txt b/Simulation/G4Extensions/Gauginos/CMakeLists.txt index 591d9dd2f225f4406d8d6e41bd92ef4e50cca2d8..6026707080a56a7ed9ba3f47701cc79773134dd3 100644 --- a/Simulation/G4Extensions/Gauginos/CMakeLists.txt +++ b/Simulation/G4Extensions/Gauginos/CMakeLists.txt @@ -18,5 +18,5 @@ atlas_add_component( Gauginos LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} AthenaBaseComps GaudiKernel G4AtlasInterfaces ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py b/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py index 540992e5975ae60d2c570d8bfeb5e45e84b423f7..8dca17479cb92f426bab7d57e36016b217012457 100644 --- a/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py +++ b/Simulation/G4Extensions/Gauginos/python/GauginosConfig.py @@ -1,28 +1,27 @@ -# 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 def getGauginosPhysicsTool(name="GauginosPhysicsTool", **kwargs): - from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns from G4AtlasApps.SimFlags import simFlags GMSBNeutralino = eval(simFlags.specialConfiguration.get_Value().get("GMSBNeutralino", "0*GeV")) GMSBTime = eval(simFlags.specialConfiguration.get_Value().get("GMSBLifeTime", "0*GeV")) kwargs.setdefault("NeutralinoMass", GMSBNeutralino) - ##kwargs.setdefault("NeutralinoWidth", 0.0*GeV); - ##kwargs.setdefault("NeutralinoCharge", 0); - ##kwargs.setdefault("NeutralinoPDGCode", 1000039); - kwargs.setdefault("NeutralinoStable", False); - kwargs.setdefault("NeutralinoLifetime", GMSBTime); - ##kwargs.setdefault("NeutralinoShortlived", False); + ##kwargs.setdefault("NeutralinoWidth", 0.0*GeV) + ##kwargs.setdefault("NeutralinoCharge", 0) + ##kwargs.setdefault("NeutralinoPDGCode", 1000039) + kwargs.setdefault("NeutralinoStable", False) + kwargs.setdefault("NeutralinoLifetime", GMSBTime) + ##kwargs.setdefault("NeutralinoShortlived", False) - if simFlags.specialConfiguration.get_Value().has_key("GMSBGravitino"): + if "GMSBGravitino" in simFlags.specialConfiguration.get_Value(): GMSBGravitino = eval(simFlags.specialConfiguration.get_Value().get("GMSBGravitino", "0*GeV")) - kwargs.setdefault("GravitinoMass", GMSBGravitino); - ##kwargs.setdefault("GravitinoWidth", 0.0*GeV); - ##kwargs.setdefault("GravitinoCharge", 0); - ##kwargs.setdefault("GravitinoPDGCode", 1000022); - ##kwargs.setdefault("GravitinoStable", True); - ##kwargs.setdefault("GravitinoLifetime", -1); - ##kwargs.setdefault("GravitinoShortlived", False); + kwargs.setdefault("GravitinoMass", GMSBGravitino) + ##kwargs.setdefault("GravitinoWidth", 0.0*GeV) + ##kwargs.setdefault("GravitinoCharge", 0) + ##kwargs.setdefault("GravitinoPDGCode", 1000022) + ##kwargs.setdefault("GravitinoStable", True) + ##kwargs.setdefault("GravitinoLifetime", -1) + ##kwargs.setdefault("GravitinoShortlived", False) return CfgMgr.GauginosPhysicsTool(name, **kwargs) diff --git a/Simulation/G4Extensions/Monopole/CMakeLists.txt b/Simulation/G4Extensions/Monopole/CMakeLists.txt index 7eacc7123cdefda91966a5865e3c5fd1eec4e241..48d05372ec591de35b7b73cd7cb9e0a6bf7a1ddb 100644 --- a/Simulation/G4Extensions/Monopole/CMakeLists.txt +++ b/Simulation/G4Extensions/Monopole/CMakeLists.txt @@ -18,5 +18,5 @@ atlas_add_component( Monopole LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps G4AtlasInterfaces ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Simulation/G4Extensions/Quirks/CMakeLists.txt b/Simulation/G4Extensions/Quirks/CMakeLists.txt index 99dd3e5c633d311a61b49a295e0d8eb90493a75a..1fe833e4f4b250fd2a0e38f16b6af8a311cae1dd 100644 --- a/Simulation/G4Extensions/Quirks/CMakeLists.txt +++ b/Simulation/G4Extensions/Quirks/CMakeLists.txt @@ -18,5 +18,5 @@ atlas_add_component( Quirks LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps G4AtlasInterfaces G4AtlasToolsLib ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Simulation/G4Extensions/Sleptons/CMakeLists.txt b/Simulation/G4Extensions/Sleptons/CMakeLists.txt index 2646be5219258e757ebe6ca7377f020b099f003d..d1a1553edf42d89d0c7f76f3003d1458d7c9c482 100644 --- a/Simulation/G4Extensions/Sleptons/CMakeLists.txt +++ b/Simulation/G4Extensions/Sleptons/CMakeLists.txt @@ -18,5 +18,5 @@ atlas_add_component( Sleptons LINK_LIBRARIES ${GEANT4_LIBRARIES} ${XERCESC_LIBRARIES} ${CLHEP_LIBRARIES} GaudiKernel AthenaBaseComps G4AtlasInterfaces ) # Install files from the package: -atlas_install_python_modules( python/*.py ) +atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) diff --git a/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py b/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py index 394a2dd28eb1dfa9ce9a926027bccd33400a76b3..7e3944555d56182f9af72f35b85a723757b4382a 100644 --- a/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.py +++ b/Simulation/G4Extensions/Sleptons/python/SleptonsConfig.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 @@ -15,12 +15,11 @@ where Particle = [STau1Minus, STau1Plus, STau2Minus, STau2Plus, SElectronRMinus, """ def getSleptonsPhysicsTool(name="SleptonsPhysicsTool", **kwargs): from G4AtlasApps.SimFlags import simFlags - from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns GMSBStau = eval(simFlags.specialConfiguration.get_Value().get("GMSBStau", None)) kwargs.setdefault("G4STau1MinusMass", GMSBStau) kwargs.setdefault("G4STau1PlusMass", GMSBStau) - if simFlags.specialConfiguration.get_Value().has_key("GMSBSlepton"): + if "GMSBSlepton" in simFlags.specialConfiguration.get_Value(): GMSBSlepton = eval(simFlags.specialConfiguration.get_Value().get("GMSBSlepton", None)) kwargs.setdefault("G4SElectronRMinusMass", GMSBSlepton) @@ -32,31 +31,30 @@ def getSleptonsPhysicsTool(name="SleptonsPhysicsTool", **kwargs): def getAllSleptonsPhysicsTool(name="AllSleptonsPhysicsTool", **kwargs): from G4AtlasApps.SimFlags import simFlags - from AthenaCommon.SystemOfUnits import GeV,MeV,eplus,ns - if simFlags.specialConfiguration.get_Value().has_key("GMSBStau"): + if "GMSBStau" in simFlags.specialConfiguration.get_Value(): GMSBStau = eval(simFlags.specialConfiguration.get_Value().get("GMSBStau", None)) GMSBStauTime = eval(simFlags.specialConfiguration.get_Value().get("GMSBStauTime", None)) kwargs.setdefault("G4STau1MinusMass", GMSBStau) kwargs.setdefault("G4STau1MinusPDGCode", 1000015) kwargs.setdefault("G4STau1MinusStable", False) kwargs.setdefault("G4STau1MinusLifetime", GMSBStauTime) - + kwargs.setdefault("G4STau1PlusMass", GMSBStau) kwargs.setdefault("G4STau1PlusPDGCode", -1000015) kwargs.setdefault("G4STau1PlusStable", False) kwargs.setdefault("G4STau1PlusLifetime", GMSBStauTime) - + kwargs.setdefault("G4STau2MinusMass", GMSBStau) kwargs.setdefault("G4STau2MinusPDGCode", 2000015) kwargs.setdefault("G4STau2MinusStable", False) kwargs.setdefault("G4STau2MinusLifetime", GMSBStauTime) - + kwargs.setdefault("G4STau2PlusMass", GMSBStau) kwargs.setdefault("G4STau2PlusPDGCode", -2000015) kwargs.setdefault("G4STau2PlusStable", False) kwargs.setdefault("G4STau2PlusLifetime", GMSBStauTime) - if simFlags.specialConfiguration.get_Value().has_key("GMSBSlepton"): + if "GMSBSlepton" in simFlags.specialConfiguration.get_Value(): GMSBSlepton = eval(simFlags.specialConfiguration.get_Value().get("GMSBSlepton", None)) GMSBSleptonTime = eval(simFlags.specialConfiguration.get_Value().get("GMSBSleptonTime", None))