40 "The \"ScalingFFAMagnet\" element defines a FFA scaling magnet with zero or non-zero spiral angle.") {
42 (
"B0",
"The nominal dipole field of the magnet [T].");
45 "The scaling magnet field index.");
47 "Tangent of the spiral angle; set to 0 to make a radial sector magnet.");
49 "The maximum power in y that will be considered in the field expansion.");
51 "Names the end field model of the ring, giving dipole field along a line of "
52 "constant radius. If blank, uses the default 'END_LENGTH' and 'CENTRE_LENGTH' "
53 "parameters and a tanh model. If 'END_FIELD_MODEL' is not blank, Opal will seek "
54 "an END_FIELD_MODEL corresponding to the name defined in this string.");
56 "The end length of the spiral FFA [m].");
58 "Full height of the magnet. Particles moving more than height/2. off the midplane (either above or below) are out of the aperture [m].");
60 "The centre length of the spiral FFA [m].");
62 "Particles are considered outside the tracking region if radius is greater than R0-RADIAL_NEG_EXTENT [m].");
64 "Particles are considered outside the tracking region if radius is greater than R0+RADIAL_POS_EXTENT [m].");
66 "Determines the position of the central portion of the magnet field relative to the element start (default is 2*end_length). [m]");
68 "Offset to the end of the magnet, i.e. placement of the next element. Default is centre_length + 4*end_length.");
70 "The field will be assumed zero if particles are more than AZIMUTHAL_EXTENT from the magnet centre (psi=0). Default is CENTRE_LENGTH/2.+5.*END_LENGTH [m].");
104 endField->
setX0(centre_length);
105 std::shared_ptr<endfieldmodel::EndFieldModel> efm(endField);
106 std::string endName =
"__opal_internal__"+
getOpalName();
162 "MAGNET_END must be > 0.0");
176 "MAGNET_START must be > 0.0");
187 "AZIMUTHAL_EXTENT must be > 0.0");
PETE_TUTree< FnFloor, typename T::PETE_Expr_t > floor(const PETE_Expr< T > &l)
double getReal(const Attribute &attr)
Return real value.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
std::string getString(const Attribute &attr)
Get string value.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
ElementBase * getElement() const
Return the embedded CLASSIC element.
void setElement(ElementBase *)
Assign new CLASSIC element.
const std::string & getOpalName() const
Return object name.
std::vector< Attribute > itsAttr
The object attributes.
virtual void rescale(double scaleFactor)=0
static void setEndFieldModel(std::string name, std::shared_ptr< EndFieldModel > efm)
virtual void setMaximumDerivative(size_t n)=0
void setLambda(double lambda)
void setAzimuthalExtent(double azimuthalExtent)
void setRMin(double rMin)
void setCentre(Vector_t centre)
void setVerticalExtent(double verticalExtent)
void setTanDelta(double tanDelta)
void setDipoleConstant(double Bz)
void setPhiStart(double phiStart)
void setEndField(endfieldmodel::EndFieldModel *endField)
void setMaxOrder(size_t maxOrder)
void setFieldIndex(double k)
void setRMax(double rMax)
void setEndFieldName(std::string name)
void setPhiEnd(double phiEnd)
endfieldmodel::EndFieldModel * getEndField() const
void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField) override
void registerOwnership() const
virtual ~OpalScalingFFAMagnet()
void setupNamedEndField()
void setupDefaultEndField()
virtual OpalScalingFFAMagnet * clone(const std::string &name)
The base class for all OPAL exceptions.