31 OpalElement(
SIZE,
"RBEND3D",
"The \"RBEND3D\" element defines an RBEND with 3D field maps"),
35 (
"ANGLE",
"Upright dipole coefficient in m^(-1)");
37 (
"K0",
"Normal dipole coefficient in m^(-1)");
39 (
"K0S",
"Skew dipole coefficient in m^(-1)");
41 (
"E1",
"Entry pole face angle in rad", 0.0);
43 (
"FMAPFN",
"Filename for the fieldmap");
45 (
"GAP",
"Full gap height of the magnet (m)", 0.0);
47 (
"HAPERT",
"Bend plane magnet aperture (m)", 0.0);
49 (
"DESIGNENERGY",
"the mean energy of the particles in MeV");
102 length ? 2 *
sin(angle / 2) / length : angle;
125 else if(bend->
getName() !=
"RBEND3D") {
127 throw OpalException(
"OpalRBend3D::update", bend->
getName() +
": No filename for field map given");
static AttCell * registerStringAttribute(const std::string &name)
Register a ``string'' element attribute.
Interface for basic beam line object.
OpalRBend3D()
Exemplar constructor.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
ValueFlag
Switch for value desired on ATTLIST command.
The base class for all OPAL exceptions.
Tps< T > sin(const Tps< T > &x)
Sine.
virtual ElementBase * removeWrappers()
Return the design element.
virtual const std::string & getName() const
Get element name.
std::vector< Attribute > itsAttr
The object attributes (see Attribute.hh).
virtual void print(std::ostream &) const
Print the object.
static ParticleMatterInteraction * find(const std::string &name)
Find named PARTICLEMATTERINTERACTION.
void initWakefunction(ElementBase &element)
virtual void setEntranceAngle(double entranceAngle)
virtual void setDesignEnergy(const double &energy, bool changeable=true)
ParticleMatterInteractionHandler * handler_m
virtual void setBendAngle(double angle)
const std::string & getOpalName() const
Return object name.
Quaternion getRotation() const
void initParticleMatterInteractionHandler(ElementBase &element)
static OpalWake * find(const std::string &name)
Find named WAKE.
Base class for all beam line elements.
void setElement(ElementBase *)
Assign new CLASSIC element.
void setCSTrafoGlobal2Local(const CoordinateSystemTrafo &ori)
void registerOwnership() const
Vector_t getOrigin() const
virtual void update()
Update the embedded CLASSIC element.
void setLength(double length)
virtual void updateUnknown(ElementBase *)
Transmit the ``unknown'' (not known to OPAL) attributes to CLASSIC.
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys)
ElementBase * getElement() const
Return the embedded CLASSIC element.
virtual void fillRegisteredAttributes(const ElementBase &, ValueFlag)
Fill in all registered attributes.
bool isPositioned() const
void setAperture(const ApertureType &type, const std::vector< double > &args)
ParticleMatterInteraction * parmatint_m
void setFieldMapFN(std::string fn)
virtual OpalRBend3D * clone(const std::string &name)
Make clone.
void setFieldAmplitude(double k0, double k0s)
double getReal(const Attribute &attr)
Return real value.
virtual void update()
Update the embedded CLASSIC bend.
Attribute makeString(const std::string &name, const std::string &help)
Make string attribute.
Attribute makeReal(const std::string &name, const std::string &help)
Make real attribute.
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
static AttCell * registerRealAttribute(const std::string &name)
Register a ``real'' element attribute.
Inform & endl(Inform &inf)
virtual void print(std::ostream &) const
Print the object.
std::string getString(const Attribute &attr)
Get string value.
CoordinateSystemTrafo getCSTrafoGlobal2Local() const