1 #ifndef OPAL_BEAMLINE_H
2 #define OPAL_BEAMLINE_H
24 template <
class T,
unsigned Dim>
62 void switchElements(
const double &,
const double &,
const double &kineticEnergy,
const bool &nomonitors =
false);
97 template<
class T>
inline
100 double startField = 0.0;
101 double endField = 0.0;
102 std::shared_ptr<T> elptr(dynamic_cast<T *>(element.removeWrappers()->clone()));
104 if (elptr->isElementPositionSet())
105 startField = elptr->getElementPosition();
107 elptr->initialise(bunch, startField, endField);
113 containsSource_m =
true;
114 double startField = 0.0;
115 double endField = 0.0;
116 std::shared_ptr<Source> elptr(dynamic_cast<Source *>(element.removeWrappers()->clone()));
118 if (elptr->isElementPositionSet())
119 startField = elptr->getElementPosition();
121 elptr->initialise(bunch, startField, endField);
122 elements_m.push_back(
ClassicField(elptr, startField, endField));
127 wrap.getElement()->accept(visitor);
132 WARNMSG(element.getTypeString() <<
" not implemented yet!" <<
endl);
137 WARNMSG(element.getTypeString() <<
" not implemented yet!" <<
endl);
142 WARNMSG(element.getTypeString() <<
" not implemented yet!" <<
endl);
151 WARNMSG(element.getTypeString() <<
" not implemented yet!" <<
endl);
156 WARNMSG(element.getTypeString() <<
" not implemented yet!" <<
endl);
161 WARNMSG(element.getTypeString() <<
" not implemented yet!" <<
endl);
187 return comp->getCSTrafoGlobal2Local().transformTo(r);
193 return comp->getCSTrafoGlobal2Local().transformFrom(r);
199 return comp->getCSTrafoGlobal2Local().rotateTo(r);
205 return comp->getCSTrafoGlobal2Local().rotateFrom(r);
210 return comp->getCSTrafoGlobal2Local();
220 return comp->getMisalignment();
227 #endif // OPAL_BEAMLINE_H
void merge(OpalBeamline &rhs)
Interface for septum magnet.
Vector_t rotateTo(const Vector_t &r) const
void switchElements(const double &, const double &, const double &kineticEnergy, const bool &nomonitors=false)
Interface for electrostatic separator.
Vector_t transformFromLocalCS(const std::shared_ptr< Component > &comp, const Vector_t &r) const
Vector_t rotateFrom(const Vector_t &r) const
Interface for RF Quadrupole.
std::list< ClassicField > FieldList
Define the position of a misaligned element.
CoordinateSystemTrafo coordTransformationTo_m
Interface for beam diagnostics.
Vector_t transformTo(const Vector_t &r) const
Vector_t rotateFromLocalCS(const std::shared_ptr< Component > &comp, const Vector_t &r) const
unsigned long getFieldAt(const unsigned int &, const Vector_t &, const long &, const double &, Vector_t &, Vector_t &)
BoundaryGeometry * getBoundaryGeometry(const unsigned int &)
Vector_t transformToLocalCS(const std::shared_ptr< Component > &comp, const Vector_t &r) const
double getStart(const Vector_t &) const
ParticleMatterInteractionHandler * getParticleMatterInteractionHandler(const unsigned int &)
Abstract beam-beam interaction.
void visit(const T &, BeamlineVisitor &, PartBunchBase< double, 3 > *)
void print(Inform &) const
FieldList getElementByType(ElementBase::ElementType)
Vector_t transformTo(const Vector_t &r) const
void swap(OpalBeamline &rhs)
Vector_t rotateToLocalCS(const std::shared_ptr< Component > &comp, const Vector_t &r) const
std::set< std::shared_ptr< Component > > getElements(const Vector_t &x)
Vector_t rotateFrom(const Vector_t &r) const
CoordinateSystemTrafo getMisalignment(const std::shared_ptr< Component > &comp) const
CoordinateSystemTrafo getCSTrafoLab2Local() const
Vector_t rotateTo(const Vector_t &r) const
Vector_t transformFrom(const Vector_t &r) const
double getEnd(const Vector_t &) const
Inform & endl(Inform &inf)
Interface for a Lambertson septum.
Vector_t transformFrom(const Vector_t &r) const