Empirical results achieved in 1980 \cite{Atherton:133786} show that it is convenient to use a high energy proton beam in order to maximize the production of positive kaons by beam interaction on a Beryllium target.\\

The highest kaon production is achieved at $P_K /P_p \simeq 0.35$, where $P_p$ is the central proton beam momentum, and $P_K$ is the momentum of the produced kaons. In addition, the number of kaons that decay in the fiducial region reaches its maximum for $P_K /P_p \simeq 0.25$. These quantities increase with $P_K^2$ and $P_K$, respectively \cite{na62-tdr}. Furthermore, the use of high energy kaons increases the detection efficiency of most sub-detectors. Due to these considerations, it was decided to fix the central beam momentum at 75 \si{\giga\electronvolt/\textit{c}}.\\

The choice of positive kaons is determined by the following ratios of particles abundances in a beam produced with 400 \si{\giga\electronvolt/\textit{c}} protons: \cite{na62-tdr}
\begin{align}
&K^+/K^- \simeq 2.1\\
&\frac{K^+ / \pi^+}{K^- / \pi^-} \simeq 1.2
\end{align}

A fiducial momentum range for the detected pion is defined between 15 and 35 \si{\giga\electronvolt/\textit{c}}. In fact, in the RICH detector pions from $K^+$ decay are well separated from background muons only if their energy is higher than approximately 15 \si{\giga\electronvolt} (see Section~\ref{sect:rich}). Moreover, an upper limit to the energy of accepted pions is set at 35 \si{\giga\electronvolt}, so that other particles originating from $K^+$ decays must carry an energy of 40 \si{\giga\electronvolt}, and thus be comfortably detectable if they are not neutrinos. This way, the detector hermeticity with respect to the background for the studied decay channel $K^+ \rightarrow \pi^+ \nu \bar{\nu}$ is also increased.\\

\tablename~\ref{tab:beam-choice} summarizes the criteria examined in order to choose the momentum of the kaon beam.\\

\begin{table}\centering\footnotesize
\begin{tabular}{|lc|c|c|c|}
%\hline
\hline
\textbf{Beam characteristics} &  & 60 \si{\giga\electronvolt/\textit{c}} & 75 \si{\giga\electronvolt/\textit{c}} & 120 \si{\giga\electronvolt/\textit{c}}\T\B\\
\hline
\multirow{4}{*}{Fluxes at production} & p & 89 & 171 & 550\T\\
 & $K^+$ & 40 & 53 & 71\\
 & $\pi^+$ & 353 & 532 & 825\B\\
 \cline{2-5}
 & total & 482 & 756 & 1446\T\B\\
\hline
\multirow{2}{*}{Survival factor over 102 \si{\meter}} & $K^+$ & 0.797 & 0.834 & 0.893\T\\
 & $\pi^+$ & 0.970 & 0.976 & 0.985\B\\
\hline
\multirow{4}{*}{Fluxes at 102 \si{\meter} from target} & p & 89 & 173 & 550\T\\
 & $K^+$ & 32 & 45 & 63\\
 & $\pi^+$ & 343 & 525 & 813\B\\
 \cline{2-5}
 & total & 464 & 743 & 1426\T\B\\
\hline
\multirow{2}{*}{Decays in 60\si{\meter} fiducial length} & $K^+$ & 3.9 & 4.5 & 4.1\T\\
 & $\pi^+$ & 6.1 & 7.4 & 7.2\B\\
\hline
$K^+$ decays / $\pi^+$ decays in 60\si{\meter} & & 0.64 & 0.61 & 0.57\T\B\\
\hline
$K^+$ decays in 60\si{\meter} / total hadr. flux & $\cdot 10^{-3}$ & 8.4 & 6.1 & 2.9\T\B\\
\hline
$K\rightarrow\pi\nu\nu$ acceptance (R\subscript{1}, no ${P_\pi}_{max}$) &  & 0.08 & 0.11 & 0.11\T\B\\
\hline
Acc. $K\rightarrow\pi\nu\nu$ / $10^{12}$ proton \si{\second^{-1}} & $\cdot 10^6\;B.R.$ & 0.31 & 0.50 & 0.45\T\B\\
\hline
Acc. $K\rightarrow\pi\nu\nu$ / $\pi^+$ decays in \si{\meter} & $\cdot B.R.$ & 0.052 & 0.067 & 0.062\T\B\\
\hline
Acc. $K\rightarrow\pi\nu\nu$ / total hadr. flux & $\cdot 10^{-3}\;B.R.$ & 0.67 & 0.67 & 0.31\T\B\\
\hline
\end{tabular}
\caption{Criteria for the choice of the central beam momentum \cite{na62-tdr}. Fluxes and decay rates are expressed in units of $10^{6}$~\si{\second^{-1}} and normalized to $10^{12}$ incident protons per second. Fluxes are measured in a solid angle $\Delta\Omega = 42$ \si{\micro\steradian}, and allow for a momentum spread $\Delta P / P = 1\%$.}\label{tab:beam-choice}
\end{table}

Let us briefly discuss how the final kaon beam is produced. A focalised 400 \si{\giga\electronvolt/\textit{c}} proton beam extracted from the SPS is driven onto a 40 \si{\centi\meter} thick beryllium target with a diameter of 2 \si{\milli\meter}. The emerging beam passes through a 95 \si{\centi\meter} long copper collimator, which absorbs particles propagating at angles greater than 6 \si{\milli\radian} before they can decay. Three subsequent quadrupole magnets define a spatial acceptance of 3 \si{\milli\radian} along the horizontal direction ($x$) and 5.2 \si{\milli\radian} along the vertical direction ($y$) around a central beam momentum of 75 \si{\giga\electronvolt/\textit{c}} \cite{na62-tdr}. Two subsequent dipoles select the positive component of the beam. A 1.06 $X_0$ thick tungsten radiator is placed in the middle of this 4-dipole achromatic optic element, in order to reduce the positron energy at such a level that the beam optics can reject positrons up to 99.6\%. Finally, two remaining dipoles, and then three quadrupole magnets, refocus the beam onto its original direction along the $z-$axis. The whole system ensures a momentum acceptance band $| \Delta P / P | \simeq 1\%$.\\

After entering the vacuum chamber, the beam is focused again to an aperture of 4 \si{\milli\radian} by a 1.8 \si{\meter} long collimator with a diameter of 28 \si{\milli\meter}.\\

The characteristics of the final beam are shown in \tablename~\ref{tab:final-beam}.\\

\begin{table}
\centering
\begin{tabular}{lc}
\hline
\hline
Momentum & $75 \pm 0.9$ \si{\giga\electronvolt/\textit{c}}\T\B\\
\hline
Rate & 750 \si{\mega\hertz}\T\B\\
\hline
\multirow{4}{*}{Composition} & 70\% $\pi^+$\T\\
 & 23\% $p^+$\\
 & 6\% $K^+$\\
 & 1\% other\B\\
\hline
\hline
\end{tabular}
\caption{Features of the final mixed beam entering the fiducial decay region.}\label{tab:final-beam}
\end{table}

\subsection{Beam tracking}
In Section~\ref{sect:cedar} I will describe the CEDAR detector used to tag $K^+$ in the beam. The CEDAR is preceded by an adjustable collimator that ensures that the beam is sufficiently large and parallel to match the detector requirements, and by a vertical steering magnet. Two pairs of scintillator counters in coincidence monitor the divergence of the beam, and their feedback is used to tune the beam optics in order to suppress the beam divergence.\\

A system composed by the Gigatracker detector (described in Section~\ref{sect:gtk}), four achromatic C-shaped dipoles, and a horizontal steering magnet is used to track the beam kaons. The achromatic dipole system deflects the beam in the vertical direction, providing a 60~\si{\milli\meter} displacement that allows to measure the track momentum with a resolution of 0.2\%.\\

Between the second and the third dipole there is a 5~\si{\meter} long toroidal collimator, made of magnetized iron, whose aim is to defocus the muon content of the beam. The ``return fields'' in the yokes of the following dipoles supplement the defocussing action of the collimator. The overall system can intercept and deflect muons out of the spatial acceptance of the beam for momenta $P_{\mu} < 55$~\si{\giga\electronvolt/\textit{c}} \cite{na62-tdr}.\\

Just before the last station of the Gigatracker, a horizontal magnet deflects the beam by an angle $\theta_K =1.2$~\si{\milli\radian} towards the positive side of the $x$ axis. This way, the subsequent deflection of -3.6~\si{\milli\radian} towards $x<0$ that allows the STRAW spectrometer to track the decay products (see Section~\ref{sect:straw}) directs the beam back into the central hole of the LKr calorimeter (Section~\ref{sect:gammaveto}).