From 413227bb4a10c6a10e5130efd8153594d84a29eb Mon Sep 17 00:00:00 2001 From: John Kenneth Anders <john.kenneth.anders@cern.ch> Date: Mon, 11 Mar 2019 10:28:47 +0000 Subject: [PATCH] Merge branch 'QballSimFix2_ALTMCPROD-6719_21.0' into '21.0' Patch preInclude.Qball.py to work-around missing specialConfiguration metadata See merge request atlas/athena!21660 (cherry picked from commit 29c9a5d790b0ff49ab4441ec8892addb23da9ecc) ddad4098 Patch preInclude.Qball.py to work-around missing specialConfiguration metadata --- .../share/specialConfig/preInclude.Qball.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py index 5b686b1ad2c..a6123bd0a93 100644 --- a/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py +++ b/Simulation/SimulationJobOptions/share/specialConfig/preInclude.Qball.py @@ -37,8 +37,6 @@ def load_files_for_qball_scenario(MASS, CHARGE): del BLINE1 del BLINE2 -assert "MASS" in simdict -assert "CHARGE" in simdict doG4SimConfig = True from AthenaCommon.AthenaCommonFlags import athenaCommonFlags import PyUtils.AthFile as af @@ -52,13 +50,16 @@ try: else: from G4AtlasApps.SimFlags import simFlags if not "InteractingPDGCodes" in simFlags.specialConfiguration.get_Value(): - CODE=10000000+int(float(simdict["CHARGE"])*100) + assert "CHARGE" in simFlags.specialConfiguration.get_Value() + CODE=10000000+int(float(simFlags.specialConfiguration.get_Value()["CHARGE"])*100) simFlags.specialConfiguration.get_Value()['InteractingPDGCodes'] = str([CODE,-1*CODE]) simdict = simFlags.specialConfiguration.get_Value() except: from G4AtlasApps.SimFlags import simFlags simdict = simFlags.specialConfiguration.get_Value() +assert "MASS" in simdict +assert "CHARGE" in simdict load_files_for_qball_scenario(simdict["MASS"], simdict["CHARGE"]) if doG4SimConfig: -- GitLab