OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Public Types | Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
OrbitTracker Class Reference

Track closed orbit. More...

#include <OrbitTracker.h>

Inheritance diagram for OrbitTracker:
Inheritance graph
[legend]
Collaboration diagram for OrbitTracker:
Collaboration graph
[legend]

Public Types

enum  {
  X, PX, Y, PY,
  T, PT
}
 
- Public Types inherited from AbstractTracker
enum  {
  X, PX, Y, PY,
  T, PT
}
 

Public Member Functions

 OrbitTracker (const Beamline &, const PartData &, bool backBeam, bool backTrack)
 Constructor. More...
 
virtual ~OrbitTracker ()
 
const FVector< double, 6 > & getOrbit () const
 Return the current orbit. More...
 
void setOrbit (const FVector< double, 6 > orbit)
 Reset the current orbit. More...
 
virtual void visitBeamBeam (const BeamBeam &)
 Apply the algorithm to a beam-beam. More...
 
virtual void visitBeamStripping (const BeamStripping &)
 Apply the algorithm to a beam stripping. More...
 
virtual void visitCCollimator (const CCollimator &)
 Apply the algorithm to a collimator. More...
 
virtual void visitComponent (const Component &)
 Apply the algorithm to an arbitrary component. More...
 
virtual void visitCorrector (const Corrector &)
 Apply the algorithm to a corrector. More...
 
virtual void visitDegrader (const Degrader &)
 Apply the algorithm to a drift. More...
 
virtual void visitDiagnostic (const Diagnostic &)
 Apply the algorithm to a diagnostic. More...
 
virtual void visitDrift (const Drift &)
 Apply the algorithm to a drift. More...
 
virtual void visitFlexibleCollimator (const FlexibleCollimator &)
 Apply the algorithm to a flexible collimator. More...
 
virtual void visitLambertson (const Lambertson &)
 Apply the algorithm to a Lambertson. More...
 
virtual void visitMarker (const Marker &)
 Apply the algorithm to a marker. More...
 
virtual void visitMonitor (const Monitor &)
 Apply the algorithm to a monitor. More...
 
virtual void visitMultipole (const Multipole &)
 Apply the algorithm to a multipole. More...
 
virtual void visitPatch (const Patch &pat)
 Apply the algorithm to a patch. More...
 
virtual void visitProbe (const Probe &prob)
 Apply the algorithm to a probe. More...
 
virtual void visitRBend (const RBend &)
 Apply the algorithm to a rectangular bend. More...
 
virtual void visitRFCavity (const RFCavity &)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitRFQuadrupole (const RFQuadrupole &)
 Apply the algorithm to a RF quadrupole. More...
 
virtual void visitSBend (const SBend &)
 Apply the algorithm to a sector bend. More...
 
virtual void visitSeparator (const Separator &)
 Apply the algorithm to a separator. More...
 
virtual void visitSeptum (const Septum &)
 Apply the algorithm to a septum. More...
 
virtual void visitSolenoid (const Solenoid &)
 Apply the algorithm to a solenoid. More...
 
virtual void visitParallelPlate (const ParallelPlate &)
 Apply the algorithm to a ParallelPlate. More...
 
virtual void visitCyclotronValley (const CyclotronValley &)
 Apply the algorithm to a CyclotronValley. More...
 
virtual void visitAlignWrapper (const AlignWrapper &)
 Apply the algorithm to an align wrapper.. More...
 
- Public Member Functions inherited from AbstractTracker
 AbstractTracker (const Beamline &, const PartData &, bool backBeam, bool backTrack)
 Constructor. More...
 
virtual ~AbstractTracker ()
 
- Public Member Functions inherited from DefaultVisitor
 DefaultVisitor (const Beamline &beamline, bool backBeam, bool backTrack)
 Constructor. More...
 
virtual ~DefaultVisitor ()=0
 
virtual void execute ()
 Apply the algorithm to the top-level beamline. More...
 
virtual void visitCyclotron (const Cyclotron &)
 Apply the algorithm to an cyclotron. More...
 
virtual void visitRing (const Ring &)
 Apply the algorithm to an opal ring.. More...
 
virtual void visitMultipoleT (const MultipoleT &)
 Apply the algorithm to a multipoleT. More...
 
virtual void visitMultipoleTStraight (const MultipoleTStraight &)
 Apply the algorithm to a multipoleTStraight. More...
 
virtual void visitMultipoleTCurvedConstRadius (const MultipoleTCurvedConstRadius &)
 Apply the algorithm to a multipoleTCurvedConstRadius. More...
 
virtual void visitMultipoleTCurvedVarRadius (const MultipoleTCurvedVarRadius &)
 Apply the algorithm to a multipoleTCurvedVarRadius. More...
 
virtual void visitOffset (const Offset &)
 Apply the algorithm to an Offset. More...
 
virtual void visitRBend3D (const RBend3D &)
 Apply the algorithm to a rectangular bend. More...
 
virtual void visitVariableRFCavity (const VariableRFCavity &vcav)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitVariableRFCavityFringeField (const VariableRFCavityFringeField &vcav)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitTravelingWave (const TravelingWave &)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitSBend3D (const SBend3D &)
 Apply the algorithm to a sector bend. More...
 
virtual void visitScalingFFAMagnet (const ScalingFFAMagnet &)
 Apply the algorithm to a scaling FFA magnet. More...
 
virtual void visitVerticalFFAMagnet (const VerticalFFAMagnet &)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitSource (const Source &)
 Apply the algorithm to a source. More...
 
virtual void visitStripper (const Stripper &)
 Apply the algorithm to a charge stripper. More...
 
virtual void visitBeamline (const Beamline &)
 Apply the algorithm to a beam line. More...
 
virtual void visitFlaggedElmPtr (const FlaggedElmPtr &)
 Apply the algorithm to a FlaggedElmPtr. More...
 
virtual void visitCorrectorWrapper (const CorrectorWrapper &)
 Apply the algorithm to an corrector wrapper.. More...
 
virtual void visitCyclotronWrapper (const CyclotronWrapper &)
 Apply the algorithm to an cyclotron wrapper.. More...
 
virtual void visitMultipoleWrapper (const MultipoleWrapper &)
 Apply the algorithm to an multipole wrapper.. More...
 
virtual void visitRBendWrapper (const RBendWrapper &)
 Apply the algorithm to an RBend wrapper.. More...
 
virtual void visitSBendWrapper (const SBendWrapper &)
 Apply the algorithm to an SBend wrapper.. More...
 
virtual void visitIntegrator (const Integrator &)
 Apply the algorithm to a generic integrator. More...
 
virtual void visitMapIntegrator (const MapIntegrator &)
 Apply the algorithm to an integrator capable of mapping. More...
 
virtual void visitTrackIntegrator (const TrackIntegrator &)
 Apply the algorithm to an integrator capable of tracking. More...
 
- Public Member Functions inherited from BeamlineVisitor
 BeamlineVisitor ()
 
virtual ~BeamlineVisitor ()
 

Private Member Functions

 OrbitTracker ()
 
 OrbitTracker (const OrbitTracker &)
 
void operator= (const OrbitTracker &)
 
void applyDrift (double length)
 Apply drift length. More...
 
void applyEntranceFringe (double edge, const BMultipoleField &field, double scale)
 Transforms fringing fields. More...
 
void applyExitFringe (double edge, const BMultipoleField &field, double scale)
 
void applyLinearMap (double length, double refLength, double h, const FTps< double, 2 > &Fx, const FTps< double, 2 > &Fy)
 Apply linear map, defined by the linear expansions Fx and Fy. More...
 
void applyMultipoleBody (double length, double refLength, const BMultipoleField &field, double scale)
 Apply body of SBend. More...
 
void applySBendBody (double length, double refLength, double h, const BMultipoleField &field, double scale)
 Apply thin multipole kick (integrated over length) to all particles. More...
 
void applyThinMultipole (const BMultipoleField &field, double factor)
 Thin multipole kick. More...
 
void applyTransform (const Euclid3D &, double refLength)
 Apply transform. More...
 
FTps< double, 2 > buildSBendVectorPotential (const BMultipoleField &, double h)
 Construct the vector potential for a SBend. More...
 

Static Private Member Functions

static void makeFocus (double k, double L, double &c, double &s, double &d, double &f)
 Helper function for finding first-order coefficients. More...
 

Private Attributes

FVector< double, 6 > itsOrbit
 

Additional Inherited Members

- Protected Attributes inherited from AbstractTracker
const PartData itsReference
 The reference information. More...
 
- Protected Attributes inherited from DefaultVisitor
const BeamlineitsLine
 
bool back_beam
 
bool back_track
 
bool back_path
 
double flip_B
 
double flip_s
 

Detailed Description

Track closed orbit.

Definition at line 37 of file OrbitTracker.h.

Member Enumeration Documentation

anonymous enum
Enumerator
X 
PX 
Y 
PY 
T 
PT 

Definition at line 42 of file OrbitTracker.h.

Constructor & Destructor Documentation

OrbitTracker::OrbitTracker ( const Beamline beamline,
const PartData reference,
bool  backBeam,
bool  backTrack 
)

Constructor.

Definition at line 69 of file OrbitTracker.cpp.

OrbitTracker::~OrbitTracker ( )
virtual

Definition at line 76 of file OrbitTracker.cpp.

OrbitTracker::OrbitTracker ( )
private
OrbitTracker::OrbitTracker ( const OrbitTracker )
private

Member Function Documentation

void OrbitTracker::applyDrift ( double  length)
private
void OrbitTracker::applyEntranceFringe ( double  edge,
const BMultipoleField field,
double  scale 
)
private

Transforms fringing fields.

Definition at line 412 of file OrbitTracker.cpp.

References BMultipoleField::normal(), PX, PY, tan(), X, and Y.

Referenced by visitRBend(), and visitSBend().

Here is the call graph for this function:

void OrbitTracker::applyExitFringe ( double  edge,
const BMultipoleField field,
double  scale 
)
private

Definition at line 422 of file OrbitTracker.cpp.

References BMultipoleField::normal(), PX, PY, tan(), X, and Y.

Referenced by visitRBend(), and visitSBend().

Here is the call graph for this function:

void OrbitTracker::applyLinearMap ( double  length,
double  refLength,
double  h,
const FTps< double, 2 > &  Fx,
const FTps< double, 2 > &  Fy 
)
private

Apply linear map, defined by the linear expansions Fx and Fy.

Definition at line 432 of file OrbitTracker.cpp.

References Hypervolume::hv(), PT, PX, PY, sqrt(), T, X, and Y.

Referenced by applyMultipoleBody(), and applySBendBody().

Here is the call graph for this function:

void OrbitTracker::applyMultipoleBody ( double  length,
double  refLength,
const BMultipoleField field,
double  scale 
)
private
void OrbitTracker::applySBendBody ( double  length,
double  refLength,
double  h,
const BMultipoleField field,
double  scale 
)
private

Apply thin multipole kick (integrated over length) to all particles.

Definition at line 547 of file OrbitTracker.cpp.

References applyLinearMap(), buildSBendVectorPotential(), and FTps< T, N >::derivative().

Referenced by visitSBend().

Here is the call graph for this function:

void OrbitTracker::applyThinMultipole ( const BMultipoleField field,
double  factor 
)
private

Thin multipole kick.

Definition at line 562 of file OrbitTracker.cpp.

References BMultipoleField::normal(), BMultipoleField::order(), PX, PY, BMultipoleField::skew(), X, and Y.

Referenced by visitMultipole(), visitRBend(), and visitSBend().

Here is the call graph for this function:

void OrbitTracker::applyTransform ( const Euclid3D euclid,
double  refLength 
)
private
Series2 OrbitTracker::buildSBendVectorPotential ( const BMultipoleField field,
double  h 
)
private
const FVector< double, 6 > & OrbitTracker::getOrbit ( ) const

Return the current orbit.

Definition at line 80 of file OrbitTracker.cpp.

References itsOrbit.

Referenced by ThreadBpm::execute(), and ThreadAll::execute().

void OrbitTracker::makeFocus ( double  k,
double  L,
double &  c,
double &  s,
double &  d,
double &  f 
)
staticprivate

Helper function for finding first-order coefficients.

Definition at line 688 of file OrbitTracker.cpp.

References abs(), Physics::c, cos(), cosh(), Physics::e, sin(), sinh(), and sqrt().

Here is the call graph for this function:

void OrbitTracker::operator= ( const OrbitTracker )
private
void OrbitTracker::setOrbit ( const FVector< double, 6 >  orbit)

Reset the current orbit.

Definition at line 85 of file OrbitTracker.cpp.

References itsOrbit.

Referenced by ThreadBpm::correct(), ThreadAll::correct(), ThreadBpm::execute(), and ThreadAll::execute().

void OrbitTracker::visitAlignWrapper ( const AlignWrapper wrap)
virtual

Apply the algorithm to an align wrapper..

Reimplemented from DefaultVisitor.

Definition at line 381 of file OrbitTracker.cpp.

References ElementBase::accept(), applyTransform(), DefaultVisitor::back_path, AlignWrapper::getElement(), AlignWrapper::getEntranceTransform(), AlignWrapper::getExitTransform(), Inverse(), Euclid3D::isIdentity(), and AlignWrapper::offset().

Here is the call graph for this function:

void OrbitTracker::visitBeamBeam ( const BeamBeam )
virtual

Apply the algorithm to a beam-beam.

Reimplemented from DefaultVisitor.

Definition at line 90 of file OrbitTracker.cpp.

void OrbitTracker::visitBeamStripping ( const BeamStripping )
virtual

Apply the algorithm to a beam stripping.

Reimplemented from DefaultVisitor.

Definition at line 95 of file OrbitTracker.cpp.

void OrbitTracker::visitCCollimator ( const CCollimator coll)
virtual

Apply the algorithm to a collimator.

Reimplemented from DefaultVisitor.

Definition at line 100 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void OrbitTracker::visitComponent ( const Component comp)
virtual

Apply the algorithm to an arbitrary component.

Reimplemented from DefaultVisitor.

Definition at line 117 of file OrbitTracker.cpp.

References DefaultVisitor::back_beam, DefaultVisitor::back_track, itsOrbit, AbstractTracker::itsReference, PT, OpalParticle::pt(), PX, OpalParticle::px(), PY, OpalParticle::py(), T, OpalParticle::t(), Component::trackBunch(), X, OpalParticle::x(), Y, and OpalParticle::y().

Here is the call graph for this function:

void OrbitTracker::visitCorrector ( const Corrector corr)
virtual
void OrbitTracker::visitCyclotronValley ( const CyclotronValley cv)
virtual

Apply the algorithm to a CyclotronValley.

Reimplemented from DefaultVisitor.

Definition at line 113 of file OrbitTracker.cpp.

void OrbitTracker::visitDegrader ( const Degrader deg)
virtual

Apply the algorithm to a drift.

Reimplemented from DefaultVisitor.

Definition at line 104 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void OrbitTracker::visitDiagnostic ( const Diagnostic diag)
virtual

Apply the algorithm to a diagnostic.

Reimplemented from DefaultVisitor.

Definition at line 149 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void OrbitTracker::visitDrift ( const Drift drift)
virtual

Apply the algorithm to a drift.

Reimplemented from DefaultVisitor.

Definition at line 154 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void OrbitTracker::visitFlexibleCollimator ( const FlexibleCollimator coll)
virtual

Apply the algorithm to a flexible collimator.

Reimplemented from DefaultVisitor.

Definition at line 158 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void OrbitTracker::visitLambertson ( const Lambertson lamb)
virtual

Apply the algorithm to a Lambertson.

Reimplemented from DefaultVisitor.

Definition at line 162 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void OrbitTracker::visitMarker ( const Marker )
virtual

Apply the algorithm to a marker.

Reimplemented from DefaultVisitor.

Definition at line 168 of file OrbitTracker.cpp.

void OrbitTracker::visitMonitor ( const Monitor moni)
virtual

Apply the algorithm to a monitor.

Reimplemented from DefaultVisitor.

Definition at line 173 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void OrbitTracker::visitMultipole ( const Multipole mult)
virtual

Apply the algorithm to a multipole.

Reimplemented from DefaultVisitor.

Definition at line 178 of file OrbitTracker.cpp.

References applyMultipoleBody(), applyThinMultipole(), Physics::c, DefaultVisitor::flip_B, DefaultVisitor::flip_s, ElementBase::getElementLength(), Multipole::getField(), PartData::getP(), PartData::getQ(), and AbstractTracker::itsReference.

Here is the call graph for this function:

void OrbitTracker::visitParallelPlate ( const ParallelPlate pplate)
virtual

Apply the algorithm to a ParallelPlate.

Reimplemented from DefaultVisitor.

Definition at line 108 of file OrbitTracker.cpp.

void OrbitTracker::visitPatch ( const Patch pat)
virtual

Apply the algorithm to a patch.

Reimplemented from DefaultVisitor.

Definition at line 194 of file OrbitTracker.cpp.

References applyTransform(), DefaultVisitor::back_path, Patch::getPatch(), and Inverse().

Here is the call graph for this function:

void OrbitTracker::visitProbe ( const Probe prob)
virtual

Apply the algorithm to a probe.

Reimplemented from DefaultVisitor.

Definition at line 200 of file OrbitTracker.cpp.

void OrbitTracker::visitRBend ( const RBend bend)
virtual
void OrbitTracker::visitRFCavity ( const RFCavity as)
virtual

Apply the algorithm to a RF cavity.

Reimplemented from DefaultVisitor.

Definition at line 260 of file OrbitTracker.cpp.

References applyDrift(), Physics::c, DefaultVisitor::flip_s, RFCavity::getAmplitude(), PartData::getBeta(), RFCavity::getElementLength(), RFCavity::getFrequency(), PartData::getP(), RFCavity::getPhase(), itsOrbit, AbstractTracker::itsReference, PT, sin(), and T.

Here is the call graph for this function:

void OrbitTracker::visitRFQuadrupole ( const RFQuadrupole rfq)
virtual

Apply the algorithm to a RF quadrupole.

Reimplemented from DefaultVisitor.

Definition at line 276 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void OrbitTracker::visitSBend ( const SBend bend)
virtual
void OrbitTracker::visitSeparator ( const Separator sep)
virtual

Apply the algorithm to a separator.

Reimplemented from DefaultVisitor.

Definition at line 328 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, ElementBase::getElementLength(), Separator::getEx(), Separator::getEy(), PartData::getP(), PartData::getQ(), itsOrbit, AbstractTracker::itsReference, PT, PX, and PY.

Here is the call graph for this function:

void OrbitTracker::visitSeptum ( const Septum sept)
virtual

Apply the algorithm to a septum.

Reimplemented from DefaultVisitor.

Definition at line 345 of file OrbitTracker.cpp.

References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().

Here is the call graph for this function:

void OrbitTracker::visitSolenoid ( const Solenoid solenoid)
virtual

Apply the algorithm to a solenoid.

Reimplemented from DefaultVisitor.

Definition at line 351 of file OrbitTracker.cpp.

References applyDrift(), Physics::c, cos(), DefaultVisitor::flip_B, DefaultVisitor::flip_s, Solenoid::getBz(), Solenoid::getElementLength(), PartData::getM(), PartData::getP(), PartData::getQ(), itsOrbit, AbstractTracker::itsReference, PT, PX, PY, sin(), T, X, and Y.

Here is the call graph for this function:

Member Data Documentation

FVector<double, 6> OrbitTracker::itsOrbit
private

The documentation for this class was generated from the following files: