From 7e28ad4b788cdcea2a78194dfc3f6e5366f83280 Mon Sep 17 00:00:00 2001 From: John Chapman Date: Mon, 17 Jan 2022 17:52:17 +0100 Subject: [PATCH] Initial fix for ATLASSIM-5584 --- .../ISF_FastCaloSimServices/CMakeLists.txt | 1 + .../python/ISF_HepMC_ToolsConfigNew.py | 13 +++++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/CMakeLists.txt b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/CMakeLists.txt index 1e651525fd0..1725c573e92 100644 --- a/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/CMakeLists.txt +++ b/Simulation/ISF/ISF_FastCaloSim/ISF_FastCaloSimServices/CMakeLists.txt @@ -21,5 +21,6 @@ atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} ) atlas_add_test( ISF_FastCaloSimServices_Config_test SCRIPT test/FastCaloSimServicesTest.py -n 3 + PRIVATE_WORKING_DIRECTORY POST_EXEC_SCRIPT nopost.sh PROPERTIES TIMEOUT 2000) diff --git a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfigNew.py b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfigNew.py index 247cadade9e..ca8c2da5a51 100644 --- a/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfigNew.py +++ b/Simulation/ISF/ISF_HepMC/ISF_HepMC_Tools/python/ISF_HepMC_ToolsConfigNew.py @@ -1,6 +1,6 @@ """ComponentAccumulator HepMC tools configurations for ISF -Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration """ from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator from AthenaConfiguration.ComponentFactory import CompFactory @@ -26,7 +26,16 @@ def ParticleSimWhiteListCfg(ConfigFlags, name="ISF_ParticleSimWhiteList", **kwar def ParticleSimWhiteList_ExtraParticlesCfg(ConfigFlags, name="ISF_ParticleSimWhiteList_ExtraParticles", **kwargs): result = ComponentAccumulator() - kwargs.setdefault("WhiteLists" , ["G4particle_whitelist.txt", "G4particle_whitelist_ExtraParticles.txt"] ) + whiteLists = ["G4particle_whitelist.txt"] + # Basically a copy of code from ExtraParticles.ExtraParticlesConfigNew for now. + from ExtraParticles import PDGHelpers + if PDGHelpers.getPDGTABLE('PDGTABLE.MeV'): + parser = PDGHelpers.PDGParser('PDGTABLE.MeV', '111-556,1112-9090226') + parser.createList() # NB ignore output here + whiteLists += ["G4particle_whitelist_ExtraParticles.txt"] + else: + print ('ERROR Failed to find PDGTABLE.MeV file') + kwargs.setdefault("WhiteLists" , whiteLists ) result.setPrivateTools(CompFactory.ISF.GenParticleSimWhiteList(name, **kwargs)) return result -- GitLab