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