\chapter{The LHCb Experiment at the LHC}
\label{ch:lhcb}

This chapter aims at introducing the \lhcbexperiment{} at the Large Hadron Collider (LHC).
The LHC is the largest circular particle accelerator and collider in the world and is located near Geneva, Switzerland.
With a circumference of about \qty{27}{\km}, it is placed in a tunnel between \qty{45}{\m} and \qty{170}{\m} below the surface and is operated by the European Organization for Nuclear Research (CERN) as part of a larger accelerator complex~\autocite{lhc}.

The LHC is designed to collide two proton beams at centre-of-mass energies up to $\qty{14}{TeV}$.
The high-energy beams are guided around the accelerator ring by superconducting magnets, which are cooled below \qty{2}{\kelvin} using superfluid helium.
The beams consist of bunches spaced \qty{25}{\ns} apart, each containing about $10^{11}$ protons.
They travel in opposite directions in two separate beam pipes and are brought to collision at four different points along the ring, resulting in a maximum bunch crossing rate of \qty{40}{\mega\hertz} and an instantaneous luminosity of up to ${10^{34}\,\unit{\per\square\centi\meter\per\second}}$.
However, several gaps are foreseen in the filling scheme to allow for reliable dumping of the beams, reducing the average collision rate to about \qty{30}{\mega\hertz}~\autocite{lhc}.

The four major experiments ATLAS, CMS, ALICE and LHCb are placed around the interaction points to study the collisions.
ATLAS~\autocite{atlas} and CMS~\autocite{cms} are the largest of the four and are designed as multi-purpose detectors covering a broad physics spectrum.
By making use of the high luminosity provided by the LHC, the data collected at ATLAS and CMS led to the discovery of a new particle in 2012~\autocite{atlas-higgs,cms-higgs}, whose properties were later found to be in agreement with the Higgs boson in the Standard Model~\autocite{higgs-theory,higgs-properties}.
ALICE is a general-purpose detector focusing on the physics of strongly interacting matter and the quark-gluon plasma~\autocite{alice}.
To allow for this, the LHC is designed to be able to also accelerate and collide heavy (Pb) ions at centre-of-mass energies up to \qty{1.15}{PeV}~\autocite{lhc}.
While ALICE is specialised in studying these collisions, the other experiments make use of the data collected during heavy ion runs as well.

This also includes the \lhcbexperiment{} that is dedicated to study rare decays of hadrons containing $b$ and $c$ quarks as well as performing precision measurements of \textit{CP} violation~\autocite{lhcb}.
The experiment is located in a cavern \qty{100}{\meter} below the surface at the border between France and Switzerland near the airport of Geneva.


\subsubsection{Detector Design}
The LHCb detector is designed as a single-arm forward spectrometer covering an angle between \qty{10}{mrad} and \qty{300}{mrad} (\qty{250}{mrad}) in the bending (non-bending) plane of the dipole magnet~\autocite{lhcb}.
This corresponds to a pseudorapidity\footnote{The pseudorapidity $\eta$ is related to the angle to the beam pipe $\theta$ via the equation \mbox{$\eta = - \text{ln}[\text{tan}(\theta/2)]$}.} range $2 < \eta < 5$ and accounts for about \qty{4}{\percent} of the solid angle.
As illustrated in \vref{fig:lhcb}, a right-handed coordinate system is adopted at LHCb, whose $z$-axis runs horizontally in the direction of the beam pipe.
The other horizontal axis ($x$) is the direction in which charged particles are mainly bent when passing through the magnetic field.

\begin{figure}
  \centering
  \includegraphics[width=0.9\textwidth]{figures/lhcb/LHCb}
  \caption{
    Schematic side view of the upgraded LHCb detector.
    The proton-proton collisions take place inside the Vertex Locator on the left.
    Image taken from Ref.~\autocite{scifi-tdr}.
  }
  \label{fig:lhcb}
\end{figure}

Unlike the three general-purpose detectors at the LHC (ATLAS, CMS and ALICE), which are built in a cylindrical shape around the interaction point in order to achieve a large geometric coverage, the special design of the LHCb detector was chosen specifically for its field of application:
As shown in the simulations in \vref{fig:bbangles}, the $b\overline{b}$ quark pairs that are of particular interest at LHCb are predominantly produced at small opening angles to the beam axis, which is reflected in the geometry of the detector.

\begin{figure}
  \captionsetup[subfigure]{aboveskip=1pt, belowskip=12pt} %Tune space between captions and subfigures
  \begin{subfigure}{0.49\linewidth}
    \centering
    \includegraphics[width=1.0\textwidth]{figures/lhcb/BBangles}
  \end{subfigure}
  \hfill
  \begin{subfigure}{0.49\linewidth}
    \centering
    \includegraphics[width=1.0\textwidth]{figures/lhcb/BBangles_vs_GPD}
  \end{subfigure}
  \caption{
    Simulated $b\overline{b}$ production angles at centre-of-mass energies $\sqrt{s} = \qty{14}{TeV}$ as a function of the angles $\theta_{1,2}$ (left) and pseudorapidities $\eta_{1,2}$ (right).
    The LHCb acceptance is highlighted in red and is compared with typical values for a general-purpose detector in case of the pseudorapidities.
    Images modified from Ref.~\autocite{bbangles}.
  }
  \label{fig:bbangles}
\end{figure}

Between 2019 and 2022, the detector has undergone a major upgrade in order to boost the future data collection rates and thus significantly reduce the statistical uncertainties of the measurements.
In the following, the upgraded \lhcbexperiment{} as well as the scope of the upgrade are presented.


\section{Detector Upgrade}
During the first years of operation between 2010 and 2018, the (initial) LHCb detector recorded data corresponding to an integrated luminosity of about \qty{9}{\per\femto\barn}.
Towards the end of this period, the detector was operating at a centre-of-mass energy $\sqrt{s} = \qty{13}{TeV}$ and an instantaneous luminosity ${\luminosity = \qty{4e32}{\per\square\centi\meter\per\second}}$~\autocite{luminosity}.
It should be noted that this value is about two orders of magnitudes below the LHC design luminosity.
With the help of a tunable beam focus and separation at its interaction point, LHCb is able to lower the luminosity to an optimal level for the experiment~\autocite{lhcb}.
This procedure is performed in order to limit the number of visible proton-proton interactions per bunch crossing, which is required for a clean and efficient event reconstruction.

Starting from LHC Run 3 in 2022, the LHCb detector will be operated at five times the luminosity compared to before the upgrade.
Until the end of Run 4, this corresponds to a collected data volume of \qty{50}{\per\femto\barn}~\autocite{upgrade-loi}.
This results in a significant reduction of statistical uncertainties and allows the experiment to reach its full flavour-physics potential at the LHC.
However, several improvements need to be made during the upgrade prior to Run 3 in order to prepare the detector for the larger number of proton-proton interactions and track multiplicities.

This concerns in particular the LHCb tracking system, which is completely replaced during the upgrade between 2019 and 2022.
Furthermore, the trigger system undergoes a fundamental change.
In the initial version, the readout of the detector was performed at \qty{1}{\mega\hertz} as determined by the first trigger level implemented in hardware~\autocite{lhcb}.
While the so-called L0 trigger provides high efficiencies for dimuon events, it quickly saturates for hadronic channels~\autocite{upgrade-loi}.
To fully profit from the increase in luminosity, it was decided to perform a trigger-less readout of the complete detector at the \qty{40}{\mega\hertz} bunch crossing rate.
To achieve this, it is required that the front-end electronics of all sub-systems are revised and replaced.

In the following, an overview of the various sub-systems of the upgraded LHCb detector is given.

\section{Tracking System}
As previously discussed, the tracking system undergoes major changes during the LHCb upgrade as it is completely replaced by new detectors.
The system is responsible for reconstructing the trajectories of charged particles.
It consists of three parts that are located closely around the interaction point in order to resolve production and decay vertices, as well as before and after the dipole magnet.
By measuring the deflection angle of charged particles caused by the Lorentz force in the magnetic field, this arrangement enables the determination of the particles' momenta.

\subsubsection{Vertex Locator (VELO)}
The (upgraded) LHCb Vertex Locator (VELO) is a silicon pixel detector that is placed closely around the proton-proton interaction region.
It consists of two detector halves equipped with \num{26} modules each.
The modules are arranged along the beam axis and are oriented perpendicular to the beam.
The detector consists of a total of about 41M pixels with a size of \qtyproduct[product-units=power]{55 x 55}{\micro\meter}~\autocite{velo-tdr}.
They are grouped in four silicon hybrid pixel tiles per module, whereas each tile is readout by three VeloPix ASICs.
The total output data rate is estimated at \qty{1.6}{Tbit/s} while reading out the front-end electronics at the full LHC bunch crossing rate of \qty{40}{\mega\hertz}~\autocite{velo-paper}.

\begin{figure}
  \centering
  \includegraphics[width=1.0\textwidth]{figures/lhcb/VELO}
  \caption{
    Schematic view of one half of the upgraded LHCb Vertex Locator (VELO) consisting of \num{26} modules (left).
    Two opposing modules from both halves in the closed position are shown on the right.
    Image adapted from Ref.~\autocite{velo-paper2}.
  }
  \label{fig:velo}
\end{figure}

A special feature of the VELO is the ability to mechanically change the distance between the modules and the beams.
In the closed state, the active pixels will be as close as \qty{3.5}{\milli\meter} from the proton beams, allowing precise resolution of the reconstructed tracks and vertices during normal operation of the LHC~\autocite{velo-paper}.
On the other hand, this feature offers protection from unstable beam conditions by mechanically increasing the distance to the beams (open state).
In order to allow for the two detector halves to be closed completely, the modules are slightly shifted along the beam axis relative to the opposing half.
A schematic view of one VELO half as well as two opposing modules in the closed position are shown in \vref{fig:velo}.


\subsubsection{Upstream Tracker (UT)}
The Upstream Tracker (UT) is located just in front, i.e. upstream of the dipole magnet.
As shown in \vref{fig:ut} (left), the detector is arranged in four detection layers that are equipped with silicon strip sensors.
Each plane has an active area of approximately \qty{2}{\meter\squared}, which covers the full acceptance of the \lhcbexperiment{}.
In order to obtain the highest possible hit resolution in the horizontal, bending direction of the magnet, the strips in the outer layers are oriented vertically.
The resolution in the non-bending direction is achieved by rotating the two inner layers by \qty{\pm 5}{\degree}.
Depending on the track occupancy and radiation dose, four different sensor types are in use.
The majority of sensors (type A) have a strip pitch of \qty{187.5}{\micro\meter}, while the pitch of the three sensor types closer to the beam pipe amounts to \qty{93.5}{\micro\meter}~\autocite{ut}.

\begin{figure}
  \centering
  \includegraphics[width=1.0\textwidth]{figures/lhcb/UT}
  \caption{
    Schematic layout of the Upstream Tracker (UT) with the four detection layers (left).
    The detector is composed of four different sensor types: Type A (green), B (yellow), C and D (pink).
    It is built from vertical staves, which carry the sensors and readout hybrids as shown on the right.
    Image adapted from Ref.~\autocite{ut}.
  }
  \label{fig:ut}
\end{figure}

The detector is built from a total of \num{68} elongated support structures that are referred to as staves.
As illustrated in \vref{fig:ut} (right), each stave is equipped with 14 to 16 silicon strip sensors.
They are mounted from both sides with a slight overlap between neighbouring sensors.
Each sensor is accompanied by a readout hybrid carrying up to eight custom front-end chips, called SALT.
The radiation-hard chips are based on \qty{130}{\nano\meter} technology and were developed to sample the signals at the LHC frequency of \qty{40}{\mega\hertz}.
The resulting digital signals are sent via flex cables to the near-detector electronics~\autocite{ut}.


\subsubsection{Scintillating Fibre (SciFi) Tracker}

\begin{figure}
  \centering
  \includegraphics[width=0.7\textwidth]{figures/lhcb/Radiation_Map}
  \caption{
    Expected dose in the $x$-$y$ plane at $z = \qty{783}{\centi\meter}$ after an integrated luminosity of \qty{50}{\per\femto\barn}.
    The Scintillating Fibre (SciFi) modules of the first tracking station located at this position are shown superimposed.
    The integrated dose absorbed in the fibres towards the centre peaks at about \qty{35}{kGy}.
    Image modified from~\autocite{scifi-tdr}.
  }
  \label{fig:radiation-map}
\end{figure}

The last component within the LHCb tracking system is the Scintillating Fibre (SciFi) Tracker~\autocite{scifi-tdr}.
It consists of three stations that are located downstream of the magnet.
Each station is composed of four detection layers that follow a similar geometry as the UT with the two inner layers being tilted by \qty{\pm 5}{\degree}.
The active area, which amounts to about \qty{30}{\meter\squared} per layer, is built from staggered layers of scintillating fibres with a diameter of \qty{250}{\micro\meter}.
They are read out by arrays of silicon photomultipliers (SiPMs), which are located at the top and bottom of the detector outside of the geometrical acceptance.
In the adjacent front-end electronics boxes, the SiPM signals are processed and digitised at the full LHC bunch crossing frequency of \qty{40}{\mega\hertz}.
The dimensions of one detector layer are illustrated in \vref{fig:radiation-map}, along with the expected radiation dose at the position of the first station after an integrated luminosity of \qty{50}{\per\femto\barn}.

The \scifitracker{} and in particular its front-end electronics are the subject of this thesis and are therefore discussed in detail in the following chapters.

\section{Particle Identification}
The particle identification (PID) capabilities play an important role for any flavour-physics experiment and has been essential for the success of LHCb during the first years of operation~\autocite{pid-tdr}.
It consists of the Ring Imaging Cherenkov (RICH) system, two calorimeters and the muon stations.
Compared to the tracking system, only small changes have been made to the PID system during the LHCb upgrade and mostly affect the RICH detectors.


\subsubsection{Ring Imaging Cherenkov (RICH) Detectors}
The main purpose of the RICH detectors is the separation of kaons and pions.
This is achieved by utilising Cherenkov light, which occurs when a charged particle traverses a medium faster than the speed of light.
In combination with the momentum as provided by the tracking system, the emission angle can be used to determine the mass of the particle.

Two separate detectors form the RICH system at LHCb and are referred to as RICH1 and RICH2.
As shown in \vref{fig:lhcb}, RICH1 is placed between the VELO and UT and covers the full angular acceptance of the detector and a momentum range of \qtyrange[range-phrase=--,range-units=single]{10}{50}{GeV/c}.
On the other hand, RICH2 is located downstream of the \scifitracker{} and specialises in high momentum particles between \qtyrange[range-phrase=--,range-units=single]{15}{100}{GeV/c} with angles up to \qty{120}{mrad}~\autocite{rich-paper}.
For these purposes, RICH1 uses $\text{C}_{4}\text{F}_{10}$ gas as the medium, while $\text{CF}_4$ is used in RICH2~\autocite{pid-tdr}.

\begin{figure}
  \captionsetup[subfigure]{aboveskip=1pt, belowskip=12pt} %Tune space between captions and subfigures
  \begin{subfigure}{0.49\linewidth}
    \centering
    \includegraphics[width=1.0\textwidth]{figures/lhcb/RICH1}
  \end{subfigure}
  \hfill
  \begin{subfigure}{0.49\linewidth}
    \centering
    \includegraphics[width=1.0\textwidth]{figures/lhcb/RICH1_Occupancy}
  \end{subfigure}
  \caption{
    Schematic side view of the upper half of RICH1 (left) and simulated single channel occupancy (right).
    Modifications to the mechanical and optical system in the course of the upgrade are indicated by the red arrows in the side view.
    Images taken from Ref.~\autocite{rich-paper}.
  }
  \label{fig:rich}
\end{figure}

While the enclosure of the RICH detectors could be reused in the upgrade, some modifications to the mechanical and optical systems were required in order to expand the focal point and thereby reduce the channel occupancy.
The modifications along with the simulated occupancy are shown in \vref{fig:rich}.
Due to the performed changes, the maximum occupancy can be limited to \qty{27}{\percent}~\autocite{rich-paper}.

For both RICH1 and RICH2, commercial multi-anode photomultiplier tubes (\mbox{MaPMTs}) are used for the detection of the Cherenkov light, along with external front-end electronics.
The \qty{40}{\mega\hertz} readout is enabled by a custom designed, radiation-hard ASIC in \qty{0.35}{\micro\meter} CMOS technology that is referred to as CLARO~\autocite{claro}.


\subsubsection{Calorimeters}
The upgraded LHCb calorimetry system is composed of two sub-detectors that are located downstream of RICH2: an electromagnetic (ECAL) and a hadronic (HCAL) calorimeter~\autocite{pid-tdr}.
Combined, they are responsible for the identification of electrons, photons and hadrons, as well as the determination of their energy.
Both calorimeters employ a design with alternating layers of absorbers and scintillators.
The produced scintillation light is transmitted via wavelength shifting fibres and is detected by photomultiplier tubes (PMTs).

One ECAL module is built from \num{66} stacked layers of lead absorbers (\qty{2}{\milli\meter} thick) and scintillators (\qty{4}{\milli\meter}).
The module size varies from \qtyproduct[product-units=power]{121.1 x 121.1}{\milli\meter} in the outer section of the ECAL, down to \qtyproduct[product-units=power]{40.4 x 40.4}{\milli\meter} in the hottest region around the beam pipe.
In contrast, the HCAL consists of alternating layers of scintillators (\qty{4}{\milli\meter}) and iron absorbers (\qty{16}{\milli\meter}), and employs two different module sizes of \qtyproduct[product-units=power]{131.3 x 131.3}{\milli\meter} and \qtyproduct[product-units=power]{262.6 x 262.6}{\milli\meter} in the inner and outer sections, respectively~\autocite{lhcb}.

No changes to the calorimeter modules have been required during the upgrade since studies have shown that the granularity is sufficient even when being operated at a luminosity of \qty{2e33}{\per\square\centi\meter\per\second} starting from LHC Run 3.
However, new front-end electronics had to be developed to support the readout rate of \qty{40}{\mega\hertz}, as well as having a higher preamplifier sensitivity in order to mitigate the gain degradation of the PMTs caused by increasing levels of radiation~\autocite{velo-paper}.

\subsubsection{Muon Stations}
Similar to the calorimeters and apart from redeveloping the front-end electronics for the trigger-less readout, the muon sub-detector remains mostly untouched during the LHCb upgrade.
It consists of four stations downstream of the calorimeters which, for historical reasons, are designated as M2 to M5.
They are equipped with multi-wire proportional chambers (MWPCs) in order to reconstruct the particle trajectories.
By taking advantage of their penetrating power, a robust identification of muons is possible, which is achieved with the help of interleaved iron walls between the stations.
The iron shielding is also the reason that no major changes are required in order to be operated at higher luminosities.
One exception to this is the muon station M1 that was installed in front of the calorimeters in the initial \lhcbexperiment{}.
Since it cannot withstand the huge hit occupancy expected at this location starting from LHC Run 3, it was removed in the course of the upgrade.
The associated loss of information is marginal, as M1 was mainly used for the now redundant L0 trigger and was not part of the muon identification algorithms~\autocite{pid-tdr}.



\section{Trigger and Data Acquisition}
\begin{figure}
  \centering
  \includegraphics[width=0.9\textwidth]{figures/lhcb/Trigger_Diagram}
  \caption{
    Trigger schemes for the initial (left) and upgraded \lhcbexperiment{} (right).
    Images taken from Ref.~\autocite{trigger-schemes}.
  }
  \label{fig:trigger}
\end{figure}

Due to the high bunch crossing rate of \qty{40}{\mega\hertz} at the LHC (\qty{30}{\mega\hertz} after excluding empty bunches), it is not feasible to store every event to disk for later access and analysis.
In fact, during the first years of operation between 2010 and 2018, the readout of the front-end electronics of the complete detector was throttled to only a fraction of that rate.
It was limited to \qty{1}{\mega\hertz} as determined by the first trigger level (L0) implemented in hardware that had only access to the data provided by part of the detector~\autocite{lhcb}.

However, to take full advantage of the fivefold increase in luminosity starting from LHC Run 3, the trigger scheme had to be revised~\autocite{trigger-tdr}.
As illustrated in \vref{fig:trigger}, the reconstruction of the complete event consisting of the data provided by all sub-detectors is now performed at the collision rate of \qty{30}{\mega\hertz}.
The full event reconstruction and selection is performed in a trigger level that is fully implemented in software, the so-called Software High Level Trigger.
To allow for the \qty{30}{\mega\hertz} readout, the front-end electronics of all sub-detectors had to be renewed as discussed previously.
They are designed to be read out via simplex optical links using a common and custom protocol that is referred to as GBT~\autocite{gbtx}.
A total of about \qty{11000} optical fibres, each carrying up to \qty{4.48}{\giga\bit/s} of user data, transfer the data from the underground cavern to the server farm located on the surface of the LHCb site~\autocite{rainer-links}.
The so-called event builder servers are equipped with custom PCI Express readout cards and are responsible for the event reconstruction~\autocite{pcie40}.

The reconstructed event information is used by a second cluster of servers referred to as event filter farm.
They have access to a large disk-based buffer and run the selection algorithms in order to filter out the events to be kept for permanent storage~\autocite{trigger-paper}.
The layout of the upgraded LHCb Data Acquisition (DAQ) system is shown in \vref{fig:daq-system}.

\begin{figure}
  \centering
  \includegraphics[width=1.0\textwidth]{figures/lhcb/DAQ}
  \caption{
    Layout of the DAQ system of the upgraded \lhcbexperiment{}.
    Image adapted from Ref.~\autocite{trigger-paper}.
  }
  \label{fig:daq-system}
\end{figure}

The detector front-end electronics and the readout cards are synchronised to the \qty{40}{\mega\hertz} LHC clock by the Timing and Fast Control (TFC) system~\autocite{tfc}.
The distribution of the information is also done via optical links and the help of dedicated interface cards.
An additional \numproduct{2 x 2300} bidirectional optical fibres are used for this purpose to enable the communication with the front-end electronics in the LHCb underground cavern~\autocite{rainer-links}.
By using the GBT protocol, the bandwidth along with the identical interface cards are shared for the implementation of the Experiment Control System (ECS).
While the TFC distributes time-sensitive information to the different components within the DAQ system, the ECS is used for slow-control operations.
These include for example the transmission of configuration parameters to the electronics, as well as reading out sensor values or error counters.

Further details about the readout and interface cards enabling the DAQ, TFC and ECS are given in \cref{sec:commissioning-daq}.
