1 #ifndef CLASSIC_BENDBASE_H
2 #define CLASSIC_BENDBASE_H
18 virtual bool bends()
const;
29 virtual void setDesignEnergy(
const double& energy,
bool changeable =
true);
44 double calcBendAngle(
double chordLength,
double radius)
const;
virtual void setBendAngle(double angle)
std::string getFieldMapFN() const
void setFieldAmplitude(double k0, double k0s)
item[EANGLE] Entrance edge angle(radians).\item[ROTATION] Rotation of the magnet about its central axis(radians
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
double calcGamma() const
Calculate gamma from design energy.
double getChordLength() const
double calcBetaGamma() const
Calculate beta*gamma from design energy.
double calcBendAngle(double chordLength, double radius) const
Calculate bend angle from chord length and design radius.
virtual double getExitAngle() const =0
double getBendAngle() const
double calcDesignRadius(double fieldAmplitude) const
Calculate design radius from design energy and field amplitude.
bool designEnergyChangeable_m
double getEntranceAngle() const
std::shared_ptr< _Fieldmap > Fieldmap
double angle_m
Bend angle.
double getFullGap() const
void setFieldMapFN(std::string fileName)
virtual void setEntranceAngle(double entranceAngle)
double getFieldAmplitude() const
Fieldmap fieldmap_m
Magnet field map.
std::vector< Vector_t > getDesignPath() const
const bool fast_m
Flag to turn on fast field calculation.
virtual void setDesignEnergy(const double &energy, bool changeable=true)
double getDesignEnergy() const
double designEnergy_m
Bend design energy (eV).
double fieldAmplitude_m
Field amplitude.
Interface for a single beam element.
std::vector< Vector_t > refTrajMap_m
Map of reference particle trajectory.
double gap_m
Full vertical gap of the magnets.
virtual bool bends() const
Indicates that element bends the beam.
double calcFieldAmplitude(double radius) const
Calculate field amplitude from design energy and radius.