25 std::string(
"The \"VerticalFFAMagnet\" element defines a vertical FFA ") +
26 std::string(
"magnet, which has a field that increases in the vertical ") +
27 std::string(
"direction while maintaining similar orbits.");
33 (
"B0",
"The nominal dipole field of the magnet at zero height [T].");
36 (
"FIELD_INDEX",
"Exponent term in the field index [m^(-1)].");
40 "The full width of the magnet. Particles moving more than WIDTH/2 horizontally, "
41 "in either direction, are out of the aperture.");
44 (
"MAX_HORIZONTAL_POWER",
45 "The maximum power in horizontal coordinate that will be considered in the field expansion.");
48 (
"END_LENGTH",
"The end length of the FFA fringe field [m].");
51 (
"CENTRE_LENGTH",
"The centre length of the FFA (i.e. length of the flat top) [m].");
55 "Determines the length of the bounding box. Magnet is situated "
56 "symmetrically in the bounding box. [m]");
60 "Height of the magnet above z=0. Particles moving upwards more than "
61 "HEIGHT_POS_EXTENT are out of the aperture [m].");
65 "Height of the magnet below z=0. Particles moving downwards more than "
66 "HEIGHT_NEG_EXTENT are out of the aperture [m].");
108 endField->
setX0(centre_length / 2.);
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.
ElementBase * getElement() const
Return the embedded CLASSIC element.
void setElement(ElementBase *)
Assign new CLASSIC element.
std::vector< Attribute > itsAttr
The object attributes.
Calculate the Tanh function (e.g.
static void setTanhDiffIndices(size_t n)
Set the value of tanh differential indices to nth order differentials.
void setX0(double x0)
Set x0 (flat top length)
void setLambda(double lambda)
Set lambda (end length)
Bending magnet with an exponential dependence on field in the vertical plane.
void setBBLength(double bbLength)
Set the length of the bounding box (centred on magnet centre)
endfieldmodel::EndFieldModel * getEndField() const
Get the fringe field.
void setWidth(double width)
Set the full width of the bounding box (centred on magnet centre)
void setMaxOrder(size_t maxOrder)
Set the maximum power of x used in the off-midplane expansion;.
void setB0(double Bz)
Set the centre field at z=0.
void setNegativeVerticalExtent(double negativeExtent)
Set the maximum extent below z = 0.
void setFieldIndex(double index)
Set the field index.
void initialise(PartBunchBase< double, 3 > *bunch, double &startField, double &endField)
Initialise the VerticalFFAMagnet.
void setEndField(endfieldmodel::EndFieldModel *endField)
Set the fringe field.
void setPositiveVerticalExtent(double positiveExtent)
set the maximum extent above z = 0
void registerOwnership() const
virtual void update()
Update the VerticalFFA with new parameters from UI parser.
virtual ~OpalVerticalFFAMagnet()
Destructor does nothing.
static const std::string docstring_m
OpalVerticalFFAMagnet()
Default constructor initialises UI parameters.
virtual OpalVerticalFFAMagnet * clone(const std::string &name)
Inherited copy constructor.