\chapter{Global Tracking Unit}

The Global Tracking Unit (GTU) is located outside the L3 magnet in
three C-side racks below the muon system,  see
~\autoref{fig:photo-gtu-racks}.
It receives tracklet and raw data from the front-end electronics via
1\,080 optical fibers and performs event buffering as well as the
trigger calculations for the TRD trigger contributions.

\begin{figure} [bht]
\begin{center}
\includegraphics[width=0.5\textwidth]{photos/Rack-GTU}
\caption{\label{fig:photo-gtu-racks}
C-side GTU racks
}
\end{center}
\end{figure}

\section{Hardware Structure}
The GTU features three types of PCAs, which all carry the same central components but are equipped with
different optical parts and supplementary modules. 90 Track Matching Units (TMU) and 18 Supermodule 
Units (SMU) are organized in 18 segments of 5+1 units that correspond to the 18 detector supermodules. 
The segments are situated in standard cPCI crates and are interconnected by a custom-developed 
high-speed LVDS backplane and a common cPCI backplane. A top-level Trigger Unit (TGU) receives 
trigger and busy information from the individual segments via LVDS transmission lines.\\

%\begin{figure}
 % \centering
 % \includegraphics[width=\linewidth]{gtu_hierarchy}
%  \caption{Hierarchy and data transport through the GTU}
 % \label{fig:gtu-hierarchy}
%\end{figure}

Each TMU absorbs the data coming from one full stack of the TRD. Its FPGA design consists of two distinct parts:
The main tracking algorithm processes the input tracklet data and forms track information to be passed 
on to the higher level trigger stages. For event raw data, the design performs the high bandwidth 
buffering for multiple events and provides a simple interface to trigger the readout or discarding 
of stored events.\\
Source Interface Units on the SMUs implement the connection to the Data Acquisition System
where data is transmitted to in case of an event accept. Detector Control System (DCS) boards
running an embedded Linux system are also mounted on the SMUs and used to implement a configuration and 
monitoring interface for the GTU segments. A dedicated ASIC on the DCS boards 
recovers the system-wide clock and forwards data transmitted via the Timing, Trigger and Control system to 
the decoding entities.\\
The TGU calucates global trigger decisions based on track and trigger information transmitted by the SMUs.
It uses a trigger interface add-on board to communicate with the Central Trigger Processor (CTP) of the 
ALICE experiment.\\
As commercially available backplane systems do not meet the tight requirements for low-latency and
high bandwidth, a custom LVDS backplane is used for data transmission within the units of one segment.
The backplane implements both a ring and a star network topology and is operated in a parallel, source
synchronous fashion at \unit[240]{MHz} DDR. Total transmission rates of \unit[5.8]{Gbit/s} between the
TMUs and SMU of a segment are reached, while the latency for transmission of a \unit[32]{Bit} word stays 
below \unit[50]{ns}.\\
The connection between SMUs and the top-level TGU is realized via LVDS cables connected to a custom backplane
on the TGU side. Here, the system is currently configured to transmit with a total data rate of 
\unit[0.9]{Gbit/s}.

\section{Tracking and Trigger}
The Global Online Tracking, i. e. the matching of tracklets provided by the TRD FEE is performed in
the lowest level of the GTU. Each of the 90 TMUs (Track Matching Units) receive the tracklets of one stack.
After the track matching algorithm is applied, for each online track found, two 64-bit words are sent
to the middle level of the GTU. For each sector an SMU (Supermodule Unit) derives the various trigger pre-contributions (M1, J1, E1, E2, ...)
as shown in Figure~\ref{fig:smu-tgu-trigger}.

\begin{figure}
  \centering
  \includegraphics[width=0.6\linewidth]{figs/gtu/smu-tgu-trigger}
  \caption{SMU/TGU trigger scheme and TGU/CTP signal assignments}
  \label{fig:smu-tgu-trigger}
\end{figure}

The sector-level contributions are forwarded to the top-level TGU (Trigger Generation Unit), where they
are combined for all sectors and at the right time sent to the CTP. The association between GTU internal trigger
pre-contributions and final TRD L1 contributions is also shown in Figure~\ref{fig:smu-tgu-trigger}.
The current assignment of the TGU outputs is shown in Figure~\ref{fig:tgu-outputs}.

\begin{figure}
  \centering
  \includegraphics[width=0.6\linewidth]{figs/gtu/tgu.pdf}
  \caption{Extended TGU with outputs}
  \label{fig:tgu-outputs}
\end{figure}

\section{DCS}
