63 #ifndef CLASSIC_ElementBase_HH
64 #define CLASSIC_ElementBase_HH
75 #include <boost/optional.hpp>
139 virtual const std::string &
getName()
const;
142 virtual void setName(
const std::string &name);
193 virtual double getExit()
const;
242 virtual double getAttribute(
const std::string &aKey)
const;
246 virtual bool hasAttribute(
const std::string &aKey)
const;
252 virtual void setAttribute(
const std::string &aKey,
double val);
331 std::pair<ApertureType, std::vector<double> >
getAperture()
const;
340 void setActionRange(
const std::queue<std::pair<double, double> > &range);
472 {
return wake_m !=
nullptr; }
594 std::string(
"ELEMEDGE for \"") +
getName() +
"\" not set");
619 #endif // CLASSIC_ElementBase_HH
static const std::map< ElementType, std::string > elementTypeToString_s
virtual BGeometryBase & getGeometry()=0
Get geometry.
virtual double getElementLength() const =0
Get geometry length.
virtual Euclid3D getEntrancePatch() const
Get patch.
virtual void setBoundaryGeometry(BoundaryGeometry *geo)
Abstract base class for reference counted objects.
virtual double getArcLength() const
Get arc length.
virtual bool isInside(const Vector_t &r) const
CoordinateSystemTrafo getCSTrafoGlobal2Local() const
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys)
void setCSTrafoGlobal2Local(const CoordinateSystemTrafo &ori)
virtual Euclid3D getTotalTransform() const
Get transform.
virtual const ConstChannel * getConstChannel(const std::string &aKey) const
Construct a read-only channel.
virtual BoundaryGeometry * getBoundaryGeometry() const
return the attached boundary geometrt object if there is any
void setActionRange(const std::queue< std::pair< double, double > > &range)
Vektor< double, 3 > Vector_t
virtual CoordinateSystemTrafo getEdgeToEnd() const
ParticleMatterInteractionHandler * parmatint_m
virtual void accept(BeamlineVisitor &visitor) const =0
Apply visitor.
bool isElementPositionSet() const
virtual Euclid3D getEntrancePatch() const
Get patch.
void operator=(const ElementBase &)
Abstract base class for accelerator geometry classes.
virtual double getExit() const
Get exit position.
virtual double getArcLength() const =0
Get arc length.
virtual Euclid3D getExitFrame() const
Get transform.
std::string getTypeString() const
virtual Channel * getChannel(const std::string &aKey, bool create=false)
Construct a read/write channel.
virtual Euclid3D getExitPatch() const
Get patch.
virtual const std::string & getName() const
Get element name.
clearpage the user may choose between constant or variable radius This model includes fringe fields begin
virtual void setAttribute(const std::string &aKey, double val)
Set value of an attribute.
virtual Euclid3D getExitFrame() const
Get transform.
virtual void makeSharable()
Set sharable flag.
virtual double getOrigin() const
Get origin position.
virtual double getAttribute(const std::string &aKey) const
Get attribute value.
void setFlagDeleteOnTransverseExit(bool=true)
virtual bool hasBoundaryGeometry() const
virtual Euclid3D getEntranceFrame() const
Get transform.
bool isSharable() const
Test if the element can be shared.
virtual bool hasParticleMatterInteraction() const
virtual Euclid3D getExitPatch() const
Get patch.
bool deleteOnTransverseExit_m
BoundaryGeometry * bgeometry_m
bool getFlagDeleteOnTransverseExit() const
void setRotationAboutZ(double rotation)
Set rotation about z axis in bend frame.
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
virtual CoordinateSystemTrafo getEdgeToBegin() const
CoordinateSystemTrafo csTrafoGlobal2Local_m
void setOutputFN(std::string fn)
Set output filename.
std::queue< std::pair< double, double > > actionRange_m
virtual WakeFunction * getWake() const
return the attached wake object if there is any
Abstract interface for read/write access to variable.
void setMisalignment(const CoordinateSystemTrafo &cst)
virtual ElementType getType() const =0
Get element type std::string.
virtual Euclid3D getTransform(double fromS, double toS) const
Get transform.
virtual double getElementLength() const
Get design length.
void setElementPosition(double elemedge)
Access to ELEMEDGE attribute.
double getElementPosition() const
double getRotationAboutZ() const
bool isPositioned() const
virtual void getElementDimensions(double &begin, double &end) const
virtual double getEntrance() const
Get entrance position.
virtual Euclid3D getEntranceFrame() const
Get transform.
virtual bool hasAttribute(const std::string &aKey) const
Test for existence of an attribute.
CoordinateSystemTrafo getMisalignment() const
virtual ElementBase * copyStructure()
Make a structural copy.
bool isInsideTransverse(const Vector_t &r) const
std::pair< ApertureType, std::vector< double > > getAperture() const
virtual void setElementLength(double length)
Set geometry length.
Map of std::string versus double value.
virtual int getRequiredNumberOfTimeSteps() const
virtual Euclid3D getTransform(double fromS, double toS) const =0
Get transform.
virtual ElementBase * clone() const =0
Return clone.
virtual void setElementLength(double length)
Set design length.
virtual ParticleMatterInteractionHandler * getParticleMatterInteraction() const
Displacement and rotation in space.
virtual void setName(const std::string &name)
Set element name.
CoordinateSystemTrafo misalignment_m
virtual Euclid3D getTotalTransform() const
Get transform.
void setAperture(const ApertureType &type, const std::vector< double > &args)
bool update(const AttributeSet &)
Update element.
void setCurrentSCoordinate(double s)
virtual BoundingBox getBoundingBoxInLabCoords() const
std::string getOutputFN() const
Get output filename.
double elementPosition_m
ELEMEDGE attribute.
std::pair< ApertureType, std::vector< double > > aperture_m
virtual double getOrigin() const
Get origin position.
virtual double getEntrance() const
Get entrance position.
virtual bool hasWake() const
virtual double getExit() const
Get exit position.
virtual void removeAttribute(const std::string &aKey)
Remove an existing attribute.
Abstract interface for read-only access to variable.