Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
OPAL
src
Commits
a9d242c2
Commit
a9d242c2
authored
Jul 15, 2020
by
frey_m
Browse files
use Util:getBetaGamma function
parent
8b530aa8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
src/Distribution/Distribution.cpp
src/Distribution/Distribution.cpp
+1
-3
src/Distribution/SigmaGenerator.cpp
src/Distribution/SigmaGenerator.cpp
+1
-2
No files found.
src/Distribution/Distribution.cpp
View file @
a9d242c2
...
...
@@ -2374,9 +2374,7 @@ void Distribution::generateMatchedGauss(const SigmaGenerator::matrix_t& sigma,
"Negative value on the diagonal of the sigma matrix."
);
}
double
gamma
=
E_m
/
massIneV
+
1.0
;
// beta * gamma
double
bgam
=
std
::
sqrt
(
gamma
*
gamma
-
1.0
);
double
bgam
=
Util
::
getBetaGamma
(
E_m
,
massIneV
);
/*
* only used for printing
...
...
src/Distribution/SigmaGenerator.cpp
View file @
a9d242c2
...
...
@@ -98,8 +98,7 @@ SigmaGenerator::SigmaGenerator(double I,
,
prinit_m
(
0.0
)
{
// minimum beta*gamma
double
minGamma
=
Emin_m
/
m_m
+
1.0
;
double
bgam
=
std
::
sqrt
(
minGamma
*
minGamma
-
1.0
);
double
bgam
=
Util
::
getBetaGamma
(
Emin_m
,
m_m
);
// set emittances (initialization like that due to old compiler version)
// [ex] = [ey] = [ez] = pi*mm*mrad --> [emittance] = m rad
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment