OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Public Types | Public Member Functions | Public Attributes | List of all members
Hamiltonian Class Reference

#include <Hamiltonian.h>

Collaboration diagram for Hamiltonian:
Collaboration graph
[legend]

Public Types

typedef FTps< double, 6 > series_t
 

Public Member Functions

 Hamiltonian (int truncOrder)
 
Hamiltonian::series_t drift (const double &gamma0)
 
Hamiltonian::series_t rbend (double &beta0, double &gamma0, double &q, double &h, double &K0)
 
Hamiltonian::series_t sbend (const double &gamma0, const double &h, const double &k0)
 
Hamiltonian::series_t bendFringe (double &beta0, double &gamma0, double &h, double &k0, series_t &ax, series_t &az)
 
Hamiltonian::series_t quadrupole (const double &gamma0, const double &q, const double &k1)
 
Hamiltonian::series_t fringeField (const double &phi, const double &k0)
 

Public Attributes

series_t x
 
series_t px
 
series_t y
 
series_t py
 
series_t z
 
series_t delta
 

Detailed Description

Definition at line 32 of file Hamiltonian.h.

Member Typedef Documentation

◆ series_t

typedef FTps<double, 6 > Hamiltonian::series_t

Definition at line 36 of file Hamiltonian.h.

Constructor & Destructor Documentation

◆ Hamiltonian()

Hamiltonian::Hamiltonian ( int  truncOrder)
explicit

Definition at line 24 of file Hamiltonian.cpp.

References delta, FTps< double, 6 >::makeVariable(), px, py, FTps< double, 6 >::setGlobalTruncOrder(), x, y, and z.

Here is the call graph for this function:

Member Function Documentation

◆ bendFringe()

Hamiltonian::series_t Hamiltonian::bendFringe ( double &  beta0,
double &  gamma0,
double &  h,
double &  k0,
series_t ax,
series_t az 
)

:TODO: WIP: Fringe Field SBend

\[H_{Dipole}= \frac{\delta}{\beta_0} - \left( 1+ hx \right) \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -(p_x - a_x)^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } + \left( 1+ hx \right) k_0 \left(x - \frac{hx^2}{2 \left( 1+ hx \right)}\right) \]

Parameters
beta0
gamma0Lorenz factor
k0normalized magnetic field ( \( k0 = \frac{B q}{P_0}\), where \(q\) is the particle charge and \(P_0\) the momentum of the reference particle)
axVector potential in x
azlongitudinal vector potential (in z)

Definition at line 98 of file Hamiltonian.cpp.

References delta, px, py, and sqrt().

Here is the call graph for this function:

◆ drift()

Hamiltonian::series_t Hamiltonian::drift ( const double &  gamma0)

Drift Space Hamiltonian

\[ H_{Drift}= \frac{\delta}{\beta_0} - \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -p_x^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } \]

Parameters
gamma0Lorenz factor

Definition at line 37 of file Hamiltonian.cpp.

References delta, px, py, and sqrt().

Referenced by ThickTracker::fillGaps_m(), and ThickTracker::visitDrift().

Here is the call graph for this function:

◆ fringeField()

Hamiltonian::series_t Hamiltonian::fringeField ( const double &  phi,
const double &  k0 
)

Hamiltonian for a linear Thin Lens fringe field approximation

\[ H_{ThinLens} = \frac{1}{2} (x^2 - y^2) k_0 \tan \left( \Psi \right) \]

Parameters
phipole face roation angle
k0normalized magnetic field ( \( k0 = \frac{B q}{P_0}\), where \(q\) is the particle charge and \(P_0\) the momentum of the reference particle)

Definition at line 153 of file Hamiltonian.cpp.

References tan(), x, and y.

Referenced by ThickTracker::visitSBend().

Here is the call graph for this function:

◆ quadrupole()

Hamiltonian::series_t Hamiltonian::quadrupole ( const double &  gamma0,
const double &  q,
const double &  k1 
)

Quadrupole Hamiltonian

\[ H_{Quadrupole}= \frac{\delta}{\beta_0} - \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -p_x^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } + \frac{1}{2} k_1 \left( x^2 - y^2 \right) \]

Parameters
gamma0Lorenz factor
qparticle charge
k1normalised field gradient ( \( k1 = \frac{B q}{P_0 r_0}\), where \(q\) is the particle charge, \(P_0\) the momentum of the reference particle and \(r_0\) the element aperture)

Definition at line 137 of file Hamiltonian.cpp.

References delta, px, py, sqrt(), x, and y.

Referenced by ThickTracker::visitMultipole().

Here is the call graph for this function:

◆ rbend()

Hamiltonian::series_t Hamiltonian::rbend ( double &  beta0,
double &  gamma0,
double &  q,
double &  h,
double &  K0 
)

:TODO: WIP:Rectangular Bend Hamiltonian

\[ H_{Dipole}= \frac{\delta}{\beta_0} - \left( 1+ hx \right) \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -p_x^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } + \left( 1+ hx \right) k_0 \left(x - \frac{hx^2}{2 \left( 1+ hx \right)}\right) \]

Definition at line 49 of file Hamiltonian.cpp.

References delta, px, py, sqrt(), and x.

Here is the call graph for this function:

◆ sbend()

Hamiltonian::series_t Hamiltonian::sbend ( const double &  gamma0,
const double &  h,
const double &  k0 
)

Sector Bend Hamiltonian

\[ H_{DipoleFringeField}= \frac{\delta}{\beta_0} - \left( 1+ hx \right) \sqrt{\left(\frac{1}{\beta_0} + \delta \right)^2 -\left( p_x - \frac{1}{2} \frac{k_0}{l} \left( s^2 - y^2 \right) \right) ^2 -p_y^2 - \frac{1}{\left(\beta_0 \gamma_0\right)^2 } } + \left( 1+ hx \right) \frac{1}{2} \frac{k_0}{l} \left( y^2 - x^2 \right) \tan \left( \Psi \right) \]

Parameters
gamma0Lorenz factor
hcurvature ( \( \frac{1}{R} \) , where \( R \) is the bend radius)
k0normalized magnetic field ( \( k0 = \frac{B q}{P_0}\), where \(q\) is the particle charge and \(P_0\) the momentum of the reference particle)

Definition at line 76 of file Hamiltonian.cpp.

References delta, px, py, sqrt(), and x.

Referenced by ThickTracker::visitSBend().

Here is the call graph for this function:

Member Data Documentation

◆ delta

series_t Hamiltonian::delta

Phase space 6th dimension

Definition at line 45 of file Hamiltonian.h.

Referenced by bendFringe(), drift(), Hamiltonian(), quadrupole(), rbend(), and sbend().

◆ px

series_t Hamiltonian::px

Phase space 2nd dimension

Definition at line 41 of file Hamiltonian.h.

Referenced by bendFringe(), drift(), Hamiltonian(), quadrupole(), rbend(), and sbend().

◆ py

series_t Hamiltonian::py

Phase space 4th dimension

Definition at line 43 of file Hamiltonian.h.

Referenced by bendFringe(), drift(), Hamiltonian(), quadrupole(), rbend(), and sbend().

◆ x

series_t Hamiltonian::x

Phase space 1st dimension

Definition at line 40 of file Hamiltonian.h.

Referenced by fringeField(), Hamiltonian(), quadrupole(), rbend(), and sbend().

◆ y

series_t Hamiltonian::y

Phase space 3rd dimension

Definition at line 42 of file Hamiltonian.h.

Referenced by fringeField(), Hamiltonian(), and quadrupole().

◆ z

series_t Hamiltonian::z

Phase space 5th dimension

Definition at line 44 of file Hamiltonian.h.

Referenced by Hamiltonian().


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