182 return filePath.replace_extension().native();
190 if (aChannel !=
nullptr) {
191 double val = *aChannel;
203 if (aChannel !=
nullptr) {
220 if (aChannel !=
nullptr && aChannel->
isSettable()) {
224 std::cout <<
"Channel nullptr or not Settable" << std::endl;
296 factor = fractionLength *
aperture_m.second[2];
301 return (std::abs(r[0]) < xLimit && std::abs(r[1]) < yLimit);
303 return (std::pow(r[0] / xLimit, 2) + std::pow(r[1] / yLimit, 2) < 1.0);
305 return (std::abs(r[0]) < factor * xLimit && std::abs(r[1]) < factor * yLimit);
307 return (std::pow(r[0] / (factor * xLimit), 2) + std::pow(r[1] / (factor * yLimit), 2) < 1.0);
321 std::vector<Vector_t> corners(8);
322 for (
int i = -1; i < 2; i += 2) {
323 for (
int j = -1; j < 2; j += 2) {
324 unsigned int idx = (i + 1)/2 + (j + 1);
Map of std::string versus double value.
const_iterator begin() const
Iterator accessing first member.
NameMap::const_iterator const_iterator
An iterator for a map of name versus value.
const_iterator end() const
Iterator marking the end of the list.
virtual void setBoundaryGeometry(BoundaryGeometry *geo)
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.
static const std::map< ElementType, std::string > elementTypeToString_s
virtual double getElementLength() const
Get design length.
bool update(const AttributeSet &)
Update element.
ParticleMatterInteractionHandler * parmatint_m
CoordinateSystemTrafo misalignment_m
virtual const ConstChannel * getConstChannel(const std::string &aKey) const
Construct a read-only channel.
ElementBase(const std::string &name)
Constructor with given name.
bool deleteOnTransverseExit_m
virtual ElementBase * clone() const =0
Return clone.
virtual void setAttribute(const std::string &aKey, double val)
Set value of an attribute.
bool isInsideTransverse(const Vector_t &r) const
std::string getOutputFN() const
Get output filename.
void setOutputFN(std::string fn)
Set output filename.
std::pair< ApertureType, std::vector< double > > aperture_m
double elementPosition_m
ELEMEDGE attribute.
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys)
virtual void makeSharable()
Set sharable flag.
virtual bool hasAttribute(const std::string &aKey) const
Test for existence of an attribute.
std::queue< std::pair< double, double > > actionRange_m
virtual CoordinateSystemTrafo getEdgeToBegin() const
std::string getTypeString() const
virtual ElementBase * copyStructure()
Make a structural copy.
BoundaryGeometry * bgeometry_m
bool isSharable() const
Test if the element can be shared.
void setCurrentSCoordinate(double s)
virtual double getAttribute(const std::string &aKey) const
Get attribute value.
virtual CoordinateSystemTrafo getEdgeToEnd() const
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
virtual BoundingBox getBoundingBoxInLabCoords() const
CoordinateSystemTrafo csTrafoGlobal2Local_m
Vector_t transformFrom(const Vector_t &r) const
Vector_t transformTo(const Vector_t &r) const
Abstract interface for read/write access to variable.
virtual bool isSettable() const
Test if settable.
Abstract interface for read-only access to variable.
Abstract base class for reference counted objects.
RCObject()
Default constructor.
static BoundingBox getBoundingBox(const std::vector< Vector_t > &positions)
Vektor< double, 3 > Vector_t