Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DD4hep
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cepc
externals
mirroring
DD4hep
Commits
df162424
Commit
df162424
authored
4 years ago
by
Andre Sailer
Browse files
Options
Downloads
Patches
Plain Diff
DDSim.Gun: simplify check for distributions
parent
22413888
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/python/DDSim/Helper/Gun.py
+1
-1
1 addition, 1 deletion
DDG4/python/DDSim/Helper/Gun.py
with
1 addition
and
1 deletion
DDG4/python/DDSim/Helper/Gun.py
+
1
−
1
View file @
df162424
...
...
@@ -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
)))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment