1 #ifndef MAD_LinearMapper_HH
2 #define MAD_LinearMapper_HH
28 template <
class T,
int N>
class FTps;
29 template <
class T,
int N>
class FVps;
78 bool revBeam,
bool revTrack);
224 (
double k,
double L,
double &
c,
double &s,
double &d,
double &f);
228 #endif // MAD_LinearMapper_HH
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.
virtual void visitPatch(const Patch &pat)
Apply the algorithm to a patch.
virtual void visitAlignWrapper(const AlignWrapper &)
Apply the algorithm to an offset beamline object wrapper.
Interface for septum magnet.
void applyMultipoleBody(double length, double refLength, const BMultipoleField &field, double scale)
Apply body of SBend.
virtual void visitSeptum(const Septum &)
Apply the algorithm to a Septum.
Interface for electrostatic separator.
virtual void visitLambertson(const Lambertson &)
Apply the algorithm to a Lambertson.
void applyExitFringe(double edge, const BMultipoleField &field, double scale)
Interface for beam position monitors.
Interface for RF Quadrupole.
virtual void visitRFCavity(const RFCavity &)
Apply the algorithm to a RFCavity.
Define the position of a misaligned element.
virtual void visitComponent(const Component &)
Apply the algorithm to an arbitrary component.
virtual void visitMultipole(const Multipole &)
Apply the algorithm to a Multipole.
virtual void visitFlexibleCollimator(const FlexibleCollimator &)
Apply the algorithm to a flexible collimator.
Interface for general corrector.
Interface for beam diagnostics.
virtual void visitSeparator(const Separator &)
Apply the algorithm to a Separator.
Interface for drift space.
Build a map using a linear map for each element.
void applySBendBody(double length, double refLength, double h, const BMultipoleField &field, double scale)
Apply thin multipole kick (integrated over length) to all particles.
Interface for general multipole.
virtual void visitMonitor(const Monitor &)
Apply the algorithm to a Monitor.
LinearMap< double, 6 > itsMap
void applyTransform(const Euclid3D &, double refLength)
Apply transform.
virtual void visitRBend0(const RBend &)
Apply the algorithm to a RBend.
virtual void getMap(LinearMap< double, 6 > &) const
Return the linear part of the accumulated map.
FTps< double, 2 > buildSBendVectorPotential(const BMultipoleField &, double h)
Construct the vector potential for a SBend.
virtual void visitSolenoid(const Solenoid &)
Apply the algorithm to a Solenoid.
virtual void visitCorrector(const Corrector &)
Apply the algorithm to a Corrector.
constexpr double c
The velocity of light in m/s.
Interface for cyclotron collimator.
virtual void visitProbe(const Probe &prob)
Apply the algorithm to a probe.
Displacement and rotation in space.
Abstract beam-beam interaction.
virtual void visitBeamStripping(const BeamStripping &)
Apply the algorithm to a beam stripping.
virtual void visitDegrader(const Degrader &)
Apply the algorithm to a drift.
Interface for cyclotron valley.
virtual void visitDrift(const Drift &)
Apply the algorithm to a Drift.
virtual void visitSBend(const SBend &)
Apply the algorithm to a SBend.
static void makeFocus(double k, double L, double &c, double &s, double &d, double &f)
Helper function for finding first-order coefficients.
An abstract sequence of beam line components.
virtual void visitRFQuadrupole(const RFQuadrupole &)
Apply the algorithm to a RFQuadrupole.
virtual void visitCyclotronValley(const CyclotronValley &)
Apply the algorithm to a CyclotronValley.
virtual void visitDiagnostic(const Diagnostic &)
Apply the algorithm to a Diagnostic.
void operator=(const LinearMapper &)
virtual void visitParallelPlate(const ParallelPlate &)
Apply the algorithm to a ParallelPlate.
The magnetic field of a multipole.
void applyEntranceFringe(double edge, const BMultipoleField &field, double scale)
Transforms fringing fields.
virtual void visitMarker(const Marker &)
Apply the algorithm to a Marker.
virtual void visitBeamBeam(const BeamBeam &)
Apply the algorithm to a BeamBeam.
virtual void visitRBend(const RBend &)
Apply the algorithm to a rectangular bend.
virtual void visitMapIntegrator(const MapIntegrator &)
Apply the algorithm to an integrator capable of mapping.
Truncated power series in N variables of type T.
Interface for a geometric patch.
Interface for a single beam element.
virtual void visitCCollimator(const CCollimator &)
Apply the algorithm to a collimator.
void applyThinMultipole(const BMultipoleField &field, double factor)
Thin multipole kick.
Vector truncated power series in n variables.
virtual void setMap(const LinearMap< double, 6 > &)
Reset the linear part of the accumulated map for restart.
void applyDrift(double length)
Apply drift length.
Interface for a Lambertson septum.