OPAL (Object Oriented Parallel Accelerator Library)
2.2.0
OPAL
|
Track with thin lens algorithm. More...
#include <ThinTracker.h>
Public Member Functions | |
ThinTracker (const Beamline &bl, const PartData &data, bool revBeam, bool revTrack) | |
Constructor. More... | |
ThinTracker (const Beamline &bl, PartBunchBase< double, 3 > *bunch, const PartData &data, bool revBeam, bool revTrack) | |
Constructor. More... | |
virtual | ~ThinTracker () |
virtual void | visitBeamBeam (const BeamBeam &) |
Apply algorithm to BeamBeam. More... | |
virtual void | visitBeamStripping (const BeamStripping &) |
Apply the algorithm to a beam stripping. More... | |
virtual void | visitCCollimator (const CCollimator &) |
Apply algorithm to Collimator. More... | |
virtual void | visitCorrector (const Corrector &) |
Apply algorithm to Corrector. More... | |
virtual void | visitDegrader (const Degrader &) |
Apply the algorithm to a drift. More... | |
virtual void | visitDiagnostic (const Diagnostic &) |
Apply algorithm to Diagnostic. More... | |
virtual void | visitDrift (const Drift &) |
Apply algorithm to Drift. More... | |
virtual void | visitFlexibleCollimator (const FlexibleCollimator &) |
Apply the algorithm to a flexible collimator. More... | |
virtual void | visitLambertson (const Lambertson &) |
Apply algorithm to Lambertson. More... | |
virtual void | visitMarker (const Marker &) |
Apply algorithm to Marker. More... | |
virtual void | visitMonitor (const Monitor &) |
Apply algorithm to Monitor. More... | |
virtual void | visitMultipole (const Multipole &) |
Apply algorithm to Multipole. More... | |
virtual void | visitProbe (const Probe &) |
Apply algorithm to Probe. More... | |
virtual void | visitRBend (const RBend &) |
Apply algorithm to RBend. More... | |
virtual void | visitRFCavity (const RFCavity &) |
Apply algorithm to RFCavity. More... | |
virtual void | visitRFQuadrupole (const RFQuadrupole &) |
Apply algorithm to RFQuadrupole. More... | |
virtual void | visitSBend (const SBend &) |
Apply algorithm to SBend. More... | |
virtual void | visitSeparator (const Separator &) |
Apply algorithm to Separator. More... | |
virtual void | visitSeptum (const Septum &) |
Apply algorithm to Septum. More... | |
virtual void | visitSolenoid (const Solenoid &) |
Apply algorithm to Solenoid. More... | |
virtual void | visitParallelPlate (const ParallelPlate &) |
Apply algorithm to Solenoid. More... | |
virtual void | visitCyclotronValley (const CyclotronValley &) |
Apply the algorithm to a CyclotronValley. More... | |
![]() | |
Tracker (const Beamline &, const PartData &, bool backBeam, bool backTrack) | |
Constructor. More... | |
Tracker (const Beamline &, PartBunchBase< double, 3 > *bunch, const PartData &, bool backBeam, bool backTrack) | |
Constructor. More... | |
virtual | ~Tracker () |
const PartBunchBase< double, 3 > * | getBunch () const |
Return the current bunch. More... | |
void | addToBunch (const OpalParticle &) |
Add particle to bunch. More... | |
virtual void | visitComponent (const Component &) |
Store the bunch. More... | |
virtual void | visitPatch (const Patch &pat) |
Apply the algorithm to a patch. More... | |
virtual void | visitAlignWrapper (const AlignWrapper &) |
Apply the algorithm to an align wrapper. More... | |
virtual void | visitTrackIntegrator (const TrackIntegrator &) |
Apply the algorithm to an integrator capable of tracking. More... | |
virtual void | visitMapIntegrator (const MapIntegrator &) |
Apply the algorithm to an integrator capable of mapping. More... | |
virtual void | setNumBunch (int) |
set total number of tracked bunches More... | |
virtual int | getNumBunch () |
get total number of tracked bunches More... | |
![]() | |
AbstractTracker (const Beamline &, const PartData &, bool backBeam, bool backTrack) | |
Constructor. More... | |
virtual | ~AbstractTracker () |
![]() | |
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... | |
![]() | |
BeamlineVisitor () | |
virtual | ~BeamlineVisitor () |
Private Member Functions | |
ThinTracker () | |
ThinTracker (const ThinTracker &) | |
void | operator= (const ThinTracker &) |
void | applyDrift (double length) |
Additional Inherited Members | |
![]() | |
enum | { X, PX, Y, PY, T, PT } |
![]() | |
FieldList | cavities_m |
set multipacting flag More... | |
const Beamline & | itsBeamline_m |
![]() | |
void | applyDrift (double length) |
Apply a drift length. More... | |
void | applyThinMultipole (const BMultipoleField &field, double factor) |
void | applyThinSBend (const BMultipoleField &field, double scale, double h) |
void | applyTransform (const Euclid3D &, double refLength=0.0) |
Apply a geometric transformation. More... | |
FTps< double, 2 > | buildMultipoleVectorPotential2D (const BMultipoleField &) |
Construct vector potential for a Multipole. More... | |
FTps< double, 6 > | buildMultipoleVectorPotential (const BMultipoleField &) |
Construct vector potential for a Multipole. More... | |
FTps< double, 2 > | buildSBendVectorPotential2D (const BMultipoleField &, double h) |
Construct vector potential for a SBend. More... | |
FTps< double, 6 > | buildSBendVectorPotential (const BMultipoleField &, double h) |
Construct vector potential for a SBend. More... | |
![]() | |
PartBunchBase< double, 3 > * | itsBunch_m |
The bunch of particles to be tracked. More... | |
![]() | |
const PartData | itsReference |
The reference information. More... | |
![]() | |
const Beamline & | itsLine |
bool | back_beam |
bool | back_track |
bool | back_path |
double | flip_B |
double | flip_s |
Track with thin lens algorithm.
Definition at line 47 of file ThinTracker.h.
ThinTracker::ThinTracker | ( | const Beamline & | bl, |
const PartData & | data, | ||
bool | revBeam, | ||
bool | revTrack | ||
) |
Constructor.
Definition at line 66 of file ThinTracker.cpp.
ThinTracker::ThinTracker | ( | const Beamline & | bl, |
PartBunchBase< double, 3 > * | bunch, | ||
const PartData & | data, | ||
bool | revBeam, | ||
bool | revTrack | ||
) |
Constructor.
Definition at line 72 of file ThinTracker.cpp.
|
virtual |
Definition at line 80 of file ThinTracker.cpp.
|
private |
|
private |
|
private |
Definition at line 459 of file ThinTracker.cpp.
References PartBunchBase< T, Dim >::get_part(), PartBunchBase< T, Dim >::getLocalNum(), PartData::getM(), PartData::getP(), Tracker::itsBunch_m, AbstractTracker::itsReference, OpalParticle::pt(), OpalParticle::px(), OpalParticle::py(), Hypervolume::ref, PartBunchBase< T, Dim >::set_part(), OpalParticle::t(), OpalParticle::x(), and OpalParticle::y().
Referenced by visitCCollimator(), visitCorrector(), visitDegrader(), visitDiagnostic(), visitDrift(), visitFlexibleCollimator(), visitLambertson(), visitMonitor(), visitMultipole(), visitRBend(), visitRFCavity(), visitRFQuadrupole(), visitSBend(), visitSeparator(), visitSeptum(), and visitSolenoid().
|
private |
|
virtual |
Apply algorithm to BeamBeam.
Reimplemented from DefaultVisitor.
Definition at line 84 of file ThinTracker.cpp.
References abs(), Physics::epsilon_0, exp(), DefaultVisitor::flip_B, DefaultVisitor::flip_s, PartBunchBase< T, Dim >::get_part(), BeamBeam::getBunchCharge(), BeamBeam::getBunchDisplacement(), BeamBeam::getBunchMoment(), PartBunchBase< T, Dim >::getLocalNum(), PartData::getP(), PartData::getQ(), imag(), Tracker::itsBunch_m, AbstractTracker::itsReference, pi, OpalParticle::px(), OpalParticle::py(), Physics::q_e, real(), PartBunchBase< T, Dim >::set_part(), sqrt(), Physics::two_pi, Attrib::Distribution::W, Werrf(), OpalParticle::x(), and OpalParticle::y().
|
virtual |
Apply the algorithm to a beam stripping.
Reimplemented from DefaultVisitor.
Definition at line 168 of file ThinTracker.cpp.
|
virtual |
Apply algorithm to Collimator.
Reimplemented from DefaultVisitor.
Definition at line 172 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply algorithm to Corrector.
Reimplemented from DefaultVisitor.
Definition at line 190 of file ThinTracker.cpp.
References applyDrift(), Physics::c, DefaultVisitor::flip_B, DefaultVisitor::flip_s, PartBunchBase< T, Dim >::get_part(), BDipoleField::getBx(), BDipoleField::getBy(), ElementBase::getElementLength(), Corrector::getField(), PartBunchBase< T, Dim >::getLocalNum(), PartData::getP(), PartData::getQ(), Tracker::itsBunch_m, AbstractTracker::itsReference, OpalParticle::px(), OpalParticle::py(), and PartBunchBase< T, Dim >::set_part().
|
virtual |
Apply the algorithm to a CyclotronValley.
Reimplemented from DefaultVisitor.
Definition at line 185 of file ThinTracker.cpp.
|
virtual |
Apply the algorithm to a drift.
Reimplemented from DefaultVisitor.
Definition at line 176 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply algorithm to Diagnostic.
Reimplemented from DefaultVisitor.
Definition at line 212 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply algorithm to Drift.
Reimplemented from DefaultVisitor.
Definition at line 218 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply the algorithm to a flexible collimator.
Reimplemented from DefaultVisitor.
Definition at line 222 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply algorithm to Lambertson.
Reimplemented from DefaultVisitor.
Definition at line 226 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply algorithm to Marker.
Reimplemented from DefaultVisitor.
Definition at line 232 of file ThinTracker.cpp.
|
virtual |
Apply algorithm to Monitor.
Reimplemented from DefaultVisitor.
Definition at line 237 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply algorithm to Multipole.
Reimplemented from DefaultVisitor.
Definition at line 242 of file ThinTracker.cpp.
References applyDrift(), Tracker::applyThinMultipole(), Physics::c, DefaultVisitor::flip_B, DefaultVisitor::flip_s, ElementBase::getElementLength(), Multipole::getField(), PartData::getP(), PartData::getQ(), and AbstractTracker::itsReference.
|
virtual |
Apply algorithm to Solenoid.
Reimplemented from DefaultVisitor.
Definition at line 180 of file ThinTracker.cpp.
|
virtual |
Apply algorithm to Probe.
Reimplemented from DefaultVisitor.
Definition at line 265 of file ThinTracker.cpp.
|
virtual |
Apply algorithm to RBend.
Reimplemented from DefaultVisitor.
Definition at line 270 of file ThinTracker.cpp.
References applyDrift(), Physics::c, DefaultVisitor::flip_B, DefaultVisitor::flip_s, PartBunchBase< T, Dim >::get_part(), RBendGeometry::getBendAngle(), RBendGeometry::getElementLength(), RBend::getField(), RBend::getGeometry(), PartBunchBase< T, Dim >::getLocalNum(), PartData::getP(), PartData::getQ(), Tracker::itsBunch_m, AbstractTracker::itsReference, BMultipoleField::normal(), BMultipoleField::order(), OpalParticle::pt(), OpalParticle::px(), OpalParticle::py(), PartBunchBase< T, Dim >::set_part(), BMultipoleField::skew(), OpalParticle::t(), OpalParticle::x(), and OpalParticle::y().
|
virtual |
Apply algorithm to RFCavity.
Reimplemented from DefaultVisitor.
Definition at line 315 of file ThinTracker.cpp.
References applyDrift(), Physics::c, DefaultVisitor::flip_s, PartBunchBase< T, Dim >::get_part(), RFCavity::getAmplitude(), RFCavity::getElementLength(), RFCavity::getFrequency(), PartBunchBase< T, Dim >::getLocalNum(), PartData::getM(), PartData::getP(), RFCavity::getPhase(), Tracker::itsBunch_m, AbstractTracker::itsReference, OpalParticle::pt(), PartBunchBase< T, Dim >::set_part(), sin(), sqrt(), and OpalParticle::t().
|
virtual |
Apply algorithm to RFQuadrupole.
Reimplemented from DefaultVisitor.
Definition at line 338 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply algorithm to SBend.
Reimplemented from DefaultVisitor.
Definition at line 344 of file ThinTracker.cpp.
References applyDrift(), Physics::c, DefaultVisitor::flip_B, DefaultVisitor::flip_s, PartBunchBase< T, Dim >::get_part(), PlanarArcGeometry::getBendAngle(), PlanarArcGeometry::getElementLength(), SBend::getField(), SBend::getGeometry(), PartBunchBase< T, Dim >::getLocalNum(), PartData::getP(), PartData::getQ(), Tracker::itsBunch_m, AbstractTracker::itsReference, BMultipoleField::normal(), BMultipoleField::order(), OpalParticle::pt(), OpalParticle::px(), OpalParticle::py(), PartBunchBase< T, Dim >::set_part(), BMultipoleField::skew(), OpalParticle::t(), OpalParticle::x(), and OpalParticle::y().
|
virtual |
Apply algorithm to Separator.
Reimplemented from DefaultVisitor.
Definition at line 388 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, PartBunchBase< T, Dim >::get_part(), ElementBase::getElementLength(), Separator::getEx(), Separator::getEy(), PartBunchBase< T, Dim >::getLocalNum(), PartData::getP(), PartData::getQ(), Tracker::itsBunch_m, AbstractTracker::itsReference, OpalParticle::pt(), OpalParticle::px(), OpalParticle::py(), and PartBunchBase< T, Dim >::set_part().
|
virtual |
Apply algorithm to Septum.
Reimplemented from DefaultVisitor.
Definition at line 411 of file ThinTracker.cpp.
References applyDrift(), DefaultVisitor::flip_s, and ElementBase::getElementLength().
|
virtual |
Apply algorithm to Solenoid.
Reimplemented from DefaultVisitor.
Definition at line 417 of file ThinTracker.cpp.
References applyDrift(), Physics::c, cos(), DefaultVisitor::flip_B, DefaultVisitor::flip_s, PartBunchBase< T, Dim >::get_part(), Solenoid::getBz(), Solenoid::getElementLength(), PartBunchBase< T, Dim >::getLocalNum(), PartData::getM(), PartData::getP(), PartData::getQ(), Tracker::itsBunch_m, AbstractTracker::itsReference, OpalParticle::pt(), OpalParticle::px(), OpalParticle::py(), Hypervolume::ref, PartBunchBase< T, Dim >::set_part(), sin(), sqrt(), OpalParticle::t(), OpalParticle::x(), and OpalParticle::y().