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
8d1ddd51
Commit
8d1ddd51
authored
3 years ago
by
Wouter Deconinck
Committed by
MarkusFrankATcernch
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Replace momentum treatment in all getParticleDirections
parent
535efcab
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/src/Geant4IsotropeGenerator.cpp
+3
-13
3 additions, 13 deletions
DDG4/src/Geant4IsotropeGenerator.cpp
with
3 additions
and
13 deletions
DDG4/src/Geant4IsotropeGenerator.cpp
+
3
−
13
View file @
8d1ddd51
...
@@ -75,10 +75,7 @@ void Geant4IsotropeGenerator::getParticleDirectionCosTheta(int, ROOT::Math::XYZV
...
@@ -75,10 +75,7 @@ void Geant4IsotropeGenerator::getParticleDirectionCosTheta(int, ROOT::Math::XYZV
double
x3
=
cos_theta
;
double
x3
=
cos_theta
;
direction
.
SetXYZ
(
x1
,
x2
,
x3
);
direction
.
SetXYZ
(
x1
,
x2
,
x3
);
if
(
m_momentumMax
<
m_momentumMin
)
getParticleMomentumUniform
(
momentum
);
momentum
=
m_momentumMin
+
(
momentum
-
m_momentumMin
)
*
rnd
.
rndm
();
else
momentum
=
m_momentumMin
+
(
m_momentumMax
-
m_momentumMin
)
*
rnd
.
rndm
();
}
}
/// Particle distribution flat in eta (pseudo rapidity)
/// Particle distribution flat in eta (pseudo rapidity)
...
@@ -99,10 +96,7 @@ void Geant4IsotropeGenerator::getParticleDirectionEta(int, ROOT::Math::XYZVector
...
@@ -99,10 +96,7 @@ void Geant4IsotropeGenerator::getParticleDirectionEta(int, ROOT::Math::XYZVector
double
x3
=
std
::
sinh
(
eta
);
double
x3
=
std
::
sinh
(
eta
);
double
r
=
std
::
sqrt
(
1.0
+
x3
*
x3
);
double
r
=
std
::
sqrt
(
1.0
+
x3
*
x3
);
direction
.
SetXYZ
(
x1
/
r
,
x2
/
r
,
x3
/
r
);
direction
.
SetXYZ
(
x1
/
r
,
x2
/
r
,
x3
/
r
);
if
(
m_momentumMax
<
m_momentumMin
)
getParticleMomentumUniform
(
momentum
);
momentum
=
m_momentumMin
+
(
momentum
-
m_momentumMin
)
*
rnd
.
rndm
();
else
momentum
=
m_momentumMin
+
(
m_momentumMax
-
m_momentumMin
)
*
rnd
.
rndm
();
}
}
/// e+e- --> ffbar particle distribution ~ 1 + cos^2(theta)
/// e+e- --> ffbar particle distribution ~ 1 + cos^2(theta)
...
@@ -128,11 +122,7 @@ void Geant4IsotropeGenerator::getParticleDirectionFFbar(int, ROOT::Math::XYZVect
...
@@ -128,11 +122,7 @@ void Geant4IsotropeGenerator::getParticleDirectionFFbar(int, ROOT::Math::XYZVect
double
x2
=
std
::
sin
(
theta
)
*
std
::
sin
(
phi
);
double
x2
=
std
::
sin
(
theta
)
*
std
::
sin
(
phi
);
double
x3
=
std
::
cos
(
theta
);
double
x3
=
std
::
cos
(
theta
);
direction
.
SetXYZ
(
x1
,
x2
,
x3
);
direction
.
SetXYZ
(
x1
,
x2
,
x3
);
if
(
m_momentumMax
<
m_momentumMin
)
getParticleMomentumUniform
(
momentum
);
momentum
=
m_momentumMin
+
(
momentum
-
m_momentumMin
)
*
rnd
.
rndm
();
else
momentum
=
m_momentumMin
+
(
m_momentumMax
-
m_momentumMin
)
*
rnd
.
rndm
();
momentum
=
rnd
.
rndm
()
*
momentum
;
return
;
return
;
}
}
}
}
...
...
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