OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
ElementBase.h
Go to the documentation of this file.
1 #ifndef CLASSIC_ElementBase_HH
2 #define CLASSIC_ElementBase_HH 1
3 
4 // ------------------------------------------------------------------------
5 // $RCSfile: ElementBase.h,v $
6 // ------------------------------------------------------------------------
7 // $Revision: 1.2 $
8 // ------------------------------------------------------------------------
9 // Copyright: see Copyright.readme
10 // ------------------------------------------------------------------------
11 //
12 // Class: ElementBase
13 // The very base class for beam line representation objects. A beam line
14 // is modelled as a composite structure having a single root object
15 // (the top level beam line), which contains both ``single'' leaf-type
16 // elements (Components), as well as sub-lines (composites).
17 //
18 // ------------------------------------------------------------------------
19 // Class category: AbsBeamline
20 // ------------------------------------------------------------------------
21 //
22 // $Date: 2000/12/16 16:26:43 $
23 // $Author: mad $
24 //
25 // ------------------------------------------------------------------------
26 
30 #include "Algorithms/Vektor.h"
31 #include "Algorithms/Quaternion.h"
34 
35 #include <string>
36 #include <queue>
37 
38 class BeamlineVisitor;
39 class Channel;
40 class ConstChannel;
41 class ElementImage;
42 
43 enum ElemType {
51 };
52 
53 
54 
55 class WakeFunction;
57 class BoundaryGeometry;
58 
59 // Class ElementBase
60 // ------------------------------------------------------------------------
62 // This class defines the abstract interface for all objects which can be
63 // contained in a beam line. ElementBase forms the base class for two distinct
64 // but related hierarchies of objects:
65 // [OL]
66 // [LI]
67 // A set of concrete accelerator element classes, which compose the standard
68 // accelerator component library (SACL).
69 // [LI]
70 // A second hierarchy which parallels the SACL, acting as container or
71 // wrapper-like objects. These latter classes are used to construct
72 // beam-lines composed of referenced ``design'' components, together with
73 // beam-line position dependent extrinsic state (e. g. errors). These wrapper
74 // objects are by default unique.
75 // [/OL]
76 // Also derived from ElementBase there is a class AlignWrapper, which can
77 // be used to store misalignment errors or deliberate displacements.
78 // Any element can have only one AlignWrapper and one FieldWrapper. To be
79 // processed in the correct order, the AlignWrapper must be the outermost.
80 // [pre]
81 // AlignWrapper --> FieldWrapper --> Element
82 // [/pre]
83 // To ensure this structure, wrapper elements cannot be constructed directly,
84 // one should rather call one of:
85 // [dl]
86 // [dt]makeAlignWrapper() [dd]make an align wrapper.
87 // [dt]makeFieldWrapper() [dd]make a field wrapper.
88 // [dt]makeWrappers() [dd]make both wrappers.
89 // [/dl]
90 // An existing wrapper can be removed by
91 // [dl]
92 // [dt]removeAlignWrapper()[dd]remove align wrapper.
93 // [dt]removeFieldWrapper()[dd]remove field wrapper.
94 // [/dl]
95 // Instances of the concrete classes for single elements are by default
96 // sharable. Instances of beam lines, wrappers and integrators are by
97 // default non-sharable, but they may be made sharable by a call to
98 // [b]makeSharable()[/b].
99 // [p]
100 // An ElementBase object can return two lengths, which may be different:
101 // [OL]
102 // [LI]
103 // The arc length along the geometry.
104 // [LI]
105 // The design length, often measured along a straight line.
106 // [/OL]
107 // Class ElementBase contains a map of name versus value for user-defined
108 // attributes (see file AbsBeamline/AttributeSet.hh). The map is primarily
109 // intended for processes that require algorithm-specific data in the
110 // accelerator model.
111 // [P]
112 // The class ElementBase has as base class the abstract class RCObject.
113 // Virtual derivation is used to make multiple inheritance possible for
114 // derived concrete classes. ElementBase implements three copy modes:
115 // [OL]
116 // [LI]
117 // Copy by reference: Call RCObject::addReference() and use [b]this[/b].
118 // [LI]
119 // Copy structure: use ElementBase::copyStructure().
120 // During copying of the structure, all sharable items are re-used, while
121 // all non-sharable ones are cloned.
122 // [LI]
123 // Copy by cloning: use ElementBase::clone().
124 // This returns a full deep copy.
125 // [/OL]
126 
127 
128 class ElementBase: public RCObject {
129 
130 public:
131 
133  explicit ElementBase(const std::string &name);
134 
135  ElementBase();
136  ElementBase(const ElementBase &);
137  virtual ~ElementBase();
138 
140  virtual const std::string &getName() const;
141 
143  virtual void setName(const std::string &name);
144 
149  };
150 
194  , ANY};
195 
197  virtual ElementType getType() const = 0;
198 
199  std::string getTypeString() const;
200  static std::string getTypeString(ElementType type);
201 
203  // Return the element geometry.
204  // Version for non-constant object.
205  virtual BGeometryBase &getGeometry() = 0;
206 
208  // Return the element geometry
209  // Version for constant object.
210  virtual const BGeometryBase &getGeometry() const = 0;
211 
213  // Return the entire arc length measured along the design orbit
214  virtual double getArcLength() const;
215 
217  // Return the design length defined by the geometry.
218  // This may be the arc length or the straight length.
219  virtual double getElementLength() const;
220 
222  // Set the design length defined by the geometry.
223  // This may be the arc length or the straight length.
224  virtual void setElementLength(double length);
225 
226  virtual void getElementDimensions(double &begin,
227  double &end) const {
228  begin = 0.0;
229  end = getElementLength();
230  }
231 
233  // Return the arc length from the entrance to the origin of the element
234  // (origin >= 0)
235  virtual double getOrigin() const;
236 
238  // Return the arc length from the origin to the entrance of the element
239  // (entrance <= 0)
240  virtual double getEntrance() const;
241 
243  // Return the arc length from the origin to the exit of the element
244  // (exit >= 0)
245  virtual double getExit() const;
246 
248  // Return the transform of the local coordinate system from the
249  // position [b]fromS[/b] to the position [b]toS[/b].
250  virtual Euclid3D getTransform(double fromS, double toS) const;
251 
253  // Equivalent to getTransform(0.0, s).
254  // Return the transform of the local coordinate system from the
255  // origin and [b]s[/b].
256  virtual Euclid3D getTransform(double s) const;
257 
259  // Equivalent to getTransform(getEntrance(), getExit()).
260  // Return the transform of the local coordinate system from the
261  // entrance to the exit of the element.
262  virtual Euclid3D getTotalTransform() const;
263 
265  // Equivalent to getTransform(0.0, getEntrance()).
266  // Return the transform of the local coordinate system from the
267  // origin to the entrance of the element.
268  virtual Euclid3D getEntranceFrame() const;
269 
271  // Equivalent to getTransform(0.0, getExit()).
272  // Return the transform of the local coordinate system from the
273  // origin to the exit of the element.
274  virtual Euclid3D getExitFrame() const;
275 
277  // Returns the entrance patch (transformation) which is used to transform
278  // the global geometry to the local geometry for a misaligned element
279  // at its entrance. The default behaviour returns identity transformation.
280  // This function should be overridden by derived concrete classes which
281  // model complex geometries.
282  virtual Euclid3D getEntrancePatch() const;
283 
285  // Returns the entrance patch (transformation) which is used to transform
286  // the local geometry to the global geometry for a misaligned element
287  // at its exit. The default behaviour returns identity transformation.
288  // This function should be overridden by derived concrete classes which
289  // model complex geometries.
290  virtual Euclid3D getExitPatch() const;
291 
293  // If the attribute does not exist, return zero.
294  virtual double getAttribute(const std::string &aKey) const;
295 
297  // If the attribute exists, return true, otherwise false.
298  virtual bool hasAttribute(const std::string &aKey) const;
299 
301  virtual void removeAttribute(const std::string &aKey);
302 
304  virtual void setAttribute(const std::string &aKey, double val);
305 
307  // This method constructs a Channel permitting read/write access to
308  // the attribute [b]aKey[/b] and returns it.
309  // If the attribute does not exist, it returns NULL.
310  virtual Channel *getChannel(const std::string &aKey, bool create = false);
311 
313  // This method constructs a Channel permitting read-only access to
314  // the attribute [b]aKey[/b] and returns it.
315  // If the attribute does not exist, it returns NULL.
316  virtual const ConstChannel *getConstChannel(const std::string &aKey) const;
317 
319  // Return the image of the element, containing the name and type std::string
320  // of the element, and a copy of the user-defined attributes.
321  virtual ElementImage *getImage() const;
322 
324  // This method must be overridden by derived classes. It should call the
325  // method of the visitor corresponding to the element class.
326  // If any error occurs, this method throws an exception.
327  virtual void accept(BeamlineVisitor &visitor) const = 0;
328 
329 
331  // Return an identical deep copy of the element.
332  virtual ElementBase *clone() const = 0;
333 
335  // Return a fresh copy of any beam line structure is made,
336  // but sharable elements remain shared.
337  virtual ElementBase *copyStructure();
338 
340  bool isSharable() const;
341 
343  // The whole structure depending on [b]this[/b] is marked as sharable.
344  // After this call a [b]copyStructure()[/b] call reuses the element.
345  virtual void makeSharable();
346 
348  // Build an AlignWrapper pointing to the element and return a pointer to
349  // that wrapper. If the element cannot be misaligned, or already has an
350  // AlignWrapper, return a pointer to the element.
351  // Wrappers are non-sharable, unless otherwise defined.
352  virtual ElementBase *makeAlignWrapper();
353 
355  // Build a FieldWrapper pointing to the element and return a pointer to
356  // that wrapper. If the element cannot have field errors, or already has
357  // a FieldWrapper, return a pointer to the element.
358  // Wrappers are non-sharable, unless otherwise defined.
359  virtual ElementBase *makeFieldWrapper();
360 
362  // Equivalent to the calls
363  // [pre]
364  // makeFieldWrapper()->makeAlignWrapper()
365  // [/pre].
366  // Wrappers are non-sharable, unless otherwise defined.
367  virtual ElementBase *makeWrappers();
368 
370  // Remove the align wrapper.
371  virtual ElementBase *removeAlignWrapper();
372 
374  // Remove the align wrapper.
375  virtual const ElementBase *removeAlignWrapper() const ;
376 
378  // Remove the field wrapper.
379  virtual ElementBase *removeFieldWrapper();
380 
382  // Remove the field wrapper for constant object.
383  virtual const ElementBase *removeFieldWrapper() const;
384 
386  // Return [b]this[/b], if the element is not wrapped.
387  virtual ElementBase *removeWrappers();
388 
390  // Return [b]this[/b], if the element is not wrapped.
391  virtual const ElementBase *removeWrappers() const ;
392 
394  // This method stores all attributes contained in the AttributeSet to
395  // "*this". The return value [b]true[/b] indicates success.
396  bool update(const AttributeSet &);
397 
399  void setElementPosition(double elemedge);
400  double getElementPosition() const;
401  bool isElementPositionSet() const;
404  virtual void setBoundaryGeometry(BoundaryGeometry *geo);
405 
407  virtual BoundaryGeometry *getBoundaryGeometry() const;
408 
409  virtual bool hasBoundaryGeometry() const;
410 
411 
413  virtual void setWake(WakeFunction *wf);
414 
416  virtual WakeFunction *getWake() const;
417 
418  virtual bool hasWake() const;
419 
421 
423 
424  virtual bool hasParticleMatterInteraction() const;
425 
427  ElemType getElType() const;
428 
430  void setElType(ElemType elt);
431 
434  void releasePosition();
435  void fixPosition();
436  bool isPositioned() const;
437 
438  virtual CoordinateSystemTrafo getEdgeToBegin() const;
439  virtual CoordinateSystemTrafo getEdgeToEnd() const;
440 
441  void setAperture(const ApertureType& type, const std::vector<double> &args);
442  std::pair<ElementBase::ApertureType, std::vector<double> > getAperture() const;
443 
444  virtual bool isInside(const Vector_t &r) const;
445 
446  void setMisalignment(double x, double y, double s);
447  void setMisalignment(const CoordinateSystemTrafo &cst);
448 
449  void getMisalignment(double &x, double &y, double &s) const;
451 
452  void setActionRange(const std::queue<std::pair<double, double> > &range);
453  void setCurrentSCoordinate(double s);
454 
456  void setRotationAboutZ(double rotation);
457  double getRotationAboutZ() const;
458 
459 protected:
460  bool isInsideTransverse(const Vector_t &r, double f = 1) const;
461 
462  // Sharable flag.
463  // If this flag is true, the element is always shared.
464  mutable bool shareFlag;
465 
468 
469  std::pair<ApertureType, std::vector<double> > aperture_m;
470 
472 
474 
475 private:
476 
477  // Not implemented.
478  void operator=(const ElementBase &);
479 
480  // The element's name
481  std::string elementID;
482 
483  // The user-defined set of attributes.
485 
487 
489 
491 
493 
499  std::queue<std::pair<double, double> > actionRange_m;
500 };
501 
502 
503 // Inline functions.
504 // ------------------------------------------------------------------------
505 
506 inline
508 { return getGeometry().getArcLength(); }
509 
510 inline
512 { return getGeometry().getElementLength(); }
513 
514 inline
515 void ElementBase::setElementLength(double length)
516 { getGeometry().setElementLength(length); }
517 
518 inline
520 { return getGeometry().getOrigin(); }
521 
522 inline
524 { return getGeometry().getEntrance(); }
525 
526 inline
527 double ElementBase::getExit() const
528 { return getGeometry().getExit(); }
529 
530 inline
531 Euclid3D ElementBase::getTransform(double fromS, double toS) const
532 { return getGeometry().getTransform(fromS, toS); }
533 
534 inline
536 { return getGeometry().getTotalTransform(); }
537 
538 inline
540 { return getGeometry().getTransform(s); }
541 
542 inline
544 { return getGeometry().getEntranceFrame(); }
545 
546 inline
548 { return getGeometry().getExitFrame(); }
549 
550 inline
552 { return getGeometry().getEntrancePatch(); }
553 
554 inline
556 { return getGeometry().getExitPatch(); }
557 
558 inline
560 { return shareFlag; }
561 
562 inline
564 { return wake_m; }
565 
566 inline
568 { return wake_m != NULL; }
569 
570 inline
572 { return bgeometry_m; }
573 
574 inline
576 { return bgeometry_m != NULL; }
577 
578 inline
580 { return parmatint_m; }
581 
582 inline
584 { return parmatint_m != NULL; }
585 
586 inline
588 { return elType_m;}
589 
590 inline
592 { elType_m = elt;}
593 
594 inline
596 {
597  if (positionIsFixed) return;
598 
599  csTrafoGlobal2Local_m = trafo;
600 }
601 
602 inline
604 { return csTrafoGlobal2Local_m; }
605 
606 inline
608 {
609  CoordinateSystemTrafo ret(Vector_t(0, 0, 0),
610  Quaternion(1, 0, 0, 0));
611 
612  return ret;
613 }
614 
615 inline
617 {
619  Quaternion(1, 0, 0, 0));
620 
621  return ret;
622 }
623 
624 inline
625 void ElementBase::setAperture(const ApertureType& type, const std::vector<double> &args)
626 {
627  aperture_m.first = type;
628  aperture_m.second = args;
629 }
630 
631 inline
632 std::pair<ElementBase::ApertureType, std::vector<double> > ElementBase::getAperture() const
633 {
634  return aperture_m;
635 }
636 
637 inline
638 bool ElementBase::isInside(const Vector_t &r) const
639 {
640  const double length = getElementLength();
641  return isInsideTransverse(r, r(2) / length * aperture_m.second[2]) && r(2) >= 0.0 && r(2) < length;
642 }
643 
644 inline
645 bool ElementBase::isInsideTransverse(const Vector_t &r, double f) const
646 {
647  switch(aperture_m.first) {
648  case RECTANGULAR:
649  return (std::abs(r[0]) < aperture_m.second[0] && std::abs(r[1]) < aperture_m.second[1]);
650  case ELLIPTICAL:
651  return (std::pow(r[0] / aperture_m.second[0], 2) + std::pow(r[1] / aperture_m.second[1], 2) < 1.0);
652  case CONIC_RECTANGULAR:
653  return (std::abs(r[0]) < f * aperture_m.second[0] && std::abs(r[1]) < f * aperture_m.second[1]);
654  case CONIC_ELLIPTICAL:
655  return (std::pow(r[0] / (f * aperture_m.second[0]), 2) + std::pow(r[1] / (f * aperture_m.second[1]), 2) < 1.0);
656  default:
657  return false;
658  }
659 }
660 
661 inline
663  misalignment_m = cst;
664 }
665 
666 inline
668  return misalignment_m;
669 }
670 
671 inline
673  positionIsFixed = false;
674 }
675 
676 inline
678  positionIsFixed = true;
679 }
680 
681 inline
683  return positionIsFixed;
684 }
685 
686 inline
687 void ElementBase::setActionRange(const std::queue<std::pair<double, double> > &range) {
688  actionRange_m = range;
689 
690  if (actionRange_m.size() > 0)
691  elementEdge_m = actionRange_m.front().first;
692 }
693 
694 inline
695 void ElementBase::setRotationAboutZ(double rotation) {
696  rotationZAxis_m = rotation;
697 }
698 
699 inline
701  return rotationZAxis_m;
702 }
703 
704 inline
705 std::string ElementBase::getTypeString() const
706 { return getTypeString(getType());}
707 
708 inline
709 void ElementBase::setElementPosition(double elemedge) {
710  elementPosition_m = elemedge;
711  elemedgeSet_m = true;
712 }
713 
714 inline
716  if (elemedgeSet_m)
717  return elementPosition_m;
718 
719  throw GeneralClassicException("ElementBase::getElementPosition()",
720  std::string("ELEMEDGE for \"") + getName() + "\" not set");
721 }
722 
723 inline
725 { return elemedgeSet_m; }
726 
727 
728 #endif // CLASSIC_ElementBase_HH
virtual BoundaryGeometry * getBoundaryGeometry() const
return the attached boundary geometrt object if there is any
Definition: ElementBase.h:571
virtual ElementBase * removeAlignWrapper()
Remove align wrapper.
CoordinateSystemTrafo getMisalignment() const
Definition: ElementBase.h:667
virtual ParticleMatterInteractionHandler * getParticleMatterInteraction() const
Definition: ElementBase.h:579
virtual double getArcLength() const
Get arc length.
Definition: ElementBase.h:507
PETE_TUTree< FnAbs, typename T::PETE_Expr_t > abs(const PETE_Expr< T > &l)
double elementPosition_m
ELEMEDGE attribute.
Definition: ElementBase.h:496
virtual bool hasBoundaryGeometry() const
Definition: ElementBase.h:575
CoordinateSystemTrafo misalignment_m
Definition: ElementBase.h:467
Interface for basic beam line object.
Definition: ElementBase.h:128
virtual Euclid3D getTransform(double fromS, double toS) const =0
Get transform.
virtual void removeAttribute(const std::string &aKey)
Remove an existing attribute.
void fixPosition()
Definition: ElementBase.h:677
virtual Euclid3D getTransform(double fromS, double toS) const
Get transform.
Definition: ElementBase.h:531
Definition: TSVMeta.h:24
void setActionRange(const std::queue< std::pair< double, double > > &range)
Definition: ElementBase.h:687
virtual double getOrigin() const
Get origin position.
Definition: ElementBase.h:519
BoundaryGeometry * bgeometry_m
Definition: ElementBase.h:488
virtual Euclid3D getEntrancePatch() const
Get patch.
Definition: ElementBase.h:551
virtual CoordinateSystemTrafo getEdgeToEnd() const
Definition: ElementBase.h:616
Map of std::string versus double value.
Definition: AttributeSet.h:41
virtual BGeometryBase & getGeometry()=0
Get geometry.
virtual Euclid3D getExitPatch() const
Get patch.
Definition: ElementBase.h:555
virtual void setName(const std::string &name)
Set element name.
virtual ElementBase * removeWrappers()
Return the design element.
void setRotationAboutZ(double rotation)
Set rotation about z axis in bend frame.
Definition: ElementBase.h:695
virtual bool hasParticleMatterInteraction() const
Definition: ElementBase.h:583
virtual void setElementLength(double length)
Set design length.
Definition: ElementBase.h:515
virtual ~ElementBase()
Definition: ElementBase.cpp:90
virtual Channel * getChannel(const std::string &aKey, bool create=false)
Construct a read/write channel.
CoordinateSystemTrafo csTrafoGlobal2Local_m
Definition: ElementBase.h:466
std::string elementID
Definition: ElementBase.h:481
ElemType getElType() const
returns element type as enumeration needed in the envelope tracker
Definition: ElementBase.h:587
virtual void setAttribute(const std::string &aKey, double val)
Set value of an attribute.
virtual const std::string & getName() const
Get element name.
Definition: ElementBase.cpp:95
virtual WakeFunction * getWake() const
return the attached wake object if there is any
Definition: ElementBase.h:563
virtual ElementBase * removeFieldWrapper()
Remove field wrapper.
double getElementPosition() const
Definition: ElementBase.h:715
virtual double getEntrance() const
Get entrance position.
Definition: Geometry.cpp:41
ParticleMatterInteractionHandler * parmatint_m
Definition: ElementBase.h:490
virtual Euclid3D getEntranceFrame() const
Get transform.
Definition: Geometry.cpp:61
virtual double getOrigin() const
Get origin position.
Definition: Geometry.cpp:36
virtual void setElementLength(double length)
Set geometry length.
Definition: Geometry.cpp:32
virtual ElementType getType() const =0
Get element type std::string.
virtual double getExit() const
Get exit position.
Definition: Geometry.cpp:46
WakeFunction * wake_m
Definition: ElementBase.h:486
ElemType
Definition: ElementBase.h:43
virtual void makeSharable()
Set sharable flag.
virtual double getElementLength() const =0
Get geometry length.
virtual ElementBase * makeWrappers()
Allow errors.
virtual bool hasWake() const
Definition: ElementBase.h:567
Abstract base class for accelerator geometry classes.
Definition: Geometry.h:43
Abstract interface for read-only access to variable.
Definition: ConstChannel.h:29
virtual void setBoundaryGeometry(BoundaryGeometry *geo)
virtual bool isInside(const Vector_t &r) const
Definition: ElementBase.h:638
virtual double getExit() const
Get exit position.
Definition: ElementBase.h:527
void setMisalignment(double x, double y, double s)
void setElType(ElemType elt)
set the element type as enumeration needed in the envelope tracker
Definition: ElementBase.h:591
virtual void accept(BeamlineVisitor &visitor) const =0
Apply visitor.
double elementEdge_m
Definition: ElementBase.h:471
virtual double getElementLength() const
Get design length.
Definition: ElementBase.h:511
bool elemedgeSet_m
Definition: ElementBase.h:497
virtual Euclid3D getEntranceFrame() const
Get transform.
Definition: ElementBase.h:543
virtual Euclid3D getExitFrame() const
Get transform.
Definition: ElementBase.h:547
An image of an element.
Definition: ElementImage.h:35
virtual ElementImage * getImage() const
Construct an image.
void releasePosition()
Definition: ElementBase.h:672
virtual Euclid3D getTotalTransform() const
Get transform.
Definition: Geometry.cpp:51
void operator=(const ElementBase &)
Abstract base class for reference counted objects.
Definition: RCObject.h:42
Displacement and rotation in space.
Definition: Euclid3D.h:68
std::string getTypeString() const
Definition: ElementBase.h:705
double rotationZAxis_m
Definition: ElementBase.h:473
void setCSTrafoGlobal2Local(const CoordinateSystemTrafo &ori)
Definition: ElementBase.h:595
Tps< T > pow(const Tps< T > &x, int y)
Integer power.
Definition: TpsMath.h:76
Vektor< double, 3 > Vector_t
Definition: Vektor.h:6
virtual ElementBase * copyStructure()
Make a structural copy.
ElemType elType_m
Definition: ElementBase.h:492
virtual double getAttribute(const std::string &aKey) const
Get attribute value.
virtual ElementBase * clone() const =0
Return clone.
bool shareFlag
Definition: ElementBase.h:464
virtual void setParticleMatterInteraction(ParticleMatterInteractionHandler *spys)
virtual double getArcLength() const =0
Get arc length.
void setCurrentSCoordinate(double s)
Abstract interface for read/write access to variable.
Definition: Channel.h:32
double getRotationAboutZ() const
Definition: ElementBase.h:700
bool isPositioned() const
Definition: ElementBase.h:682
virtual const ConstChannel * getConstChannel(const std::string &aKey) const
Construct a read-only channel.
virtual CoordinateSystemTrafo getEdgeToBegin() const
Definition: ElementBase.h:607
const std::string name
bool isElementPositionSet() const
Definition: ElementBase.h:724
virtual ElementBase * makeAlignWrapper()
Allow misalignment.
void setAperture(const ApertureType &type, const std::vector< double > &args)
Definition: ElementBase.h:625
virtual Euclid3D getExitPatch() const
Get patch.
Definition: Geometry.cpp:76
AttributeSet userAttribs
Definition: ElementBase.h:484
bool isSharable() const
Test if the element can be shared.
Definition: ElementBase.h:559
std::pair< ApertureType, std::vector< double > > aperture_m
Definition: ElementBase.h:469
void setElementPosition(double elemedge)
Access to ELEMEDGE attribute.
Definition: ElementBase.h:709
std::queue< std::pair< double, double > > actionRange_m
Definition: ElementBase.h:499
virtual bool hasAttribute(const std::string &aKey) const
Test for existence of an attribute.
bool isInsideTransverse(const Vector_t &r, double f=1) const
Definition: ElementBase.h:645
bool positionIsFixed
Definition: ElementBase.h:494
virtual Euclid3D getTotalTransform() const
Get transform.
Definition: ElementBase.h:535
std::pair< ElementBase::ApertureType, std::vector< double > > getAperture() const
Definition: ElementBase.h:632
Abstract algorithm.
virtual Euclid3D getEntrancePatch() const
Get patch.
Definition: Geometry.cpp:71
virtual ElementBase * makeFieldWrapper()
Allow field errors.
virtual void setWake(WakeFunction *wf)
attach a wake field to the element
virtual void getElementDimensions(double &begin, double &end) const
Definition: ElementBase.h:226
virtual Euclid3D getExitFrame() const
Get transform.
Definition: Geometry.cpp:66
bool update(const AttributeSet &)
Update element.
virtual double getEntrance() const
Get entrance position.
Definition: ElementBase.h:523
CoordinateSystemTrafo getCSTrafoGlobal2Local() const
Definition: ElementBase.h:603