68 Ring(std::string ring);
139 virtual bool bends()
const override {
152 virtual void getDimensions(
double& zBegin,
double& zEnd)
const override;
156 return new Ring(*
this);
472 return Vector3D({vec_t[0], vec_t[1], vec_t[2]});
std::vector< RingSection * > RingSectionList
Interface for a single beam element.
Ring describes a ring type geometry for tracking.
virtual const EMField & getField() const override
Not implemented, throws an exception.
double getBeamRInit() const
Get the initial beam radius.
void setSymmetry(double symmetry)
Set the rotational symmetry of the ring (number of cells)
PartBunch_t * getRefPartBunch() const
Get pointer to RefPartBunch_t from the bunch.
double getLatticePhiInit() const
Get the initial element's azimuthal angle.
virtual void initialise(PartBunch_t *bunch, double &startField, double &endField) override
Initialise the Ring.
double getRingMinR() const
Get the ring minimum.
static Vector_t< double, 3 > convert(const Vector3D &vec)
Convert from a Vector3D to a Vector_t<double, 3>
Rotation3D getRotationStartToEnd(Euclid3D delta) const
virtual EMField & getField() override
Not implemented, throws an exception.
static bool sectionCompare(RingSection const *const sec1, RingSection const *const sec2)
double getBeamPRInit() const
Get the initial beam radial momentum.
virtual void finalise() override
Clean up the Ring.
Vector_t< double, 3 > getNextPosition() const
Get the initial element's start position in cartesian coordinates.
double getSymmetry() const
Get the rotational symmetry of the ring (number of cells)
virtual ~Ring()
Destructor - deletes lossDS_m if not nullptr.
Vector_t< double, 3 > getNextNormal() const
Get the initial element's start normal in cartesian coordinates.
Ring & operator=(const Ring &ring)
Disabled.
RingSection * getLastSectionPlaced() const
Get the last section placed or nullptr if no sections were placed yet.
virtual bool apply(const size_t &id, const double &t, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B) override
Overwrite data in vector E and B with electric and magnetic field.
void setBeamRInit(double rInit)
Set the initial beam radius.
virtual const PlanarArcGeometry & getGeometry() const override
Not implemented.
void setIsClosed(bool isClosed)
Set flag for closure checking.
void setLatticeThetaInit(double thetaInit)
Set the first element's horizontal angle.
virtual ElementBase * clone() const override
Inherited copy constructor.
void setHarmonicNumber(double cyclHarm)
Set the harmonic number for RF (number of bunches in the ring)
void setLatticePhiInit(double phiInit)
Set the initial element's azimuthal angle.
virtual bool bends() const override
Returns true - Ring is assumed to bend particles, being a ring.
double getLatticeThetaInit() const
Get the first element's horizontal angle.
double latticeThetaInit_m
std::vector< RingSectionList > ringSections_m
virtual void accept(BeamlineVisitor &visitor) const override
Accept the BeamlineVisitor.
void setRingAperture(double minR, double maxR)
Set the ring aperture limits.
void setScale(double scale)
Set the scaling factor for the fields.
RingSectionList section_list_m
double getBeamPhiInit() const
Get the initial beam azimuthal angle.
void setBeamPRInit(double pRInit)
Set the initial beam radial momentum.
double getIsClosed() const
Get flag for closure checking.
std::vector< RingSection * > getSectionsAt(const Vector_t< double, 3 > &pos)
Get the list of sections at position pos.
double getRingMaxR() const
Get the ring maximum.
void checkMidplane(Euclid3D delta) const
void setLossDataSink(LossDataSink *sink)
Set LossDataSink to sink.
PartBunch_t * refPartBunch_m
void setBeamPhiInit(double phiInit)
Set the initial beam azimuthal angle.
void setRefPartBunch(PartBunch_t *bunch)
Set RefPartBunch_t to bunch.
PlanarArcGeometry planarArcGeometry_m
double getHarmonicNumber()
Get the harmonic number for RF (number of bunches in the ring)
virtual void getDimensions(double &zBegin, double &zEnd) const override
Not implemented - always throws an exception.
void setRFFreq(double rfFreq)
Set the nominal RF frequency.
void lockRing()
Lock the ring.
double getRFFreq() const
Get the nominal RF frequency.
void setLatticeRInit(double rInit)
Set the initial element's radius.
virtual PlanarArcGeometry & getGeometry() override
Not implemented.
void appendElement(const Component &element)
Add element to the ring.
void rotateToCyclCoordinates(Euclid3D &euclid3d) const
double getLatticeRInit() const
Get the initial element's radius.
static const double lengthTolerance_m
static const double angleTolerance_m
PartBunch_t * getLossDataSink() const
Get pointer to lossDataSink.
Displacement and rotation in space.
A simple arc in the XZ plane.
Rotation in 3-dimensional space.
Abstract base class for electromagnetic fields.
Component placement handler in ring geometry.