136 if (std::abs(angle) > 0.0) {
139 (std::sin(E1) + std::sin(std::abs(angle) - E1));
143 double fieldAmplitude = std::copysign(1.0, refCharge) * std::abs(amplitude);
virtual void visitRBend(const RBend &)=0
Apply the algorithm to a rectangular bend.
void setExitAngle(double exitAngle)
virtual void setEntranceAngle(double entranceAngle) override
Bend2D(const std::string &name)
Constructor with given name.
void setMessageHeader(const std::string &header)
double getBendAngle() const
virtual void setBendAngle(double angle)
double getEntranceAngle() const
double calcDesignRadius(double fieldAmplitude) const
Calculate design radius from design energy and field amplitude.
PartBunchBase< double, 3 > * RefPartBunch_m
virtual double getElementLength() const
Get design length.
virtual void setBendAngle(double angle) override
virtual void accept(BeamlineVisitor &) const override
Apply visitor to RBend.
RBend(const std::string &name)
Constructor with given name.
virtual BMultipoleField & getField() override=0
Get multipole expansion of field.
double getNormalComponent(int) const
Get normal component.
virtual bool findChordLength(double &chordLength) override
void setNormalComponent(int, double)
Set normal component.
void setSkewComponent(int, double)
Set skew component.
double getSkewComponent(int) const
Get skew component.
virtual ElementType getType() const override
Get element type std::string.
virtual void setEntranceAngle(double entranceAngle) override
double getNormalComponent(int n) const
Get component.
double getSkewComponent(int n) const
Get component.
void setNormalComponent(int n, double Bn)
Set component.
void setSkewComponent(int n, double Bn)
Set component.