Commit f789e041 authored by kraus's avatar kraus
Browse files

Merge branch 'use_more_suitable_name_instead_of_getCoordTransformTo' into 'master'

Use a more suitable name instead of getCoordTransformationTo

See merge request OPAL/src!67
parents ca13618f 8141e0da
......@@ -22,7 +22,7 @@ ParallelSliceTracker::ParallelSliceTracker(const Beamline &beamline,
Tracker(beamline, reference, revBeam, revTrack) {
CoordinateSystemTrafo labToRef(beamline.getOrigin3D(),
beamline.getCoordTransformationTo().conjugate());
beamline.getInitialDirection());
referenceToLabCSTrafo_m = labToRef.inverted();
}
......@@ -46,7 +46,7 @@ ParallelSliceTracker::ParallelSliceTracker(const Beamline &beamline,
itsDataSink_m = &ds;
CoordinateSystemTrafo labToRef(beamline.getOrigin3D(),
beamline.getCoordTransformationTo());
beamline.getInitialDirection());
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->getCoordTransformationTo());
OpalBeamline stash(fbl->getOrigin3D(), fbl->getInitialDirection());
stash.swap(itsOpalBeamline_m);
fbl->iterate(*this, false);
itsOpalBeamline_m.prepareSections();
......
......@@ -60,7 +60,7 @@ ParallelTTracker::ParallelTTracker(const Beamline &beamline,
bool revTrack):
Tracker(beamline, reference, revBeam, revTrack),
itsDataSink_m(NULL),
itsOpalBeamline_m(beamline.getOrigin3D(), beamline.getCoordTransformationTo()),
itsOpalBeamline_m(beamline.getOrigin3D(), beamline.getInitialDirection()),
RefPartR_m(0.0),
RefPartP_m(0.0),
globalEOL_m(false),
......@@ -87,7 +87,7 @@ ParallelTTracker::ParallelTTracker(const Beamline &beamline,
{
CoordinateSystemTrafo labToRef(beamline.getOrigin3D(),
beamline.getCoordTransformationTo().conjugate());
beamline.getInitialDirection());
referenceToLabCSTrafo_m = labToRef.inverted();
#ifdef OPAL_DKS
......@@ -108,7 +108,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.getCoordTransformationTo()),
itsOpalBeamline_m(beamline.getOrigin3D(), beamline.getInitialDirection()),
RefPartR_m(0.0),
RefPartP_m(0.0),
globalEOL_m(false),
......@@ -132,7 +132,7 @@ ParallelTTracker::ParallelTTracker(const Beamline &beamline,
{
CoordinateSystemTrafo labToRef(beamline.getOrigin3D(),
beamline.getCoordTransformationTo());
beamline.getInitialDirection());
referenceToLabCSTrafo_m = labToRef.inverted();
for (std::vector<unsigned long long>::const_iterator it = maxSteps.begin(); it != maxSteps.end(); ++ it) {
......@@ -257,6 +257,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);
......
......@@ -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.getCoordTransformationTo())
, itsOpalBeamline_m(beamline.getOrigin3D(), beamline.getInitialDirection())
, 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.getCoordTransformationTo());
beamline.getInitialDirection());
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.getCoordTransformationTo())
, itsOpalBeamline_m(beamline.getOrigin3D(), beamline.getInitialDirection())
, 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.getCoordTransformationTo());
beamline.getInitialDirection());
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->getCoordTransformationTo());
OpalBeamline stash(fbl->getOrigin3D(), fbl->getInitialDirection());
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
......@@ -50,7 +50,7 @@ Vector_t Beamline::getOrigin3D() const {
return Vector_t(0);
}
Quaternion Beamline::getCoordTransformationTo() const {
Quaternion Beamline::getInitialDirection() const {
return Quaternion(1, 0, 0, 0);
}
......
......@@ -52,7 +52,7 @@ public:
virtual void iterate(BeamlineVisitor &, bool reverse) const = 0;
virtual Vector_t getOrigin3D() const;
virtual Quaternion getCoordTransformationTo() const;
virtual Quaternion getInitialDirection() const;
virtual bool getRelativeFlag() const;
private:
......
......@@ -19,11 +19,11 @@ OpalBeamline::OpalBeamline():
}
OpalBeamline::OpalBeamline(const Vector_t& origin,
const Quaternion& coordTransformationTo):
const Quaternion& rotation):
elements_m(),
prepared_m(false),
containsSource_m(false),
coordTransformationTo_m(origin, coordTransformationTo)
coordTransformationTo_m(origin, rotation)
{
}
......
......@@ -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 &);
......
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