Commit 45aaa9d3 authored by kraus's avatar kraus
Browse files

Merge branch 'master' of gitlab.psi.ch:OPAL/src

parents f8d5cdf1 e448207d
......@@ -61,6 +61,7 @@ Cyclotron::Cyclotron(const Cyclotron &right):
zinit_m(right.zinit_m),
pzinit_m(right.pzinit_m),
spiral_flag_m(right.spiral_flag_m),
trimCoilThreshold_m(right.trimCoilThreshold_m),
type_m(right.type_m),
harm_m(right.harm_m),
bscale_m(right.bscale_m),
......
......@@ -1300,15 +1300,12 @@ void Distribution::createMatchedGaussDistribution(size_t numberOfParticles, doub
const double fmLowE = CyclotronElement->getFMLowE();
const double fmHighE = CyclotronElement->getFMHighE();
double lE,hE;
lE = fmLowE;
hE = fmHighE;
if ((lE<0) || (hE<0)) {
lE = E_m*1E-6;
hE = E_m*1E-6;
if ( fmLowE < 0 || fmHighE < 0 ) {
throw OpalException("Distribution::CreateMatchedGaussDistribution()",
"Missing attributes 'FMLOWE' and/or 'FMHIHGE' in "
"'CYCLOTRON' definition.");
}
int Nint = 1000;
double scaleFactor = 1.0;
bool writeMap = true;
......@@ -1322,8 +1319,8 @@ void Distribution::createMatchedGaussDistribution(size_t numberOfParticles, doub
E_m*1E-6,
CyclotronElement->getCyclHarm(),
massIneV*1E-6,
lE,
hE,
fmLowE,
fmHighE,
(int)Attributes::getReal(itsAttr[Attrib::Distribution::MAGSYM]),
Nint,
Attributes::getString(itsAttr[Attrib::Distribution::FMAPFN]),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment