2 1e-10 1 !Number of constraints; Convergence threshold; maximum number of iterations

3 1 2 4 120.0 1. 0 !IC (type of constraint. =3 is for a constraint on a particle coordinate); Particle number; Particle coordinate (=2 for Y);Where?:at the end of element #4(i.e. DIPOLE);Wanted value(=120 cm); Weigth ; 0:no additional parameters

3 1 3 4 0.0 1. 0 !IC (type of constraint. =3 is for a constraint on a particle coordinate); Particle number; Particle coordinate (=3 for T);Where?:at the end of element #4(i.e. DIPOLE);Wanted value(=0 deg.); Weigth ; 0:no additional parameters

'END' 6

'END'

!!The FIT should converge to YS=-120.2408355 and B0=4.552771183 after 105 iteration.

morecomment=[l]{!\ }% Comment only with space after !

}

\usepackage[section]{placeins}% to be able to use \FloatBarrier

\usepackage{cleveref}%to use \cref

\usepackage{longtable}

...

...

@@ -23,7 +29,7 @@

%opening

\title{Zgoubi, would you do for me\\TRIUMF's High Resolution Spectrometer?}

\title{Zgoubi, would you do for me\\TRIUMF's High Resolution Separator?}

\author{Thomas Planche}

%\footnote{tplanche@triumf.ca}\\~\\ TRIUMF\thanks{This work has been supported by the Natural Sciences and Engineering Research Council of Canada. TRIUMF also receives federal funding via a contribution agreement through the National Research Council of Canada.}}

...

...

@@ -31,6 +37,49 @@

\maketitle

\tableofcontents

\section{Basic Layout}

The optical system we will consider in this note is designed to separate rare isotopes with mass/charge differences of only one part in 20\,000 in beams with transverse emittances of at least 3\,$\mu$m\footnote{Un-normalized emittance. Note that to achieve such resolution an energy spread of the order of 1\,eV or less is required.}~\cite{TRI-DN-16-09}.

It is composed of:

\begin{itemize}

\item an emittance defining slit;

\item followed by an 80\,cm drift;

\item followed by two identical 90\,deg.~magnetic dipoles (bending radius~=~120\,cm, edge angle~$\approx$~26.5\,deg.) separated by a 2$\times$80\,cm drift;

\item followed by an 80\,cm drift;

\item followed by a mass selection slit.

\end{itemize}

The basic parameters of this high resolution separator (HRS) were determined using the linear optics code {\tt TRANSOPTR}~\cite{optrOnGitlab}.

To achieve in practice the desired resolving power, it is essential to compensate non-linear aberrations. To this aim an electrostatic multipole corrector is added halfway between the two dipoles. The detailed design of the most critical components -- namely the dipoles and the multipole corrector -- was accomplished using a 3D finite element code ({\tt OPERA}) which provided inputs to non-linear optics codes such as {\tt COSY-INFINITY} and {\tt zgoubi}.

In this note I will go through the steps of the design work done using {\tt zgoubi}.

\section{Define your `object'}

Let's start with something simple and try to track one single particle. Let's say we want to track a 60\,keV $\rm{^{238}U}^+$ ion. At first we will track it through magnetic element only, so the knowing the magnetic rigidity $B\rho$ is sufficient. As a reminder the magnetic rigidity is given by:

\begin{equation}

B\rho=\frac{p}{q}\,,

\end{equation}

where $q$ is the charge of the particle, and $p$ its momentum given by:

\begin{equation}

p^2c^2=E^2-m^2c^4\,,

\end{equation}

where $E$ is the particle's total energy, $m$ its mass, and $c$ the speed of light. For non-relativistic particles, like our 60\,keV uranium ion, the momentum can also be obtained using:

\begin{equation}

p=\sqrt{2mqE_k}\,,

\end{equation}

where $E_k$ is the beam potential (60\,keV in our case), often also referred to as the `kinetic' energy\footnote{Note that it is a true kinetic energy only in the non-relativistic approximation. In the relativistic case the beam potential is given by $(\gamma-1)mc^2$ and cannot be seen as a kinetic energy term, whatever way you look at it~\cite{2014PHYS-1}.}.

If you look into {\tt zgoubi} user's guide~\cite{meot2012zgoubi} you will find you need to call use the keyword 'OBJECT' (or 'OBJET' if you like to talk to {\tt zgoubi} in French). There are several equivalent ways (KOBJ=1 to 6) to have the 'object' you will track be one single particle. I will use KOBJ=2:

\begin{lstlisting}

'OBJET'

544.12 !BORO: Brho of 60 keV 238U+ = 544.12 kG.cm

2 !KOBJ=2: initial coordinates must be entered explicitly

1 1 !total number of particles; number of distinct momenta