Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
S
src
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
71
Issues
71
List
Boards
Labels
Service Desk
Milestones
Merge Requests
5
Merge Requests
5
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Code Review
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OPAL
src
Commits
0530b5ea
Commit
0530b5ea
authored
Apr 29, 2020
by
ext-calvo_p
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "cleanup src: remove using namespace std"
parent
e7812d0b
Changes
106
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
106 changed files
with
963 additions
and
1088 deletions
+963
-1088
src/AbstractObjects/OpalData.cpp
src/AbstractObjects/OpalData.cpp
+8
-8
src/AbstractObjects/RangeRep.cpp
src/AbstractObjects/RangeRep.cpp
+0
-1
src/Algorithms/LieMapper.cpp
src/Algorithms/LieMapper.cpp
+5
-6
src/Algorithms/MPSplitIntegrator.cpp
src/Algorithms/MPSplitIntegrator.cpp
+3
-5
src/Algorithms/MapAnalyser.cpp
src/Algorithms/MapAnalyser.cpp
+1
-1
src/Algorithms/ParallelCyclotronTracker.cpp
src/Algorithms/ParallelCyclotronTracker.cpp
+56
-58
src/Algorithms/ThickMapper.cpp
src/Algorithms/ThickMapper.cpp
+6
-7
src/Algorithms/TransportMapper.cpp
src/Algorithms/TransportMapper.cpp
+7
-8
src/Aperture/Aperture.cpp
src/Aperture/Aperture.cpp
+52
-50
src/Aperture/Split.cpp
src/Aperture/Split.cpp
+57
-57
src/BasicActions/DumpEMFields.cpp
src/BasicActions/DumpEMFields.cpp
+11
-12
src/BasicActions/DumpFields.cpp
src/BasicActions/DumpFields.cpp
+3
-3
src/Classic/AbsBeamline/BeamStripping.cpp
src/Classic/AbsBeamline/BeamStripping.cpp
+2
-2
src/Classic/AbsBeamline/Bend2D.cpp
src/Classic/AbsBeamline/Bend2D.cpp
+54
-56
src/Classic/AbsBeamline/CCollimator.cpp
src/Classic/AbsBeamline/CCollimator.cpp
+1
-2
src/Classic/AbsBeamline/Corrector.cpp
src/Classic/AbsBeamline/Corrector.cpp
+2
-3
src/Classic/AbsBeamline/Cyclotron.cpp
src/Classic/AbsBeamline/Cyclotron.cpp
+18
-21
src/Classic/AbsBeamline/Degrader.cpp
src/Classic/AbsBeamline/Degrader.cpp
+4
-7
src/Classic/AbsBeamline/ElementBase.cpp
src/Classic/AbsBeamline/ElementBase.cpp
+1
-2
src/Classic/AbsBeamline/FlexibleCollimator.cpp
src/Classic/AbsBeamline/FlexibleCollimator.cpp
+2
-4
src/Classic/AbsBeamline/Monitor.cpp
src/Classic/AbsBeamline/Monitor.cpp
+1
-3
src/Classic/AbsBeamline/MultipoleTBase.cpp
src/Classic/AbsBeamline/MultipoleTBase.cpp
+11
-11
src/Classic/AbsBeamline/MultipoleTBase.h
src/Classic/AbsBeamline/MultipoleTBase.h
+3
-3
src/Classic/AbsBeamline/MultipoleTFunctions/CoordinateTransform.cpp
...c/AbsBeamline/MultipoleTFunctions/CoordinateTransform.cpp
+16
-17
src/Classic/AbsBeamline/Offset.cpp
src/Classic/AbsBeamline/Offset.cpp
+18
-18
src/Classic/AbsBeamline/ParallelPlate.cpp
src/Classic/AbsBeamline/ParallelPlate.cpp
+0
-1
src/Classic/AbsBeamline/PluginElement.cpp
src/Classic/AbsBeamline/PluginElement.cpp
+3
-5
src/Classic/AbsBeamline/Probe.cpp
src/Classic/AbsBeamline/Probe.cpp
+2
-2
src/Classic/AbsBeamline/RBend.cpp
src/Classic/AbsBeamline/RBend.cpp
+6
-6
src/Classic/AbsBeamline/RBend3D.cpp
src/Classic/AbsBeamline/RBend3D.cpp
+11
-10
src/Classic/AbsBeamline/RFCavity.cpp
src/Classic/AbsBeamline/RFCavity.cpp
+45
-52
src/Classic/AbsBeamline/RFCavity.h
src/Classic/AbsBeamline/RFCavity.h
+20
-27
src/Classic/AbsBeamline/Ring.cpp
src/Classic/AbsBeamline/Ring.cpp
+17
-17
src/Classic/AbsBeamline/Ring.h
src/Classic/AbsBeamline/Ring.h
+3
-3
src/Classic/AbsBeamline/ScalingFFAMagnet.cpp
src/Classic/AbsBeamline/ScalingFFAMagnet.cpp
+9
-9
src/Classic/AbsBeamline/Septum.cpp
src/Classic/AbsBeamline/Septum.cpp
+4
-4
src/Classic/AbsBeamline/Stripper.cpp
src/Classic/AbsBeamline/Stripper.cpp
+3
-3
src/Classic/AbsBeamline/TravelingWave.cpp
src/Classic/AbsBeamline/TravelingWave.cpp
+5
-7
src/Classic/AbsBeamline/TravelingWave.h
src/Classic/AbsBeamline/TravelingWave.h
+21
-27
src/Classic/Algebra/Vector.h
src/Classic/Algebra/Vector.h
+1
-1
src/Classic/Algorithms/IdealMapper.cpp
src/Classic/Algorithms/IdealMapper.cpp
+8
-10
src/Classic/Algorithms/LinearMapper.cpp
src/Classic/Algorithms/LinearMapper.cpp
+16
-16
src/Classic/Algorithms/OrbitTracker.cpp
src/Classic/Algorithms/OrbitTracker.cpp
+18
-21
src/Classic/Algorithms/PartBins.cpp
src/Classic/Algorithms/PartBins.cpp
+4
-4
src/Classic/Algorithms/PartBunch.cpp
src/Classic/Algorithms/PartBunch.cpp
+6
-10
src/Classic/Algorithms/PartBunchBase.hpp
src/Classic/Algorithms/PartBunchBase.hpp
+20
-21
src/Classic/Algorithms/PartData.cpp
src/Classic/Algorithms/PartData.cpp
+6
-6
src/Classic/Algorithms/Quaternion.cpp
src/Classic/Algorithms/Quaternion.cpp
+11
-11
src/Classic/Algorithms/Quaternion.h
src/Classic/Algorithms/Quaternion.h
+2
-2
src/Classic/Algorithms/ThinMapper.cpp
src/Classic/Algorithms/ThinMapper.cpp
+7
-10
src/Classic/Algorithms/ThinTracker.cpp
src/Classic/Algorithms/ThinTracker.cpp
+19
-22
src/Classic/Algorithms/Tracker.cpp
src/Classic/Algorithms/Tracker.cpp
+5
-5
src/Classic/Algorithms/Vektor.h
src/Classic/Algorithms/Vektor.h
+1
-1
src/Classic/BeamlineGeometry/Euclid3DGeometry.cpp
src/Classic/BeamlineGeometry/Euclid3DGeometry.cpp
+1
-1
src/Classic/BeamlineGeometry/Rotation3D.cpp
src/Classic/BeamlineGeometry/Rotation3D.cpp
+15
-15
src/Classic/Fields/Astra1DDynamic.cpp
src/Classic/Fields/Astra1DDynamic.cpp
+12
-17
src/Classic/Fields/Astra1DElectroStatic.cpp
src/Classic/Fields/Astra1DElectroStatic.cpp
+2
-5
src/Classic/Fields/Astra1DMagnetoStatic.cpp
src/Classic/Fields/Astra1DMagnetoStatic.cpp
+5
-9
src/Classic/Fields/FM1DProfile2.cpp
src/Classic/Fields/FM1DProfile2.cpp
+12
-16
src/Classic/Fields/FM2DDynamic.cpp
src/Classic/Fields/FM2DDynamic.cpp
+4
-8
src/Classic/Fields/FM2DDynamic.h
src/Classic/Fields/FM2DDynamic.h
+1
-1
src/Classic/Fields/FM2DElectroStatic.cpp
src/Classic/Fields/FM2DElectroStatic.cpp
+5
-6
src/Classic/Fields/FM2DElectroStatic.h
src/Classic/Fields/FM2DElectroStatic.h
+1
-1
src/Classic/Fields/FM2DMagnetoStatic.cpp
src/Classic/Fields/FM2DMagnetoStatic.cpp
+3
-4
src/Classic/Fields/FM2DMagnetoStatic.h
src/Classic/Fields/FM2DMagnetoStatic.h
+1
-1
src/Classic/Fields/FM3DDynamic.cpp
src/Classic/Fields/FM3DDynamic.cpp
+2
-6
src/Classic/Fields/FM3DH5Block.cpp
src/Classic/Fields/FM3DH5Block.cpp
+1
-3
src/Classic/Fields/FM3DH5Block_nonscale.cpp
src/Classic/Fields/FM3DH5Block_nonscale.cpp
+4
-6
src/Classic/Fields/FM3DMagnetoStatic.cpp
src/Classic/Fields/FM3DMagnetoStatic.cpp
+3
-7
src/Classic/Fields/FM3DMagnetoStaticH5Block.cpp
src/Classic/Fields/FM3DMagnetoStaticH5Block.cpp
+1
-3
src/Classic/Fields/FMDummy.cpp
src/Classic/Fields/FMDummy.cpp
+2
-3
src/Classic/Fields/Fieldmap.cpp
src/Classic/Fields/Fieldmap.cpp
+23
-23
src/Classic/Fields/SectorField.cpp
src/Classic/Fields/SectorField.cpp
+13
-13
src/Classic/Filters/FixedFFTLowPass.cpp
src/Classic/Filters/FixedFFTLowPass.cpp
+2
-3
src/Classic/Filters/RelativeFFTLowPass.cpp
src/Classic/Filters/RelativeFFTLowPass.cpp
+10
-11
src/Classic/Filters/SavitzkyGolay.cpp
src/Classic/Filters/SavitzkyGolay.cpp
+16
-17
src/Classic/Filters/Stencil.cpp
src/Classic/Filters/Stencil.cpp
+5
-6
src/Classic/FixedAlgebra/DragtFinnMap.h
src/Classic/FixedAlgebra/DragtFinnMap.h
+2
-2
src/Classic/FixedAlgebra/DragtFinnNormalForm.h
src/Classic/FixedAlgebra/DragtFinnNormalForm.h
+6
-7
src/Classic/FixedAlgebra/FDoubleEigen.h
src/Classic/FixedAlgebra/FDoubleEigen.h
+6
-6
src/Classic/FixedAlgebra/FNormalForm.h
src/Classic/FixedAlgebra/FNormalForm.h
+6
-7
src/Classic/Solvers/BeamStrippingPhysics.cpp
src/Classic/Solvers/BeamStrippingPhysics.cpp
+7
-10
src/Classic/Solvers/GreenWakeFunction.cpp
src/Classic/Solvers/GreenWakeFunction.cpp
+6
-7
src/Distribution/ClosedOrbitFinder.h
src/Distribution/ClosedOrbitFinder.h
+2
-2
src/Distribution/Distribution.cpp
src/Distribution/Distribution.cpp
+2
-2
src/Distribution/Harmonics.h
src/Distribution/Harmonics.h
+3
-3
src/Distribution/LaserProfile.cpp
src/Distribution/LaserProfile.cpp
+2
-4
src/Distribution/SigmaGenerator.h
src/Distribution/SigmaGenerator.h
+6
-6
src/Elements/OpalBeamStripping.cpp
src/Elements/OpalBeamStripping.cpp
+0
-1
src/Elements/OpalCCollimator.cpp
src/Elements/OpalCCollimator.cpp
+0
-1
src/Elements/OpalCavity.cpp
src/Elements/OpalCavity.cpp
+1
-3
src/Elements/OpalElement.cpp
src/Elements/OpalElement.cpp
+13
-13
src/Elements/OpalMarker.cpp
src/Elements/OpalMarker.cpp
+0
-1
src/Elements/OpalParallelPlate.cpp
src/Elements/OpalParallelPlate.cpp
+1
-3
src/Elements/OpalTravelingWave.cpp
src/Elements/OpalTravelingWave.cpp
+2
-4
src/Elements/OpalVariableRFCavityFringeField.cpp
src/Elements/OpalVariableRFCavityFringeField.cpp
+3
-4
src/Expressions/ARow.cpp
src/Expressions/ARow.cpp
+0
-1
src/Expressions/ATable.cpp
src/Expressions/ATable.cpp
+0
-1
src/Expressions/SCell.cpp
src/Expressions/SCell.cpp
+0
-1
src/PhysicsActions/Dynamic.cpp
src/PhysicsActions/Dynamic.cpp
+1
-1
src/Solvers/ArbitraryDomain.cpp
src/Solvers/ArbitraryDomain.cpp
+7
-7
src/Solvers/P3MPoissonSolver.cpp
src/Solvers/P3MPoissonSolver.cpp
+9
-8
src/Steppers/BorisPusher.h
src/Steppers/BorisPusher.h
+3
-5
src/Structure/BoundaryGeometry.cpp
src/Structure/BoundaryGeometry.cpp
+26
-25
src/Structure/SecondaryEmissionPhysics.cpp
src/Structure/SecondaryEmissionPhysics.cpp
+89
-89
src/Tables/Period.cpp
src/Tables/Period.cpp
+1
-1
No files found.
src/AbstractObjects/OpalData.cpp
View file @
0530b5ea
...
...
@@ -45,7 +45,7 @@
// /DTA
#define MAX_NUM_INSTANCES 10
using
namespace
std
;
// Class OpalData::ClearReference
// ------------------------------------------------------------------------
...
...
@@ -524,8 +524,8 @@ void OpalData::define(Object *newObject) {
if
(
table
->
isDependent
(
name
))
{
if
(
Options
::
info
)
{
cerr
<<
endl
<<
"Erasing dependent table
\"
"
<<
tableName
<<
"
\"
."
<<
endl
<<
endl
;
std
::
cerr
<<
std
::
endl
<<
"Erasing dependent table
\"
"
<<
tableName
<<
"
\"
."
<<
std
::
endl
;
}
// Remove table from directory.
...
...
@@ -599,8 +599,8 @@ void OpalData::makeDirty(Object *obj) {
void
OpalData
::
printNames
(
std
::
ostream
&
os
,
const
std
::
string
&
pattern
)
{
int
column
=
0
;
RegularExpression
regex
(
pattern
);
os
<<
endl
<<
"Object names matching the pattern
\"
"
<<
pattern
<<
"
\"
:"
<<
endl
;
os
<<
std
::
endl
<<
"Object names matching the pattern
\"
"
<<
pattern
<<
"
\"
:"
<<
std
::
endl
;
for
(
ObjectDir
::
const_iterator
index
=
p
->
mainDirectory
.
begin
();
index
!=
p
->
mainDirectory
.
end
();
++
index
)
{
...
...
@@ -617,14 +617,14 @@ void OpalData::printNames(std::ostream &os, const std::string &pattern) {
column
++
;
}
while
((
column
%
20
)
!=
0
);
}
else
{
os
<<
endl
;
os
<<
std
::
endl
;
column
=
0
;
}
}
}
if
(
column
)
os
<<
endl
;
os
<<
endl
;
if
(
column
)
os
<<
std
::
endl
;
os
<<
std
::
endl
;
}
...
...
src/AbstractObjects/RangeRep.cpp
View file @
0530b5ea
...
...
@@ -19,7 +19,6 @@
#include "AbstractObjects/RangeRep.h"
#include "AbstractObjects/Element.h"
#include <iostream>
using
namespace
std
;
// Class RangeRep
...
...
src/Algorithms/LieMapper.cpp
View file @
0530b5ea
...
...
@@ -54,7 +54,6 @@
class
Beamline
;
class
PartData
;
using
Physics
::
c
;
typedef
FTps
<
double
,
6
>
Series
;
...
...
@@ -183,7 +182,7 @@ void LieMapper::visitMonitor(const Monitor &corr) {
void
LieMapper
::
visitMultipole
(
const
Multipole
&
mult
)
{
double
length
=
mult
.
getElementLength
()
*
flip_s
;
const
BMultipoleField
&
field
=
mult
.
getField
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
if
(
length
)
{
// Normal case: Finite-length multipole, field coefficients are B.
...
...
@@ -231,7 +230,7 @@ void LieMapper::visitRBend(const RBend &bend) {
// Geometry.
const
RBendGeometry
&
geometry
=
bend
.
getGeometry
();
double
length
=
flip_s
*
geometry
.
getElementLength
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BMultipoleField
&
field
=
bend
.
getField
();
if
(
length
)
{
...
...
@@ -313,7 +312,7 @@ void LieMapper::visitRFCavity(const RFCavity &as) {
// Compute Hamiltonian.
static
const
Series
t
=
Series
::
makeVariable
(
AbstractMapper
::
T
);
Series
H
=
peak
*
cos
(
as
.
getPhase
()
+
(
freq
/
c
)
*
t
);
Series
H
=
peak
*
cos
(
as
.
getPhase
()
+
(
freq
/
Physics
::
c
)
*
t
);
// Build map.
DragtFinnMap
<
3
>
theMap
=
DragtFinnMap
<
3
>::
factorSimple
(
H
);
...
...
@@ -333,7 +332,7 @@ void LieMapper::visitRFQuadrupole(const RFQuadrupole &rfq) {
void
LieMapper
::
visitSBend
(
const
SBend
&
bend
)
{
const
PlanarArcGeometry
&
geometry
=
bend
.
getGeometry
();
double
length
=
flip_s
*
geometry
.
getElementLength
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BMultipoleField
&
field
=
bend
.
getField
();
if
(
length
)
{
...
...
@@ -417,7 +416,7 @@ void LieMapper::visitSolenoid(const Solenoid &solenoid) {
double
length
=
flip_s
*
solenoid
.
getElementLength
();
if
(
length
)
{
double
ks
=
(
flip_B
*
itsReference
.
getQ
()
*
solenoid
.
getBz
()
*
c
)
/
double
ks
=
(
flip_B
*
itsReference
.
getQ
()
*
solenoid
.
getBz
()
*
Physics
::
c
)
/
(
2.0
*
itsReference
.
getP
());
if
(
ks
)
{
...
...
src/Algorithms/MPSplitIntegrator.cpp
View file @
0530b5ea
...
...
@@ -29,8 +29,6 @@
#include "FixedAlgebra/FVps.h"
#include "Physics/Physics.h"
using
Physics
::
c
;
// Class MPSplitIntegrator
// ------------------------------------------------------------------------
...
...
@@ -82,7 +80,7 @@ void MPSplitIntegrator::trackMap(FVps<double, 6> &map,
double
length
=
itsMultipole
->
getElementLength
();
if
(
revTrack
)
length
=
-
length
;
BMultipoleField
field
=
itsMultipole
->
getField
();
double
scale
=
(
ref
.
getQ
()
*
c
)
/
(
ref
.
getP
());
double
scale
=
(
ref
.
getQ
()
*
Physics
::
c
)
/
(
ref
.
getP
());
if
(
revBeam
)
scale
=
-
scale
;
if
(
length
)
{
...
...
@@ -112,7 +110,7 @@ void MPSplitIntegrator::trackParticle(OpalParticle &part, const PartData &ref,
double
length
=
itsMultipole
->
getElementLength
();
if
(
revTrack
)
length
=
-
length
;
BMultipoleField
field
=
itsMultipole
->
getField
();
double
scale
=
(
ref
.
getQ
()
*
c
)
/
(
ref
.
getP
());
double
scale
=
(
ref
.
getQ
()
*
Physics
::
c
)
/
(
ref
.
getP
());
if
(
revBeam
)
scale
=
-
scale
;
if
(
length
)
{
...
...
@@ -143,7 +141,7 @@ void MPSplitIntegrator::trackBunch(PartBunchBase<double, 3> *bunch,
double
length
=
itsMultipole
->
getElementLength
();
if
(
revTrack
)
length
=
-
length
;
BMultipoleField
field
=
itsMultipole
->
getField
();
double
scale
=
(
ref
.
getQ
()
*
c
)
/
(
ref
.
getP
());
double
scale
=
(
ref
.
getQ
()
*
Physics
::
c
)
/
(
ref
.
getP
());
if
(
revBeam
)
scale
=
-
scale
;
if
(
length
)
{
...
...
src/Algorithms/MapAnalyser.cpp
View file @
0530b5ea
...
...
@@ -306,7 +306,7 @@ void MapAnalyser::normalizeEigen_m(cfMatrix_t& eigenVecM, cfMatrix_t& invEigenVe
for
(
int
j
=
0
;
j
<
6
;
j
+=
2
){
temp
+=
2
*
(
eigenVecM
[
j
][
i
]
*
std
::
conj
(
eigenVecM
[
j
+
1
][
i
])).
imag
();
}
temp
=
std
::
f
abs
(
temp
);
temp
=
std
::
abs
(
temp
);
if
(
temp
>
1e-10
){
for
(
int
j
=
0
;
j
<
6
;
j
++
){
...
...
src/Algorithms/ParallelCyclotronTracker.cpp
View file @
0530b5ea
This diff is collapsed.
Click to expand it.
src/Algorithms/ThickMapper.cpp
View file @
0530b5ea
...
...
@@ -55,7 +55,6 @@
class
Beamline
;
class
PartData
;
using
Physics
::
c
;
#define PSdim 6
typedef
FVector
<
double
,
PSdim
>
Vector
;
...
...
@@ -106,7 +105,7 @@ void ThickMapper::visitCorrector(const Corrector &corr) {
// Apply kick.
double
scale
=
(
flip_s
*
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
(
flip_s
*
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BDipoleField
&
field
=
corr
.
getField
();
itsMap
[
PX
]
-=
field
.
getBy
()
*
scale
;
itsMap
[
PY
]
+=
field
.
getBx
()
*
scale
;
...
...
@@ -153,7 +152,7 @@ void ThickMapper::visitMultipole(const Multipole &mult) {
//std::cerr << "==> In ThickMapper::visitMultipole(const Multipole &mult)" << std::endl;
// Geometry and Field
double
length
=
flip_s
*
mult
.
getElementLength
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BMultipoleField
&
field
=
mult
.
getField
();
int
order
=
field
.
order
();
...
...
@@ -220,7 +219,7 @@ void ThickMapper::visitRBend(const RBend &bend) {
// Geometry and Field.
const
RBendGeometry
&
geometry
=
bend
.
getGeometry
();
double
length
=
flip_s
*
geometry
.
getElementLength
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BMultipoleField
&
field
=
bend
.
getField
();
int
order
=
field
.
order
();
double
beta_inv
=
1.0
/
itsReference
.
getBeta
();
...
...
@@ -336,7 +335,7 @@ void ThickMapper::visitRFCavity(const RFCavity &as) {
double
peak
=
flip_s
*
as
.
getAmplitude
()
/
itsReference
.
getP
();
Series
pt
=
itsMap
[
PT
]
+
1.0
;
Series
speed
=
(
c
*
pt
)
/
sqrt
(
pt
*
pt
+
kin
*
kin
);
Series
speed
=
(
Physics
::
c
*
pt
)
/
sqrt
(
pt
*
pt
+
kin
*
kin
);
Series
phase
=
as
.
getPhase
()
+
freq
*
itsMap
[
T
]
/
speed
;
itsMap
[
PT
]
+=
peak
*
sin
(
phase
)
/
pt
;
...
...
@@ -356,7 +355,7 @@ void ThickMapper::visitSBend(const SBend &bend) {
// Geometry and Field.
const
PlanarArcGeometry
&
geometry
=
bend
.
getGeometry
();
double
length
=
flip_s
*
geometry
.
getElementLength
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BMultipoleField
&
field
=
bend
.
getField
();
int
order
=
field
.
order
();
double
beta_inv
=
1.0
/
itsReference
.
getBeta
();
...
...
@@ -480,7 +479,7 @@ void ThickMapper::visitSolenoid(const Solenoid &solenoid) {
double
length
=
flip_s
*
solenoid
.
getElementLength
();
if
(
length
!=
0.0
)
{
double
ks
=
(
flip_B
*
itsReference
.
getQ
()
*
solenoid
.
getBz
()
*
c
)
/
double
ks
=
(
flip_B
*
itsReference
.
getQ
()
*
solenoid
.
getBz
()
*
Physics
::
c
)
/
(
2.0
*
itsReference
.
getP
());
if
(
ks
)
{
...
...
src/Algorithms/TransportMapper.cpp
View file @
0530b5ea
...
...
@@ -51,9 +51,8 @@
#include "FixedAlgebra/TransportFun.h"
#include "FixedAlgebra/TransportMath.h"
#include "Physics/Physics.h"
#include <cmath>
using
Physics
::
c
;
#include <cmath>
typedef
FTps
<
double
,
2
>
Series2
;
typedef
TransportFun
<
double
,
6
>
TptFun
;
...
...
@@ -141,7 +140,7 @@ void TransportMapper::visitCorrector(const Corrector &corr) {
if
(
length
)
applyDrift
(
length
/
2.0
);
// Apply kick.
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BDipoleField
&
field
=
corr
.
getField
();
itsMap
[
PX
]
-=
field
.
getBy
()
*
scale
;
itsMap
[
PY
]
+=
field
.
getBx
()
*
scale
;
...
...
@@ -185,7 +184,7 @@ void TransportMapper::visitMonitor(const Monitor &corr) {
void
TransportMapper
::
visitMultipole
(
const
Multipole
&
multipole
)
{
double
length
=
flip_s
*
multipole
.
getElementLength
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BMultipoleField
&
field
=
multipole
.
getField
();
if
(
length
)
{
...
...
@@ -212,7 +211,7 @@ void TransportMapper::visitProbe(const Probe &/*prob*/) {
void
TransportMapper
::
visitRBend
(
const
RBend
&
bend
)
{
const
RBendGeometry
&
geometry
=
bend
.
getGeometry
();
double
length
=
flip_s
*
geometry
.
getElementLength
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BMultipoleField
&
field
=
bend
.
getField
();
if
(
length
==
0.0
)
{
...
...
@@ -271,7 +270,7 @@ void TransportMapper::visitRFCavity(const RFCavity &as) {
if
(
length
)
applyDrift
(
length
/
2.0
);
// Apply accelerating voltage.
TptFun
time
=
itsMap
[
T
]
/
(
c
*
itsReference
.
getBeta
());
TptFun
time
=
itsMap
[
T
]
/
(
Physics
::
c
*
itsReference
.
getBeta
());
double
peak
=
flip_s
*
as
.
getAmplitude
()
/
itsReference
.
getP
();
TptFun
phase
=
as
.
getPhase
()
+
as
.
getFrequency
()
*
time
;
itsMap
[
PT
]
+=
peak
*
sin
(
phase
);
...
...
@@ -290,7 +289,7 @@ void TransportMapper::visitRFQuadrupole(const RFQuadrupole &rfq) {
void
TransportMapper
::
visitSBend
(
const
SBend
&
bend
)
{
const
PlanarArcGeometry
&
geometry
=
bend
.
getGeometry
();
double
length
=
flip_s
*
geometry
.
getElementLength
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
c
)
/
itsReference
.
getP
();
double
scale
=
(
flip_B
*
itsReference
.
getQ
()
*
Physics
::
c
)
/
itsReference
.
getP
();
const
BMultipoleField
&
field
=
bend
.
getField
();
if
(
length
==
0.0
)
{
...
...
@@ -360,7 +359,7 @@ void TransportMapper::visitSolenoid(const Solenoid &solenoid) {
double
length
=
flip_s
*
solenoid
.
getElementLength
();
if
(
length
)
{
double
ks
=
(
flip_B
*
itsReference
.
getQ
()
*
solenoid
.
getBz
()
*
c
)
/
double
ks
=
(
flip_B
*
itsReference
.
getQ
()
*
solenoid
.
getBz
()
*
Physics
::
c
)
/
(
2.0
*
itsReference
.
getP
());
if
(
ks
)
{
...
...
src/Aperture/Aperture.cpp
View file @
0530b5ea
This diff is collapsed.
Click to expand it.
src/Aperture/Split.cpp
View file @
0530b5ea
This diff is collapsed.
Click to expand it.
src/BasicActions/DumpEMFields.cpp
View file @
0530b5ea
...
...
@@ -27,7 +27,7 @@
#include <fstream>
#include <cmath>
#include "Fields/Interpolation/NDGrid.h" // classic
#include "AbsBeamline/Component.h" // classic
#include "Utilities/OpalException.h"
...
...
@@ -114,7 +114,7 @@ void DumpEMFields::parseCoordinateSystem() {
}
std
::
string
coordStr
=
Attributes
::
getString
(
itsAttr
[
13
]);
for
(
size_t
i
=
0
;
i
<
coordStr
.
size
();
++
i
)
{
coordStr
[
i
]
=
tolower
(
coordStr
[
i
]);
coordStr
[
i
]
=
std
::
tolower
(
coordStr
[
i
]);
}
if
(
coordStr
==
"cylindrical"
)
{
coordinates_m
=
CYLINDRICAL
;
...
...
@@ -197,12 +197,12 @@ void DumpEMFields::writeFields(Component* field) {
void
DumpEMFields
::
checkInt
(
double
real
,
std
::
string
name
,
double
tolerance
)
{
real
+=
tolerance
;
// prevent rounding error
if
(
fabs
(
floor
(
real
)
-
real
)
>
2
*
tolerance
)
{
if
(
std
::
abs
(
std
::
floor
(
real
)
-
real
)
>
2
*
tolerance
)
{
throw
OpalException
(
"DumpEMFields::checkInt"
,
"Value for "
+
name
+
" should be an integer but a real value was found"
);
}
if
(
floor
(
real
)
<
0.5
)
{
if
(
std
::
floor
(
real
)
<
0.5
)
{
throw
OpalException
(
"DumpEMFields::checkInt"
,
"Value for "
+
name
+
" should be 1 or more"
);
}
...
...
@@ -247,8 +247,8 @@ void DumpEMFields::writeFieldLine(Component* field,
Vector_t
point
=
pointIn
;
if
(
coordinates_m
==
CYLINDRICAL
)
{
// pointIn is r, phi, z
point
[
0
]
=
cos
(
pointIn
[
1
])
*
pointIn
[
0
];
point
[
1
]
=
sin
(
pointIn
[
1
])
*
pointIn
[
0
];
point
[
0
]
=
std
::
cos
(
pointIn
[
1
])
*
pointIn
[
0
];
point
[
1
]
=
s
td
::
s
in
(
pointIn
[
1
])
*
pointIn
[
0
];
}
field
->
apply
(
point
,
centroid
,
time
,
E
,
B
);
...
...
@@ -256,10 +256,10 @@ void DumpEMFields::writeFieldLine(Component* field,
Vector_t
Eout
=
E
;
if
(
coordinates_m
==
CYLINDRICAL
)
{
// pointIn is r, phi, z
Bout
[
0
]
=
B
[
0
]
*
cos
(
pointIn
[
1
])
+
B
[
1
]
*
sin
(
pointIn
[
1
]);
Bout
[
1
]
=
-
B
[
0
]
*
s
in
(
pointIn
[
1
])
+
B
[
1
]
*
cos
(
pointIn
[
1
]);
Eout
[
0
]
=
E
[
0
]
*
cos
(
pointIn
[
1
])
+
E
[
1
]
*
sin
(
pointIn
[
1
]);
Eout
[
1
]
=
-
E
[
0
]
*
s
in
(
pointIn
[
1
])
+
E
[
1
]
*
cos
(
pointIn
[
1
]);
Bout
[
0
]
=
B
[
0
]
*
std
::
cos
(
pointIn
[
1
])
+
B
[
1
]
*
std
::
sin
(
pointIn
[
1
]);
Bout
[
1
]
=
-
B
[
0
]
*
s
td
::
sin
(
pointIn
[
1
])
+
B
[
1
]
*
std
::
cos
(
pointIn
[
1
]);
Eout
[
0
]
=
E
[
0
]
*
std
::
cos
(
pointIn
[
1
])
+
E
[
1
]
*
std
::
sin
(
pointIn
[
1
]);
Eout
[
1
]
=
-
E
[
0
]
*
s
td
::
sin
(
pointIn
[
1
])
+
E
[
1
]
*
std
::
cos
(
pointIn
[
1
]);
fout
<<
pointIn
[
0
]
<<
" "
<<
pointIn
[
1
]
*
DEGREE
<<
" "
<<
pointIn
[
2
]
<<
" "
<<
time
<<
" "
;
}
else
{
fout
<<
pointIn
[
0
]
<<
" "
<<
pointIn
[
1
]
<<
" "
<<
pointIn
[
2
]
<<
" "
<<
time
<<
" "
;
...
...
@@ -309,5 +309,4 @@ void DumpEMFields::writeFieldThis(Component* field) {
"Something went wrong during writing "
+
filename_m
);
}
fout
.
close
();
}
}
\ No newline at end of file
src/BasicActions/DumpFields.cpp
View file @
0530b5ea
...
...
@@ -131,12 +131,12 @@ void DumpFields::writeFields(Component* field) {
}
void
DumpFields
::
checkInt
(
double
real
,
std
::
string
name
,
double
tolerance
)
{
if
(
fabs
(
floor
(
real
)
-
real
)
>
tolerance
)
{
if
(
std
::
abs
(
std
::
floor
(
real
)
-
real
)
>
tolerance
)
{
throw
OpalException
(
"DumpFields::checkInt"
,
"Value for "
+
name
+
" should be an integer but a real value was found"
);
}
if
(
floor
(
real
)
<
0.5
)
{
if
(
std
::
floor
(
real
)
<
0.5
)
{
throw
OpalException
(
"DumpFields::checkInt"
,
"Value for "
+
name
+
" should be 1 or more"
);
}
...
...
@@ -183,4 +183,4 @@ void DumpFields::writeFieldThis(Component* field) {
"Something went wrong during writing "
+
filename_m
);
}
fout
.
close
();
}
}
\ No newline at end of file
src/Classic/AbsBeamline/BeamStripping.cpp
View file @
0530b5ea
...
...
@@ -286,12 +286,12 @@ double BeamStripping::checkPressure(const double &x, const double &y) {
double
tet
=
tempv
;
if
((
x
<
0
)
&&
(
y
>=
0
))
tet
=
Physics
::
pi
+
tempv
;
else
if
((
x
<
0
)
&&
(
y
<=
0
))
tet
=
Physics
::
pi
+
tempv
;
else
if
((
x
>
0
)
&&
(
y
<=
0
))
tet
=
2.0
*
Physics
::
pi
+
tempv
;
else
if
((
x
>
0
)
&&
(
y
<=
0
))
tet
=
Physics
::
two_
pi
+
tempv
;
else
if
((
x
==
0
)
&&
(
y
>
0
))
tet
=
Physics
::
pi
/
2.0
;
else
if
((
x
==
0
)
&&
(
y
<
0
))
tet
=
1.5
*
Physics
::
pi
;
// the actual angle of particle
tet
=
tet
/
Physics
::
pi
*
180.0
;
tet
=
tet
*
Physics
::
rad2deg
;
// the corresponding angle on the field map
// Note: this does not work if the start point of field map does not equal zero.
...
...
src/Classic/AbsBeamline/Bend2D.cpp
View file @
0530b5ea
This diff is collapsed.
Click to expand it.
src/Classic/AbsBeamline/CCollimator.cpp
View file @
0530b5ea
...
...
@@ -166,5 +166,4 @@ void CCollimator::doSetGeom() {
// *gmsg << "point " << i << " ( " << geom_m[i].x << ", " << geom_m[i].y << ")" << endl;
// }
// *gmsg << "rmin " << rmin_m << " rmax " << rmax_m << endl;
}
}
\ No newline at end of file
src/Classic/AbsBeamline/Corrector.cpp
View file @
0530b5ea
...
...
@@ -25,7 +25,6 @@
#include "Utilities/GeneralClassicException.h"
#include "Utilities/Util.h"
extern
Inform
*
gmsg
;
// Class Corrector
// ------------------------------------------------------------------------
...
...
@@ -116,7 +115,7 @@ void Corrector::goOnline(const double &) {
}
if
(
!
kickFieldSet_m
)
{
const
double
momentum
=
sqrt
(
std
::
pow
(
designEnergy_m
,
2.0
)
+
2.0
*
designEnergy_m
*
RefPartBunch_m
->
getM
());
const
double
momentum
=
s
td
::
s
qrt
(
std
::
pow
(
designEnergy_m
,
2.0
)
+
2.0
*
designEnergy_m
*
RefPartBunch_m
->
getM
());
const
double
magnitude
=
momentum
/
(
Physics
::
c
*
pathLength
);
kickField_m
=
magnitude
*
RefPartBunch_m
->
getQ
()
*
Vector_t
(
kickY_m
,
-
kickX_m
,
0.0
);
}
...
...
@@ -132,7 +131,7 @@ void Corrector::setDesignEnergy(const double& ekin, bool changeable) {
if
(
RefPartBunch_m
)
{
if
(
!
kickFieldSet_m
)
{
const
double
pathLength
=
getGeometry
().
getElementLength
();
const
double
momentum
=
sqrt
(
std
::
pow
(
designEnergy_m
,
2.0
)
+
2.0
*
designEnergy_m
*
RefPartBunch_m
->
getM
());
const
double
momentum
=
s
td
::
s
qrt
(
std
::
pow
(
designEnergy_m
,
2.0
)
+
2.0
*
designEnergy_m
*
RefPartBunch_m
->
getM
());
const
double
magnitude
=
momentum
/
(
Physics
::
c
*
pathLength
);
kickField_m
=
magnitude
*
RefPartBunch_m
->
getQ
()
*
Vector_t
(
kickY_m
,
-
kickX_m
,
0.0
);
}
...
...
src/Classic/AbsBeamline/Cyclotron.cpp
View file @
0530b5ea
...
...
@@ -28,7 +28,6 @@ throw GeneralClassicException("Cyclotron::getFieldFromFile",\
extern
Inform
*
gmsg
;
using
Physics
::
pi
;
// Class Cyclotron
// ------------------------------------------------------------------------
...
...
@@ -407,16 +406,16 @@ bool Cyclotron::apply(const Vector_t &R, const Vector_t &/*P*/,
/* if((R[0] > 0) && (R[1] >= 0)) tet = tempv;
else*/
if
((
R
[
0
]
<
0
)
&&
(
R
[
1
]
>=
0
))
tet
=
pi
+
tempv
;
else
if
((
R
[
0
]
<
0
)
&&
(
R
[
1
]
<=
0
))
tet
=
pi
+
tempv
;
else
if
((
R
[
0
]
>
0
)
&&
(
R
[
1
]
<=
0
))
tet
=
2.0
*
pi
+
tempv
;
else
if
((
R
[
0
]
==
0
)
&&
(
R
[
1
]
>
0
))
tet
=
pi
/
2.0
;
else
if
((
R
[
0
]
==
0
)
&&
(
R
[
1
]
<
0
))
tet
=
1.5
*
pi
;
if
((
R
[
0
]
<
0
)
&&
(
R
[
1
]
>=
0
))
tet
=
Physics
::
pi
+
tempv
;
else
if
((
R
[
0
]
<
0
)
&&
(
R
[
1
]
<=
0
))
tet
=
Physics
::
pi
+
tempv
;
else
if
((
R
[
0
]
>
0
)
&&
(
R
[
1
]
<=
0
))
tet
=
Physics
::
two_
pi
+
tempv
;
else
if
((
R
[
0
]
==
0
)
&&
(
R
[
1
]
>
0
))
tet
=
Physics
::
pi
/
2.0
;
else
if
((
R
[
0
]
==
0
)
&&
(
R
[
1
]
<
0
))
tet
=
1.5
*
Physics
::
pi
;
double
tet_rad
=
tet
;
// the actual angle of particle in degree
tet
=
tet
/
pi
*
180.0
;
tet
*=
Physics
::
rad2deg
;
// Necessary for gap phase output -DW
if
(
0
<=
tet
&&
tet
<=
45
)
waiting_for_gap
=
1
;
...
...
@@ -438,8 +437,8 @@ bool Cyclotron::apply(const Vector_t &R, const Vector_t &/*P*/,
this
->
applyTrimCoil
(
rad
,
R
[
2
],
tet_rad
,
br
,
bz
);
/* Br Btheta -> Bx By */
B
[
0
]
=
br
*
cos
(
tet_rad
)
-
bt
*
sin
(
tet_rad
);
B
[
1
]
=
br
*
s
in
(
tet_rad
)
+
bt
*
cos
(
tet_rad
);
B
[
0
]
=
br
*
std
::
cos
(
tet_rad
)
-
bt
*
std
::
sin
(
tet_rad
);
B
[
1
]
=
br
*
s
td
::
sin
(
tet_rad
)
+
bt
*
std
::
cos
(
tet_rad
);
B
[
2
]
=
bz
;
}
else
{
return
true
;
...
...
@@ -495,18 +494,18 @@ bool Cyclotron::apply(const Vector_t &R, const Vector_t &/*P*/,
}
}
double
phase
=
2.0
*
pi
*
1.0E-3
*
frequency
*
t
+
(
*
rfphii
);
// f in [MHz], t in [ns]
double
phase
=
Physics
::
two_
pi
*
1.0E-3
*
frequency
*
t
+
(
*
rfphii
);
// f in [MHz], t in [ns]
E
+=
ebscale
*
cos
(
phase
)
*
tmpE
;
B
-=
ebscale
*
sin
(
phase
)
*
tmpB
;
E
+=
ebscale
*
std
::
cos
(
phase
)
*
tmpE
;
B
-=
ebscale
*
s
td
::
s
in
(
phase
)
*
tmpB
;
if
(
myBFieldType_m
!=
SYNCHRO
)
continue
;
// Some phase output -DW
double
phase_print
=
phase
*
Physics
::
rad2deg
;
if
(
tet
>=
90.0
&&
waiting_for_gap
==
1
)
{
double
phase_print
=
180.0
*
phase
/
pi
;
phase_print
=
fmod
(
phase_print
,
360
)
-
360.0
;
phase_print
=
std
::
fmod
(
phase_print
,
360
)
-
360.0
;
*
gmsg
<<
endl
<<
"Gap 1 phase = "
<<
phase_print
<<
" Deg"
<<
endl
;
*
gmsg
<<
"Gap 1 E-Field = ("
<<
E
[
0
]
<<
"/"
<<
E
[
1
]
<<
"/"
<<
E
[
2
]
<<
")"
<<
endl
;
...
...
@@ -516,9 +515,7 @@ bool Cyclotron::apply(const Vector_t &R, const Vector_t &/*P*/,
waiting_for_gap
=
2
;
}
else
if
(
tet
>=
270.0
&&
waiting_for_gap
==
2
)
{
double
phase_print
=
180.0
*
phase
/
pi
;
phase_print
=
fmod
(
phase_print
,
360
)
-
360.0
;
phase_print
=
std
::
fmod
(
phase_print
,
360
)
-
360.0
;
*
gmsg
<<
endl
<<
"Gap 2 phase = "
<<
phase_print
<<
" Deg"
<<
endl
;
*
gmsg
<<
"Gap 2 E-Field = ("
<<
E
[
0
]
<<
"/"
<<
E
[
1
]
<<
"/"
<<
E
[
2
]
<<
")"
<<
endl
;
...
...
@@ -684,7 +681,7 @@ bool Cyclotron::interpolate(const double& rad,
// the corresponding angle on the field map
// Note: this does not work if the start point of field map does not equal zero.
double
tet_map
=
fmod
(
tet_rad
/
Physics
::
pi
*
180.0
,
360.0
/
symmetry_m
);
double
tet_map
=
std
::
fmod
(
tet_rad
*
Physics
::
rad2deg
,
360.0
/
symmetry_m
);
double
xit
=
tet_map
/
BP
.
dtet
;
...
...
@@ -821,7 +818,7 @@ void Cyclotron::getdiffs() {
for
(
int
k
=
0
;
k
<
Bfield
.
ntet
;
k
++
)
{
double
dtheta
=
pi
/
180.0
*
BP
.
dtet
;
double
dtheta
=
Physics
::
deg2rad
*
BP
.
dtet
;
int
kEdge
;
...
...
@@ -907,8 +904,8 @@ void Cyclotron::getdiffs() {
for(int i = 0; i< Bfield.nrad; i++){
for(int j = 0; j< Bfield.ntetS; j++){
int index = idx(i,j);
double x = (BP.rmin+i*BP.delr) * sin(j*BP.dtet*pi/180.0);
double y = (BP.rmin+i*BP.delr) * cos(j*BP.dtet*pi/180.0);
double x = (BP.rmin+i*BP.delr) * s
td::s
in(j*BP.dtet*pi/180.0);
double y = (BP.rmin+i*BP.delr) *
std::
cos(j*BP.dtet*pi/180.0);
*gmsg<<"x= "<<x<<" y= "<<y<<" B= "<<Bfield.bfld[index]<<endl;
}
}
...
...
src/Classic/AbsBeamline/Degrader.cpp
View file @
0530b5ea
...
...
@@ -31,8 +31,6 @@
extern
Inform
*
gmsg
;
using
namespace
std
;
// Class Degrader
// ------------------------------------------------------------------------
...
...
@@ -91,7 +89,7 @@ bool Degrader::apply(const size_t &i, const double &t, Vector_t &/*E*/, Vector_t
const
Vector_t
&
R
=
RefPartBunch_m
->
R
[
i
];
const
Vector_t
&
P
=
RefPartBunch_m
->
P
[
i
];
const
double
recpgamma
=
Physics
::
c
*
RefPartBunch_m
->
dt
[
i
]
/
sqrt
(
1.0
+
dot
(
P
,
P
));
const
double
recpgamma
=
Physics
::
c
*
RefPartBunch_m
->
dt
[
i
]
/
s
td
::
s
qrt
(
1.0
+
dot
(
P
,
P
));
if
(
isInMaterial
(
R
(
2
)))
{
//if particle was allready marked as -1 (it means it should have gone into degrader but didn't)
...
...
@@ -183,7 +181,7 @@ void Degrader::setOutputFN(std::string fn) {
filename_m
=
fn
;
}
string
Degrader
::
getOutputFN
()
{
st
d
::
st
ring
Degrader
::
getOutputFN
()
{
if
(
filename_m
==
std
::
string
(
""
))
return
getName
();
else
...
...
@@ -200,8 +198,7 @@ ElementBase::ElementType Degrader::getType() const {
return
DEGRADER
;
}
string
Degrader
::
getDegraderShape
()
{
st
d
::
st
ring
Degrader
::
getDegraderShape
()
{
return
"DEGRADER"
;
}
}
\ No newline at end of file
src/Classic/AbsBeamline/ElementBase.cpp
View file @
0530b5ea
...
...
@@ -31,7 +31,6 @@
#include "Solvers/WakeFunction.hh"
#include "Solvers/ParticleMatterInteractionHandler.hh"
using
namespace
std
;
// Class ElementBase
// ------------------------------------------------------------------------
...
...
@@ -139,7 +138,7 @@ void ElementBase::setAttribute(const std::string &aKey, double val) {
*
aChannel
=
val
;
delete
aChannel
;
}
else
cout
<<
"Channel NULL or not Settable"
<<
endl
;
std
::
cout
<<
"Channel NULL or not Settable"
<<
std
::
endl
;
}
...
...
src/Classic/AbsBeamline/FlexibleCollimator.cpp
View file @
0530b5ea
...
...
@@ -90,7 +90,7 @@ bool FlexibleCollimator::apply(const size_t &i, const double &t, Vector_t &/*E*/
const
Vector_t
&
R
=
RefPartBunch_m
->
R
[
i
];
const
Vector_t
&
P
=
RefPartBunch_m
->
P
[
i
];
const
double
&
dt
=
RefPartBunch_m
->
dt
[
i
];
const
double
recpgamma
=
Physics
::
c
*
dt
/
sqrt
(
1.0
+
dot
(
P
,
P
));
const
double
recpgamma
=
Physics
::
c
*
dt
/
s
td
::
s
qrt
(
1.0
+
dot
(
P
,
P
));
bool
pdead
=
isStopped
(
R
,
P
,
recpgamma
);
if
(
pdead
)
{
...
...
@@ -269,6 +269,4 @@ void FlexibleCollimator::writeHolesAndQuadtree(const std::string &baseFilename)
out
.
close
();
}
}
}
\ No newline at end of file
src/Classic/AbsBeamline/Monitor.cpp
View file @
0530b5ea
...
...
@@ -32,7 +32,6 @@
#include <fstream>
#include <memory>
using
namespace
std
;
// Class Monitor
// ------------------------------------------------------------------------
...
...
@@ -225,5 +224,4 @@ void Monitor::writeStatistics() {
}
statFileEntries_sm
.
clear
();
}
}
\ No newline at end of file
src/Classic/AbsBeamline/MultipoleTBase.cpp
View file @
0530b5ea
...
...
@@ -26,10 +26,10 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include "MultipoleTBase.h"
#include <gsl/gsl_sf_gamma.h>