From df16242437a62d5a94fd1d07dff68f96d8e4847e Mon Sep 17 00:00:00 2001 From: Andre Sailer <andre.philippe.sailer@cern.ch> Date: Fri, 20 Nov 2020 13:20:59 +0100 Subject: [PATCH] DDSim.Gun: simplify check for distributions --- DDG4/python/DDSim/Helper/Gun.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DDG4/python/DDSim/Helper/Gun.py b/DDG4/python/DDSim/Helper/Gun.py index 9963afe4a..249826c53 100644 --- a/DDG4/python/DDSim/Helper/Gun.py +++ b/DDG4/python/DDSim/Helper/Gun.py @@ -51,7 +51,7 @@ class Gun(ConfigHelper): def distribution(self, val): if val is None: return - possibleDistributions = ['uniform', 'cos(theta)', 'eta', 'pseudorapidity', 'ffbar'] # (1+cos^2 theta) + possibleDistributions = self._distribution_EXTRA['choices'] if not isinstance(val, six.string_types): raise RuntimeError("malformed input '%s' for gun.distribution. Need a string : %s " % (val, ",".join(possibleDistributions))) -- GitLab