18#ifndef OPAL_BEAMLINE_H
19#define OPAL_BEAMLINE_H
38class ParticleMatterInteractionHandler;
97 const double&,
const double&,
const double& kineticEnergy,
98 const bool& nomonitors =
false);
120 void print(Inform&)
const;
176 double startField = 0.0;
177 double endField = 0.0;
178 std::shared_ptr<T> elptr(
dynamic_cast<T*
>(element.clone()));
182 if (elptr->isElementPositionSet()) startField = elptr->getElementPosition();
184 elptr->initialise(&bunch, startField, endField);
234 return found->second;
236 return comp->getPlacedElement();
240 const std::shared_ptr<Component>& comp)
const {
249 const std::shared_ptr<Component>& comp)
const {
254 const std::shared_ptr<Component>& comp)
const {
259 const std::shared_ptr<Component>& comp)
const {
std::list< BeamlineFieldElement > FieldList
Defines the abstract interface for a single beamline component in the accelerator model.
ippl::Vector< T, Dim > Vector_t
Template PIC bunch: IPPL PicManager, shared field mesh/solver, and multiple particle containers.
Beamline component together with its active longitudinal field interval.
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 > rotateFrom(const ippl::Vector< double, 3 > &r) const
Rotate a vector from the local frame back into the parent frame.
ippl::Vector< double, 3 > rotateTo(const ippl::Vector< double, 3 > &r) const
Rotate a vector from the parent frame into the local frame.
ippl::Vector< double, 3 > transformTo(const ippl::Vector< double, 3 > &r) const
Map a point from the parent frame to the local frame.
const CoordinateSystemTrafo & getNominalToActual() const
FieldList getElementByType(ElementType)
Vector_t< double, 3 > rotateToLocalCS(const std::shared_ptr< Component > &comp, const Vector_t< double, 3 > &r) const
void positionElementRelative(std::shared_ptr< ElementBase >)
CoordinateSystemTrafo getMisalignment(const std::shared_ptr< Component > &comp) const
void merge(OpalBeamline &rhs)
bool compatibilityPlacementCompiled_m
ParticleMatterInteractionHandler * getParticleMatterInteractionHandler(const unsigned int &)
unsigned long getFieldAt(const unsigned int &, const Vector_t< double, 3 > &, const long &, const double &, Vector_t< double, 3 > &, Vector_t< double, 3 > &)
std::map< const ElementBase *, PlacedElement > PlacementAssembly
Vector_t< double, 3 > transformTo(const Vector_t< double, 3 > &r) const
Vector_t< double, 3 > transformFromLocalCS(const std::shared_ptr< Component > &comp, const Vector_t< double, 3 > &r) const
CoordinateSystemTrafo getNominalExitTransform(const std::shared_ptr< Component > &comp) const
CoordinateSystemTrafo coordTransformationTo_m
CoordinateSystemTrafo getNominalEntryTransform(const std::shared_ptr< Component > &comp) const
PlacedElement getPlacedElement(const std::shared_ptr< Component > &comp) const
Return the placed-element view used by the bridge stage.
double getEnd(const Vector_t< double, 3 > &) const
Vector_t< double, 3 > rotateTo(const Vector_t< double, 3 > &r) const
void print(Inform &) const
Vector_t< double, 3 > transformToLocalCS(const std::shared_ptr< Component > &comp, const Vector_t< double, 3 > &r) const
void setNominalPlacement(const std::shared_ptr< ElementBase > &element, const CoordinateSystemTrafo &parentToBody)
Update the nominal rigid placement transform of one element.
void switchElements(const double &, const double &, const double &kineticEnergy, const bool &nomonitors=false)
void compileCompatibilityPlacement()
Compile legacy reference-order placement into explicit nominal poses.
void storePlacedElement(const std::shared_ptr< ElementBase > &element)
Refresh the beamline-owned placed-element assembly record.
void apply(const Vector_t< double, 3 > &R, const Vector_t< double, 3 > &, const double &t, Vector_t< double, 3 > &E, Vector_t< double, 3 > &B)
Vector_t< double, 3 > transformFrom(const Vector_t< double, 3 > &r) const
double getStart(const Vector_t< double, 3 > &) const
CoordinateSystemTrafo getCSTrafoLab2Local() const
void visit(const T &, BeamlineVisitor &, PartBunch_t &)
BoundaryGeometry * getBoundaryGeometry(const unsigned int &)
Vector_t< double, 3 > rotateFromLocalCS(const std::shared_ptr< Component > &comp, const Vector_t< double, 3 > &r) const
Vector_t< double, 3 > rotateFrom(const Vector_t< double, 3 > &r) const
PlacementAssembly placementAssembly_m
std::set< std::shared_ptr< Component > > getElements()
void swap(OpalBeamline &rhs)
Geometric placement record for an element instance.
const Misalignment & getMisalignment() const
CoordinateSystemTrafo getNominalEntryTransform() const
CoordinateSystemTrafo getNominalExitTransform() const
CoordinateSystemTrafo getNominalBodyTransform() const
Quaternion storage and rotation algebra used by OPALX geometry code.