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

#include <ParallelCyclotronTracker.h>

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

Classes

struct  settings
 

Public Types

typedef std::vector< double > dvector_t
 
typedef std::vector< int > ivector_t
 
typedef std::pair< double[8], Component * > element_pair
 
typedef std::pair< ElementType, element_pairtype_pair
 
typedef std::list< type_pair * > beamline_list
 
- Public Types inherited from AbstractTracker
enum  {
  X , PX , Y , PY ,
  T , PT
}
 

Public Member Functions

 ParallelCyclotronTracker (const Beamline &bl, PartBunchBase< double, 3 > *bunch, DataSink &ds, const PartData &data, bool revBeam, bool revTrack, int maxSTEPS, Steppers::TimeIntegrator timeintegrator, const int &numBunch, const double &mbEta, const double &mbPara, const std::string &mbMode, const std::string &mbBinning)
 Constructor. More...
 
virtual ~ParallelCyclotronTracker ()
 
virtual void execute ()
 Apply the algorithm to the top-level beamline. More...
 
bool computeExternalFields_m (const Vector_t &R, const Vector_t &P, const double &t, Vector_t &Efield, Vector_t &Bfield)
 Calculate the field map at an arbitrary point. More...
 
virtual void visitBeamline (const Beamline &)
 Apply the algorithm to a beam line. More...
 
virtual void visitCCollimator (const CCollimator &)
 Apply the algorithm to a collimator. More...
 
virtual void visitCorrector (const Corrector &)
 Apply the algorithm to a closed orbit corrector. More...
 
virtual void visitCyclotron (const Cyclotron &cycl)
 Apply the algorithm to a cyclotron. More...
 
virtual void visitDegrader (const Degrader &)
 Apply the algorithm to a degrader. More...
 
virtual void visitDrift (const Drift &)
 Apply the algorithm to a drift space. More...
 
virtual void visitFlexibleCollimator (const FlexibleCollimator &)
 Apply the algorithm to a flexible collimator. More...
 
virtual void visitMarker (const Marker &)
 Apply the algorithm to a marker. More...
 
virtual void visitMonitor (const Monitor &)
 Apply the algorithm to a beam position monitor. More...
 
virtual void visitMultipole (const Multipole &)
 Apply the algorithm to a multipole. More...
 
virtual void visitMultipoleT (const MultipoleT &)
 Apply the algorithm to an arbitrary multipole. More...
 
virtual void visitMultipoleTStraight (const MultipoleTStraight &)
 Apply the algorithm to an arbitrary straight multipole. More...
 
virtual void visitMultipoleTCurvedConstRadius (const MultipoleTCurvedConstRadius &)
 Apply the algorithm to an arbitrary curved multipole of constant radius. More...
 
virtual void visitMultipoleTCurvedVarRadius (const MultipoleTCurvedVarRadius &)
 Apply the algorithm to an arbitrary curved multipole of variable radius. More...
 
virtual void visitOffset (const Offset &)
 Apply the algorithm to a offset (placement). More...
 
virtual void visitProbe (const Probe &)
 Apply the algorithm to a probe. More...
 
virtual void visitRBend (const RBend &)
 Apply the algorithm to a rectangular bend. More...
 
virtual void visitRFCavity (const RFCavity &)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitRing (const Ring &ring)
 Apply the algorithm to a ring. More...
 
virtual void visitSBend (const SBend &)
 Apply the algorithm to a sector bend. More...
 
virtual void visitSBend3D (const SBend3D &)
 Apply the algorithm to a sector bend with 3D field map. More...
 
virtual void visitScalingFFAMagnet (const ScalingFFAMagnet &bend)
 Apply the algorithm to a scaling FFA magnet. More...
 
virtual void visitSeptum (const Septum &)
 Apply the algorithm to a septum. More...
 
virtual void visitSolenoid (const Solenoid &)
 Apply the algorithm to a solenoid. More...
 
virtual void visitStripper (const Stripper &)
 Apply the algorithm to a particle stripper. More...
 
virtual void visitVacuum (const Vacuum &)
 Apply the algorithm to a vacuum space. More...
 
virtual void visitVariableRFCavity (const VariableRFCavity &cav)
 Apply the algorithm to a variabel RF cavity. More...
 
virtual void visitVariableRFCavityFringeField (const VariableRFCavityFringeField &cav)
 Apply the algorithm to a variable RF cavity with Fringe Field. More...
 
virtual void visitVerticalFFAMagnet (const VerticalFFAMagnet &bend)
 Apply the algorithm to a vertical FFA magnet. More...
 
void setLastDumpedStep (const int para)
 set last dumped step More...
 
void bgf_main_collision_test ()
 
void initializeBoundaryGeometry ()
 
void setPr (double x)
 Method for restart. More...
 
void setPt (double x)
 
void setPz (double x)
 
void setR (double x)
 
void setTheta (double x)
 
void setZ (double x)
 
void setBeGa (double x)
 
void setPhi (double x)
 
void setPsi (double x)
 
void setPreviousH5Local (bool x)
 
- Public Member Functions inherited from Tracker
 Tracker (const Beamline &, const PartData &, bool backBeam, bool backTrack)
 Constructor. More...
 
 Tracker (const Beamline &, PartBunchBase< double, 3 > *bunch, const PartData &, bool backBeam, bool backTrack)
 Constructor. More...
 
virtual ~Tracker ()
 
const PartBunchBase< double, 3 > * getBunch () const
 Return the current bunch. More...
 
void addToBunch (const OpalParticle &)
 Add particle to bunch. More...
 
virtual void visitComponent (const Component &)
 Store the bunch. More...
 
virtual void setNumBunch (short)
 set total number of tracked bunches More...
 
virtual short getNumBunch ()
 get total number of tracked bunches More...
 
- Public Member Functions inherited from AbstractTracker
 AbstractTracker (const Beamline &, const PartData &, bool backBeam, bool backTrack)
 Constructor. More...
 
virtual ~AbstractTracker ()
 
- Public Member Functions inherited from DefaultVisitor
 DefaultVisitor (const Beamline &beamline, bool backBeam, bool backTrack)
 Constructor. More...
 
virtual ~DefaultVisitor ()=0
 
virtual void execute ()
 Apply the algorithm to the top-level beamline. More...
 
virtual void visitBeamline (const Beamline &)
 Apply the algorithm to a beam line. More...
 
virtual void visitCCollimator (const CCollimator &)
 Apply the algorithm to a collimator. More...
 
virtual void visitComponent (const Component &)
 Apply the algorithm to an arbitrary component. More...
 
virtual void visitCorrector (const Corrector &)
 Apply the algorithm to a closed orbit corrector. More...
 
virtual void visitCyclotron (const Cyclotron &)
 Apply the algorithm to an cyclotron. More...
 
virtual void visitDegrader (const Degrader &)
 Apply the algorithm to a degrader. More...
 
virtual void visitDrift (const Drift &)
 Apply the algorithm to a drift space. More...
 
virtual void visitFlaggedElmPtr (const FlaggedElmPtr &)
 Apply the algorithm to a FlaggedElmPtr. More...
 
virtual void visitFlexibleCollimator (const FlexibleCollimator &)
 Apply the algorithm to a flexible collimator. More...
 
virtual void visitMarker (const Marker &)
 Apply the algorithm to a marker. More...
 
virtual void visitMonitor (const Monitor &)
 Apply the algorithm to a beam position monitor. More...
 
virtual void visitMultipole (const Multipole &)
 Apply the algorithm to a multipole. More...
 
virtual void visitMultipoleT (const MultipoleT &)
 Apply the algorithm to to an arbitrary multipole. More...
 
virtual void visitMultipoleTStraight (const MultipoleTStraight &)
 Apply the algorithm to an arbitrary straight multipole. More...
 
virtual void visitMultipoleTCurvedConstRadius (const MultipoleTCurvedConstRadius &)
 Apply the algorithm to an arbitrary curved multipole of constant radius. More...
 
virtual void visitMultipoleTCurvedVarRadius (const MultipoleTCurvedVarRadius &)
 Apply the algorithm to an arbitrary curved multipole of variable radius. More...
 
virtual void visitOffset (const Offset &)
 Apply the algorithm to an offset (placement). More...
 
virtual void visitProbe (const Probe &prob)
 Apply the algorithm to a probe. More...
 
virtual void visitRBend (const RBend &)
 Apply the algorithm to a rectangular bend. More...
 
virtual void visitRBend3D (const RBend3D &)
 Apply the algorithm to a rectangular bend. More...
 
virtual void visitRFCavity (const RFCavity &)
 Apply the algorithm to a RF cavity. More...
 
virtual void visitRing (const Ring &)
 Apply the algorithm to a ring. More...
 
virtual void visitSBend (const SBend &)
 Apply the algorithm to a sector bend. More...
 
virtual void visitSBend3D (const SBend3D &)
 Apply the algorithm to a sector bend with 3D field map. More...
 
virtual void visitScalingFFAMagnet (const ScalingFFAMagnet &)
 Apply the algorithm to a scaling FFA magnet. More...
 
virtual void visitSeptum (const Septum &)
 Apply the algorithm to a septum. More...
 
virtual void visitSolenoid (const Solenoid &)
 Apply the algorithm to a solenoid. More...
 
virtual void visitSource (const Source &)
 Apply the algorithm to a source. More...
 
virtual void visitStripper (const Stripper &)
 Apply the algorithm to a particle stripper. More...
 
virtual void visitTravelingWave (const TravelingWave &)
 Apply the algorithm to a traveling wave. More...
 
virtual void visitVacuum (const Vacuum &)
 Apply the algorithm to a vacuum space. More...
 
virtual void visitVariableRFCavity (const VariableRFCavity &vcav)
 Apply the algorithm to a a variable RF cavity. More...
 
virtual void visitVariableRFCavityFringeField (const VariableRFCavityFringeField &vcav)
 Apply the algorithm to a a variable RF cavity with Fringe Field. More...
 
virtual void visitVerticalFFAMagnet (const VerticalFFAMagnet &)
 Apply the algorithm to a vertical FFA magnet. More...
 
- Public Member Functions inherited from BeamlineVisitor
 BeamlineVisitor ()
 
virtual ~BeamlineVisitor ()
 
virtual void execute ()=0
 Execute the algorithm on the attached beam line. More...
 
virtual void visitBeamline (const Beamline &)=0
 Apply the algorithm to a beam line. More...
 
virtual void visitCCollimator (const CCollimator &)=0
 Apply the algorithm to a collimator. More...
 
virtual void visitComponent (const Component &)=0
 Apply the algorithm to an arbitrary component. More...
 
virtual void visitCorrector (const Corrector &)=0
 Apply the algorithm to a closed orbit corrector. More...
 
virtual void visitCyclotron (const Cyclotron &)=0
 Apply the algorithm to a cyclotron. More...
 
virtual void visitDegrader (const Degrader &)=0
 Apply the algorithm to a degrader. More...
 
virtual void visitDrift (const Drift &)=0
 Apply the algorithm to a drift space. More...
 
virtual void visitFlaggedElmPtr (const FlaggedElmPtr &)=0
 Apply the algorithm to a FlaggedElmPtr. More...
 
virtual void visitFlexibleCollimator (const FlexibleCollimator &)=0
 Apply the algorithm to a flexible collimator. More...
 
virtual void visitMarker (const Marker &)=0
 Apply the algorithm to a marker. More...
 
virtual void visitMonitor (const Monitor &)=0
 Apply the algorithm to a beam position monitor. More...
 
virtual void visitMultipole (const Multipole &)=0
 Apply the algorithm to a multipole. More...
 
virtual void visitMultipoleT (const MultipoleT &)=0
 Apply the algorithm to an arbitrary multipole. More...
 
virtual void visitMultipoleTStraight (const MultipoleTStraight &)=0
 Apply the algorithm to an arbitrary straight multipole. More...
 
virtual void visitMultipoleTCurvedConstRadius (const MultipoleTCurvedConstRadius &)=0
 Apply the algorithm to an arbitrary curved multipole of constant radius. More...
 
virtual void visitMultipoleTCurvedVarRadius (const MultipoleTCurvedVarRadius &)=0
 Apply the algorithm to an arbitrary curved multipole of variable radius. More...
 
virtual void visitOffset (const Offset &)=0
 Apply the algorithm to an offset (placement). More...
 
virtual void visitProbe (const Probe &)=0
 Apply the algorithm to a probe. More...
 
virtual void visitRBend (const RBend &)=0
 Apply the algorithm to a rectangular bend. More...
 
virtual void visitRBend3D (const RBend3D &)
 Apply the algorithm to a rectangular bend. More...
 
virtual void visitRFCavity (const RFCavity &)=0
 Apply the algorithm to a RF cavity. More...
 
virtual void visitRing (const Ring &)=0
 Apply the algorithm to a ring. More...
 
virtual void visitSBend (const SBend &)=0
 Apply the algorithm to a sector bend. More...
 
virtual void visitSBend3D (const SBend3D &)=0
 Apply the algorithm to a sector bend with 3D field map. More...
 
virtual void visitScalingFFAMagnet (const ScalingFFAMagnet &)=0
 Apply the algorithm to a scaling FFA magnet. More...
 
virtual void visitSeptum (const Septum &)=0
 Apply the algorithm to a septum magnet. More...
 
virtual void visitSolenoid (const Solenoid &)=0
 Apply the algorithm to a solenoid. More...
 
virtual void visitSource (const Source &)=0
 Apply the algorithm to a source. More...
 
virtual void visitStripper (const Stripper &)=0
 Apply the algorithm to a particle stripper. More...
 
virtual void visitTravelingWave (const TravelingWave &)=0
 Apply the algorithm to a traveling wave. More...
 
virtual void visitVacuum (const Vacuum &)=0
 Apply the algorithm to a vacuum space. More...
 
virtual void visitVariableRFCavity (const VariableRFCavity &)=0
 Apply the algorithm to a variable RF cavity. More...
 
virtual void visitVariableRFCavityFringeField (const VariableRFCavityFringeField &)=0
 Apply the algorithm to a variable RF cavity with Fringe Field. More...
 
virtual void visitVerticalFFAMagnet (const VerticalFFAMagnet &)=0
 Apply the algorithm to a vertical FFA magnet. More...
 

Private Types

enum class  TrackingMode : unsigned short { UNDEFINED , SINGLE , SEO , BUNCH }
 
typedef std::function< bool(const double &, const size_t &, Vector_t &, Vector_t &)> function_t
 

Private Member Functions

 ParallelCyclotronTracker ()
 
 ParallelCyclotronTracker (const ParallelCyclotronTracker &)
 
void operator= (const ParallelCyclotronTracker &)
 
void MtsTracker ()
 
void GenericTracker ()
 
bool getFieldsAtPoint (const double &t, const size_t &Pindex, Vector_t &Efield, Vector_t &Bfield)
 
void dumpAngle (const double &theta, double &prevAzimuth, double &azimuth, const short &bunchNr=0)
 
double computeRadius (const Vector_t &meanR) const
 
void computePathLengthUpdate (std::vector< double > &dl, const double &dt)
 
void openFiles (size_t numFiles, std::string fn)
 @ open / close output coordinate files More...
 
void closeFiles ()
 
void buildupFieldList (double BcParameter[], ElementType elementType, Component *elptr)
 
double calculateAngle (double x, double y)
 
double calculateAngle2 (double x, double y)
 
bool checkGapCross (Vector_t Rold, Vector_t Rnew, RFCavity *rfcavity, double &DistOld)
 
bool RFkick (RFCavity *rfcavity, const double t, const double dt, const int Pindex)
 
bool getTunes (dvector_t &t, dvector_t &r, dvector_t &z, int lastTurn, double &nur, double &nuz)
 
Vector_t calcMeanR (short bunchNr=-1) const
 
Vector_t calcMeanP () const
 
void repartition ()
 
void globalToLocal (ParticleAttrib< Vector_t > &vectorArray, double phi, Vector_t const translationToGlobal=0)
 
void localToGlobal (ParticleAttrib< Vector_t > &vectorArray, double phi, Vector_t const translationToGlobal=0)
 
void globalToLocal (ParticleAttrib< Vector_t > &vectorArray, Quaternion_t const quaternion, Vector_t const meanR=Vector_t(0.0))
 
void localToGlobal (ParticleAttrib< Vector_t > &vectorArray, Quaternion_t const quaternion, Vector_t const meanR=Vector_t(0.0))
 
void globalToLocal (ParticleAttrib< Vector_t > &particleVectors, double const phi, double const psi, Vector_t const meanR=Vector_t(0.0))
 
void localToGlobal (ParticleAttrib< Vector_t > &particleVectors, double const phi, double const psi, Vector_t const meanR=Vector_t(0.0))
 
void globalToLocal (Vector_t &myVector, double const phi, double const psi, Vector_t const meanR=Vector_t(0.0))
 
void localToGlobal (Vector_t &myVector, double const phi, double const psi, Vector_t const meanR=Vector_t(0.0))
 
void rotateWithQuaternion (ParticleAttrib< Vector_t > &vectorArray, Quaternion_t const quaternion)
 
void getQuaternionTwoVectors (Vector_t u, Vector_t v, Quaternion_t &quaternion)
 
void normalizeQuaternion (Quaternion_t &quaternion)
 
void normalizeVector (Vector_t &vector)
 
void rotateAroundZ (ParticleAttrib< Vector_t > &particleVectors, double const phi)
 
void rotateAroundX (ParticleAttrib< Vector_t > &particleVectors, double const psi)
 
void rotateAroundZ (Vector_t &myVector, double const phi)
 
void rotateAroundX (Vector_t &myVector, double const psi)
 
bool push (double h)
 
bool kick (double h)
 
void borisExternalFields (double h)
 
bool applyPluginElements (const double dt)
 
bool deleteParticle (bool=false)
 
void initTrackOrbitFile ()
 
void singleParticleDump ()
 
void bunchDumpStatData ()
 
void bunchDumpPhaseSpaceData ()
 
void evaluateSpaceChargeField ()
 
void initDistInGlobalFrame ()
 
void setTimeStep ()
 
void checkFileMomentum ()
 
void checkNumPart (std::string s)
 
double getHarmonicNumber () const
 
bool isTurnDone ()
 Check if turn done. More...
 
void update_m (double &t, const double &dt, const bool &finishedTurn)
 Update time and path length, write to output files. More...
 
std::tuple< double, double, double > initializeTracking_m ()
 
void finalizeTracking_m (dvector_t &Ttime, dvector_t &Tdeltr, dvector_t &Tdeltz, ivector_t &TturnNumber)
 
void setTrackingMode ()
 
void seoMode_m (double &t, const double dt, bool &finishedTurn, dvector_t &Ttime, dvector_t &Tdeltr, dvector_t &Tdeltz, ivector_t &TturnNumber)
 
void singleMode_m (double &t, const double dt, bool &finishedTurn, double &oldReferenceTheta)
 
void bunchMode_m (double &t, const double dt, bool &finishedTurn)
 
void gapCrossKick_m (size_t i, double t, double dt, const Vector_t &Rold, const Vector_t &Pold)
 
void dumpAzimuthAngles_m (const double &t, const Vector_t &R, const Vector_t &P, const double &oldReferenceTheta, const double &temp_meanTheta)
 
void dumpThetaEachTurn_m (const double &t, const Vector_t &R, const Vector_t &P, const double &temp_meanTheta, bool &finishedTurn)
 
void computeSpaceChargeFields_m ()
 
bool computeExternalFields_m (const size_t &i, const double &t, Vector_t &Efield, Vector_t &Bfield)
 
void injectBunch (bool &flagTransition)
 
void saveInjectValues ()
 
bool isMultiBunch () const
 
bool hasMultiBunch () const
 
void updatePathLength (const double &dt)
 
void updateTime (const double &dt)
 
void updateAzimuthAndRadius ()
 
void initPathLength ()
 

Private Attributes

beamline_list FieldDimensions
 
std::list< Component * > myElements
 
BeamlineitsBeamline
 
std::vector< PluginElement * > pluginElements_m
 
std::vector< CavityCrossDatacavCrossDatas_m
 
DataSinkitsDataSink
 
BoundaryGeometrybgf_m
 
Cyclotroncycl_m
 
int maxSteps_m
 The maximal number of steps the system is integrated. More...
 
double bega
 The reference variables. More...
 
double referenceR
 
double referenceTheta
 
double referenceZ = 0.0
 
double referencePr
 
double referencePt
 
double referencePz = 0.0
 
double referencePtot
 
double referencePsi
 
double referencePhi
 
bool spiral_flag = false
 
Vector_t PreviousMeanP
 
bool previousH5Local
 
double sinRefTheta_m
 
double cosRefTheta_m
 
std::unique_ptr< MultiBunchHandlermbHandler_m
 
int lastDumpedStep_m
 
double pathLength_m
 
long long step_m
 
long long restartStep0_m
 
int turnnumber_m
 
double azimuth_m
 
double prevAzimuth_m
 
Vector_t FDext_m [2]
 
Vector_t extE_m
 
Vector_t extB_m
 
const int myNode_m
 
const size_t initialLocalNum_m
 
const size_t initialTotalNum_m
 
std::vector< std::unique_ptr< std::ofstream > > outfTheta_m
 output coordinates at different azimuthal angles and one after every turn More...
 
std::vector< double > azimuth_angle_m
 the different azimuthal angles for the outfTheta_m output files More...
 
std::ofstream outfTrackOrbit_m
 
IpplTimings::TimerRef IntegrationTimer_m
 
IpplTimings::TimerRef DumpTimer_m
 
IpplTimings::TimerRef TransformTimer_m
 
IpplTimings::TimerRef BinRepartTimer_m
 
IpplTimings::TimerRef PluginElemTimer_m
 
IpplTimings::TimerRef DelParticleTimer_m
 
RingopalRing_m
 
std::unique_ptr< LossDataSinklossDs_m
 
std::unique_ptr< Stepper< function_t > > itsStepper_mp
 
struct ParallelCyclotronTracker::settings setup_m
 
TrackingMode mode_m
 
Steppers::TimeIntegrator stepper_m
 

Static Private Attributes

static Vector_t const xaxis = Vector_t(1.0, 0.0, 0.0)
 The positive axes unit vectors. More...
 
static Vector_t const yaxis = Vector_t(0.0, 1.0, 0.0)
 
static Vector_t const zaxis = Vector_t(0.0, 0.0, 1.0)
 

Additional Inherited Members

- Public Attributes inherited from Tracker
FieldList cavities_m
 
const BeamlineitsBeamline_m
 
- Protected Member Functions inherited from Tracker
void applyDrift (double length)
 Apply a drift length. More...
 
void applyThinMultipole (const BMultipoleField &field, double factor)
 
void applyThinSBend (const BMultipoleField &field, double scale, double h)
 
void applyTransform (const Euclid3D &, double refLength=0.0)
 Apply a geometric transformation. More...
 
FTps< double, 2 > buildMultipoleVectorPotential2D (const BMultipoleField &)
 Construct vector potential for a Multipole. More...
 
FTps< double, 6 > buildMultipoleVectorPotential (const BMultipoleField &)
 Construct vector potential for a Multipole. More...
 
FTps< double, 2 > buildSBendVectorPotential2D (const BMultipoleField &, double h)
 Construct vector potential for a SBend. More...
 
FTps< double, 6 > buildSBendVectorPotential (const BMultipoleField &, double h)
 Construct vector potential for a SBend. More...
 
- Protected Attributes inherited from Tracker
PartBunchBase< double, 3 > * itsBunch_m
 The bunch of particles to be tracked. More...
 
- Protected Attributes inherited from AbstractTracker
const PartData itsReference
 The reference information. More...
 
- Protected Attributes inherited from DefaultVisitor
const BeamlineitsLine
 
bool back_beam
 
bool back_track
 
bool back_path
 
double flip_B
 
double flip_s
 

Detailed Description

Definition at line 54 of file ParallelCyclotronTracker.h.

Member Typedef Documentation

◆ beamline_list

Definition at line 61 of file ParallelCyclotronTracker.h.

◆ dvector_t

typedef std::vector<double> ParallelCyclotronTracker::dvector_t

Definition at line 57 of file ParallelCyclotronTracker.h.

◆ element_pair

typedef std::pair<double[8], Component*> ParallelCyclotronTracker::element_pair

Definition at line 59 of file ParallelCyclotronTracker.h.

◆ function_t

typedef std::function<bool(const double&, const size_t&, Vector_t&, Vector_t&)> ParallelCyclotronTracker::function_t
private

Definition at line 458 of file ParallelCyclotronTracker.h.

◆ ivector_t

typedef std::vector<int> ParallelCyclotronTracker::ivector_t

Definition at line 58 of file ParallelCyclotronTracker.h.

◆ type_pair

Definition at line 60 of file ParallelCyclotronTracker.h.

Member Enumeration Documentation

◆ TrackingMode

enum class ParallelCyclotronTracker::TrackingMode : unsigned short
strongprivate
Enumerator
UNDEFINED 
SINGLE 
SEO 
BUNCH 

Definition at line 206 of file ParallelCyclotronTracker.h.

Constructor & Destructor Documentation

◆ ParallelCyclotronTracker() [1/3]

ParallelCyclotronTracker::ParallelCyclotronTracker ( const Beamline beamline,
PartBunchBase< double, 3 > *  bunch,
DataSink ds,
const PartData reference,
bool  revBeam,
bool  revTrack,
int  maxSTEPS,
Steppers::TimeIntegrator  timeintegrator,
const int &  numBunch,
const double &  mbEta,
const double &  mbPara,
const std::string &  mbMode,
const std::string &  mbBinning 
)

Constructor.

Constructor ParallelCyclotronTracker

Parameters
beamline
bunch
ds
reference
revBeam
revTrack
maxSTEPS
timeIntegrator

Definition at line 114 of file ParallelCyclotronTracker.cpp.

References BinRepartTimer_m, ElementBase::clone(), DelParticleTimer_m, DumpTimer_m, IpplTimings::getTimer(), IntegrationTimer_m, itsBeamline, itsDataSink, mbHandler_m, PluginElemTimer_m, setTrackingMode(), and TransformTimer_m.

Here is the call graph for this function:

◆ ~ParallelCyclotronTracker()

ParallelCyclotronTracker::~ParallelCyclotronTracker ( )
virtual

◆ ParallelCyclotronTracker() [2/3]

ParallelCyclotronTracker::ParallelCyclotronTracker ( )
private

◆ ParallelCyclotronTracker() [3/3]

ParallelCyclotronTracker::ParallelCyclotronTracker ( const ParallelCyclotronTracker )
private

Member Function Documentation

◆ applyPluginElements()

bool ParallelCyclotronTracker::applyPluginElements ( const double  dt)
private

◆ bgf_main_collision_test()

void ParallelCyclotronTracker::bgf_main_collision_test ( )

◆ borisExternalFields()

void ParallelCyclotronTracker::borisExternalFields ( double  h)
private

◆ buildupFieldList()

void ParallelCyclotronTracker::buildupFieldList ( double  BcParameter[],
ElementType  elementType,
Component elptr 
)
private
Parameters
BcParameter
ElementType
elptr

Definition at line 1112 of file ParallelCyclotronTracker.cpp.

References CYCLOTRON, FieldDimensions, and RING.

Referenced by visitCCollimator(), visitCyclotron(), visitProbe(), visitRFCavity(), visitRing(), visitSeptum(), visitStripper(), and visitVacuum().

◆ bunchDumpPhaseSpaceData()

void ParallelCyclotronTracker::bunchDumpPhaseSpaceData ( )
private

◆ bunchDumpStatData()

void ParallelCyclotronTracker::bunchDumpStatData ( )
private

◆ bunchMode_m()

void ParallelCyclotronTracker::bunchMode_m ( double &  t,
const double  dt,
bool &  finishedTurn 
)
private

◆ calcMeanP()

Vector_t ParallelCyclotronTracker::calcMeanP ( ) const
private

◆ calcMeanR()

Vector_t ParallelCyclotronTracker::calcMeanR ( short  bunchNr = -1) const
private

◆ calculateAngle()

double ParallelCyclotronTracker::calculateAngle ( double  x,
double  y 
)
inlineprivate
Parameters
x
y
Returns
angle range [0~2PI) degree

Definition at line 559 of file ParallelCyclotronTracker.h.

References atan2(), and Physics::two_pi.

Referenced by bunchDumpPhaseSpaceData(), bunchDumpStatData(), deleteParticle(), initDistInGlobalFrame(), MtsTracker(), saveInjectValues(), seoMode_m(), and updateAzimuthAndRadius().

Here is the call graph for this function:

◆ calculateAngle2()

double ParallelCyclotronTracker::calculateAngle2 ( double  x,
double  y 
)
inlineprivate
Parameters
x
y
Returns
angle range [-PI~PI) degree

Definition at line 573 of file ParallelCyclotronTracker.h.

References atan2().

Referenced by MtsTracker(), and singleMode_m().

Here is the call graph for this function:

◆ checkFileMomentum()

void ParallelCyclotronTracker::checkFileMomentum ( )
private

◆ checkGapCross()

bool ParallelCyclotronTracker::checkGapCross ( Vector_t  Rold,
Vector_t  Rnew,
RFCavity rfcavity,
double &  Dold 
)
private
Parameters
Rold
Rnew
elptr
Dold
Returns

Definition at line 1492 of file ParallelCyclotronTracker.cpp.

References RFCavity::getCosAzimuth(), RFCavity::getPerpenDistance(), RFCavity::getSinAzimuth(), Units::m2mm, and Units::mm2m.

Referenced by gapCrossKick_m().

Here is the call graph for this function:

◆ checkNumPart()

void ParallelCyclotronTracker::checkNumPart ( std::string  s)
private

Definition at line 1142 of file ParallelCyclotronTracker.cpp.

References endl(), PartBunchBase< T, Dim >::getLocalNum(), gmsg, Tracker::itsBunch_m, and reduce().

Referenced by initDistInGlobalFrame().

Here is the call graph for this function:

◆ closeFiles()

void ParallelCyclotronTracker::closeFiles ( )
private

Close all files related to special output in the Cyclotron mode.

Definition at line 308 of file ParallelCyclotronTracker.cpp.

References outfTheta_m.

Referenced by finalizeTracking_m().

◆ computeExternalFields_m() [1/2]

bool ParallelCyclotronTracker::computeExternalFields_m ( const size_t &  i,
const double &  t,
Vector_t Efield,
Vector_t Bfield 
)
private

Definition at line 3411 of file ParallelCyclotronTracker.cpp.

References FieldDimensions, Units::kG2T, Units::kV2V, and Units::mm2m.

◆ computeExternalFields_m() [2/2]

bool ParallelCyclotronTracker::computeExternalFields_m ( const Vector_t R,
const Vector_t P,
const double &  t,
Vector_t Efield,
Vector_t Bfield 
)

Calculate the field map at an arbitrary point.

Definition at line 3425 of file ParallelCyclotronTracker.cpp.

References FieldDimensions, Units::kG2T, Units::kV2V, Units::mm2m, and Attrib::Distribution::R.

Referenced by borisExternalFields(), and getFieldsAtPoint().

◆ computePathLengthUpdate()

void ParallelCyclotronTracker::computePathLengthUpdate ( std::vector< double > &  dl,
const double &  dt 
)
private

◆ computeRadius()

double ParallelCyclotronTracker::computeRadius ( const Vector_t meanR) const
private

Definition at line 233 of file ParallelCyclotronTracker.cpp.

References Units::m2mm, and sqrt().

Referenced by bunchDumpPhaseSpaceData(), saveInjectValues(), and updateAzimuthAndRadius().

Here is the call graph for this function:

◆ computeSpaceChargeFields_m()

void ParallelCyclotronTracker::computeSpaceChargeFields_m ( )
private

◆ deleteParticle()

bool ParallelCyclotronTracker::deleteParticle ( bool  flagNeedUpdate = false)
private

◆ dumpAngle()

void ParallelCyclotronTracker::dumpAngle ( const double &  theta,
double &  prevAzimuth,
double &  azimuth,
const short &  bunchNr = 0 
)
private

◆ dumpAzimuthAngles_m()

void ParallelCyclotronTracker::dumpAzimuthAngles_m ( const double &  t,
const Vector_t R,
const Vector_t P,
const double &  oldReferenceTheta,
const double &  temp_meanTheta 
)
inlineprivate

◆ dumpThetaEachTurn_m()

void ParallelCyclotronTracker::dumpThetaEachTurn_m ( const double &  t,
const Vector_t R,
const Vector_t P,
const double &  temp_meanTheta,
bool &  finishedTurn 
)
inlineprivate

Definition at line 3296 of file ParallelCyclotronTracker.cpp.

References cos(), Units::deg2rad, endl(), gmsg, isTurnDone(), outfTheta_m, Attrib::Distribution::R, sin(), sqrt(), and turnnumber_m.

Referenced by MtsTracker(), and singleMode_m().

Here is the call graph for this function:

◆ evaluateSpaceChargeField()

void ParallelCyclotronTracker::evaluateSpaceChargeField ( )
private

◆ execute()

void ParallelCyclotronTracker::execute ( )
virtual

◆ finalizeTracking_m()

void ParallelCyclotronTracker::finalizeTracking_m ( dvector_t Ttime,
dvector_t Tdeltr,
dvector_t Tdeltz,
ivector_t TturnNumber 
)
private

◆ gapCrossKick_m()

void ParallelCyclotronTracker::gapCrossKick_m ( size_t  i,
double  t,
double  dt,
const Vector_t Rold,
const Vector_t Pold 
)
private

◆ GenericTracker()

void ParallelCyclotronTracker::GenericTracker ( )
private

◆ getFieldsAtPoint()

bool ParallelCyclotronTracker::getFieldsAtPoint ( const double &  t,
const size_t &  Pindex,
Vector_t Efield,
Vector_t Bfield 
)
private

◆ getHarmonicNumber()

double ParallelCyclotronTracker::getHarmonicNumber ( ) const
private

Definition at line 1617 of file ParallelCyclotronTracker.cpp.

References FieldDimensions, Cyclotron::getCyclHarm(), Ring::getHarmonicNumber(), and opalRing_m.

Referenced by bgf_main_collision_test(), and initializeTracking_m().

Here is the call graph for this function:

◆ getQuaternionTwoVectors()

void ParallelCyclotronTracker::getQuaternionTwoVectors ( Vector_t  u,
Vector_t  v,
Quaternion_t quaternion 
)
inlineprivate

Definition at line 1903 of file ParallelCyclotronTracker.cpp.

References abs(), cos(), cross(), dot(), normalizeQuaternion(), normalizeVector(), Physics::pi, sin(), sqrt(), xaxis, and zaxis.

Referenced by bunchMode_m(), and computeSpaceChargeFields_m().

Here is the call graph for this function:

◆ getTunes()

bool ParallelCyclotronTracker::getTunes ( dvector_t t,
dvector_t r,
dvector_t z,
int  lastTurn,
double &  nur,
double &  nuz 
)
private
Parameters
t
r
z
lastTurn
nur
nuz
Returns

Definition at line 1550 of file ParallelCyclotronTracker.cpp.

References endl(), for_each(), gmsg, TUNE_class::lombAnalysis(), and AbstractTracker::T.

Referenced by finalizeTracking_m().

Here is the call graph for this function:

◆ globalToLocal() [1/4]

void ParallelCyclotronTracker::globalToLocal ( ParticleAttrib< Vector_t > &  particleVectors,
double const  phi,
double const  psi,
Vector_t const  meanR = Vector_t(0.0) 
)
inlineprivate

Definition at line 1736 of file ParallelCyclotronTracker.cpp.

References rotateAroundX(), rotateAroundZ(), IpplTimings::startTimer(), IpplTimings::stopTimer(), and TransformTimer_m.

Here is the call graph for this function:

◆ globalToLocal() [2/4]

void ParallelCyclotronTracker::globalToLocal ( ParticleAttrib< Vector_t > &  vectorArray,
double  phi,
Vector_t const  translationToGlobal = 0 
)
private

◆ globalToLocal() [3/4]

void ParallelCyclotronTracker::globalToLocal ( ParticleAttrib< Vector_t > &  vectorArray,
Quaternion_t const  quaternion,
Vector_t const  meanR = Vector_t(0.0) 
)
inlineprivate

Definition at line 1707 of file ParallelCyclotronTracker.cpp.

References rotateWithQuaternion(), IpplTimings::startTimer(), IpplTimings::stopTimer(), and TransformTimer_m.

Here is the call graph for this function:

◆ globalToLocal() [4/4]

void ParallelCyclotronTracker::globalToLocal ( Vector_t myVector,
double const  phi,
double const  psi,
Vector_t const  meanR = Vector_t(0.0) 
)
inlineprivate

Definition at line 1757 of file ParallelCyclotronTracker.cpp.

References rotateAroundX(), rotateAroundZ(), IpplTimings::startTimer(), IpplTimings::stopTimer(), and TransformTimer_m.

Here is the call graph for this function:

◆ hasMultiBunch()

bool ParallelCyclotronTracker::hasMultiBunch ( ) const
inlineprivate

Definition at line 585 of file ParallelCyclotronTracker.h.

References isMultiBunch(), and mbHandler_m.

Referenced by computeSpaceChargeFields_m().

Here is the call graph for this function:

◆ initDistInGlobalFrame()

void ParallelCyclotronTracker::initDistInGlobalFrame ( )
private

◆ initializeBoundaryGeometry()

void ParallelCyclotronTracker::initializeBoundaryGeometry ( )

◆ initializeTracking_m()

std::tuple< double, double, double > ParallelCyclotronTracker::initializeTracking_m ( )
private

◆ initPathLength()

void ParallelCyclotronTracker::initPathLength ( )
private

multi-bunch mode: set the path length of each bunch in case of restart mode

At creation of DataSink the lines are rewinded properly --> the last entry of the path length is therefore the initial path length at restart.

Precondition
In order to work properly in restart mode, the lines in the multi-bunch *.smb files need to be rewinded first.

Definition at line 3549 of file ParallelCyclotronTracker.cpp.

References isMultiBunch(), itsDataSink, mbHandler_m, and DataSink::setMultiBunchInitialPathLengh().

Referenced by initializeTracking_m().

Here is the call graph for this function:

◆ initTrackOrbitFile()

void ParallelCyclotronTracker::initTrackOrbitFile ( )
private

◆ injectBunch()

void ParallelCyclotronTracker::injectBunch ( bool &  flagTransition)
private

◆ isMultiBunch()

bool ParallelCyclotronTracker::isMultiBunch ( ) const
inlineprivate

◆ isTurnDone()

bool ParallelCyclotronTracker::isTurnDone ( )
private

◆ kick()

bool ParallelCyclotronTracker::kick ( double  h)
private

◆ localToGlobal() [1/4]

void ParallelCyclotronTracker::localToGlobal ( ParticleAttrib< Vector_t > &  particleVectors,
double const  phi,
double const  psi,
Vector_t const  meanR = Vector_t(0.0) 
)
inlineprivate

Definition at line 1778 of file ParallelCyclotronTracker.cpp.

References rotateAroundX(), rotateAroundZ(), IpplTimings::startTimer(), IpplTimings::stopTimer(), and TransformTimer_m.

Here is the call graph for this function:

◆ localToGlobal() [2/4]

void ParallelCyclotronTracker::localToGlobal ( ParticleAttrib< Vector_t > &  vectorArray,
double  phi,
Vector_t const  translationToGlobal = 0 
)
private

◆ localToGlobal() [3/4]

void ParallelCyclotronTracker::localToGlobal ( ParticleAttrib< Vector_t > &  vectorArray,
Quaternion_t const  quaternion,
Vector_t const  meanR = Vector_t(0.0) 
)
inlineprivate

Definition at line 1720 of file ParallelCyclotronTracker.cpp.

References rotateWithQuaternion(), IpplTimings::startTimer(), IpplTimings::stopTimer(), and TransformTimer_m.

Here is the call graph for this function:

◆ localToGlobal() [4/4]

void ParallelCyclotronTracker::localToGlobal ( Vector_t myVector,
double const  phi,
double const  psi,
Vector_t const  meanR = Vector_t(0.0) 
)
inlineprivate

Definition at line 1799 of file ParallelCyclotronTracker.cpp.

References rotateAroundX(), rotateAroundZ(), IpplTimings::startTimer(), IpplTimings::stopTimer(), and TransformTimer_m.

Here is the call graph for this function:

◆ MtsTracker()

void ParallelCyclotronTracker::MtsTracker ( )
private

◆ normalizeQuaternion()

void ParallelCyclotronTracker::normalizeQuaternion ( Quaternion_t quaternion)
inlineprivate

Definition at line 1834 of file ParallelCyclotronTracker.cpp.

References abs(), dot(), and sqrt().

Referenced by getQuaternionTwoVectors().

Here is the call graph for this function:

◆ normalizeVector()

void ParallelCyclotronTracker::normalizeVector ( Vector_t vector)
inlineprivate

Definition at line 1846 of file ParallelCyclotronTracker.cpp.

References abs(), dot(), and sqrt().

Referenced by getQuaternionTwoVectors().

Here is the call graph for this function:

◆ openFiles()

void ParallelCyclotronTracker::openFiles ( size_t  numFiles,
std::string  SfileName 
)
private

@ open / close output coordinate files

Parameters
fnBase file name

Definition at line 282 of file ParallelCyclotronTracker.cpp.

References endl(), and outfTheta_m.

Referenced by initializeTracking_m().

Here is the call graph for this function:

◆ operator=()

void ParallelCyclotronTracker::operator= ( const ParallelCyclotronTracker )
private

◆ push()

bool ParallelCyclotronTracker::push ( double  h)
private

◆ repartition()

void ParallelCyclotronTracker::repartition ( )
private

◆ RFkick()

bool ParallelCyclotronTracker::RFkick ( RFCavity rfcavity,
const double  t,
const double  dt,
const int  Pindex 
)
private

◆ rotateAroundX() [1/2]

void ParallelCyclotronTracker::rotateAroundX ( ParticleAttrib< Vector_t > &  particleVectors,
double const  psi 
)
inlineprivate

Definition at line 1880 of file ParallelCyclotronTracker.cpp.

References cos(), dot(), PartBunchBase< T, Dim >::getLocalNum(), Tracker::itsBunch_m, and sin().

Referenced by globalToLocal(), and localToGlobal().

Here is the call graph for this function:

◆ rotateAroundX() [2/2]

void ParallelCyclotronTracker::rotateAroundX ( Vector_t myVector,
double const  psi 
)
inlineprivate

Definition at line 1893 of file ParallelCyclotronTracker.cpp.

References cos(), dot(), and sin().

Here is the call graph for this function:

◆ rotateAroundZ() [1/2]

void ParallelCyclotronTracker::rotateAroundZ ( ParticleAttrib< Vector_t > &  particleVectors,
double const  phi 
)
inlineprivate

Definition at line 1858 of file ParallelCyclotronTracker.cpp.

References cos(), dot(), PartBunchBase< T, Dim >::getLocalNum(), Tracker::itsBunch_m, and sin().

Referenced by globalToLocal(), and localToGlobal().

Here is the call graph for this function:

◆ rotateAroundZ() [2/2]

void ParallelCyclotronTracker::rotateAroundZ ( Vector_t myVector,
double const  phi 
)
inlineprivate

Definition at line 1870 of file ParallelCyclotronTracker.cpp.

References cos(), dot(), and sin().

Here is the call graph for this function:

◆ rotateWithQuaternion()

void ParallelCyclotronTracker::rotateWithQuaternion ( ParticleAttrib< Vector_t > &  vectorArray,
Quaternion_t const  quaternion 
)
inlineprivate

Definition at line 1820 of file ParallelCyclotronTracker.cpp.

References cross(), dot(), PartBunchBase< T, Dim >::getLocalNum(), and Tracker::itsBunch_m.

Referenced by globalToLocal(), and localToGlobal().

Here is the call graph for this function:

◆ saveInjectValues()

void ParallelCyclotronTracker::saveInjectValues ( )
private

◆ seoMode_m()

void ParallelCyclotronTracker::seoMode_m ( double &  t,
const double  dt,
bool &  finishedTurn,
dvector_t Ttime,
dvector_t Tdeltr,
dvector_t Tdeltz,
ivector_t TturnNumber 
)
private

◆ setBeGa()

void ParallelCyclotronTracker::setBeGa ( double  x)
inline

Definition at line 197 of file ParallelCyclotronTracker.h.

References bega.

Referenced by TrackRun::setupCyclotronTracker().

◆ setLastDumpedStep()

void ParallelCyclotronTracker::setLastDumpedStep ( const int  para)
inline

set last dumped step

Definition at line 188 of file ParallelCyclotronTracker.h.

References lastDumpedStep_m.

Referenced by TrackRun::setupCyclotronTracker().

◆ setPhi()

void ParallelCyclotronTracker::setPhi ( double  x)
inline

Definition at line 198 of file ParallelCyclotronTracker.h.

References referencePhi.

Referenced by TrackRun::setupCyclotronTracker().

◆ setPr()

void ParallelCyclotronTracker::setPr ( double  x)
inline

Method for restart.

Definition at line 191 of file ParallelCyclotronTracker.h.

References referencePr.

Referenced by TrackRun::setupCyclotronTracker().

◆ setPreviousH5Local()

void ParallelCyclotronTracker::setPreviousH5Local ( bool  x)
inline

Definition at line 200 of file ParallelCyclotronTracker.h.

References previousH5Local.

Referenced by TrackRun::setupCyclotronTracker().

◆ setPsi()

void ParallelCyclotronTracker::setPsi ( double  x)
inline

Definition at line 199 of file ParallelCyclotronTracker.h.

References referencePsi.

Referenced by TrackRun::setupCyclotronTracker().

◆ setPt()

void ParallelCyclotronTracker::setPt ( double  x)
inline

Definition at line 192 of file ParallelCyclotronTracker.h.

References referencePt.

Referenced by TrackRun::setupCyclotronTracker().

◆ setPz()

void ParallelCyclotronTracker::setPz ( double  x)
inline

Definition at line 193 of file ParallelCyclotronTracker.h.

References referencePz.

Referenced by TrackRun::setupCyclotronTracker().

◆ setR()

void ParallelCyclotronTracker::setR ( double  x)
inline

Definition at line 194 of file ParallelCyclotronTracker.h.

References referenceR.

Referenced by TrackRun::setupCyclotronTracker().

◆ setTheta()

void ParallelCyclotronTracker::setTheta ( double  x)
inline

Definition at line 195 of file ParallelCyclotronTracker.h.

References referenceTheta.

Referenced by TrackRun::setupCyclotronTracker().

◆ setTimeStep()

void ParallelCyclotronTracker::setTimeStep ( )
private

Definition at line 2383 of file ParallelCyclotronTracker.cpp.

References PartBunchBase< T, Dim >::dt, PartBunchBase< T, Dim >::getdT(), initialLocalNum_m, and Tracker::itsBunch_m.

Referenced by initDistInGlobalFrame().

Here is the call graph for this function:

◆ setTrackingMode()

void ParallelCyclotronTracker::setTrackingMode ( )
private

Definition at line 3005 of file ParallelCyclotronTracker.cpp.

References BUNCH, initialTotalNum_m, mode_m, SEO, SINGLE, and UNDEFINED.

Referenced by ParallelCyclotronTracker().

◆ setZ()

void ParallelCyclotronTracker::setZ ( double  x)
inline

Definition at line 196 of file ParallelCyclotronTracker.h.

References referenceZ.

Referenced by TrackRun::setupCyclotronTracker().

◆ singleMode_m()

void ParallelCyclotronTracker::singleMode_m ( double &  t,
const double  dt,
bool &  finishedTurn,
double &  oldReferenceTheta 
)
private

◆ singleParticleDump()

void ParallelCyclotronTracker::singleParticleDump ( )
private

◆ update_m()

void ParallelCyclotronTracker::update_m ( double &  t,
const double &  dt,
const bool &  finishedTurn 
)
private

◆ updateAzimuthAndRadius()

void ParallelCyclotronTracker::updateAzimuthAndRadius ( )
private

◆ updatePathLength()

void ParallelCyclotronTracker::updatePathLength ( const double &  dt)
private

Definition at line 3500 of file ParallelCyclotronTracker.cpp.

References computePathLengthUpdate(), isMultiBunch(), Tracker::itsBunch_m, mbHandler_m, pathLength_m, and PartBunchBase< T, Dim >::set_sPos().

Referenced by update_m().

Here is the call graph for this function:

◆ updateTime()

void ParallelCyclotronTracker::updateTime ( const double &  dt)
private

Definition at line 3521 of file ParallelCyclotronTracker.cpp.

References PartBunchBase< T, Dim >::getT(), isMultiBunch(), Tracker::itsBunch_m, mbHandler_m, Units::ns2s, and PartBunchBase< T, Dim >::setT().

Referenced by update_m().

Here is the call graph for this function:

◆ visitBeamline()

void ParallelCyclotronTracker::visitBeamline ( const Beamline bl)
virtual

Apply the algorithm to a beam line.

Parameters
bl

Reimplemented from DefaultVisitor.

Definition at line 1137 of file ParallelCyclotronTracker.cpp.

References TBeamline< T >::iterate().

Here is the call graph for this function:

◆ visitCCollimator()

void ParallelCyclotronTracker::visitCCollimator ( const CCollimator coll)
virtual

◆ visitCorrector()

void ParallelCyclotronTracker::visitCorrector ( const Corrector corr)
virtual

Apply the algorithm to a closed orbit corrector.

Parameters
corr

Reimplemented from DefaultVisitor.

Definition at line 538 of file ParallelCyclotronTracker.cpp.

References ElementBase::clone(), endl(), ElementBase::getElementLength(), gmsg, and myElements.

Here is the call graph for this function:

◆ visitCyclotron()

void ParallelCyclotronTracker::visitCyclotron ( const Cyclotron cycl)
virtual

◆ visitDegrader()

void ParallelCyclotronTracker::visitDegrader ( const Degrader deg)
virtual

Apply the algorithm to a degrader.

Parameters
degrader

Reimplemented from DefaultVisitor.

Definition at line 548 of file ParallelCyclotronTracker.cpp.

References matheval::detail::math::deg(), endl(), gmsg, and myElements.

Here is the call graph for this function:

◆ visitDrift()

void ParallelCyclotronTracker::visitDrift ( const Drift drift)
virtual

Apply the algorithm to a drift space.

Parameters
drift

Reimplemented from DefaultVisitor.

Definition at line 559 of file ParallelCyclotronTracker.cpp.

References ElementBase::clone(), endl(), ElementBase::getElementLength(), gmsg, and myElements.

Here is the call graph for this function:

◆ visitFlexibleCollimator()

void ParallelCyclotronTracker::visitFlexibleCollimator ( const FlexibleCollimator )
virtual

Apply the algorithm to a flexible collimator.

Parameters

Reimplemented from DefaultVisitor.

Definition at line 569 of file ParallelCyclotronTracker.cpp.

◆ visitMarker()

void ParallelCyclotronTracker::visitMarker ( const Marker marker)
virtual

Apply the algorithm to a marker.

Parameters
marker

Reimplemented from DefaultVisitor.

Definition at line 594 of file ParallelCyclotronTracker.cpp.

References ElementBase::clone(), and myElements.

Here is the call graph for this function:

◆ visitMonitor()

void ParallelCyclotronTracker::visitMonitor ( const Monitor corr)
virtual

Apply the algorithm to a beam position monitor.

Parameters
corr

Reimplemented from DefaultVisitor.

Definition at line 605 of file ParallelCyclotronTracker.cpp.

References ElementBase::clone(), and myElements.

Here is the call graph for this function:

◆ visitMultipole()

void ParallelCyclotronTracker::visitMultipole ( const Multipole mult)
virtual

Apply the algorithm to a multipole.

Parameters
mult

Reimplemented from DefaultVisitor.

Definition at line 616 of file ParallelCyclotronTracker.cpp.

References ElementBase::clone(), endl(), ElementBase::getElementLength(), gmsg, and myElements.

Here is the call graph for this function:

◆ visitMultipoleT()

void ParallelCyclotronTracker::visitMultipoleT ( const MultipoleT multT)
virtual

Apply the algorithm to an arbitrary multipole.

Parameters
multT

Reimplemented from DefaultVisitor.

Definition at line 626 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), MultipoleT::clone(), endl(), gmsg, myElements, and opalRing_m.

Here is the call graph for this function:

◆ visitMultipoleTCurvedConstRadius()

void ParallelCyclotronTracker::visitMultipoleTCurvedConstRadius ( const MultipoleTCurvedConstRadius multTccurv)
virtual

Apply the algorithm to an arbitrary curved multipole of constant radius.

Parameters
multTccurv

Reimplemented from DefaultVisitor.

Definition at line 658 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), MultipoleTCurvedConstRadius::clone(), endl(), gmsg, myElements, and opalRing_m.

Here is the call graph for this function:

◆ visitMultipoleTCurvedVarRadius()

void ParallelCyclotronTracker::visitMultipoleTCurvedVarRadius ( const MultipoleTCurvedVarRadius multTvcurv)
virtual

Apply the algorithm to an arbitrary curved multipole of variable radius.

Parameters
multTvcurv

Reimplemented from DefaultVisitor.

Definition at line 674 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), MultipoleTCurvedVarRadius::clone(), endl(), gmsg, myElements, and opalRing_m.

Here is the call graph for this function:

◆ visitMultipoleTStraight()

void ParallelCyclotronTracker::visitMultipoleTStraight ( const MultipoleTStraight multTstraight)
virtual

Apply the algorithm to an arbitrary straight multipole.

Parameters
multTstraight

Reimplemented from DefaultVisitor.

Definition at line 642 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), MultipoleTStraight::clone(), endl(), gmsg, myElements, and opalRing_m.

Here is the call graph for this function:

◆ visitOffset()

void ParallelCyclotronTracker::visitOffset ( const Offset off)
virtual

Apply the algorithm to a offset (placement).

Parameters
off

Reimplemented from DefaultVisitor.

Definition at line 578 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), Ring::getNextNormal(), Ring::getNextPosition(), opalRing_m, and Offset::updateGeometry().

Here is the call graph for this function:

◆ visitProbe()

void ParallelCyclotronTracker::visitProbe ( const Probe prob)
virtual

◆ visitRBend()

void ParallelCyclotronTracker::visitRBend ( const RBend bend)
virtual

Apply the algorithm to a rectangular bend.

Parameters
bend

Reimplemented from DefaultVisitor.

Definition at line 729 of file ParallelCyclotronTracker.cpp.

References ElementBase::clone(), endl(), ElementBase::getElementLength(), gmsg, and myElements.

Here is the call graph for this function:

◆ visitRFCavity()

void ParallelCyclotronTracker::visitRFCavity ( const RFCavity as)
virtual

◆ visitRing()

void ParallelCyclotronTracker::visitRing ( const Ring ring)
virtual

◆ visitSBend()

void ParallelCyclotronTracker::visitSBend ( const SBend bend)
virtual

Apply the algorithm to a sector bend.

Parameters
bend

Reimplemented from DefaultVisitor.

Definition at line 885 of file ParallelCyclotronTracker.cpp.

References ElementBase::clone(), endl(), ElementBase::getElementLength(), gmsg, and myElements.

Here is the call graph for this function:

◆ visitSBend3D()

void ParallelCyclotronTracker::visitSBend3D ( const SBend3D bend)
virtual

Apply the algorithm to a sector bend with 3D field map.

Reimplemented from DefaultVisitor.

Definition at line 890 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), endl(), gmsg, and opalRing_m.

Here is the call graph for this function:

◆ visitScalingFFAMagnet()

void ParallelCyclotronTracker::visitScalingFFAMagnet ( const ScalingFFAMagnet bend)
virtual

Apply the algorithm to a scaling FFA magnet.

Reimplemented from DefaultVisitor.

Definition at line 899 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), ScalingFFAMagnet::clone(), endl(), gmsg, opalRing_m, and ScalingFFAMagnet::setupEndField().

Here is the call graph for this function:

◆ visitSeptum()

void ParallelCyclotronTracker::visitSeptum ( const Septum sept)
virtual

◆ visitSolenoid()

void ParallelCyclotronTracker::visitSolenoid ( const Solenoid solenoid)
virtual

Apply the algorithm to a solenoid.

Parameters
solenoid

Reimplemented from DefaultVisitor.

Definition at line 958 of file ParallelCyclotronTracker.cpp.

References ElementBase::clone(), endl(), gmsg, ElementBase::hasAttribute(), and myElements.

Here is the call graph for this function:

◆ visitStripper()

void ParallelCyclotronTracker::visitStripper ( const Stripper stripper)
virtual

◆ visitVacuum()

void ParallelCyclotronTracker::visitVacuum ( const Vacuum vac)
virtual

Apply the algorithm to a vacuum space.

Parameters
vac

Reimplemented from DefaultVisitor.

Definition at line 1023 of file ParallelCyclotronTracker.cpp.

References buildupFieldList(), ElementBase::clone(), endl(), Vacuum::getPressure(), Vacuum::getPressureMapFN(), Vacuum::getPScale(), Vacuum::getResidualGasName(), Vacuum::getStop(), Vacuum::getTemperature(), gmsg, Vacuum::initialise(), Tracker::itsBunch_m, myElements, and VACUUM.

Here is the call graph for this function:

◆ visitVariableRFCavity()

void ParallelCyclotronTracker::visitVariableRFCavity ( const VariableRFCavity cav)
virtual

Apply the algorithm to a variabel RF cavity.

Parameters
cav

Reimplemented from DefaultVisitor.

Definition at line 1066 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), endl(), gmsg, and opalRing_m.

Here is the call graph for this function:

◆ visitVariableRFCavityFringeField()

void ParallelCyclotronTracker::visitVariableRFCavityFringeField ( const VariableRFCavityFringeField cav)
virtual

Apply the algorithm to a variable RF cavity with Fringe Field.

Parameters
cav

Reimplemented from DefaultVisitor.

Definition at line 1080 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), endl(), gmsg, and opalRing_m.

Here is the call graph for this function:

◆ visitVerticalFFAMagnet()

void ParallelCyclotronTracker::visitVerticalFFAMagnet ( const VerticalFFAMagnet mag)
virtual

Apply the algorithm to a vertical FFA magnet.

Parameters
mag

Reimplemented from DefaultVisitor.

Definition at line 1095 of file ParallelCyclotronTracker.cpp.

References Ring::appendElement(), endl(), gmsg, and opalRing_m.

Here is the call graph for this function:

Member Data Documentation

◆ azimuth_angle_m

std::vector<double> ParallelCyclotronTracker::azimuth_angle_m
private

the different azimuthal angles for the outfTheta_m output files

Definition at line 312 of file ParallelCyclotronTracker.h.

Referenced by dumpAzimuthAngles_m(), and initializeTracking_m().

◆ azimuth_m

double ParallelCyclotronTracker::azimuth_m
private

Definition at line 284 of file ParallelCyclotronTracker.h.

Referenced by bunchDumpStatData(), execute(), and saveInjectValues().

◆ bega

double ParallelCyclotronTracker::bega
private

The reference variables.

Definition at line 239 of file ParallelCyclotronTracker.h.

Referenced by setBeGa(), and visitCyclotron().

◆ bgf_m

BoundaryGeometry* ParallelCyclotronTracker::bgf_m
private

◆ BinRepartTimer_m

IpplTimings::TimerRef ParallelCyclotronTracker::BinRepartTimer_m
private

Definition at line 335 of file ParallelCyclotronTracker.h.

Referenced by ParallelCyclotronTracker(), and repartition().

◆ cavCrossDatas_m

std::vector<CavityCrossData> ParallelCyclotronTracker::cavCrossDatas_m
private

Definition at line 222 of file ParallelCyclotronTracker.h.

Referenced by execute(), and push().

◆ cosRefTheta_m

double ParallelCyclotronTracker::cosRefTheta_m
private

Definition at line 259 of file ParallelCyclotronTracker.h.

Referenced by initDistInGlobalFrame(), visitCyclotron(), and visitRing().

◆ cycl_m

Cyclotron* ParallelCyclotronTracker::cycl_m
private

Definition at line 228 of file ParallelCyclotronTracker.h.

Referenced by applyPluginElements(), and visitCyclotron().

◆ DelParticleTimer_m

IpplTimings::TimerRef ParallelCyclotronTracker::DelParticleTimer_m
private

Definition at line 337 of file ParallelCyclotronTracker.h.

Referenced by deleteParticle(), and ParallelCyclotronTracker().

◆ DumpTimer_m

IpplTimings::TimerRef ParallelCyclotronTracker::DumpTimer_m
private

◆ extB_m

Vector_t ParallelCyclotronTracker::extB_m
private

Definition at line 303 of file ParallelCyclotronTracker.h.

Referenced by bunchDumpPhaseSpaceData(), bunchDumpStatData(), and execute().

◆ extE_m

Vector_t ParallelCyclotronTracker::extE_m
private

Definition at line 303 of file ParallelCyclotronTracker.h.

Referenced by bunchDumpPhaseSpaceData(), bunchDumpStatData(), and execute().

◆ FDext_m

Vector_t ParallelCyclotronTracker::FDext_m[2]
private

Definition at line 303 of file ParallelCyclotronTracker.h.

Referenced by bunchDumpPhaseSpaceData(), bunchDumpStatData(), and execute().

◆ FieldDimensions

beamline_list ParallelCyclotronTracker::FieldDimensions
private

◆ initialLocalNum_m

const size_t ParallelCyclotronTracker::initialLocalNum_m
private

◆ initialTotalNum_m

const size_t ParallelCyclotronTracker::initialTotalNum_m
private

◆ IntegrationTimer_m

IpplTimings::TimerRef ParallelCyclotronTracker::IntegrationTimer_m
private

◆ itsBeamline

Beamline* ParallelCyclotronTracker::itsBeamline
private

◆ itsDataSink

DataSink* ParallelCyclotronTracker::itsDataSink
private

◆ itsStepper_mp

std::unique_ptr< Stepper<function_t> > ParallelCyclotronTracker::itsStepper_mp
private

◆ lastDumpedStep_m

int ParallelCyclotronTracker::lastDumpedStep_m
private

◆ lossDs_m

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

◆ maxSteps_m

int ParallelCyclotronTracker::maxSteps_m
private

The maximal number of steps the system is integrated.

Definition at line 231 of file ParallelCyclotronTracker.h.

Referenced by GenericTracker(), and MtsTracker().

◆ mbHandler_m

std::unique_ptr<MultiBunchHandler> ParallelCyclotronTracker::mbHandler_m
private

◆ mode_m

TrackingMode ParallelCyclotronTracker::mode_m
private

◆ myElements

std::list<Component*> ParallelCyclotronTracker::myElements
private

◆ myNode_m

const int ParallelCyclotronTracker::myNode_m
private

◆ opalRing_m

Ring* ParallelCyclotronTracker::opalRing_m
private

◆ outfTheta_m

std::vector<std::unique_ptr<std::ofstream> > ParallelCyclotronTracker::outfTheta_m
private

output coordinates at different azimuthal angles and one after every turn

Definition at line 310 of file ParallelCyclotronTracker.h.

Referenced by closeFiles(), dumpAzimuthAngles_m(), dumpThetaEachTurn_m(), and openFiles().

◆ outfTrackOrbit_m

std::ofstream ParallelCyclotronTracker::outfTrackOrbit_m
private

output file for six dimensional phase space

Definition at line 318 of file ParallelCyclotronTracker.h.

Referenced by finalizeTracking_m(), initTrackOrbitFile(), seoMode_m(), singleMode_m(), and singleParticleDump().

◆ pathLength_m

double ParallelCyclotronTracker::pathLength_m
private

Definition at line 267 of file ParallelCyclotronTracker.h.

Referenced by initDistInGlobalFrame(), and updatePathLength().

◆ pluginElements_m

std::vector<PluginElement*> ParallelCyclotronTracker::pluginElements_m
private

Definition at line 221 of file ParallelCyclotronTracker.h.

Referenced by applyPluginElements(), execute(), and update_m().

◆ PluginElemTimer_m

IpplTimings::TimerRef ParallelCyclotronTracker::PluginElemTimer_m
private

Definition at line 336 of file ParallelCyclotronTracker.h.

Referenced by applyPluginElements(), and ParallelCyclotronTracker().

◆ prevAzimuth_m

double ParallelCyclotronTracker::prevAzimuth_m
private

Definition at line 285 of file ParallelCyclotronTracker.h.

Referenced by bunchDumpStatData(), execute(), and saveInjectValues().

◆ previousH5Local

bool ParallelCyclotronTracker::previousH5Local
private

Definition at line 256 of file ParallelCyclotronTracker.h.

Referenced by setPreviousH5Local(), and visitCyclotron().

◆ PreviousMeanP

Vector_t ParallelCyclotronTracker::PreviousMeanP
private

Definition at line 254 of file ParallelCyclotronTracker.h.

Referenced by bunchMode_m(), and computeSpaceChargeFields_m().

◆ referencePhi

double ParallelCyclotronTracker::referencePhi
private

Definition at line 250 of file ParallelCyclotronTracker.h.

Referenced by initDistInGlobalFrame(), setPhi(), and visitCyclotron().

◆ referencePr

double ParallelCyclotronTracker::referencePr
private

◆ referencePsi

double ParallelCyclotronTracker::referencePsi
private

Definition at line 249 of file ParallelCyclotronTracker.h.

Referenced by initDistInGlobalFrame(), setPsi(), and visitCyclotron().

◆ referencePt

double ParallelCyclotronTracker::referencePt
private

◆ referencePtot

double ParallelCyclotronTracker::referencePtot
private

◆ referencePz

double ParallelCyclotronTracker::referencePz = 0.0
private

◆ referenceR

double ParallelCyclotronTracker::referenceR
private

◆ referenceTheta

double ParallelCyclotronTracker::referenceTheta
private

◆ referenceZ

double ParallelCyclotronTracker::referenceZ = 0.0
private

◆ restartStep0_m

long long ParallelCyclotronTracker::restartStep0_m
private

Definition at line 279 of file ParallelCyclotronTracker.h.

Referenced by execute(), and initializeTracking_m().

◆ setup_m

struct ParallelCyclotronTracker::settings ParallelCyclotronTracker::setup_m
private

◆ sinRefTheta_m

double ParallelCyclotronTracker::sinRefTheta_m
private

Definition at line 258 of file ParallelCyclotronTracker.h.

Referenced by initDistInGlobalFrame(), visitCyclotron(), and visitRing().

◆ spiral_flag

bool ParallelCyclotronTracker::spiral_flag = false
private

◆ step_m

long long ParallelCyclotronTracker::step_m
private

◆ stepper_m

Steppers::TimeIntegrator ParallelCyclotronTracker::stepper_m
private

Definition at line 471 of file ParallelCyclotronTracker.h.

Referenced by execute().

◆ TransformTimer_m

IpplTimings::TimerRef ParallelCyclotronTracker::TransformTimer_m
private

◆ turnnumber_m

int ParallelCyclotronTracker::turnnumber_m
private

◆ xaxis

Vector_t const ParallelCyclotronTracker::xaxis = Vector_t(1.0, 0.0, 0.0)
staticprivate

The positive axes unit vectors.

Definition at line 234 of file ParallelCyclotronTracker.h.

Referenced by getQuaternionTwoVectors().

◆ yaxis

Vector_t const ParallelCyclotronTracker::yaxis = Vector_t(0.0, 1.0, 0.0)
staticprivate

Definition at line 235 of file ParallelCyclotronTracker.h.

Referenced by computeSpaceChargeFields_m().

◆ zaxis

Vector_t const ParallelCyclotronTracker::zaxis = Vector_t(0.0, 0.0, 1.0)
staticprivate

Definition at line 236 of file ParallelCyclotronTracker.h.

Referenced by getQuaternionTwoVectors().


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