39 double beta0 = this->getBeta_m(gamma0);
41 return (
delta / beta0 )
45 - 1./( beta0 * beta0 * gamma0 * gamma0 ),truncOrder_m+1);
58 return (
delta / beta0 )
62 - 1./( beta0*beta0 * gamma0*gamma0 ),truncOrder_m+1
68 - 1./( beta0*beta0 * gamma0*gamma0 ),truncOrder_m
70 + k0 *
x * (1. + 0.5 * h*
x);
80 double beta0 = this->getBeta_m(gamma0);
82 return (
delta / beta0 )
86 - 1./( beta0*beta0 * gamma0*gamma0 ),(truncOrder_m+1)
92 - 1./( beta0*beta0 * gamma0*gamma0 ),truncOrder_m
94 + K0 *
x * (1. + 0.5 * h*
x);
106 if (truncOrder_m == 2){
107 return (
delta / beta0 )
111 - 1./( beta0 * beta0 * gamma0 * gamma0 ),truncOrder_m+1
114 return (
delta / beta0 )
116 - (
px*
px - 2.0*
px*ax - ax*ax)
118 - 1./( beta0 * beta0 * gamma0 * gamma0 ),truncOrder_m+1
141 double beta0 = this->getBeta_m(gamma0);
143 return (
delta / beta0 )
147 - 1./( beta0*beta0 * gamma0*gamma0 ),truncOrder_m+1
149 + 0.5 * k1 * (
x*
x -
y*
y);
156 if ( truncOrder_m > 1 ) {
168 double Hamiltonian::getBeta_m(
const double& gamma) {
169 return std::sqrt(1.0 - 1.0 / (gamma * gamma) );
Tps< T > tan(const Tps< T > &x)
Tangent.
Tps< T > sqrt(const Tps< T > &x)
Square root.
Hamiltonian::series_t sbend(const double &gamma0, const double &h, const double &k0)
Hamiltonian::series_t drift(const double &gamma0)
Hamiltonian::series_t rbend(double &beta0, double &gamma0, double &q, double &h, double &K0)
Hamiltonian::series_t quadrupole(const double &gamma0, const double &q, const double &k1)
Hamiltonian(int truncOrder)
Hamiltonian::series_t bendFringe(double &beta0, double &gamma0, double &h, double &k0, series_t &ax, series_t &az)
Hamiltonian::series_t fringeField(const double &phi, const double &k0)
static FTps makeVariable(int var)
Make variable.
static void setGlobalTruncOrder(int order)
Set the global truncation order.