98 csTrafoGlobal2Local_m(right.csTrafoGlobal2Local_m),
99 misalignment_m(right.misalignment_m),
100 aperture_m(right.aperture_m),
101 elementEdge_m(right.elementEdge_m),
102 rotationZAxis_m(right.rotationZAxis_m),
103 elementID(right.elementID),
104 userAttribs(right.userAttribs),
105 wake_m(right.wake_m),
106 bgeometry_m(right.bgeometry_m),
107 parmatint_m(right.parmatint_m),
108 positionIsFixed(right.positionIsFixed),
109 elementPosition_m(right.elementPosition_m),
110 elemedgeSet_m(right.elemedgeSet_m),
111 outputfn_m(right.outputfn_m),
112 deleteOnTransverseExit_m(right.deleteOnTransverseExit_m) {}
116 csTrafoGlobal2Local_m(),
119 rotationZAxis_m(0.0),
123 bgeometry_m(nullptr),
124 parmatint_m(nullptr),
125 positionIsFixed(false),
126 elementPosition_m(0.0),
127 elemedgeSet_m(false),
143 return filePath.replace_extension().native();
150 if (aChannel !=
nullptr) {
151 double val = *aChannel;
162 if (aChannel !=
nullptr) {
175 if (aChannel !=
nullptr && aChannel->
isSettable()) {
179 std::cout <<
"Channel nullptr or not Settable" << std::endl;
242 double fractionLength = rRelativeToBegin(2) / length;
243 fractionLength = std::clamp(fractionLength, 0.0, 1.0);
245 factor = 1.0 + fractionLength * (
aperture_m.second[2] - 1.0);
251 return (std::abs(r[0]) < xLimit && std::abs(r[1]) < yLimit);
253 return (std::pow(r[0] / xLimit, 2) + std::pow(r[1] / yLimit, 2) < 1.0);
255 return (std::abs(r[0]) < factor * xLimit && std::abs(r[1]) < factor * yLimit);
257 return (std::pow(r[0] / (factor * xLimit), 2) + std::pow(r[1] / (factor * yLimit), 2)
272 std::vector<Vector_t<double, 3>> corners(8);
273 for (
int i = -1; i < 2; i += 2) {
274 for (
int j = -1; j < 2; j += 2) {
275 unsigned int idx = (i + 1) / 2 + (j + 1);
ippl::Vector< T, Dim > Vector_t
Map of std::string versus double value.
void removeAttribute(const std::string &aKey)
Remove an existing attribute.
const_iterator begin() const
Iterator accessing first member.
NameMap::const_iterator const_iterator
An iterator for a map of name versus value.
Channel * getChannel(const std::string &aKey, bool create=false)
Construct a read/write channel.
const_iterator end() const
Iterator marking the end of the list.
static BoundingBox getBoundingBox(const std::vector< Vector_t< double, 3 > > &positions)
Abstract interface for read/write access to variable.
virtual bool isSettable() const
Test if settable.
Abstract interface for read-only access to variable.
Rigid spatial transform between a parent frame and a local frame.
ippl::Vector< double, 3 > transformFrom(const ippl::Vector< double, 3 > &r) const
Map a point from the local frame back to the parent frame.
ippl::Vector< double, 3 > transformTo(const ippl::Vector< double, 3 > &r) const
Map a point from the parent frame to the local frame.
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
virtual const ConstChannel * getConstChannel(const std::string &aKey) const
Construct a read-only channel.
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
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