  The Standard Model of particle physics is well established, yet recently
showed tensions with experimental observations. A large part of this thesis is
dedicated to the first measurement of the ratio of branching fractions of the
decays $B^+ \rightarrow K^+ \mu^+ \mu^-$ and $B^+ \rightarrow K^+ e^+ e^-$ ,
referred to as $R_K$ , in the high dilepton invariant-mass region. The
presented analysis uses the full dataset of proton-proton collisions collected
by the LHCb experiment in the years 2011-2018, corresponding to an integrated
luminosity of 9 $fb^{-1}$. The final result for $R_K$ is still blinded. The
sensitivity of the developed analysis is estimated to be
$\sigma_{R_K}^{\mathrm{stat}} = 0.073$ and $\sigma_{R_K}^{\mathrm{stat}} =
0.031$. In addition to the precision measurement of $R_K$ at a high dilepton
invariant mass, this thesis contains two more technical topics. First, an
algorithm that selects particles in an event in the LHCb detector by performing
a full event interpretation, referred to as DFEI. This tool is based on
multiple Graph Neural Networks and aims to cope with the increase in luminosity
in current and future upgrades of the LHCb detector. Comparisons with the
current approach show at least similar, sometimes better, performance with
respect to decay reconstruction and selection using charged particles. The
efficiency is mostly independent of the luminosity, which is crucial for future
upgrades. Second, a Python package for likelihood model fitting called zfit.
The increasing popularity of the Python programming language in High Energy
Physics creates a need for a flexible, modular, and performant fitting library.
The zfit package is well integrated into the Python ecosystem, highly
customizable and fast thanks to its computational backend TensorFlow.
