Skip to content
Snippets Groups Projects
Commit df162424 authored by Andre Sailer's avatar Andre Sailer
Browse files

DDSim.Gun: simplify check for distributions

parent 22413888
No related branches found
No related tags found
No related merge requests found
......@@ -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)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment