|
OPAL (Object Oriented Parallel Accelerator Library) 2024.2
OPAL
|
#include <Cyclotron.h>


Classes | |
| struct | RFPhaseCache |
Public Types | |
| enum class | BFieldType : unsigned short { NONE , PSIBF , CARBONBF , ANSYSBF , AVFEQBF , FFABF , BANDRF , SYNCHRO } |
Public Member Functions | |
| Cyclotron (const std::string &name) | |
| Constructor with given name. | |
| Cyclotron () | |
| Cyclotron (const Cyclotron &) | |
| virtual | ~Cyclotron () |
| virtual void | accept (BeamlineVisitor &) const |
| Apply visitor to Cyclotron. | |
| virtual double | getSlices () const =0 |
| Get number of slices. | |
| virtual double | getStepsize () const =0 |
| Get stepsize. | |
| 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. | |
| 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 |
| void | setTurnNumber (int turn) |
| Turn number written into the loss records of apply(); the tracker sets it every step. | |
| 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 () |
| void | checkInitialReferenceParticle (double refR, double refTheta, double refZ) |
Public Member Functions inherited from Component | |
| Component (const std::string &name) | |
| Constructor with given name. | |
| Component () | |
| Component (const Component &right) | |
| virtual | ~Component () |
| virtual EMField & | getField ()=0 |
| Return field. | |
| virtual const EMField & | getField () const =0 |
| Return field. | |
| EVector | Efield (const Point3D &P) const |
| Return the field in a point. | |
| BVector | Bfield (const Point3D &P) const |
| Return the field in a point. | |
| EVector | Efield (const Point3D &P, double t) const |
| Return the field in a point. | |
| BVector | Bfield (const Point3D &P, double t) const |
| Return the field in a point. | |
| EBVectors | EBfield (const Point3D &P) const |
| Return the field in a point. | |
| EBVectors | EBfield (const Point3D &P, double t) const |
| Return the field in a point. | |
| 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 | goOnline (const double &kineticEnergy) |
| virtual void | goOffline () |
| virtual bool | Online () |
| virtual const ElementBase & | getDesign () const |
| Return design element. | |
| virtual void | trackBunch (PartBunchBase< double, 3 > *bunch, const PartData &, bool revBeam, bool revTrack) const |
| Track particle bunch. | |
| virtual void | trackMap (FVps< double, 6 > &map, const PartData &, bool revBeam, bool revTrack) const |
| Track a map. | |
| void | setExitFaceSlope (const double &) |
Public Member Functions inherited from ElementBase | |
| ElementBase (const std::string &name) | |
| Constructor with given name. | |
| ElementBase () | |
| ElementBase (const ElementBase &) | |
| virtual | ~ElementBase () |
| virtual const std::string & | getName () const |
| Get element name. | |
| virtual void | setName (const std::string &name) |
| Set element name. | |
| std::string | getTypeString () const |
| virtual BGeometryBase & | getGeometry ()=0 |
| Get geometry. | |
| virtual const BGeometryBase & | getGeometry () const =0 |
| Get geometry. | |
| virtual double | getArcLength () const |
| Get arc length. | |
| virtual double | getElementLength () const |
| Get design length. | |
| virtual void | setElementLength (double length) |
| Set design length. | |
| virtual void | getElementDimensions (double &begin, double &end) const |
| virtual double | getOrigin () const |
| Get origin position. | |
| virtual double | getEntrance () const |
| Get entrance position. | |
| virtual double | getExit () const |
| Get exit position. | |
| virtual Euclid3D | getTransform (double fromS, double toS) const |
| Get transform. | |
| virtual Euclid3D | getTransform (double s) const |
| Get transform. | |
| virtual Euclid3D | getTotalTransform () const |
| Get transform. | |
| virtual Euclid3D | getEntranceFrame () const |
| Get transform. | |
| virtual Euclid3D | getExitFrame () const |
| Get transform. | |
| virtual Euclid3D | getEntrancePatch () const |
| Get patch. | |
| virtual Euclid3D | getExitPatch () const |
| Get patch. | |
| virtual double | getAttribute (const std::string &aKey) const |
| Get attribute value. | |
| virtual bool | hasAttribute (const std::string &aKey) const |
| Test for existence of an attribute. | |
| virtual void | removeAttribute (const std::string &aKey) |
| Remove an existing attribute. | |
| virtual void | setAttribute (const std::string &aKey, double val) |
| Set value of an attribute. | |
| virtual Channel * | getChannel (const std::string &aKey, bool create=false) |
| Construct a read/write channel. | |
| virtual const ConstChannel * | getConstChannel (const std::string &aKey) const |
| Construct a read-only channel. | |
| virtual ElementBase * | clone () const =0 |
| Return clone. | |
| virtual ElementBase * | copyStructure () |
| Make a structural copy. | |
| bool | isSharable () const |
| Test if the element can be shared. | |
| virtual void | makeSharable () |
| Set sharable flag. | |
| bool | update (const AttributeSet &) |
| Update element. | |
| virtual void | setBoundaryGeometry (BoundaryGeometry *geo) |
| virtual BoundaryGeometry * | getBoundaryGeometry () const |
| return the attached boundary geometrt object if there is any | |
| virtual bool | hasBoundaryGeometry () const |
| virtual void | setWake (WakeFunction *wf) |
| attach a wake field to the element | |
| virtual WakeFunction * | getWake () const |
| return the attached wake object if there is any | |
| virtual bool | hasWake () const |
| virtual void | setParticleMatterInteraction (ParticleMatterInteractionHandler *spys) |
| virtual ParticleMatterInteractionHandler * | getParticleMatterInteraction () 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. | |
| double | getRotationAboutZ () const |
| virtual BoundingBox | getBoundingBoxInLabCoords () const |
| virtual int | getRequiredNumberOfTimeSteps () const |
| void | setOutputFN (std::string fn) |
| Set output filename. | |
| std::string | getOutputFN () const |
| Get output filename. | |
| void | setFlagDeleteOnTransverseExit (bool=true) |
| bool | getFlagDeleteOnTransverseExit () const |
| void | setElementPosition (double elemedge) |
| Access to ELEMEDGE attribute. | |
| double | getElementPosition () const |
| bool | isElementPositionSet () const |
Public Member Functions inherited from RCObject | |
| int | addReference () const |
| Increment reference count. | |
| int | removeReference () const |
| Decrement the reference count. | |
| bool | isShared () const |
| Test for sharing. | |
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. | |
| RCObject (const RCObject &) | |
| Copy constructor. | |
| virtual | ~RCObject ()=0 |
| RCObject & | operator= (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. | |
| void | applyTrimCoil_m (const double r, const double z, const double tet_rad, double *br, double *bz) |
| Apply trim coils (calculate field contributions) | |
| void | operator= (const Cyclotron &)=delete |
| bool | midplaneMapInterior (const Vector_t &R) const |
| void | rfPhase (std::size_t map, double t, double frequency, double phi, double &cosPhase, double &sinPhase) |
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< LossDataSink > | lossDs_m |
| int | turnNumber_m = 0 |
| int | waitingGap_m = 1 |
| bool | midplaneMapIsZero_m = false |
| std::vector< RFPhaseCache > | rfPhaseCache_m |
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 |
Definition at line 84 of file Cyclotron.h.
|
strong |
| Enumerator | |
|---|---|
| NONE | |
| PSIBF | |
| CARBONBF | |
| ANSYSBF | |
| AVFEQBF | |
| FFABF | |
| BANDRF | |
| SYNCHRO | |
Definition at line 87 of file Cyclotron.h.
|
explicit |
Constructor with given name.
Definition at line 91 of file Cyclotron.cpp.
| Cyclotron::Cyclotron | ( | ) |
Definition at line 56 of file Cyclotron.cpp.
| Cyclotron::Cyclotron | ( | const Cyclotron & | right | ) |
Definition at line 60 of file Cyclotron.cpp.
|
virtual |
Definition at line 95 of file Cyclotron.cpp.
|
virtual |
Apply visitor to Cyclotron.
Implements ElementBase.
Definition at line 163 of file Cyclotron.cpp.
References BeamlineVisitor::visitCyclotron().

|
virtual |
Definition at line 650 of file Cyclotron.cpp.
References applyTrimCoil(), and interpolate().

Reimplemented from Component.
Definition at line 462 of file Cyclotron.cpp.
References apply(), PartBunchBase< T, Dim >::Bin, PartBunchBase< T, Dim >::bunchNum, endl(), ElementBase::getName(), gmsgALL, PartBunchBase< T, Dim >::ID, level4(), lossDs_m, PartBunchBase< T, Dim >::M, maxr_m, maxz_m, minr_m, PartBunchBase< T, Dim >::P, PartBunchBase< T, Dim >::Q, PartBunchBase< T, Dim >::R, Component::RefPartBunch_m, and turnNumber_m.
Referenced by apply(), and BeamStrippingPhysics::doPhysics().

|
virtual |
Reimplemented from Component.
Definition at line 501 of file Cyclotron.cpp.
References applyTrimCoil(), BANDRF, endl(), escale_m, fieldType_m, gmsg, interpolate(), Units::m2mm, Units::MHz2Hz, midplaneMapInterior(), Physics::pi, Units::rad2deg, rffc_m, RFfields_m, rffrequ_m, rfPhase(), rfPhaseCache_m, rfphi_m, rfvc_m, superpose_m, SYNCHRO, Physics::two_pi, and waitingGap_m.

|
private |
Apply trim coils (calculate field contributions) with smooth field transition.
Definition at line 107 of file Cyclotron.cpp.
References applyTrimCoil_m(), and trimCoilThreshold_m.
Referenced by apply(), and apply().

|
private |
Apply trim coils (calculate field contributions)
Definition at line 99 of file Cyclotron.cpp.
References trimcoils_m.
Referenced by applyTrimCoil().
|
virtual |
Implements Component.
Definition at line 663 of file Cyclotron.cpp.
| void Cyclotron::checkInitialReferenceParticle | ( | double | refR, |
| double | refTheta, | ||
| double | refZ | ||
| ) |
Definition at line 445 of file Cyclotron.cpp.
References Util::angleBetweenAngles(), maxr_m, maxz_m, and Physics::pi.
Referenced by ParallelCyclotronTracker::visitCyclotron().

|
virtual |
Implements Component.
Definition at line 657 of file Cyclotron.cpp.
References endl(), ElementBase::getName(), gmsg, lossDs_m, and Component::online_m.

| Cyclotron::BFieldType Cyclotron::getBFieldType | ( | ) | const |
Definition at line 441 of file Cyclotron.cpp.
References fieldType_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 327 of file Cyclotron.cpp.
References bscale_m.
Referenced by ClosedOrbitFinder< Value_type, Size_type, Stepper >::ClosedOrbitFinder(), and ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 348 of file Cyclotron.cpp.
References harm_m.
Referenced by Distribution::createMatchedGaussDistribution(), ParallelCyclotronTracker::getHarmonicNumber(), and ParallelCyclotronTracker::visitCyclotron().
| const std::string & Cyclotron::getCyclotronType | ( | ) | const |
Definition at line 311 of file Cyclotron.cpp.
References typeName_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
protected |
Definition at line 944 of file Cyclotron.cpp.
References Bfield_m, BfieldData::bfld_m, BP_m, BfieldData::dbr_m, BfieldData::dbrr_m, BfieldData::dbrrr_m, BfieldData::dbrrt_m, BfieldData::dbrt_m, BfieldData::dbrtt_m, BfieldData::dbt_m, BfieldData::dbtt_m, BfieldData::dbttt_m, Units::deg2rad, BPositions::delr_m, BPositions::dtet_m, BfieldData::f2_m, BfieldData::f3_m, BfieldData::g3_m, gutdf5d(), idx(), BfieldData::nrad_m, BfieldData::ntet_m, BfieldData::ntetS_m, BfieldData::ntot_m, and BPositions::rarr_m.
Referenced by read().

|
virtual |
Implements Component.
Definition at line 1611 of file Cyclotron.cpp.
|
virtual |
Definition at line 335 of file Cyclotron.cpp.
References escale_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
protected |
Definition at line 1292 of file Cyclotron.cpp.
References BPositions::Bfact_m, Bfield_m, BfieldData::bfld_m, BP_m, CHECK_CYC_FSCANF_EOF, BfieldData::dbt_m, BfieldData::dbtt_m, BfieldData::dbttt_m, BPositions::delr_m, BPositions::dtet_m, endl(), fmapfn_m, IpplInfo::getNodes(), gmsg, idx(), Options::info, Units::mm2m, BfieldData::nrad_m, BfieldData::ntetS_m, BfieldData::ntot_m, BPositions::rmin_m, BPositions::tetmin_m, and writeOutputFieldFiles().
Referenced by read().

|
protected |
Definition at line 1522 of file Cyclotron.cpp.
References endl(), getFieldFromFile_Carbon(), _Fieldmap::getFieldmap(), gmsg, RFfields_m, and RFfilename_m.
Referenced by read().

|
protected |
Definition at line 1382 of file Cyclotron.cpp.
References BPositions::Bfact_m, Bfield_m, BfieldData::bfld_m, BP_m, CHECK_CYC_FSCANF_EOF, BfieldData::dbt_m, BfieldData::dbtt_m, BfieldData::dbttt_m, BPositions::delr_m, BPositions::dtet_m, endl(), fmapfn_m, IpplInfo::getNodes(), gmsg, idx(), Options::info, Units::mm2m, BfieldData::nrad_m, BfieldData::ntet_m, BfieldData::ntetS_m, BfieldData::ntot_m, BPositions::rmin_m, BPositions::tetmin_m, and writeOutputFieldFiles().
Referenced by getFieldFromFile_BandRF(), getFieldFromFile_Synchrocyclotron(), and read().

|
protected |
Definition at line 1449 of file Cyclotron.cpp.
References BPositions::Bfact_m, Bfield_m, BfieldData::bfld_m, BP_m, CHECK_CYC_FSCANF_EOF, BfieldData::dbt_m, BfieldData::dbtt_m, BfieldData::dbttt_m, BPositions::delr_m, BPositions::dtet_m, endl(), fmapfn_m, gmsg, idx(), Units::mm2m, BfieldData::nrad_m, BfieldData::ntet_m, BfieldData::ntetS_m, BfieldData::ntot_m, BPositions::rmin_m, Units::T2kG, and BPositions::tetmin_m.
Referenced by read().

|
protected |
Definition at line 1186 of file Cyclotron.cpp.
References BPositions::Bfact_m, Bfield_m, BfieldData::bfld_m, BP_m, BfieldData::dbt_m, BfieldData::dbtt_m, BfieldData::dbttt_m, BPositions::delr_m, BPositions::dtet_m, endl(), fmapfn_m, IpplInfo::getNodes(), gmsg, idx(), Options::info, Units::m2mm, BfieldData::nrad_m, BfieldData::ntet_m, BfieldData::ntetS_m, BfieldData::ntot_m, BPositions::rmin_m, Units::T2kG, BPositions::tetmin_m, and writeOutputFieldFiles().
Referenced by read().

|
protected |
Definition at line 1075 of file Cyclotron.cpp.
References BPositions::Bfact_m, Bfield_m, BfieldData::bfld_m, BP_m, CHECK_CYC_FSCANF_EOF, BfieldData::dbt_m, BfieldData::dbtt_m, BfieldData::dbttt_m, BPositions::delr_m, BPositions::dtet_m, endl(), fmapfn_m, gmsg, idx(), Units::mm2m, BfieldData::nrad_m, BfieldData::ntet_m, BfieldData::ntetS_m, BfieldData::ntot_m, BPositions::rmin_m, and BPositions::tetmin_m.
Referenced by read().

|
protected |
Definition at line 1536 of file Cyclotron.cpp.
References CHECK_CYC_FSCANF_EOF, endl(), getFieldFromFile_Carbon(), _Fieldmap::getFieldmap(), gmsg, rffc_m, RFFCoeff_fn_m, RFfields_m, RFfilename_m, rfvc_m, and RFVCoeff_fn_m.
Referenced by read().

|
virtual |
Definition at line 231 of file Cyclotron.cpp.
References fmapfn_m.
Referenced by Distribution::createMatchedGaussDistribution(), and ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 423 of file Cyclotron.cpp.
References fmHighE_m.
Referenced by ClosedOrbitFinder< Value_type, Size_type, Stepper >::ClosedOrbitFinder(), and Distribution::createMatchedGaussDistribution().
|
virtual |
Definition at line 415 of file Cyclotron.cpp.
References fmLowE_m.
Referenced by ClosedOrbitFinder< Value_type, Size_type, Stepper >::ClosedOrbitFinder(), and Distribution::createMatchedGaussDistribution().
|
virtual |
Definition at line 377 of file Cyclotron.cpp.
References maxr_m, and minr_m.
Referenced by Vacuum::checkVacuum(), and ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 398 of file Cyclotron.cpp.
References maxz_m, and minz_m.
Referenced by Vacuum::checkVacuum(), and ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 368 of file Cyclotron.cpp.
References minr_m.
Referenced by Vacuum::checkVacuum(), and ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 390 of file Cyclotron.cpp.
References minz_m.
Referenced by Vacuum::checkVacuum(), and ParallelCyclotronTracker::visitCyclotron().
| unsigned int Cyclotron::getNumberOfTrimcoils | ( | ) | const |
Definition at line 344 of file Cyclotron.cpp.
References trimcoils_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 187 of file Cyclotron.cpp.
References phiinit_m.
Referenced by Distribution::createMatchedGaussDistribution(), SigmaGenerator::match(), and ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 179 of file Cyclotron.cpp.
References prinit_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 203 of file Cyclotron.cpp.
References pzinit_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 274 of file Cyclotron.cpp.
References rffrequ_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 261 of file Cyclotron.cpp.
References rfphi_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 171 of file Cyclotron.cpp.
References rinit_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 356 of file Cyclotron.cpp.
References Bfield_m, BP_m, BPositions::delr_m, BfieldData::nrad_m, and BPositions::rmin_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 352 of file Cyclotron.cpp.
References BP_m, and BPositions::rmin_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
pure virtual |
Get number of slices.
Implemented in CyclotronRep.
|
virtual |
Definition at line 219 of file Cyclotron.cpp.
References spiralFlag_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
pure virtual |
Get stepsize.
Implemented in CyclotronRep.
|
virtual |
Definition at line 287 of file Cyclotron.cpp.
References superpose_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 300 of file Cyclotron.cpp.
References symmetry_m.
Referenced by ClosedOrbitFinder< Value_type, Size_type, Stepper >::ClosedOrbitFinder(), and ParallelCyclotronTracker::visitCyclotron().
|
virtual |
Definition at line 211 of file Cyclotron.cpp.
References trimCoilThreshold_m.
|
virtual |
Get element type std::string.
Reimplemented from Component.
Definition at line 315 of file Cyclotron.cpp.
References CYCLOTRON.
|
virtual |
Definition at line 195 of file Cyclotron.cpp.
References zinit_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
protected |
Definition at line 668 of file Cyclotron.cpp.
Referenced by getdiffs().
|
inlineprotected |
Definition at line 250 of file Cyclotron.h.
References Bfield_m, and BfieldData::ntetS_m.
Referenced by getdiffs(), getFieldFromFile_AVFEQ(), getFieldFromFile_Carbon(), getFieldFromFile_CYCIAE(), getFieldFromFile_FFA(), getFieldFromFile_Ring(), interpolate(), and writeOutputFieldFiles().
|
virtual |
Definition at line 1066 of file Cyclotron.cpp.
References Options::asciidump, ElementBase::getOutputFN(), lossDs_m, read(), and Component::RefPartBunch_m.

|
virtual |
Implements Component.
Definition at line 1061 of file Cyclotron.cpp.
References Component::online_m, and Component::RefPartBunch_m.
Referenced by ParallelCyclotronTracker::visitCyclotron().
|
protected |
Definition at line 1053 of file Cyclotron.cpp.
References BP_m, BPositions::delr_m, and BPositions::rarr_m.
Referenced by read().
| bool Cyclotron::interpolate | ( | const double & | rad, |
| const double & | tet_rad, | ||
| double & | br, | ||
| double & | bt, | ||
| double & | bz | ||
| ) |
Definition at line 780 of file Cyclotron.cpp.
References Bfield_m, BfieldData::bfld_m, BP_m, BfieldData::dbr_m, BfieldData::dbt_m, BPositions::delr_m, BPositions::dtet_m, FFABF, fieldType_m, idx(), BfieldData::ntet_m, BfieldData::ntot_m, Units::rad2deg, BPositions::rmin_m, and symmetry_m.
Referenced by apply(), and apply().

|
private |
True if the midplane map is known to give a zero field at R: R lies strictly inside its radial range, where interpolate() is guaranteed to succeed, off the axis, with a finite z.
Definition at line 150 of file Cyclotron.cpp.
References Bfield_m, BP_m, BPositions::delr_m, midplaneMapIsZero_m, BfieldData::nrad_m, BPositions::rmin_m, and trimcoils_m.
Referenced by apply().
|
privatedelete |
| void Cyclotron::read | ( | const double & | scaleFactor | ) |
Definition at line 863 of file Cyclotron.cpp.
References ANSYSBF, AVFEQBF, BANDRF, Bfield_m, BfieldData::bfld_m, BP_m, CARBONBF, BfieldData::dbr_m, BfieldData::dbt_m, BPositions::delr_m, BPositions::dtet_m, endl(), FFABF, fieldType_m, getdiffs(), getFieldFromFile_AVFEQ(), getFieldFromFile_BandRF(), getFieldFromFile_Carbon(), getFieldFromFile_CYCIAE(), getFieldFromFile_FFA(), getFieldFromFile_Ring(), getFieldFromFile_Synchrocyclotron(), gmsg, initR(), midplaneMapIsZero_m, BfieldData::nrad_m, BfieldData::ntet_m, PSIBF, RFfields_m, rfPhaseCache_m, BPositions::rmin_m, symmetry_m, SYNCHRO, trimcoils_m, and typeName_m.
Referenced by ClosedOrbitFinder< Value_type, Size_type, Stepper >::ClosedOrbitFinder(), and initialise().

|
private |
Definition at line 128 of file Cyclotron.cpp.
References Cyclotron::RFPhaseCache::cosPhase, Units::MHz2Hz, Cyclotron::RFPhaseCache::next, rfPhaseCache_m, Cyclotron::RFPhaseCache::sinPhase, Cyclotron::RFPhaseCache::size, Cyclotron::RFPhaseCache::t, and Physics::two_pi.
Referenced by apply().
| void Cyclotron::setBFieldType | ( | ) |
Definition at line 427 of file Cyclotron.cpp.
References ANSYSBF, AVFEQBF, BANDRF, CARBONBF, FFABF, fieldType_m, PSIBF, SYNCHRO, and typeName_m.
Referenced by setCyclotronType().
| void Cyclotron::setBScale | ( | double | bs | ) |
Definition at line 323 of file Cyclotron.cpp.
References bscale_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setCyclHarm | ( | double | h | ) |
Definition at line 319 of file Cyclotron.cpp.
References harm_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setCyclotronType | ( | const std::string & | type | ) |
Definition at line 304 of file Cyclotron.cpp.
References setBFieldType(), and typeName_m.
Referenced by OpalCyclotron::update().

| void Cyclotron::setEScale | ( | std::vector< double > | bs | ) |
Definition at line 331 of file Cyclotron.cpp.
References escale_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setFieldMapFN | ( | const std::string & | fmapfn | ) |
Definition at line 227 of file Cyclotron.cpp.
References fmapfn_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setFMHighE | ( | double | e | ) |
Definition at line 419 of file Cyclotron.cpp.
References fmHighE_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setFMLowE | ( | double | e | ) |
Definition at line 411 of file Cyclotron.cpp.
References fmLowE_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setMaxR | ( | double | r | ) |
Definition at line 364 of file Cyclotron.cpp.
References maxr_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setMaxZ | ( | double | z | ) |
Definition at line 394 of file Cyclotron.cpp.
References maxz_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setMinR | ( | double | r | ) |
Definition at line 360 of file Cyclotron.cpp.
References minr_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setMinZ | ( | double | z | ) |
Definition at line 386 of file Cyclotron.cpp.
References minz_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setPHIinit | ( | double | phiinit | ) |
Definition at line 183 of file Cyclotron.cpp.
References phiinit_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setPRinit | ( | double | prinit | ) |
Definition at line 175 of file Cyclotron.cpp.
References prinit_m.
Referenced by Distribution::createMatchedGaussDistribution(), and OpalCyclotron::update().
| void Cyclotron::setPZinit | ( | double | zinit | ) |
Definition at line 199 of file Cyclotron.cpp.
References pzinit_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setRFFCoeffFN | ( | std::vector< std::string > | rff_coeff_fn | ) |
Definition at line 249 of file Cyclotron.cpp.
References RFFCoeff_fn_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setRfFieldMapFN | ( | std::vector< std::string > | rffmapfn | ) |
Definition at line 245 of file Cyclotron.cpp.
References RFfilename_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setRfFrequ | ( | std::vector< double > | f | ) |
Definition at line 270 of file Cyclotron.cpp.
References rffrequ_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setRfPhi | ( | std::vector< double > | f | ) |
Definition at line 257 of file Cyclotron.cpp.
References rfphi_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setRFVCoeffFN | ( | std::vector< std::string > | rfv_coeff_fn | ) |
Definition at line 253 of file Cyclotron.cpp.
References RFVCoeff_fn_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setRinit | ( | double | rinit | ) |
Definition at line 167 of file Cyclotron.cpp.
References rinit_m.
Referenced by Distribution::createMatchedGaussDistribution(), and OpalCyclotron::update().
| void Cyclotron::setSpiralFlag | ( | bool | spiral_flag | ) |
Definition at line 215 of file Cyclotron.cpp.
References spiralFlag_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setSuperpose | ( | std::vector< bool > | flag | ) |
Definition at line 283 of file Cyclotron.cpp.
References superpose_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setSymmetry | ( | double | symmetry | ) |
Definition at line 296 of file Cyclotron.cpp.
References symmetry_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setTrimCoils | ( | const std::vector< TrimCoil * > & | trimcoils | ) |
Definition at line 407 of file Cyclotron.cpp.
References trimcoils_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setTrimCoilThreshold | ( | double | trimCoilThreshold | ) |
Definition at line 207 of file Cyclotron.cpp.
References trimCoilThreshold_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::setTurnNumber | ( | int | turn | ) |
Turn number written into the loss records of apply(); the tracker sets it every step.
Definition at line 223 of file Cyclotron.cpp.
References turnNumber_m.
Referenced by ParallelCyclotronTracker::GenericTracker(), and ParallelCyclotronTracker::MtsTracker().
| void Cyclotron::setZinit | ( | double | zinit | ) |
Definition at line 191 of file Cyclotron.cpp.
References zinit_m.
Referenced by OpalCyclotron::update().
| void Cyclotron::writeOutputFieldFiles | ( | ) |
Definition at line 1615 of file Cyclotron.cpp.
References BANDRF, Bfield_m, BfieldData::bfld_m, BP_m, CARBONBF, Util::combineFilePath(), BPositions::delr_m, BPositions::dtet_m, endl(), fieldType_m, fp1(), fp2(), OpalData::getAuxiliaryOutputDirectory(), OpalData::getInstance(), gmsg, idx(), BfieldData::nrad_m, BfieldData::ntet_m, RFfields_m, BPositions::rmin_m, SYNCHRO, and BPositions::tetmin_m.
Referenced by getFieldFromFile_AVFEQ(), getFieldFromFile_Carbon(), and getFieldFromFile_FFA().

|
protected |
Definition at line 338 of file Cyclotron.h.
Referenced by getdiffs(), getFieldFromFile_AVFEQ(), getFieldFromFile_Carbon(), getFieldFromFile_CYCIAE(), getFieldFromFile_FFA(), getFieldFromFile_Ring(), getRmax(), idx(), interpolate(), midplaneMapInterior(), read(), and writeOutputFieldFiles().
|
protected |
Definition at line 341 of file Cyclotron.h.
Referenced by getdiffs(), getFieldFromFile_AVFEQ(), getFieldFromFile_Carbon(), getFieldFromFile_CYCIAE(), getFieldFromFile_FFA(), getFieldFromFile_Ring(), getRmax(), getRmin(), initR(), interpolate(), midplaneMapInterior(), read(), and writeOutputFieldFiles().
|
private |
A scale factor for the B-field
Definition at line 280 of file Cyclotron.h.
Referenced by getBScale(), and setBScale().
|
private |
A scale factor for the E-field
Definition at line 262 of file Cyclotron.h.
Referenced by apply(), getEScale(), and setEScale().
|
private |
Definition at line 254 of file Cyclotron.h.
Referenced by apply(), getBFieldType(), interpolate(), read(), setBFieldType(), and writeOutputFieldFiles().
|
private |
Stores the filename of the B-fieldmap
Definition at line 256 of file Cyclotron.h.
Referenced by getFieldFromFile_AVFEQ(), getFieldFromFile_Carbon(), getFieldFromFile_CYCIAE(), getFieldFromFile_FFA(), getFieldFromFile_Ring(), getFieldMapFN(), and setFieldMapFN().
|
private |
Definition at line 290 of file Cyclotron.h.
Referenced by getFMHighE(), and setFMHighE().
|
private |
Definition at line 289 of file Cyclotron.h.
Referenced by getFMLowE(), and setFMLowE().
|
private |
Definition at line 278 of file Cyclotron.h.
Referenced by getCyclHarm(), and setCyclHarm().
|
private |
Handling for store the particle out of region
Definition at line 302 of file Cyclotron.h.
Referenced by apply(), finalise(), and initialise().
|
private |
Definition at line 285 of file Cyclotron.h.
Referenced by apply(), checkInitialReferenceParticle(), getMaxR(), and setMaxR().
|
private |
Definition at line 287 of file Cyclotron.h.
Referenced by apply(), checkInitialReferenceParticle(), getMaxZ(), and setMaxZ().
|
private |
BANDRF only: the midplane map is zero everywhere and there are no trim coils, so in the interior of the map it contributes nothing and only its radial extent matters (see midplaneMapInterior()).
Definition at line 312 of file Cyclotron.h.
Referenced by midplaneMapInterior(), and read().
|
private |
|
private |
Definition at line 286 of file Cyclotron.h.
|
private |
Definition at line 269 of file Cyclotron.h.
Referenced by getPHIinit(), and setPHIinit().
|
private |
Definition at line 268 of file Cyclotron.h.
Referenced by getPRinit(), and setPRinit().
|
private |
Definition at line 271 of file Cyclotron.h.
Referenced by getPZinit(), and setPZinit().
|
private |
Definition at line 258 of file Cyclotron.h.
Referenced by apply(), and getFieldFromFile_Synchrocyclotron().
|
private |
Definition at line 299 of file Cyclotron.h.
Referenced by getFieldFromFile_Synchrocyclotron(), and setRFFCoeffFN().
|
private |
Definition at line 297 of file Cyclotron.h.
Referenced by apply(), getFieldFromFile_BandRF(), getFieldFromFile_Synchrocyclotron(), read(), and writeOutputFieldFiles().
|
private |
Definition at line 298 of file Cyclotron.h.
Referenced by getFieldFromFile_BandRF(), getFieldFromFile_Synchrocyclotron(), and setRfFieldMapFN().
|
private |
Definition at line 257 of file Cyclotron.h.
Referenced by apply(), getRfFrequ(), and setRfFrequ().
|
private |
Definition at line 331 of file Cyclotron.h.
|
private |
Definition at line 261 of file Cyclotron.h.
Referenced by apply(), getRfPhi(), and setRfPhi().
|
private |
Definition at line 260 of file Cyclotron.h.
Referenced by apply(), and getFieldFromFile_Synchrocyclotron().
|
private |
Definition at line 300 of file Cyclotron.h.
Referenced by getFieldFromFile_Synchrocyclotron(), and setRFVCoeffFN().
|
private |
Definition at line 259 of file Cyclotron.h.
|
private |
Definition at line 267 of file Cyclotron.h.
Referenced by getRinit(), and setRinit().
|
private |
Definition at line 273 of file Cyclotron.h.
Referenced by getSpiralFlag(), and setSpiralFlag().
|
private |
A flag for superpose electric fields
Definition at line 263 of file Cyclotron.h.
Referenced by apply(), getSuperpose(), and setSuperpose().
|
private |
Definition at line 265 of file Cyclotron.h.
Referenced by getSymmetry(), interpolate(), read(), and setSymmetry().
|
private |
Trim coils
Definition at line 282 of file Cyclotron.h.
Referenced by applyTrimCoil_m(), getNumberOfTrimcoils(), midplaneMapInterior(), read(), and setTrimCoils().
|
private |
B-field threshold for applying trim coil
Definition at line 274 of file Cyclotron.h.
Referenced by applyTrimCoil(), getTrimCoilThreshold(), and setTrimCoilThreshold().
|
private |
Turn number for the loss records, see setTurnNumber()
Definition at line 304 of file Cyclotron.h.
Referenced by apply(), and setTurnNumber().
|
private |
Name of the TYPE parameter in cyclotron
Definition at line 276 of file Cyclotron.h.
Referenced by getCyclotronType(), read(), setBFieldType(), and setCyclotronType().
|
private |
Definition at line 307 of file Cyclotron.h.
Referenced by apply().
|
private |
Definition at line 270 of file Cyclotron.h.
Referenced by getZinit(), and setZinit().