67#include <boost/filesystem.hpp>
149 return filePath.replace_extension().native();
156 if (aChannel !=
nullptr) {
157 double val = *aChannel;
168 if (aChannel !=
nullptr) {
183 if (aChannel !=
nullptr && aChannel->
isSettable()) {
187 std::cout <<
"Channel nullptr or not Settable" << std::endl;
253 factor = fractionLength *
aperture_m.second[2];
258 return (std::abs(r[0]) < xLimit && std::abs(r[1]) < yLimit);
260 return (std::pow(r[0] / xLimit, 2) + std::pow(r[1] / yLimit, 2) < 1.0);
262 return (std::abs(r[0]) < factor * xLimit && std::abs(r[1]) < factor * yLimit);
265 std::pow(r[0] / (factor * xLimit), 2) + std::pow(r[1] / (factor * yLimit), 2)
280 std::vector<Vector_t<double, 3>> corners(8);
281 for (
int i = -1; i < 2; i += 2) {
282 for (
int j = -1; j < 2; j += 2) {
283 unsigned int idx = (i + 1) / 2 + (j + 1);
ippl::Vector< T, Dim > Vector_t
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.
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)
bool isInsideTransverse(const Vector_t< double, 3 > &r) const
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
ippl::Vector< double, 3 > transformFrom(const ippl::Vector< double, 3 > &r) const
ippl::Vector< double, 3 > transformTo(const ippl::Vector< double, 3 > &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.
RCObject()
Default constructor.
static BoundingBox getBoundingBox(const std::vector< Vector_t< double, 3 > > &positions)