Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
kraus
src
Commits
8141e0da
Commit
8141e0da
authored
Apr 02, 2019
by
kraus
Browse files
use a more suitable name instead of getCoordTransformationTo
parent
c46e953c
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
19 additions
and
18 deletions
+19
-18
src/Algorithms/ParallelSliceTracker.cpp
src/Algorithms/ParallelSliceTracker.cpp
+3
-3
src/Algorithms/ParallelTTracker.cpp
src/Algorithms/ParallelTTracker.cpp
+5
-4
src/Algorithms/ThickTracker.cpp
src/Algorithms/ThickTracker.cpp
+6
-6
src/Classic/Beamlines/Beamline.cpp
src/Classic/Beamlines/Beamline.cpp
+1
-1
src/Classic/Beamlines/Beamline.h
src/Classic/Beamlines/Beamline.h
+1
-1
src/Elements/OpalBeamline.cpp
src/Elements/OpalBeamline.cpp
+2
-2
src/Elements/OpalBeamline.h
src/Elements/OpalBeamline.h
+1
-1
No files found.
src/Algorithms/ParallelSliceTracker.cpp
View file @
8141e0da
...
...
@@ -22,7 +22,7 @@ ParallelSliceTracker::ParallelSliceTracker(const Beamline &beamline,
Tracker
(
beamline
,
reference
,
revBeam
,
revTrack
)
{
CoordinateSystemTrafo
labToRef
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransformationTo
().
conjugate
());
beamline
.
get
InitialDirection
());
referenceToLabCSTrafo_m
=
labToRef
.
inverted
();
}
...
...
@@ -46,7 +46,7 @@ ParallelSliceTracker::ParallelSliceTracker(const Beamline &beamline,
itsDataSink_m
=
&
ds
;
CoordinateSystemTrafo
labToRef
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransforma
tion
To
());
beamline
.
get
InitialDirec
tion
());
referenceToLabCSTrafo_m
=
labToRef
.
inverted
();
for
(
std
::
vector
<
unsigned
long
long
>::
const_iterator
it
=
maxSteps
.
begin
();
it
!=
maxSteps
.
end
();
++
it
)
{
...
...
@@ -78,7 +78,7 @@ ParallelSliceTracker::~ParallelSliceTracker()
void
ParallelSliceTracker
::
visitBeamline
(
const
Beamline
&
bl
)
{
// borrowed from ParallelTTracker
const
FlaggedBeamline
*
fbl
=
static_cast
<
const
FlaggedBeamline
*>
(
&
bl
);
if
(
fbl
->
getRelativeFlag
())
{
OpalBeamline
stash
(
fbl
->
getOrigin3D
(),
fbl
->
get
CoordTransforma
tion
To
());
OpalBeamline
stash
(
fbl
->
getOrigin3D
(),
fbl
->
get
InitialDirec
tion
());
stash
.
swap
(
itsOpalBeamline_m
);
fbl
->
iterate
(
*
this
,
false
);
itsOpalBeamline_m
.
prepareSections
();
...
...
src/Algorithms/ParallelTTracker.cpp
View file @
8141e0da
...
...
@@ -60,7 +60,7 @@ ParallelTTracker::ParallelTTracker(const Beamline &beamline,
bool
revTrack
)
:
Tracker
(
beamline
,
reference
,
revBeam
,
revTrack
),
itsDataSink_m
(
NULL
),
itsOpalBeamline_m
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransforma
tion
To
()),
itsOpalBeamline_m
(
beamline
.
getOrigin3D
(),
beamline
.
get
InitialDirec
tion
()),
RefPartR_m
(
0.0
),
RefPartP_m
(
0.0
),
globalEOL_m
(
false
),
...
...
@@ -88,7 +88,7 @@ ParallelTTracker::ParallelTTracker(const Beamline &beamline,
{
CoordinateSystemTrafo
labToRef
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransformationTo
().
conjugate
());
beamline
.
get
InitialDirection
());
referenceToLabCSTrafo_m
=
labToRef
.
inverted
();
#ifdef OPAL_DKS
...
...
@@ -109,7 +109,7 @@ ParallelTTracker::ParallelTTracker(const Beamline &beamline,
const
std
::
vector
<
double
>
&
dt
)
:
Tracker
(
beamline
,
bunch
,
reference
,
revBeam
,
revTrack
),
itsDataSink_m
(
&
ds
),
itsOpalBeamline_m
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransforma
tion
To
()),
itsOpalBeamline_m
(
beamline
.
getOrigin3D
(),
beamline
.
get
InitialDirec
tion
()),
RefPartR_m
(
0.0
),
RefPartP_m
(
0.0
),
globalEOL_m
(
false
),
...
...
@@ -134,7 +134,7 @@ ParallelTTracker::ParallelTTracker(const Beamline &beamline,
{
CoordinateSystemTrafo
labToRef
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransforma
tion
To
());
beamline
.
get
InitialDirec
tion
());
referenceToLabCSTrafo_m
=
labToRef
.
inverted
();
for
(
std
::
vector
<
unsigned
long
long
>::
const_iterator
it
=
maxSteps
.
begin
();
it
!=
maxSteps
.
end
();
++
it
)
{
...
...
@@ -259,6 +259,7 @@ void ParallelTTracker::execute() {
restoreCavityPhases
();
}
else
{
RefPartR_m
=
Vector_t
(
0.0
);
RefPartP_m
=
euclidean_norm
(
itsBunch_m
->
get_pmean_Distribution
())
*
Vector_t
(
0
,
0
,
1
);
...
...
src/Algorithms/ThickTracker.cpp
View file @
8141e0da
...
...
@@ -43,7 +43,7 @@ ThickTracker::ThickTracker(const Beamline &beamline,
,
RefPartR_m
(
0.0
)
,
RefPartP_m
(
0.0
)
,
itsDataSink_m
(
nullptr
)
,
itsOpalBeamline_m
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransforma
tion
To
())
,
itsOpalBeamline_m
(
beamline
.
getOrigin3D
(),
beamline
.
get
InitialDirec
tion
())
,
zstart_m
(
0.0
)
,
zstop_m
(
0.0
)
,
threshold_m
(
1.0e-6
)
...
...
@@ -53,7 +53,7 @@ ThickTracker::ThickTracker(const Beamline &beamline,
,
mapTracking_m
(
IpplTimings
::
getTimer
(
"mapTracking"
))
{
CoordinateSystemTrafo
labToRef
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransforma
tion
To
());
beamline
.
get
InitialDirec
tion
());
referenceToLabCSTrafo_m
=
labToRef
.
inverted
();
}
...
...
@@ -74,7 +74,7 @@ ThickTracker::ThickTracker(const Beamline &beamline,
,
RefPartR_m
(
0.0
)
,
RefPartP_m
(
0.0
)
,
itsDataSink_m
(
&
ds
)
,
itsOpalBeamline_m
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransforma
tion
To
())
,
itsOpalBeamline_m
(
beamline
.
getOrigin3D
(),
beamline
.
get
InitialDirec
tion
())
,
zstart_m
(
zstart
)
,
zstop_m
(
zstop
[
0
])
,
threshold_m
(
1.0e-6
)
...
...
@@ -89,7 +89,7 @@ ThickTracker::ThickTracker(const Beamline &beamline,
CoordinateSystemTrafo
labToRef
(
beamline
.
getOrigin3D
(),
beamline
.
get
CoordTransforma
tion
To
());
beamline
.
get
InitialDirec
tion
());
referenceToLabCSTrafo_m
=
labToRef
.
inverted
();
}
...
...
@@ -104,7 +104,7 @@ void ThickTracker::visitBeamline(const Beamline &bl) {
const
FlaggedBeamline
*
fbl
=
static_cast
<
const
FlaggedBeamline
*>
(
&
bl
);
if
(
fbl
->
getRelativeFlag
())
{
*
gmsg
<<
" do stuff"
<<
endl
;
OpalBeamline
stash
(
fbl
->
getOrigin3D
(),
fbl
->
get
CoordTransforma
tion
To
());
OpalBeamline
stash
(
fbl
->
getOrigin3D
(),
fbl
->
get
InitialDirec
tion
());
stash
.
swap
(
itsOpalBeamline_m
);
fbl
->
iterate
(
*
this
,
false
);
itsOpalBeamline_m
.
prepareSections
();
...
...
@@ -616,4 +616,4 @@ void ThickTracker::update_m(const double& spos,
itsBunch_m
->
setGlobalTrackStep
(
step
);
itsBunch_m
->
calcBeamParameters
();
itsBunch_m
->
calcEMean
();
}
}
\ No newline at end of file
src/Classic/Beamlines/Beamline.cpp
View file @
8141e0da
...
...
@@ -50,7 +50,7 @@ Vector_t Beamline::getOrigin3D() const {
return
Vector_t
(
0
);
}
Quaternion
Beamline
::
get
CoordTransforma
tion
To
()
const
{
Quaternion
Beamline
::
get
InitialDirec
tion
()
const
{
return
Quaternion
(
1
,
0
,
0
,
0
);
}
...
...
src/Classic/Beamlines/Beamline.h
View file @
8141e0da
...
...
@@ -52,7 +52,7 @@ public:
virtual
void
iterate
(
BeamlineVisitor
&
,
bool
reverse
)
const
=
0
;
virtual
Vector_t
getOrigin3D
()
const
;
virtual
Quaternion
get
CoordTransforma
tion
To
()
const
;
virtual
Quaternion
get
InitialDirec
tion
()
const
;
virtual
bool
getRelativeFlag
()
const
;
private:
...
...
src/Elements/OpalBeamline.cpp
View file @
8141e0da
...
...
@@ -19,11 +19,11 @@ OpalBeamline::OpalBeamline():
}
OpalBeamline
::
OpalBeamline
(
const
Vector_t
&
origin
,
const
Quaternion
&
coordTransform
ation
To
)
:
const
Quaternion
&
rot
ation
)
:
elements_m
(),
prepared_m
(
false
),
containsSource_m
(
false
),
coordTransformationTo_m
(
origin
,
coordTransform
ation
To
)
coordTransformationTo_m
(
origin
,
rot
ation
)
{
}
...
...
src/Elements/OpalBeamline.h
View file @
8141e0da
...
...
@@ -41,7 +41,7 @@ class OpalBeamline {
public:
OpalBeamline
();
OpalBeamline
(
const
Vector_t
&
origin
,
const
Quaternion
&
coordTrafoTo
);
const
Quaternion
&
rotation
);
~
OpalBeamline
();
OpalSection
&
getSectionAt
(
const
Vector_t
&
,
long
&
);
...
...
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