45 std::vector<Vector_t> designPath(size);
48 for (
unsigned int i = 0; i < size; ++ i) {
50 designPath[i] = currentPosition;
67 return std::abs(betaGamma * mass / (
Physics::c * fieldAmplitude * charge));
76 return betaGamma * mass / (
Physics::c * radius * charge);
81 return 2.0 * std::asin(chordLength / (2.0 * radius));
86 return chordLength / (2.0 * std::sin(angle / 2.0));
98 return std::sqrt(std::pow(gamma, 2.0) - 1.0);
constexpr double c
The velocity of light in m/s.
double calcGamma() const
Calculate gamma from design energy.
std::vector< Vector_t > getDesignPath() const
std::vector< Vector_t > refTrajMap_m
Map of reference particle trajectory.
double calcBendAngle(double chordLength, double radius) const
Calculate bend angle from chord length and design radius.
double fieldAmplitude_m
Field amplitude.
double calcBetaGamma() const
Calculate beta*gamma from design energy.
double designEnergy_m
Bend design energy (eV).
Fieldmap fieldmap_m
Magnet field map.
double gap_m
Full vertical gap of the magnets.
bool designEnergyChangeable_m
double calcFieldAmplitude(double radius) const
Calculate field amplitude from design energy and radius.
double calcDesignRadius(double fieldAmplitude) const
Calculate design radius from design energy and field amplitude.
void setFieldAmplitude(double k0, double k0s)
double angle_m
Bend angle.
Component(const std::string &name)
Constructor with given name.
PartBunchBase< double, 3 > * RefPartBunch_m
Vektor< double, 3 > Vector_t