OPAL (Object Oriented Parallel Accelerator Library) 2022.1
OPAL
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
Cyclotron Class Referenceabstract

#include <Cyclotron.h>

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

Public Types

enum class  BFieldType : unsigned short {
  PSIBF , CARBONBF , ANSYSBF , AVFEQBF ,
  FFABF , BANDRF , SYNCHRO
}
 

Public Member Functions

 Cyclotron (const std::string &name)
 Constructor with given name. More...
 
 Cyclotron ()
 
 Cyclotron (const Cyclotron &)
 
virtual ~Cyclotron ()
 
virtual void accept (BeamlineVisitor &) const
 Apply visitor to Cyclotron. More...
 
virtual double getSlices () const =0
 Get number of slices. More...
 
virtual double getStepsize () const =0
 Get stepsize. More...
 
void setFieldMapFN (const std::string &fmapfn)
 
virtual std::string getFieldMapFN () const
 
void setRfFieldMapFN (std::vector< std::string > rffmapfn)
 
void setRFFCoeffFN (std::vector< std::string > rff_coeff_fn)
 
void setRFVCoeffFN (std::vector< std::string > rfv_coeff_fn)
 
void setCyclotronType (const std::string &type)
 
const std::string & getCyclotronType () const
 
void setBFieldType ()
 
BFieldType getBFieldType () const
 
virtual ElementType getType () const
 Get element type std::string. More...
 
virtual void getDimensions (double &zBegin, double &zEnd) const
 
unsigned int getNumberOfTrimcoils () const
 
void setCyclHarm (double h)
 
virtual double getCyclHarm () const
 
void setRfPhi (std::vector< double > f)
 
virtual std::vector< double > getRfPhi () const
 
void setRfFrequ (std::vector< double > f)
 
virtual std::vector< double > getRfFrequ () const
 
void setSymmetry (double symmetry)
 
virtual double getSymmetry () const
 
void setRinit (double rinit)
 
virtual double getRinit () const
 
void setPRinit (double prinit)
 
virtual double getPRinit () const
 
void setPHIinit (double phiinit)
 
virtual double getPHIinit () const
 
void setZinit (double zinit)
 
virtual double getZinit () const
 
void setPZinit (double zinit)
 
virtual double getPZinit () const
 
void setBScale (double bs)
 
virtual double getBScale () const
 
void setEScale (std::vector< double > bs)
 
virtual std::vector< double > getEScale () const
 
void setTrimCoils (const std::vector< TrimCoil * > &trimcoils)
 
void setSuperpose (std::vector< bool > flag)
 
virtual std::vector< bool > getSuperpose () const
 
void setMinR (double r)
 
virtual double getMinR () const
 
void setMaxR (double r)
 
virtual double getMaxR () const
 
void setMinZ (double z)
 
virtual double getMinZ () const
 
void setMaxZ (double z)
 
virtual double getMaxZ () const
 
void setFMLowE (double e)
 
virtual double getFMLowE () const
 
void setFMHighE (double e)
 
virtual double getFMHighE () const
 
void setTrimCoilThreshold (double)
 
virtual double getTrimCoilThreshold () const
 
void setSpiralFlag (bool spiral_flag)
 
virtual bool getSpiralFlag () const
 
virtual bool apply (const size_t &id, 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 void apply (const double &rad, const double &z, const double &tet_rad, double &br, double &bt, double &bz)
 
virtual void initialise (PartBunchBase< double, 3 > *bunch, double &startField, double &endField)
 
virtual void initialise (PartBunchBase< double, 3 > *bunch, const double &scaleFactor)
 
virtual void finalise ()
 
virtual bool bends () const
 
virtual double getRmax () const
 
virtual double getRmin () const
 
bool interpolate (const double &rad, const double &tet_rad, double &br, double &bt, double &bz)
 
void read (const double &scaleFactor)
 
void writeOutputFieldFiles ()
 
- 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...
 

Protected Member Functions

void getdiffs ()
 
double gutdf5d (double *f, double dx, const int kor, const int krl, const int lpr)
 
void initR (double rmin, double dr, int nrad)
 
void getFieldFromFile_Ring (const double &scaleFactor)
 
void getFieldFromFile_Carbon (const double &scaleFactor)
 
void getFieldFromFile_CYCIAE (const double &scaleFactor)
 
void getFieldFromFile_AVFEQ (const double &scaleFactor)
 
void getFieldFromFile_FFA (const double &scaleFactor)
 
void getFieldFromFile_BandRF (const double &scaleFactor)
 
void getFieldFromFile_Synchrocyclotron (const double &scaleFactor)
 
int idx (int irad, int ktet)
 
- 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

BfieldData Bfield_m
 
BPositions BP_m
 
- 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
 

Private Member Functions

void applyTrimCoil (const double r, const double z, const double tet_rad, double &br, double &bz)
 Apply trim coils (calculate field contributions) with smooth field transition. More...
 
void applyTrimCoil_m (const double r, const double z, const double tet_rad, double *br, double *bz)
 Apply trim coils (calculate field contributions) More...
 
void operator= (const Cyclotron &)=delete
 

Private Attributes

BFieldType fieldType_m
 
std::string fmapfn_m
 
std::vector< double > rffrequ_m
 
std::vector< std::vector< double > > rffc_m
 
std::vector< double > rfvrequ_m
 
std::vector< std::vector< double > > rfvc_m
 
std::vector< double > rfphi_m
 
std::vector< double > escale_m
 
std::vector< bool > superpose_m
 
double symmetry_m
 
double rinit_m
 
double prinit_m
 
double phiinit_m
 
double zinit_m
 
double pzinit_m
 
bool spiralFlag_m
 
double trimCoilThreshold_m
 
std::string typeName_m
 
double harm_m
 
double bscale_m
 
std::vector< TrimCoil * > trimcoils_m
 
double minr_m
 
double maxr_m
 
double minz_m
 
double maxz_m
 
double fmLowE_m
 
double fmHighE_m
 
std::vector< Fieldmap * > RFfields_m
 
std::vector< std::string > RFfilename_m
 
std::vector< std::string > RFFCoeff_fn_m
 
std::vector< std::string > RFVCoeff_fn_m
 
std::unique_ptr< LossDataSinklossDs_m
 
int waitingGap_m = 1
 

Additional Inherited Members

- Static Public Member Functions inherited from ElementBase
static std::string getTypeString (ElementType type)
 
- Static Protected Attributes inherited from Component
static const std::vector< double > defaultAperture_m
 

Detailed Description

Definition at line 80 of file Cyclotron.h.

Member Enumeration Documentation

◆ BFieldType

enum class Cyclotron::BFieldType : unsigned short
strong
Enumerator
PSIBF 
CARBONBF 
ANSYSBF 
AVFEQBF 
FFABF 
BANDRF 
SYNCHRO 

Definition at line 83 of file Cyclotron.h.

Constructor & Destructor Documentation

◆ Cyclotron() [1/3]

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

Constructor with given name.

Definition at line 89 of file Cyclotron.cpp.

◆ Cyclotron() [2/3]

Cyclotron::Cyclotron ( )

Definition at line 54 of file Cyclotron.cpp.

◆ Cyclotron() [3/3]

Cyclotron::Cyclotron ( const Cyclotron right)

Definition at line 58 of file Cyclotron.cpp.

◆ ~Cyclotron()

Cyclotron::~Cyclotron ( )
virtual

Definition at line 93 of file Cyclotron.cpp.

Member Function Documentation

◆ accept()

void Cyclotron::accept ( BeamlineVisitor visitor) const
virtual

Apply visitor to Cyclotron.

Implements ElementBase.

Definition at line 119 of file Cyclotron.cpp.

References BeamlineVisitor::visitCyclotron().

Here is the call graph for this function:

◆ apply() [1/3]

void Cyclotron::apply ( const double &  rad,
const double &  z,
const double &  tet_rad,
double &  br,
double &  bt,
double &  bz 
)
virtual

Definition at line 560 of file Cyclotron.cpp.

References applyTrimCoil(), and interpolate().

Here is the call graph for this function:

◆ apply() [2/3]

bool Cyclotron::apply ( const size_t &  id,
const double &  t,
Vector_t E,
Vector_t B 
)
virtual

◆ apply() [3/3]

bool Cyclotron::apply ( const Vector_t R,
const Vector_t P,
const double &  t,
Vector_t E,
Vector_t B 
)
virtual

◆ applyTrimCoil()

void Cyclotron::applyTrimCoil ( const double  r,
const double  z,
const double  tet_rad,
double &  br,
double &  bz 
)
private

Apply trim coils (calculate field contributions) with smooth field transition.

Definition at line 105 of file Cyclotron.cpp.

References abs(), applyTrimCoil_m(), and trimCoilThreshold_m.

Referenced by apply().

Here is the call graph for this function:

◆ applyTrimCoil_m()

void Cyclotron::applyTrimCoil_m ( const double  r,
const double  z,
const double  tet_rad,
double *  br,
double *  bz 
)
private

Apply trim coils (calculate field contributions)

Definition at line 97 of file Cyclotron.cpp.

References trimcoils_m.

Referenced by applyTrimCoil().

◆ bends()

bool Cyclotron::bends ( ) const
virtual

Implements Component.

Definition at line 573 of file Cyclotron.cpp.

◆ finalise()

void Cyclotron::finalise ( )
virtual

Implements Component.

Definition at line 567 of file Cyclotron.cpp.

References endl(), ElementBase::getName(), gmsg, lossDs_m, and Component::online_m.

Here is the call graph for this function:

◆ getBFieldType()

Cyclotron::BFieldType Cyclotron::getBFieldType ( ) const

Definition at line 389 of file Cyclotron.cpp.

References fieldType_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getBScale()

double Cyclotron::getBScale ( ) const
virtual

◆ getCyclHarm()

double Cyclotron::getCyclHarm ( ) const
virtual

◆ getCyclotronType()

const std::string & Cyclotron::getCyclotronType ( ) const

Definition at line 260 of file Cyclotron.cpp.

References typeName_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getdiffs()

void Cyclotron::getdiffs ( )
protected

◆ getDimensions()

void Cyclotron::getDimensions ( double &  zBegin,
double &  zEnd 
) const
virtual

Implements Component.

Definition at line 1493 of file Cyclotron.cpp.

◆ getEScale()

std::vector< double > Cyclotron::getEScale ( ) const
virtual

Definition at line 284 of file Cyclotron.cpp.

References escale_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getFieldFromFile_AVFEQ()

void Cyclotron::getFieldFromFile_AVFEQ ( const double &  scaleFactor)
protected

◆ getFieldFromFile_BandRF()

void Cyclotron::getFieldFromFile_BandRF ( const double &  scaleFactor)
protected

Definition at line 1403 of file Cyclotron.cpp.

References endl(), getFieldFromFile_Carbon(), Fieldmap::getFieldmap(), gmsg, Fieldmap::readMap(), RFfields_m, and RFfilename_m.

Referenced by read().

Here is the call graph for this function:

◆ getFieldFromFile_Carbon()

void Cyclotron::getFieldFromFile_Carbon ( const double &  scaleFactor)
protected

◆ getFieldFromFile_CYCIAE()

void Cyclotron::getFieldFromFile_CYCIAE ( const double &  scaleFactor)
protected

◆ getFieldFromFile_FFA()

void Cyclotron::getFieldFromFile_FFA ( const double &  scaleFactor)
protected

◆ getFieldFromFile_Ring()

void Cyclotron::getFieldFromFile_Ring ( const double &  scaleFactor)
protected

◆ getFieldFromFile_Synchrocyclotron()

void Cyclotron::getFieldFromFile_Synchrocyclotron ( const double &  scaleFactor)
protected

Definition at line 1417 of file Cyclotron.cpp.

References CHECK_CYC_FSCANF_EOF, endl(), getFieldFromFile_Carbon(), Fieldmap::getFieldmap(), gmsg, Fieldmap::readMap(), rffc_m, RFFCoeff_fn_m, RFfields_m, RFfilename_m, rfvc_m, and RFVCoeff_fn_m.

Referenced by read().

Here is the call graph for this function:

◆ getFieldMapFN()

std::string Cyclotron::getFieldMapFN ( ) const
virtual

◆ getFMHighE()

double Cyclotron::getFMHighE ( ) const
virtual

◆ getFMLowE()

double Cyclotron::getFMLowE ( ) const
virtual

◆ getMaxR()

double Cyclotron::getMaxR ( ) const
virtual

Definition at line 325 of file Cyclotron.cpp.

References maxr_m.

Referenced by Vacuum::checkVacuum(), and ParallelCyclotronTracker::visitCyclotron().

◆ getMaxZ()

double Cyclotron::getMaxZ ( ) const
virtual

Definition at line 345 of file Cyclotron.cpp.

References maxz_m.

Referenced by Vacuum::checkVacuum(), and ParallelCyclotronTracker::visitCyclotron().

◆ getMinR()

double Cyclotron::getMinR ( ) const
virtual

Definition at line 321 of file Cyclotron.cpp.

References minr_m.

Referenced by Vacuum::checkVacuum(), and ParallelCyclotronTracker::visitCyclotron().

◆ getMinZ()

double Cyclotron::getMinZ ( ) const
virtual

Definition at line 335 of file Cyclotron.cpp.

References minz_m.

Referenced by Vacuum::checkVacuum(), and ParallelCyclotronTracker::visitCyclotron().

◆ getNumberOfTrimcoils()

unsigned int Cyclotron::getNumberOfTrimcoils ( ) const

Definition at line 293 of file Cyclotron.cpp.

References trimcoils_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getPHIinit()

double Cyclotron::getPHIinit ( ) const
virtual

◆ getPRinit()

double Cyclotron::getPRinit ( ) const
virtual

Definition at line 135 of file Cyclotron.cpp.

References prinit_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getPZinit()

double Cyclotron::getPZinit ( ) const
virtual

Definition at line 159 of file Cyclotron.cpp.

References pzinit_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getRfFrequ()

std::vector< double > Cyclotron::getRfFrequ ( ) const
virtual

Definition at line 226 of file Cyclotron.cpp.

References rffrequ_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getRfPhi()

std::vector< double > Cyclotron::getRfPhi ( ) const
virtual

Definition at line 213 of file Cyclotron.cpp.

References rfphi_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getRinit()

double Cyclotron::getRinit ( ) const
virtual

Definition at line 127 of file Cyclotron.cpp.

References rinit_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getRmax()

double Cyclotron::getRmax ( ) const
virtual

◆ getRmin()

double Cyclotron::getRmin ( ) const
virtual

Definition at line 301 of file Cyclotron.cpp.

References BP_m, and BPositions::rmin_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getSlices()

virtual double Cyclotron::getSlices ( ) const
pure virtual

Get number of slices.

Implemented in CyclotronRep.

◆ getSpiralFlag()

bool Cyclotron::getSpiralFlag ( ) const
virtual

Definition at line 175 of file Cyclotron.cpp.

References spiralFlag_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getStepsize()

virtual double Cyclotron::getStepsize ( ) const
pure virtual

Get stepsize.

Implemented in CyclotronRep.

◆ getSuperpose()

std::vector< bool > Cyclotron::getSuperpose ( ) const
virtual

Definition at line 239 of file Cyclotron.cpp.

References superpose_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ getSymmetry()

double Cyclotron::getSymmetry ( ) const
virtual

◆ getTrimCoilThreshold()

double Cyclotron::getTrimCoilThreshold ( ) const
virtual

Definition at line 167 of file Cyclotron.cpp.

References trimCoilThreshold_m.

◆ getType()

ElementType Cyclotron::getType ( ) const
virtual

Get element type std::string.

Reimplemented from Component.

Definition at line 264 of file Cyclotron.cpp.

References CYCLOTRON.

◆ getZinit()

double Cyclotron::getZinit ( ) const
virtual

Definition at line 151 of file Cyclotron.cpp.

References zinit_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ gutdf5d()

double Cyclotron::gutdf5d ( double *  f,
double  dx,
const int  kor,
const int  krl,
const int  lpr 
)
protected

Definition at line 578 of file Cyclotron.cpp.

References pow().

Referenced by getdiffs().

Here is the call graph for this function:

◆ idx()

int Cyclotron::idx ( int  irad,
int  ktet 
)
inlineprotected

◆ initialise() [1/2]

void Cyclotron::initialise ( PartBunchBase< double, 3 > *  bunch,
const double &  scaleFactor 
)
virtual

Definition at line 946 of file Cyclotron.cpp.

References Options::asciidump, ElementBase::getOutputFN(), lossDs_m, read(), and Component::RefPartBunch_m.

Here is the call graph for this function:

◆ initialise() [2/2]

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

Implements Component.

Definition at line 941 of file Cyclotron.cpp.

References Component::online_m, and Component::RefPartBunch_m.

Referenced by ParallelCyclotronTracker::visitCyclotron().

◆ initR()

void Cyclotron::initR ( double  rmin,
double  dr,
int  nrad 
)
protected

Definition at line 933 of file Cyclotron.cpp.

References BP_m, BPositions::delr_m, and BPositions::rarr_m.

Referenced by read().

◆ interpolate()

bool Cyclotron::interpolate ( const double &  rad,
const double &  tet_rad,
double &  br,
double &  bt,
double &  bz 
)

◆ operator=()

void Cyclotron::operator= ( const Cyclotron )
privatedelete

◆ read()

void Cyclotron::read ( const double &  scaleFactor)

◆ setBFieldType()

void Cyclotron::setBFieldType ( )

◆ setBScale()

void Cyclotron::setBScale ( double  bs)

Definition at line 272 of file Cyclotron.cpp.

References bscale_m.

Referenced by OpalCyclotron::update().

◆ setCyclHarm()

void Cyclotron::setCyclHarm ( double  h)

Definition at line 268 of file Cyclotron.cpp.

References harm_m.

Referenced by OpalCyclotron::update().

◆ setCyclotronType()

void Cyclotron::setCyclotronType ( const std::string &  type)

Definition at line 256 of file Cyclotron.cpp.

References typeName_m.

Referenced by OpalCyclotron::update().

◆ setEScale()

void Cyclotron::setEScale ( std::vector< double >  bs)

Definition at line 280 of file Cyclotron.cpp.

References escale_m.

Referenced by OpalCyclotron::update().

◆ setFieldMapFN()

void Cyclotron::setFieldMapFN ( const std::string &  fmapfn)

Definition at line 179 of file Cyclotron.cpp.

References fmapfn_m.

Referenced by OpalCyclotron::update().

◆ setFMHighE()

void Cyclotron::setFMHighE ( double  e)

Definition at line 361 of file Cyclotron.cpp.

References Physics::e, and fmHighE_m.

Referenced by OpalCyclotron::update().

◆ setFMLowE()

void Cyclotron::setFMLowE ( double  e)

Definition at line 353 of file Cyclotron.cpp.

References Physics::e, and fmLowE_m.

Referenced by OpalCyclotron::update().

◆ setMaxR()

void Cyclotron::setMaxR ( double  r)

Definition at line 315 of file Cyclotron.cpp.

References maxr_m, and Units::mm2m.

Referenced by OpalCyclotron::update().

◆ setMaxZ()

void Cyclotron::setMaxZ ( double  z)

Definition at line 339 of file Cyclotron.cpp.

References maxz_m, and Units::mm2m.

Referenced by OpalCyclotron::update().

◆ setMinR()

void Cyclotron::setMinR ( double  r)

Definition at line 309 of file Cyclotron.cpp.

References minr_m, and Units::mm2m.

Referenced by OpalCyclotron::update().

◆ setMinZ()

void Cyclotron::setMinZ ( double  z)

Definition at line 329 of file Cyclotron.cpp.

References minz_m, and Units::mm2m.

Referenced by OpalCyclotron::update().

◆ setPHIinit()

void Cyclotron::setPHIinit ( double  phiinit)

Definition at line 139 of file Cyclotron.cpp.

References phiinit_m.

Referenced by OpalCyclotron::update().

◆ setPRinit()

void Cyclotron::setPRinit ( double  prinit)

Definition at line 131 of file Cyclotron.cpp.

References prinit_m.

Referenced by Distribution::createMatchedGaussDistribution(), and OpalCyclotron::update().

◆ setPZinit()

void Cyclotron::setPZinit ( double  zinit)

Definition at line 155 of file Cyclotron.cpp.

References pzinit_m.

Referenced by OpalCyclotron::update().

◆ setRFFCoeffFN()

void Cyclotron::setRFFCoeffFN ( std::vector< std::string >  rff_coeff_fn)

Definition at line 201 of file Cyclotron.cpp.

References RFFCoeff_fn_m.

Referenced by OpalCyclotron::update().

◆ setRfFieldMapFN()

void Cyclotron::setRfFieldMapFN ( std::vector< std::string >  rffmapfn)

Definition at line 197 of file Cyclotron.cpp.

References RFfilename_m.

Referenced by OpalCyclotron::update().

◆ setRfFrequ()

void Cyclotron::setRfFrequ ( std::vector< double >  f)

Definition at line 222 of file Cyclotron.cpp.

References rffrequ_m.

Referenced by OpalCyclotron::update().

◆ setRfPhi()

void Cyclotron::setRfPhi ( std::vector< double >  f)

Definition at line 209 of file Cyclotron.cpp.

References rfphi_m.

Referenced by OpalCyclotron::update().

◆ setRFVCoeffFN()

void Cyclotron::setRFVCoeffFN ( std::vector< std::string >  rfv_coeff_fn)

Definition at line 205 of file Cyclotron.cpp.

References RFVCoeff_fn_m.

Referenced by OpalCyclotron::update().

◆ setRinit()

void Cyclotron::setRinit ( double  rinit)

Definition at line 123 of file Cyclotron.cpp.

References rinit_m.

Referenced by Distribution::createMatchedGaussDistribution(), and OpalCyclotron::update().

◆ setSpiralFlag()

void Cyclotron::setSpiralFlag ( bool  spiral_flag)

Definition at line 171 of file Cyclotron.cpp.

References spiralFlag_m.

Referenced by OpalCyclotron::update().

◆ setSuperpose()

void Cyclotron::setSuperpose ( std::vector< bool >  flag)

Definition at line 235 of file Cyclotron.cpp.

References superpose_m.

Referenced by OpalCyclotron::update().

◆ setSymmetry()

void Cyclotron::setSymmetry ( double  symmetry)

Definition at line 248 of file Cyclotron.cpp.

References symmetry_m.

Referenced by OpalCyclotron::update().

◆ setTrimCoils()

void Cyclotron::setTrimCoils ( const std::vector< TrimCoil * > &  trimcoils)

Definition at line 349 of file Cyclotron.cpp.

References trimcoils_m.

Referenced by OpalCyclotron::update().

◆ setTrimCoilThreshold()

void Cyclotron::setTrimCoilThreshold ( double  trimCoilThreshold)

Definition at line 163 of file Cyclotron.cpp.

References Units::T2kG, and trimCoilThreshold_m.

Referenced by OpalCyclotron::update().

◆ setZinit()

void Cyclotron::setZinit ( double  zinit)

Definition at line 147 of file Cyclotron.cpp.

References zinit_m.

Referenced by OpalCyclotron::update().

◆ writeOutputFieldFiles()

void Cyclotron::writeOutputFieldFiles ( )

Member Data Documentation

◆ Bfield_m

BfieldData Cyclotron::Bfield_m
protected

◆ BP_m

BPositions Cyclotron::BP_m
protected

◆ bscale_m

double Cyclotron::bscale_m
private

A scale factor for the B-field

Definition at line 270 of file Cyclotron.h.

Referenced by getBScale(), and setBScale().

◆ escale_m

std::vector<double> Cyclotron::escale_m
private

A scale factor for the E-field

Definition at line 252 of file Cyclotron.h.

Referenced by apply(), getEScale(), and setEScale().

◆ fieldType_m

BFieldType Cyclotron::fieldType_m
private

◆ fmapfn_m

std::string Cyclotron::fmapfn_m
private

◆ fmHighE_m

double Cyclotron::fmHighE_m
private

Definition at line 280 of file Cyclotron.h.

Referenced by getFMHighE(), and setFMHighE().

◆ fmLowE_m

double Cyclotron::fmLowE_m
private

Definition at line 279 of file Cyclotron.h.

Referenced by getFMLowE(), and setFMLowE().

◆ harm_m

double Cyclotron::harm_m
private

Definition at line 268 of file Cyclotron.h.

Referenced by getCyclHarm(), and setCyclHarm().

◆ lossDs_m

std::unique_ptr<LossDataSink> Cyclotron::lossDs_m
private

Handling for store the particle out of region

Definition at line 292 of file Cyclotron.h.

Referenced by apply(), finalise(), and initialise().

◆ maxr_m

double Cyclotron::maxr_m
private

Definition at line 275 of file Cyclotron.h.

Referenced by apply(), getMaxR(), and setMaxR().

◆ maxz_m

double Cyclotron::maxz_m
private

Definition at line 277 of file Cyclotron.h.

Referenced by apply(), getMaxZ(), and setMaxZ().

◆ minr_m

double Cyclotron::minr_m
private

Definition at line 274 of file Cyclotron.h.

Referenced by apply(), getMinR(), and setMinR().

◆ minz_m

double Cyclotron::minz_m
private

Definition at line 276 of file Cyclotron.h.

Referenced by getMinZ(), and setMinZ().

◆ phiinit_m

double Cyclotron::phiinit_m
private

Definition at line 259 of file Cyclotron.h.

Referenced by getPHIinit(), and setPHIinit().

◆ prinit_m

double Cyclotron::prinit_m
private

Definition at line 258 of file Cyclotron.h.

Referenced by getPRinit(), and setPRinit().

◆ pzinit_m

double Cyclotron::pzinit_m
private

Definition at line 261 of file Cyclotron.h.

Referenced by getPZinit(), and setPZinit().

◆ rffc_m

std::vector< std::vector<double> > Cyclotron::rffc_m
private

Definition at line 248 of file Cyclotron.h.

Referenced by apply(), and getFieldFromFile_Synchrocyclotron().

◆ RFFCoeff_fn_m

std::vector<std::string> Cyclotron::RFFCoeff_fn_m
private

Definition at line 289 of file Cyclotron.h.

Referenced by getFieldFromFile_Synchrocyclotron(), and setRFFCoeffFN().

◆ RFfields_m

std::vector<Fieldmap*> Cyclotron::RFfields_m
private

◆ RFfilename_m

std::vector<std::string> Cyclotron::RFfilename_m
private

◆ rffrequ_m

std::vector<double> Cyclotron::rffrequ_m
private

Definition at line 247 of file Cyclotron.h.

Referenced by apply(), getRfFrequ(), and setRfFrequ().

◆ rfphi_m

std::vector<double> Cyclotron::rfphi_m
private

Definition at line 251 of file Cyclotron.h.

Referenced by apply(), getRfPhi(), and setRfPhi().

◆ rfvc_m

std::vector< std::vector<double> > Cyclotron::rfvc_m
private

Definition at line 250 of file Cyclotron.h.

Referenced by apply(), and getFieldFromFile_Synchrocyclotron().

◆ RFVCoeff_fn_m

std::vector<std::string> Cyclotron::RFVCoeff_fn_m
private

Definition at line 290 of file Cyclotron.h.

Referenced by getFieldFromFile_Synchrocyclotron(), and setRFVCoeffFN().

◆ rfvrequ_m

std::vector<double> Cyclotron::rfvrequ_m
private

Definition at line 249 of file Cyclotron.h.

◆ rinit_m

double Cyclotron::rinit_m
private

Definition at line 257 of file Cyclotron.h.

Referenced by getRinit(), and setRinit().

◆ spiralFlag_m

bool Cyclotron::spiralFlag_m
private

Definition at line 263 of file Cyclotron.h.

Referenced by getSpiralFlag(), and setSpiralFlag().

◆ superpose_m

std::vector<bool> Cyclotron::superpose_m
private

A flag for superpose electric fields

Definition at line 253 of file Cyclotron.h.

Referenced by apply(), getSuperpose(), and setSuperpose().

◆ symmetry_m

double Cyclotron::symmetry_m
private

Definition at line 255 of file Cyclotron.h.

Referenced by getSymmetry(), interpolate(), and setSymmetry().

◆ trimcoils_m

std::vector<TrimCoil*> Cyclotron::trimcoils_m
private

Trim coils

Definition at line 272 of file Cyclotron.h.

Referenced by applyTrimCoil_m(), getNumberOfTrimcoils(), and setTrimCoils().

◆ trimCoilThreshold_m

double Cyclotron::trimCoilThreshold_m
private

B-field threshold for applying trim coil

Definition at line 264 of file Cyclotron.h.

Referenced by applyTrimCoil(), getTrimCoilThreshold(), and setTrimCoilThreshold().

◆ typeName_m

std::string Cyclotron::typeName_m
private

Name of the TYPE parameter in cyclotron

Definition at line 266 of file Cyclotron.h.

Referenced by getCyclotronType(), setBFieldType(), and setCyclotronType().

◆ waitingGap_m

int Cyclotron::waitingGap_m = 1
private

Definition at line 295 of file Cyclotron.h.

Referenced by apply().

◆ zinit_m

double Cyclotron::zinit_m
private

Definition at line 260 of file Cyclotron.h.

Referenced by getZinit(), and setZinit().


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