This research project represents the first approach to a GPU-based real-time trigger solution in High Energy Physics experiments. It started as a bare idea, supported by early tests by the NA62 collaboration \cite{gtcfelice,gianluca-tipp,Collazuol201249}, and that idea has now been implemented into a working online trigger framework prototype.\\

A fast, parallelized and seedless algorithm has been developed, capable of finding multiple rings at real-time trigger level, a challenging idea that proved to be feasible. The possibility to fit \v{C}erenkov rings online allows selective trigger conditions to be set, based on kinematical constraints: the radius and centre of the rings in fact provide a rough measurement of the particle momentum and of its direction, with an assumption on the particle type.\\

The analysis reported in \chaptername~\ref{ch:mc} demonstrates that the main background processes can be suppressed, by at least 60\%, in addition to what can be achieved by a non-selective hardware L0 trigger. Basic kinematical analysis can be performed on data coming from a single detector in order to provide early trigger decisions. If this idea is pursued, it could lead to a ``triggerless'' design of future experiments: data could be evaluated in real time in order to assess the signal and background content, with no need for a previous event selection performed in hardware.\\%with arbitrary cuts that could bias the data sample.\\

Within the scope of the NA62 experiment, a GPU-based trigger could be built, that reduces the data rate arising from $\pi^+\pi^0$ events up to 92\% for high PMT hit multiplicity events. The results reported in Section~\ref{ch:results} demonstrate that also the $\pi^+\pi^+\pi^-$ background can be suppressed down to a similar level, even with a non optimized algorithm. Additional trigger requirements may be set up in order to further reduce this rate and to increase the trigger rejection for low multiplicity events. Moreover, this approach makes it possible to set up specific triggers for lepton number and lepton flavour violating $K^+$ decay modes, as discussed in Section~\ref{whymulti}.\\

The latency of the GPU-based algorithm developed for this thesis proved to be stable, and low enough to be compatible with the requirements of a real-time trigger for high rate experiments.\\

The results reported in this thesis prove that alternative trigger designs are feasible for the NA62 experiment, and dedicated triggers to study other $K^+$ decay modes are accessible and should be further investigated.\\

The graphics cards industry has seen lively development since the first Personal Computers were released. Today, this sector is one of the most supported by the IT industry. General-Purpose computing on GPUs is a new research branch in fast expansion, that has already introduced advantages for scientific computing.\\

This work represents a starting point to introduce the use of flexible GPU-based real-time triggers in High Energy Physics.