OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
OpalBeamline Class Reference

#include <OpalBeamline.h>

Collaboration diagram for OpalBeamline:

Public Member Functions

 OpalBeamline ()
 OpalBeamline (const Vector_t &origin, const Quaternion &rotation)
 ~OpalBeamline ()
void activateElements ()
std::set< std::shared_ptr< Component > > getElements (const Vector_t &x)
Vector_t transformTo (const Vector_t &r) const
Vector_t transformFrom (const Vector_t &r) const
Vector_t rotateTo (const Vector_t &r) const
Vector_t rotateFrom (const Vector_t &r) const
Vector_t transformToLocalCS (const std::shared_ptr< Component > &comp, const Vector_t &r) const
Vector_t transformFromLocalCS (const std::shared_ptr< Component > &comp, const Vector_t &r) const
Vector_t rotateToLocalCS (const std::shared_ptr< Component > &comp, const Vector_t &r) const
Vector_t rotateFromLocalCS (const std::shared_ptr< Component > &comp, const Vector_t &r) const
CoordinateSystemTrafo getCSTrafoLab2Local (const std::shared_ptr< Component > &comp) const
CoordinateSystemTrafo getCSTrafoLab2Local () const
CoordinateSystemTrafo getMisalignment (const std::shared_ptr< Component > &comp) const
double getStart (const Vector_t &) const
double getEnd (const Vector_t &) const
void switchElements (const double &, const double &, const double &kineticEnergy, const bool &nomonitors=false)
void switchElementsOff ()
ParticleMatterInteractionHandlergetParticleMatterInteractionHandler (const unsigned int &)
BoundaryGeometrygetBoundaryGeometry (const unsigned int &)
unsigned long getFieldAt (const unsigned int &, const Vector_t &, const long &, const double &, Vector_t &, Vector_t &)
unsigned long getFieldAt (const Vector_t &, const Vector_t &, const double &, Vector_t &, Vector_t &)
template<class T>
void visit (const T &, BeamlineVisitor &, PartBunchBase< double, 3 > *)
void prepareSections ()
void positionElementRelative (std::shared_ptr< ElementBase >)
void compute3DLattice ()
void save3DLattice ()
void save3DInput ()
void print (Inform &) const
FieldList getElementByType (ElementType)
void swap (OpalBeamline &rhs)
void merge (OpalBeamline &rhs)
bool containsSource ()
template<>
void visit (const Source &element, BeamlineVisitor &, PartBunchBase< double, 3 > *bunch)
template<>
void visit (const Marker &, BeamlineVisitor &, PartBunchBase< double, 3 > *)
template<>
void visit (const Septum &element, BeamlineVisitor &, PartBunchBase< double, 3 > *)

Private Attributes

FieldList elements_m
bool prepared_m
bool containsSource_m
CoordinateSystemTrafo coordTransformationTo_m

Detailed Description

Definition at line 40 of file OpalBeamline.h.

Constructor & Destructor Documentation

◆ OpalBeamline() [1/2]

OpalBeamline::OpalBeamline ( )

Definition at line 31 of file OpalBeamline.cpp.

References containsSource_m, elements_m, and prepared_m.

Referenced by getBoundaryGeometry(), merge(), and swap().

◆ OpalBeamline() [2/2]

OpalBeamline::OpalBeamline ( const Vector_t & origin,
const Quaternion & rotation )

Definition at line 38 of file OpalBeamline.cpp.

References containsSource_m, coordTransformationTo_m, elements_m, and prepared_m.

◆ ~OpalBeamline()

OpalBeamline::~OpalBeamline ( )

Definition at line 47 of file OpalBeamline.cpp.

References elements_m.

Member Function Documentation

◆ activateElements()

void OpalBeamline::activateElements ( )

Definition at line 594 of file OpalBeamline.cpp.

References elements_m, end(), Units::eV2MeV, BendBase::getDesignEnergy(), RBEND, and SBEND.

Here is the call graph for this function:

◆ compute3DLattice()

void OpalBeamline::compute3DLattice ( )

Definition at line 205 of file OpalBeamline.cpp.

References Quaternion::conjugate(), coordTransformationTo_m, cos(), elements_m, end(), euclidean_norm(), BendBase::getBendAngle(), BendBase::getChordLength(), BendBase::getDesignPath(), BendBase::getEntranceAngle(), ElementBase::getRotationAboutZ(), Options::idealized, RBEND, RBEND3D, Quaternion::rotate(), SBEND, sin(), and SOURCE.

Here is the call graph for this function:

◆ containsSource()

bool OpalBeamline::containsSource ( )
inline

Definition at line 205 of file OpalBeamline.h.

References containsSource_m.

◆ getBoundaryGeometry()

BoundaryGeometry * OpalBeamline::getBoundaryGeometry ( const unsigned int & )

References OpalBeamline().

Here is the call graph for this function:

◆ getCSTrafoLab2Local() [1/2]

CoordinateSystemTrafo OpalBeamline::getCSTrafoLab2Local ( ) const
inline

Definition at line 195 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ getCSTrafoLab2Local() [2/2]

CoordinateSystemTrafo OpalBeamline::getCSTrafoLab2Local ( const std::shared_ptr< Component > & comp) const
inline

Definition at line 190 of file OpalBeamline.h.

◆ getElementByType()

FieldList OpalBeamline::getElementByType ( ElementType type)

Definition at line 178 of file OpalBeamline.cpp.

References ANY, and elements_m.

◆ getElements()

std::set< std::shared_ptr< Component > > OpalBeamline::getElements ( const Vector_t & x)

Definition at line 51 of file OpalBeamline.cpp.

References elements_m, and end().

Referenced by getFieldAt().

Here is the call graph for this function:

◆ getEnd()

double OpalBeamline::getEnd ( const Vector_t & ) const

◆ getFieldAt() [1/2]

unsigned long OpalBeamline::getFieldAt ( const unsigned int & ,
const Vector_t & ,
const long & ,
const double & ,
Vector_t & ,
Vector_t &  )

Definition at line 67 of file OpalBeamline.cpp.

◆ getFieldAt() [2/2]

unsigned long OpalBeamline::getFieldAt ( const Vector_t & position,
const Vector_t & momentum,
const double & t,
Vector_t & Ef,
Vector_t & Bf )

Definition at line 74 of file OpalBeamline.cpp.

References CCOLLIMATOR, end(), getElements(), MARKER, MONITOR, rotateFromLocalCS(), rotateToLocalCS(), and transformToLocalCS().

Here is the call graph for this function:

◆ getMisalignment()

CoordinateSystemTrafo OpalBeamline::getMisalignment ( const std::shared_ptr< Component > & comp) const
inline

Definition at line 200 of file OpalBeamline.h.

◆ getParticleMatterInteractionHandler()

ParticleMatterInteractionHandler * OpalBeamline::getParticleMatterInteractionHandler ( const unsigned int & )

◆ getStart()

double OpalBeamline::getStart ( const Vector_t & ) const

◆ merge()

void OpalBeamline::merge ( OpalBeamline & rhs)

Definition at line 169 of file OpalBeamline.cpp.

References containsSource_m, elements_m, OpalBeamline(), and prepared_m.

Referenced by ParallelTTracker::visitBeamline(), and ThickTracker::visitBeamline().

Here is the call graph for this function:

◆ positionElementRelative()

void OpalBeamline::positionElementRelative ( std::shared_ptr< ElementBase > element)

Definition at line 192 of file OpalBeamline.cpp.

References coordTransformationTo_m.

Referenced by visit(), and visit().

◆ prepareSections()

void OpalBeamline::prepareSections ( )

Definition at line 151 of file OpalBeamline.cpp.

References elements_m, prepared_m, and ClassicField::SortAsc().

Here is the call graph for this function:

◆ print()

void OpalBeamline::print ( Inform & ) const

Definition at line 160 of file OpalBeamline.cpp.

◆ rotateFrom()

Vector_t OpalBeamline::rotateFrom ( const Vector_t & r) const
inline

Definition at line 161 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ rotateFromLocalCS()

Vector_t OpalBeamline::rotateFromLocalCS ( const std::shared_ptr< Component > & comp,
const Vector_t & r ) const
inline

Definition at line 184 of file OpalBeamline.h.

Referenced by getFieldAt().

◆ rotateTo()

Vector_t OpalBeamline::rotateTo ( const Vector_t & r) const
inline

Definition at line 156 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ rotateToLocalCS()

Vector_t OpalBeamline::rotateToLocalCS ( const std::shared_ptr< Component > & comp,
const Vector_t & r ) const
inline

Definition at line 178 of file OpalBeamline.h.

Referenced by getFieldAt().

◆ save3DInput()

void OpalBeamline::save3DInput ( )

◆ save3DLattice()

◆ swap()

void OpalBeamline::swap ( OpalBeamline & rhs)

Definition at line 163 of file OpalBeamline.cpp.

References coordTransformationTo_m, elements_m, OpalBeamline(), and prepared_m.

Referenced by ParallelTTracker::visitBeamline(), and ThickTracker::visitBeamline().

Here is the call graph for this function:

◆ switchElements()

void OpalBeamline::switchElements ( const double & min,
const double & max,
const double & kineticEnergy,
const bool & nomonitors = false )

Definition at line 112 of file OpalBeamline.cpp.

References DEGRADER, elements_m, max(), min(), and MONITOR.

Here is the call graph for this function:

◆ switchElementsOff()

void OpalBeamline::switchElementsOff ( )

Definition at line 146 of file OpalBeamline.cpp.

References elements_m.

◆ transformFrom()

Vector_t OpalBeamline::transformFrom ( const Vector_t & r) const
inline

Definition at line 151 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ transformFromLocalCS()

Vector_t OpalBeamline::transformFromLocalCS ( const std::shared_ptr< Component > & comp,
const Vector_t & r ) const
inline

Definition at line 172 of file OpalBeamline.h.

◆ transformTo()

Vector_t OpalBeamline::transformTo ( const Vector_t & r) const
inline

Definition at line 146 of file OpalBeamline.h.

References coordTransformationTo_m.

◆ transformToLocalCS()

Vector_t OpalBeamline::transformToLocalCS ( const std::shared_ptr< Component > & comp,
const Vector_t & r ) const
inline

Definition at line 166 of file OpalBeamline.h.

Referenced by getFieldAt().

◆ visit() [1/4]

template<>
void OpalBeamline::visit ( const Marker & ,
BeamlineVisitor & ,
PartBunchBase< double, 3 > *  )
inline

Definition at line 137 of file OpalBeamline.h.

◆ visit() [2/4]

template<>
void OpalBeamline::visit ( const Septum & element,
BeamlineVisitor & ,
PartBunchBase< double, 3 > *  )
inline

Definition at line 141 of file OpalBeamline.h.

References endl(), ElementBase::getTypeString(), and WARNMSG.

Here is the call graph for this function:

◆ visit() [3/4]

template<>
void OpalBeamline::visit ( const Source & element,
BeamlineVisitor & ,
PartBunchBase< double, 3 > * bunch )
inline

Definition at line 121 of file OpalBeamline.h.

References ElementBase::clone(), containsSource_m, elements_m, and positionElementRelative().

Here is the call graph for this function:

◆ visit() [4/4]

template<class T>
void OpalBeamline::visit ( const T & element,
BeamlineVisitor & ,
PartBunchBase< double, 3 > * bunch )
inline

Definition at line 105 of file OpalBeamline.h.

References elements_m, and positionElementRelative().

Here is the call graph for this function:

Member Data Documentation

◆ containsSource_m

bool OpalBeamline::containsSource_m
private

Definition at line 99 of file OpalBeamline.h.

Referenced by containsSource(), merge(), OpalBeamline(), OpalBeamline(), and visit().

◆ coordTransformationTo_m

◆ elements_m

◆ prepared_m

bool OpalBeamline::prepared_m
private

Definition at line 98 of file OpalBeamline.h.

Referenced by merge(), OpalBeamline(), OpalBeamline(), prepareSections(), and swap().


The documentation for this class was generated from the following files: