OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Member Functions | Private Member Functions | Private Attributes | List of all members
ScalingFFAMagnet Class Reference

#include <ScalingFFAMagnet.h>

Inheritance diagram for ScalingFFAMagnet:
Inheritance graph
[legend]
Collaboration diagram for ScalingFFAMagnet:
Collaboration graph
[legend]

Public Member Functions

 ScalingFFAMagnet (const std::string &name)
 
 ~ScalingFFAMagnet ()
 
ScalingFFAMagnetclone () const override
 
bool apply (const size_t &i, const double &t, Vector_t &E, Vector_t &B) override
 
bool apply (const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B) override
 
bool getFieldValue (const Vector_t &R, Vector_t &B) const
 
bool getFieldValueCylindrical (const Vector_t &R, Vector_t &B) const
 
void initialise (PartBunchBase< double, 3 > *bunch, double &startField, double &endField) override
 
void initialise ()
 
void finalise () override
 
bool bends () const override
 
void getDimensions (double &, double &) const override
 
BGeometryBasegetGeometry () override
 
const BGeometryBasegetGeometry () const override
 
EMFieldgetField () override
 
const EMFieldgetField () const override
 
void accept (BeamlineVisitor &visitor) const override
 
double getTanDelta () const
 
void setTanDelta (double tanDelta)
 
double getFieldIndex () const
 
void setFieldIndex (double k)
 
double getDipoleConstant () const
 
void setDipoleConstant (double Bz)
 
double getR0 () const
 
void setR0 (double r0)
 
Vector_t getCentre () const
 
void setCentre (Vector_t centre)
 
endfieldmodel::EndFieldModelgetEndField () const
 
void setEndField (endfieldmodel::EndFieldModel *endField)
 
size_t getMaxOrder () const
 
void setMaxOrder (size_t maxOrder)
 
double getPhiStart () const
 
void setPhiStart (double phiStart)
 
double getPhiEnd () const
 
void setPhiEnd (double phiEnd)
 
double getRMin () const
 
void setRMin (double rMin)
 
double getRMax () const
 
void setRMax (double rMax)
 
double getAzimuthalExtent () const
 
void setAzimuthalExtent (double azimuthalExtent)
 
double getVerticalExtent () const
 
void setVerticalExtent (double verticalExtent)
 
std::vector< std::vector< double > > getDfCoefficients ()
 
void setupEndField ()
 
void setEndFieldName (std::string name)
 
std::string getEndFieldName () const
 
- Public Member Functions inherited from Component
 Component (const std::string &name)
 Constructor with given name. More...
 
 Component ()
 
 Component (const Component &right)
 
virtual ~Component ()
 
virtual EMFieldgetField ()=0
 Return field. More...
 
virtual const EMFieldgetField () const =0
 Return field. More...
 
EVector Efield (const Point3D &P) const
 Return the field in a point. More...
 
BVector Bfield (const Point3D &P) const
 Return the field in a point. More...
 
EVector Efield (const Point3D &P, double t) const
 Return the field in a point. More...
 
BVector Bfield (const Point3D &P, double t) const
 Return the field in a point. More...
 
EBVectors EBfield (const Point3D &P) const
 Return the field in a point. More...
 
EBVectors EBfield (const Point3D &P, double t) const
 Return the field in a point. More...
 
virtual bool apply (const size_t &i, const double &t, Vector_t &E, Vector_t &B)
 
virtual bool apply (const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B)
 
virtual bool applyToReferenceParticle (const Vector_t &R, const Vector_t &P, const double &t, Vector_t &E, Vector_t &B)
 
virtual bool getPotential (const Vector_t &, const double &, Vector_t &, double &)
 
virtual double getDesignEnergy () const
 
virtual void setDesignEnergy (const double &energy, bool changeable=true)
 
virtual void initialise (PartBunchBase< double, 3 > *bunch, double &startField, double &endField)=0
 
virtual void finalise ()=0
 
virtual bool bends () const =0
 
virtual void goOnline (const double &kineticEnergy)
 
virtual void goOffline ()
 
virtual bool Online ()
 
virtual void getDimensions (double &zBegin, double &zEnd) const =0
 
virtual ElementType getType () const
 Get element type std::string. More...
 
virtual const ElementBasegetDesign () const
 Return design element. More...
 
virtual void trackBunch (PartBunchBase< double, 3 > *bunch, const PartData &, bool revBeam, bool revTrack) const
 Track particle bunch. More...
 
virtual void trackMap (FVps< double, 6 > &map, const PartData &, bool revBeam, bool revTrack) const
 Track a map. More...
 
void setExitFaceSlope (const double &)
 
- Public Member Functions inherited from ElementBase
 ElementBase (const std::string &name)
 Constructor with given name. More...
 
 ElementBase ()
 
 ElementBase (const ElementBase &)
 
virtual ~ElementBase ()
 
virtual const std::string & getName () const
 Get element name. More...
 
virtual void setName (const std::string &name)
 Set element name. More...
 
virtual ElementType getType () const =0
 Get element type std::string. More...
 
std::string getTypeString () const
 
virtual BGeometryBasegetGeometry ()=0
 Get geometry. More...
 
virtual const BGeometryBasegetGeometry () const =0
 Get geometry. More...
 
virtual double getArcLength () const
 Get arc length. More...
 
virtual double getElementLength () const
 Get design length. More...
 
virtual void setElementLength (double length)
 Set design length. More...
 
virtual void getElementDimensions (double &begin, double &end) const
 
virtual double getOrigin () const
 Get origin position. More...
 
virtual double getEntrance () const
 Get entrance position. More...
 
virtual double getExit () const
 Get exit position. More...
 
virtual Euclid3D getTransform (double fromS, double toS) const
 Get transform. More...
 
virtual Euclid3D getTransform (double s) const
 Get transform. More...
 
virtual Euclid3D getTotalTransform () const
 Get transform. More...
 
virtual Euclid3D getEntranceFrame () const
 Get transform. More...
 
virtual Euclid3D getExitFrame () const
 Get transform. More...
 
virtual Euclid3D getEntrancePatch () const
 Get patch. More...
 
virtual Euclid3D getExitPatch () const
 Get patch. More...
 
virtual double getAttribute (const std::string &aKey) const
 Get attribute value. More...
 
virtual bool hasAttribute (const std::string &aKey) const
 Test for existence of an attribute. More...
 
virtual void removeAttribute (const std::string &aKey)
 Remove an existing attribute. More...
 
virtual void setAttribute (const std::string &aKey, double val)
 Set value of an attribute. More...
 
virtual ChannelgetChannel (const std::string &aKey, bool create=false)
 Construct a read/write channel. More...
 
virtual const ConstChannelgetConstChannel (const std::string &aKey) const
 Construct a read-only channel. More...
 
virtual void accept (BeamlineVisitor &visitor) const =0
 Apply visitor. More...
 
virtual ElementBaseclone () const =0
 Return clone. More...
 
virtual ElementBasecopyStructure ()
 Make a structural copy. More...
 
bool isSharable () const
 Test if the element can be shared. More...
 
virtual void makeSharable ()
 Set sharable flag. More...
 
bool update (const AttributeSet &)
 Update element. More...
 
virtual void setBoundaryGeometry (BoundaryGeometry *geo)
 
virtual BoundaryGeometrygetBoundaryGeometry () const
 return the attached boundary geometrt object if there is any More...
 
virtual bool hasBoundaryGeometry () const
 
virtual void setWake (WakeFunction *wf)
 attach a wake field to the element More...
 
virtual WakeFunctiongetWake () const
 return the attached wake object if there is any More...
 
virtual bool hasWake () const
 
virtual void setParticleMatterInteraction (ParticleMatterInteractionHandler *spys)
 
virtual ParticleMatterInteractionHandlergetParticleMatterInteraction () const
 
virtual bool hasParticleMatterInteraction () const
 
void setCSTrafoGlobal2Local (const CoordinateSystemTrafo &ori)
 
CoordinateSystemTrafo getCSTrafoGlobal2Local () const
 
void releasePosition ()
 
void fixPosition ()
 
bool isPositioned () const
 
virtual CoordinateSystemTrafo getEdgeToBegin () const
 
virtual CoordinateSystemTrafo getEdgeToEnd () const
 
void setAperture (const ApertureType &type, const std::vector< double > &args)
 
std::pair< ApertureType, std::vector< double > > getAperture () const
 
virtual bool isInside (const Vector_t &r) const
 
void setMisalignment (const CoordinateSystemTrafo &cst)
 
void getMisalignment (double &x, double &y, double &s) const
 
CoordinateSystemTrafo getMisalignment () const
 
void setActionRange (const std::queue< std::pair< double, double > > &range)
 
void setCurrentSCoordinate (double s)
 
void setRotationAboutZ (double rotation)
 Set rotation about z axis in bend frame. More...
 
double getRotationAboutZ () const
 
virtual BoundingBox getBoundingBoxInLabCoords () const
 
virtual int getRequiredNumberOfTimeSteps () const
 
void setOutputFN (std::string fn)
 Set output filename. More...
 
std::string getOutputFN () const
 Get output filename. More...
 
void setFlagDeleteOnTransverseExit (bool=true)
 
bool getFlagDeleteOnTransverseExit () const
 
void setElementPosition (double elemedge)
 Access to ELEMEDGE attribute. More...
 
double getElementPosition () const
 
bool isElementPositionSet () const
 
- Public Member Functions inherited from RCObject
int addReference () const
 Increment reference count. More...
 
int removeReference () const
 Decrement the reference count. More...
 
bool isShared () const
 Test for sharing. More...
 

Private Member Functions

void calculateDfCoefficients ()
 
 ScalingFFAMagnet (const ScalingFFAMagnet &right)
 
ScalingFFAMagnetoperator= (const ScalingFFAMagnet &rhs)
 

Private Attributes

PlanarArcGeometry planarArcGeometry_m
 
BMultipoleField dummy
 
size_t maxOrder_m = 0
 
double tanDelta_m = 0.
 
double k_m = 0.
 
double Bz_m = 0.
 
double r0_m = 0.
 
double rMin_m = 0.
 
double rMax_m = 0.
 
double phiStart_m = 0.
 
double phiEnd_m = 0.
 
double azimuthalExtent_m = 0.
 
double verticalExtent_m = 0.
 
Vector_t centre_m
 
endfieldmodel::EndFieldModelendField_m = nullptr
 
std::string endFieldName_m = ""
 
const double fp_tolerance = 1e-18
 
std::vector< std::vector< double > > dfCoefficients_m
 

Additional Inherited Members

- Static Public Member Functions inherited from ElementBase
static std::string getTypeString (ElementType type)
 
- Protected Member Functions inherited from ElementBase
bool isInsideTransverse (const Vector_t &r) const
 
- Protected Member Functions inherited from RCObject
 RCObject ()
 Default constructor. More...
 
 RCObject (const RCObject &)
 Copy constructor. More...
 
virtual ~RCObject ()=0
 
RCObjectoperator= (const RCObject &right)
 
- Protected Attributes inherited from Component
double exit_face_slope_m
 
PartBunchBase< double, 3 > * RefPartBunch_m
 
bool online_m
 
- Protected Attributes inherited from ElementBase
bool shareFlag
 
CoordinateSystemTrafo csTrafoGlobal2Local_m
 
CoordinateSystemTrafo misalignment_m
 
std::pair< ApertureType, std::vector< double > > aperture_m
 
double elementEdge_m
 
double rotationZAxis_m
 
- Static Protected Attributes inherited from Component
static const std::vector< double > defaultAperture_m
 

Detailed Description

Sector bending magnet with an FFA-style field index and spiral end shape

Note about placement and end field; in order to get a user-defined end field shape, we do a lookup from user defined end fields, which is pulled from the EndFieldModel object and done by setupEndField(). Because end fields tie into the geometry, this has to be done before placements; but it also needs to be done after parsing has finished. setupEndField() is called by e.g. ParallelCyclotronTracker just before the object is handed to OpalRing for placement.

Definition at line 47 of file ScalingFFAMagnet.h.

Constructor & Destructor Documentation

◆ ScalingFFAMagnet() [1/2]

ScalingFFAMagnet::ScalingFFAMagnet ( const std::string &  name)
explicit

Construct a new ScalingFFAMagnet

Parameters
nameUser-defined name of the ScalingFFAMagnet

Definition at line 34 of file ScalingFFAMagnet.cpp.

Referenced by clone().

◆ ~ScalingFFAMagnet()

ScalingFFAMagnet::~ScalingFFAMagnet ( )

Destructor - deletes map

Definition at line 55 of file ScalingFFAMagnet.cpp.

References endField_m.

◆ ScalingFFAMagnet() [2/2]

ScalingFFAMagnet::ScalingFFAMagnet ( const ScalingFFAMagnet right)
private

Copy constructor

Definition at line 39 of file ScalingFFAMagnet.cpp.

References Bz_m, endfieldmodel::EndFieldModel::clone(), endField_m, r0_m, and Component::RefPartBunch_m.

Here is the call graph for this function:

Member Function Documentation

◆ accept()

void ScalingFFAMagnet::accept ( BeamlineVisitor visitor) const
overridevirtual

Accept a beamline visitor

Implements ElementBase.

Definition at line 103 of file ScalingFFAMagnet.cpp.

References BeamlineVisitor::visitScalingFFAMagnet().

Here is the call graph for this function:

◆ apply() [1/2]

bool ScalingFFAMagnet::apply ( const size_t &  i,
const double &  t,
Vector_t E,
Vector_t B 
)
overridevirtual

Calculate the field at the position of the ith particle

Parameters
iindex of the particle event override; field is calculated at this position
ttime at which the field is to be calculated
Ecalculated electric field - always 0 (no E-field)
Bcalculated magnetic field
Returns
true if particle is outside the field map

Reimplemented from Component.

Definition at line 73 of file ScalingFFAMagnet.cpp.

References apply(), PartBunchBase< T, Dim >::P, PartBunchBase< T, Dim >::R, and Component::RefPartBunch_m.

Referenced by apply().

Here is the call graph for this function:

◆ apply() [2/2]

bool ScalingFFAMagnet::apply ( const Vector_t R,
const Vector_t P,
const double &  t,
Vector_t E,
Vector_t B 
)
overridevirtual

Calculate the field at some arbitrary position

Parameters
Rposition in the local coordinate system of the bend
Pnot used
tnot used
Enot used
Bcalculated magnetic field
Returns
true if particle is outside the field map, else false

Reimplemented from Component.

Definition at line 171 of file ScalingFFAMagnet.cpp.

References getFieldValue(), and Attrib::Distribution::R.

Here is the call graph for this function:

◆ bends()

bool ScalingFFAMagnet::bends ( ) const
inlineoverridevirtual

Return true - ScalingFFAMagnet always bends the reference particle

Implements Component.

Definition at line 91 of file ScalingFFAMagnet.cpp.

◆ calculateDfCoefficients()

void ScalingFFAMagnet::calculateDfCoefficients ( )
private

Calculate the df coefficients, ready for field generation

Must be called following any update to the the field parameters, in order for correct field to be calculated.

Definition at line 176 of file ScalingFFAMagnet.cpp.

References dfCoefficients_m, k_m, maxOrder_m, Hypervolume::n, and tanDelta_m.

Referenced by initialise().

◆ clone()

ScalingFFAMagnet * ScalingFFAMagnet::clone ( ) const
overridevirtual

Inheritable copy constructor

Implements ElementBase.

Definition at line 59 of file ScalingFFAMagnet.cpp.

References initialise(), and ScalingFFAMagnet().

Referenced by ParallelCyclotronTracker::visitScalingFFAMagnet().

Here is the call graph for this function:

◆ finalise()

void ScalingFFAMagnet::finalise ( )
overridevirtual

Finalise the ScalingFFAMagnet - sets bunch to nullptr

Implements Component.

Definition at line 87 of file ScalingFFAMagnet.cpp.

References Component::RefPartBunch_m.

◆ getAzimuthalExtent()

double ScalingFFAMagnet::getAzimuthalExtent ( ) const
inline

Get the maximum azimuthal displacement from \psi=0

Definition at line 227 of file ScalingFFAMagnet.h.

References azimuthalExtent_m.

◆ getCentre()

Vector_t ScalingFFAMagnet::getCentre ( ) const
inline

Get the centre of the sector

Definition at line 166 of file ScalingFFAMagnet.h.

References centre_m.

◆ getDfCoefficients()

std::vector< std::vector< double > > ScalingFFAMagnet::getDfCoefficients ( )
inline

Return the calculated df coefficients

Definition at line 242 of file ScalingFFAMagnet.h.

References dfCoefficients_m.

◆ getDimensions()

void ScalingFFAMagnet::getDimensions ( double &  ,
double &   
) const
inlineoverridevirtual

Not implemented

Implements Component.

Definition at line 124 of file ScalingFFAMagnet.h.

◆ getDipoleConstant()

double ScalingFFAMagnet::getDipoleConstant ( ) const
inline

Get the dipole constant B_0

Definition at line 154 of file ScalingFFAMagnet.h.

References Bz_m.

◆ getEndField()

endfieldmodel::EndFieldModel * ScalingFFAMagnet::getEndField ( ) const
inline

Get the fringe field

Returns the fringe field model; ScalingFFAMagnet retains ownership of the returned memory.

Definition at line 176 of file ScalingFFAMagnet.h.

References endField_m.

Referenced by OpalScalingFFAMagnet::update().

◆ getEndFieldName()

std::string ScalingFFAMagnet::getEndFieldName ( ) const
inline

Return the end field name.

Definition at line 262 of file ScalingFFAMagnet.h.

References endFieldName_m.

◆ getField() [1/2]

const EMField & ScalingFFAMagnet::getField ( ) const
overridevirtual

Return a dummy (0.) field value (what is this for?)

Implements Component.

Definition at line 69 of file ScalingFFAMagnet.cpp.

References dummy.

◆ getField() [2/2]

EMField & ScalingFFAMagnet::getField ( )
overridevirtual

Return a dummy (0.) field value (what is this for?)

Implements Component.

Definition at line 65 of file ScalingFFAMagnet.cpp.

References dummy.

◆ getFieldIndex()

double ScalingFFAMagnet::getFieldIndex ( ) const
inline

Get the field index k

Definition at line 148 of file ScalingFFAMagnet.h.

References k_m.

◆ getFieldValue()

bool ScalingFFAMagnet::getFieldValue ( const Vector_t R,
Vector_t B 
) const

Calculate the field at some arbitrary position in cartesian coordinates

Parameters
Rposition in the local coordinate system of the bend, in cartesian coordinates defined like (x, y, z)
Bcalculated magnetic field defined like (Bx, By, Bz)
Returns
true if particle is outside the field map, else false

Definition at line 108 of file ScalingFFAMagnet.cpp.

References atan2(), centre_m, cos(), getFieldValueCylindrical(), Attrib::Distribution::R, sin(), and sqrt().

Referenced by apply().

Here is the call graph for this function:

◆ getFieldValueCylindrical()

bool ScalingFFAMagnet::getFieldValueCylindrical ( const Vector_t R,
Vector_t B 
) const

Calculate the field at some arbitrary position in cylindrical coordinates

Parameters
Rposition in the local coordinate system of the bend, in cylindrical polar coordinates defined like (r, y, phi)
Bcalculated magnetic field defined like (Br, By, Bphi)
Returns
true if particle is outside the field map, else false

Definition at line 124 of file ScalingFFAMagnet.cpp.

References r0_m, and rMax_m.

Referenced by getFieldValue().

◆ getGeometry() [1/2]

const BGeometryBase & ScalingFFAMagnet::getGeometry ( ) const
overridevirtual

Return the cell geometry

Implements ElementBase.

Definition at line 99 of file ScalingFFAMagnet.cpp.

References planarArcGeometry_m.

◆ getGeometry() [2/2]

BGeometryBase & ScalingFFAMagnet::getGeometry ( )
overridevirtual

Return the cell geometry

Implements ElementBase.

Definition at line 95 of file ScalingFFAMagnet.cpp.

References planarArcGeometry_m.

◆ getMaxOrder()

size_t ScalingFFAMagnet::getMaxOrder ( ) const
inline

Get the maximum power of y modelled in the off-midplane expansion;

Definition at line 187 of file ScalingFFAMagnet.h.

References maxOrder_m.

◆ getPhiEnd()

double ScalingFFAMagnet::getPhiEnd ( ) const
inline

Get the offset of the magnet end from the start

Definition at line 203 of file ScalingFFAMagnet.h.

References phiEnd_m.

◆ getPhiStart()

double ScalingFFAMagnet::getPhiStart ( ) const
inline

Get the offset of the magnet centre from the start

Definition at line 195 of file ScalingFFAMagnet.h.

References phiStart_m.

Referenced by setupEndField().

◆ getR0()

double ScalingFFAMagnet::getR0 ( ) const
inline

Get the radius constant R_0

Definition at line 160 of file ScalingFFAMagnet.h.

References r0_m.

Referenced by setupEndField().

◆ getRMax()

double ScalingFFAMagnet::getRMax ( ) const
inline

Get the maximum radius

Definition at line 219 of file ScalingFFAMagnet.h.

References rMax_m.

◆ getRMin()

double ScalingFFAMagnet::getRMin ( ) const
inline

Get the maximum radius

Definition at line 211 of file ScalingFFAMagnet.h.

References rMin_m.

◆ getTanDelta()

double ScalingFFAMagnet::getTanDelta ( ) const
inline

Get tan delta - delta is the spiral angle

Definition at line 142 of file ScalingFFAMagnet.h.

References tanDelta_m.

◆ getVerticalExtent()

double ScalingFFAMagnet::getVerticalExtent ( ) const
inline

Get the maximum vertical displacement from the midplane

Definition at line 235 of file ScalingFFAMagnet.h.

References verticalExtent_m.

◆ initialise() [1/2]

void ScalingFFAMagnet::initialise ( )

Initialise the ScalingFFAMagnet

Sets up the field expansion and the geometry; call after changing any field parameters

Definition at line 78 of file ScalingFFAMagnet.cpp.

References calculateDfCoefficients().

Referenced by initialise().

Here is the call graph for this function:

◆ initialise() [2/2]

void ScalingFFAMagnet::initialise ( PartBunchBase< double, 3 > *  bunch,
double &  startField,
double &  endField 
)
overridevirtual

Initialise the ScalingFFAMagnet

Parameters
bunchthe global bunch object
startFieldnot used
endFieldnot used

Implements Component.

Definition at line 82 of file ScalingFFAMagnet.cpp.

References initialise(), and Component::RefPartBunch_m.

Referenced by clone(), and OpalScalingFFAMagnet::update().

Here is the call graph for this function:

◆ operator=()

ScalingFFAMagnet & ScalingFFAMagnet::operator= ( const ScalingFFAMagnet rhs)
private

◆ setAzimuthalExtent()

void ScalingFFAMagnet::setAzimuthalExtent ( double  azimuthalExtent)
inline

Set the maximum azimuthal displacement from \psi=0

Definition at line 231 of file ScalingFFAMagnet.h.

References azimuthalExtent_m.

Referenced by setupEndField(), and OpalScalingFFAMagnet::update().

◆ setCentre()

void ScalingFFAMagnet::setCentre ( Vector_t  centre)
inline

Set the centre of the sector

Definition at line 169 of file ScalingFFAMagnet.h.

References centre_m.

Referenced by OpalScalingFFAMagnet::update().

◆ setDipoleConstant()

void ScalingFFAMagnet::setDipoleConstant ( double  Bz)
inline

Set the dipole constant B_0

Definition at line 157 of file ScalingFFAMagnet.h.

References Bz_m.

Referenced by OpalScalingFFAMagnet::update().

◆ setEndField()

void ScalingFFAMagnet::setEndField ( endfieldmodel::EndFieldModel endField)

Set the fringe field

  • endField: the new fringe field; ScalingFFAMagnet takes ownership of the memory associated with endField.

Definition at line 199 of file ScalingFFAMagnet.cpp.

References endField_m.

Referenced by OpalScalingFFAMagnet::OpalScalingFFAMagnet(), and setupEndField().

◆ setEndFieldName()

void ScalingFFAMagnet::setEndFieldName ( std::string  name)
inline

Set the end field name.

Called during parsing of the input file; OPAL looks for the endFieldName when setupEndField() is called.

Definition at line 259 of file ScalingFFAMagnet.h.

References endFieldName_m, and name.

Referenced by OpalScalingFFAMagnet::setupDefaultEndField(), and OpalScalingFFAMagnet::setupNamedEndField().

◆ setFieldIndex()

void ScalingFFAMagnet::setFieldIndex ( double  k)
inline

Set the field index k

Definition at line 151 of file ScalingFFAMagnet.h.

References k_m.

Referenced by OpalScalingFFAMagnet::update().

◆ setMaxOrder()

void ScalingFFAMagnet::setMaxOrder ( size_t  maxOrder)
inline

Set the maximum power of y modelled in the off-midplane expansion;

Definition at line 191 of file ScalingFFAMagnet.h.

References maxOrder_m.

Referenced by OpalScalingFFAMagnet::update().

◆ setPhiEnd()

void ScalingFFAMagnet::setPhiEnd ( double  phiEnd)
inline

Set the offset of the magnet end from the start

Definition at line 207 of file ScalingFFAMagnet.h.

References phiEnd_m.

Referenced by setupEndField(), and OpalScalingFFAMagnet::update().

◆ setPhiStart()

void ScalingFFAMagnet::setPhiStart ( double  phiStart)
inline

Set the offset of the magnet centre from the start

Definition at line 199 of file ScalingFFAMagnet.h.

References phiStart_m.

Referenced by setupEndField(), and OpalScalingFFAMagnet::update().

◆ setR0()

void ScalingFFAMagnet::setR0 ( double  r0)
inline

Set the radius constant R_0

Definition at line 163 of file ScalingFFAMagnet.h.

References r0_m.

Referenced by OpalScalingFFAMagnet::update().

◆ setRMax()

void ScalingFFAMagnet::setRMax ( double  rMax)
inline

Set the maximum radius

Definition at line 223 of file ScalingFFAMagnet.h.

References rMax_m.

Referenced by OpalScalingFFAMagnet::update().

◆ setRMin()

void ScalingFFAMagnet::setRMin ( double  rMin)
inline

Set the maximum radius

Definition at line 215 of file ScalingFFAMagnet.h.

References rMin_m.

Referenced by OpalScalingFFAMagnet::update().

◆ setTanDelta()

void ScalingFFAMagnet::setTanDelta ( double  tanDelta)
inline

Set tan delta - delta is the spiral angle

Definition at line 145 of file ScalingFFAMagnet.h.

References tanDelta_m.

Referenced by OpalScalingFFAMagnet::update().

◆ setupEndField()

void ScalingFFAMagnet::setupEndField ( )

setupEndField does some end field and geometry set-up

This is normally called just before the magnet is placed; can only set up the end field after everything has been parsed from input (otherwise OPAL may not know about an end field model).

sets PhiStart, PhiEnd, AzimuthalExtent and the end field model itself.

Definition at line 209 of file ScalingFFAMagnet.cpp.

References azimuthalExtent_m, endfieldmodel::EndFieldModel::clone(), endFieldName_m, endfieldmodel::EndFieldModel::getCentreLength(), endfieldmodel::EndFieldModel::getEndFieldModel(), endfieldmodel::EndFieldModel::getEndLength(), getPhiStart(), getR0(), Units::m2mm, phiEnd_m, phiStart_m, planarArcGeometry_m, r0_m, endfieldmodel::EndFieldModel::rescale(), setAzimuthalExtent(), PlanarArcGeometry::setCurvature(), PlanarArcGeometry::setElementLength(), setEndField(), setPhiEnd(), and setPhiStart().

Referenced by ParallelCyclotronTracker::visitScalingFFAMagnet().

Here is the call graph for this function:

◆ setVerticalExtent()

void ScalingFFAMagnet::setVerticalExtent ( double  verticalExtent)
inline

Set the maximum vertical displacement from the midplane

Definition at line 239 of file ScalingFFAMagnet.h.

References verticalExtent_m.

Referenced by OpalScalingFFAMagnet::update().

Member Data Documentation

◆ azimuthalExtent_m

double ScalingFFAMagnet::azimuthalExtent_m = 0.
private

Definition at line 287 of file ScalingFFAMagnet.h.

Referenced by getAzimuthalExtent(), setAzimuthalExtent(), and setupEndField().

◆ Bz_m

double ScalingFFAMagnet::Bz_m = 0.
private

Definition at line 281 of file ScalingFFAMagnet.h.

Referenced by getDipoleConstant(), ScalingFFAMagnet(), and setDipoleConstant().

◆ centre_m

Vector_t ScalingFFAMagnet::centre_m
private

Definition at line 289 of file ScalingFFAMagnet.h.

Referenced by getCentre(), getFieldValue(), and setCentre().

◆ dfCoefficients_m

std::vector<std::vector<double> > ScalingFFAMagnet::dfCoefficients_m
private

Definition at line 293 of file ScalingFFAMagnet.h.

Referenced by calculateDfCoefficients(), and getDfCoefficients().

◆ dummy

BMultipoleField ScalingFFAMagnet::dummy
private

Definition at line 276 of file ScalingFFAMagnet.h.

Referenced by getField().

◆ endField_m

endfieldmodel::EndFieldModel* ScalingFFAMagnet::endField_m = nullptr
private

Definition at line 290 of file ScalingFFAMagnet.h.

Referenced by getEndField(), ScalingFFAMagnet(), setEndField(), and ~ScalingFFAMagnet().

◆ endFieldName_m

std::string ScalingFFAMagnet::endFieldName_m = ""
private

Definition at line 291 of file ScalingFFAMagnet.h.

Referenced by getEndFieldName(), setEndFieldName(), and setupEndField().

◆ fp_tolerance

const double ScalingFFAMagnet::fp_tolerance = 1e-18
private

Definition at line 292 of file ScalingFFAMagnet.h.

◆ k_m

double ScalingFFAMagnet::k_m = 0.
private

Definition at line 280 of file ScalingFFAMagnet.h.

Referenced by calculateDfCoefficients(), getFieldIndex(), and setFieldIndex().

◆ maxOrder_m

size_t ScalingFFAMagnet::maxOrder_m = 0
private

Definition at line 278 of file ScalingFFAMagnet.h.

Referenced by calculateDfCoefficients(), getMaxOrder(), and setMaxOrder().

◆ phiEnd_m

double ScalingFFAMagnet::phiEnd_m = 0.
private

Definition at line 286 of file ScalingFFAMagnet.h.

Referenced by getPhiEnd(), setPhiEnd(), and setupEndField().

◆ phiStart_m

double ScalingFFAMagnet::phiStart_m = 0.
private

Definition at line 285 of file ScalingFFAMagnet.h.

Referenced by getPhiStart(), setPhiStart(), and setupEndField().

◆ planarArcGeometry_m

PlanarArcGeometry ScalingFFAMagnet::planarArcGeometry_m
private

Definition at line 275 of file ScalingFFAMagnet.h.

Referenced by getGeometry(), and setupEndField().

◆ r0_m

double ScalingFFAMagnet::r0_m = 0.
private

◆ rMax_m

double ScalingFFAMagnet::rMax_m = 0.
private

Definition at line 284 of file ScalingFFAMagnet.h.

Referenced by getFieldValueCylindrical(), getRMax(), and setRMax().

◆ rMin_m

double ScalingFFAMagnet::rMin_m = 0.
private

Definition at line 283 of file ScalingFFAMagnet.h.

Referenced by getRMin(), and setRMin().

◆ tanDelta_m

double ScalingFFAMagnet::tanDelta_m = 0.
private

Definition at line 279 of file ScalingFFAMagnet.h.

Referenced by calculateDfCoefficients(), getTanDelta(), and setTanDelta().

◆ verticalExtent_m

double ScalingFFAMagnet::verticalExtent_m = 0.
private

Definition at line 288 of file ScalingFFAMagnet.h.

Referenced by getVerticalExtent(), and setVerticalExtent().


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