Skip to content

Fix possible bug in modify_param_card

Chris Pollard requested to merge cpollard-MG-mass-fix into master

I ran into a problem while adding only new masses to madgraph param cards. At

https://gitlab.cern.ch/atlas/athena/-/blob/5e760ba3c00b6b4f561c30d11127e3aba6f4510f/Generators/MadGraphControl/python/MadGraphUtils.py#L1995

doneParams is initialized as an empty dict, but later when building leftovers, it assumes that "MASS" is already a key of doneParams.

https://gitlab.cern.ch/atlas/athena/-/blob/5e760ba3c00b6b4f561c30d11127e3aba6f4510f/Generators/MadGraphControl/python/MadGraphUtils.py#L2005

These changes should mean that if you're only adding new particle masses, you don't get a KeyError.

Originally reported in https://its.cern.ch/jira/browse/AGENE-2042

CC: @ewelina @gpanizzo @mcfayden @hmildner @zmarshal @cgutscho @jkretz

  • Chris
Edited by Chris Pollard

Merge request reports