%10MHz -> 400kHz-1MHz -> L1,L2,analysis
NA62 was designed to collect approximately $100$ $K^+ \rightarrow \pi^+ \nu \bar{\nu}$ events in two years of data taking. This exceptional statistics will make it possible to probe this ultra-rare $K^+$ decay channel with unprecedented precision.\\

Accounting for an acceptance of signal events between 10\% and 20\%, the experiment was planned in order to allow about $10^{13}$ $K^+$ decays in the fiducial region. With an unseparated $\sim$800~\si{\mega\hertz} hadron beam containing approximately 6\% kaons, the output event rate of the detectors will be of the order of magnitude of 10~\si{\mega\hertz}.\\
%
%This exceptional statistics will make it possible to probe ultra-rare $K^+$ decay channels with an unprecedented precision.\\

%On the other hand
However, a 10~\si{\mega\hertz} input rate is unsustainable for any reasonable-sized offline data acquisition system. A multi-level trigger system was therefore devised, with the purpose of scaling the data-saving rate down to few tens of~\si{\kilo\hertz}. The following list describes the trigger chain to be used in the NA62 experiment:
% provides a draft of a fully pipelined trigger chain that could be used in the NA62 experiment:
\begin{colbox}{F8E0E0}
\begin{itemize}
\item[\textbf{L0:}] hardware synchronous level. Data rate reduction from 10~\si{\mega\hertz} to 1~\si{\mega\hertz}, with a maximum latency of 1~\si{\milli\second}, using a few fast detectors only.
\item[\textbf{L1:}] simplified reconstruction of single detectors. Data rate reduction from 1~\si{\mega\hertz} to about 100~\si{\kilo\hertz}.
\item[\textbf{L2:}] complete information, full reconstruction. Data rate reduction from about 100~\si{\kilo\hertz} to about 15~\si{\kilo\hertz}.
\end{itemize}
\end{colbox}

\T The L0 is a fast hardware system that collects information from a few detectors and uses it to perform a fast event rejection before readout from the temporary data buffers to the online PC farm.
%synchronizes them before feeding them into the L1 farm. 
At this stage, simple assumptions may be done in order to discard a set of data clearly due to background processes, such as events with more than one charged track, or featuring signals on any chamber of the muon veto system.
%The production of the L0 trigger signal is described in \chaptername~\vref{sect:na62l0}.\\
\chaptername~\ref{sect:na62l0} describes how the L0 trigger signal is produced.\\

%The maximum latency of the level 0 trigger stage, i.e. the available time for the first ``decision making'' process, is set at 1~\si{\milli\second}. Each detector is read separately.\\
%
%In principle, the L0 latency is large enough to allow for deeper analysis. An extension to the existing L0 trigger may be devised if \\
%BLA BLA GPU BLA BLA\\
The maximum latency of the level 0 trigger, i.e. the available time for the first ``decision making'' process, was preliminarily set at 1~\si{\milli\second}, a remarkably large value compared to other High Energy Physics experiments. In principle, this latency is large enough to allow for deeper analysis on separately read detectors.\\

The RICH detector was described in \chaptername~\ref{sect:rich}. Thanks to its fast response, it will be used in the L0 trigger by providing a multiplicity count. Much more information is however available from the RICH. The features of the rings generated by charged particles crossing the RICH volume would provide the direction and the velocity of the particle as independent measurements. Evaluating this information at the online trigger stage would allow an important reduction of the event flow. However, 
since the readout system of the RICH detector consists in a matrix of photomultipliers,
information about the particle is available only after a first stage of ring identification. This identification would also need to be performed online, which requires very high-speed processing units.\\%, much more efficient than the standard FPGAs normally used.\\ 


%A fast ring recognition tool may be developed and run on any processor. However, only a multi-core
Recent years witnessed the development of a new trend in Information Technology, i.e. ``General Purpose computing on Graphics Processing Units'' (\textbf{GPGPU}). Despite being originally designed for 3D computer graphics, modern commercial GPUs are often exploited to efficiently perform scientific computations. Recently, major vendors such as Nvidia and ATI began to sell processing units and API (Application Programming Interface) libraries specially designed for this purpose.\\

In particular, today the computing power and parallel structure of GPUs seems capable to meet the timing requirements of a low level trigger for High Energy Physics experiments. The idea at the basis of this Master's thesis is to exploit the computing capability of GPUs in order to analyse the extra track information provided by the RICH detector at the L0 trigger stage.