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
61461a88
Commit
61461a88
authored
2 years ago
by
Wouter Deconinck
Committed by
Andre Sailer
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: ddsim --gun.distribution eta should set eta_min, eta_max correctly
parent
a9b6a1bf
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DDG4/src/Geant4IsotropeGenerator.cpp
+2
-2
2 additions, 2 deletions
DDG4/src/Geant4IsotropeGenerator.cpp
with
2 additions
and
2 deletions
DDG4/src/Geant4IsotropeGenerator.cpp
+
2
−
2
View file @
61461a88
...
@@ -76,8 +76,8 @@ void Geant4IsotropeGenerator::getParticleDirectionEta(int, ROOT::Math::XYZVector
...
@@ -76,8 +76,8 @@ void Geant4IsotropeGenerator::getParticleDirectionEta(int, ROOT::Math::XYZVector
// See https://en.wikipedia.org/wiki/Pseudorapidity
// See https://en.wikipedia.org/wiki/Pseudorapidity
const
double
dmin
=
std
::
numeric_limits
<
double
>::
epsilon
();
const
double
dmin
=
std
::
numeric_limits
<
double
>::
epsilon
();
double
phi
=
m_phiMin
+
(
m_phiMax
-
m_phiMin
)
*
rnd
.
rndm
();
double
phi
=
m_phiMin
+
(
m_phiMax
-
m_phiMin
)
*
rnd
.
rndm
();
double
eta_m
in
=
Distribution
::
eta
(
m_thetaMin
>
dmin
?
m_thetaMin
:
dmin
);
double
eta_m
ax
=
Distribution
::
eta
(
m_thetaMin
>
dmin
?
m_thetaMin
:
dmin
);
double
eta_m
ax
=
Distribution
::
eta
(
m_thetaMax
>
(
M_PI
-
dmin
)
?
m_thetaMax
:
M_PI
-
dmin
);
double
eta_m
in
=
Distribution
::
eta
(
m_thetaMax
>
(
M_PI
-
dmin
)
?
M_PI
-
dmin
:
m_thetaMax
);
double
eta
=
eta_min
+
(
eta_max
-
eta_min
)
*
rnd
.
rndm
();
double
eta
=
eta_min
+
(
eta_max
-
eta_min
)
*
rnd
.
rndm
();
double
x1
=
std
::
cos
(
phi
);
double
x1
=
std
::
cos
(
phi
);
double
x2
=
std
::
sin
(
phi
);
double
x2
=
std
::
sin
(
phi
);
...
...
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