The LHCb software contains software packages for the online and offline stages of the data processing. It is based on the GAUDI framework [99], which itself makes
use of the ROOTframework[100,101]. One of the packages in the LHCb software is
the MOOREpackage[102]. It runs online and has implicitly already been introduced in the last section, as it is the package that holds the code of the HLT. This section focusses on the BRUNEL [103] and DAVINCI [104] packages, which run offline on
triggered data, both from the detector and simulations, in order to perform prepara- tions necessary for end-user analyses. The first step is a full event reconstruction done by the BRUNELpackage. It is described in Sec. 4.4.1. The second step is a centralised
preselection, the so-called stripping, which is taken care of by the DAVINCI package. It is explained in Sec. 4.4.2.
4.4.1 Event reconstruction
The event reconstruction comprises two tasks. Firstly, the tracking forms and com- bines tracks from hits of charged particles in the tracking system. Secondly, particle hypotheses are assigned to the tracks using information from the particle identifica- tion system.
Different tracking methods are utilised corresponding to the different track types (see Sec. 4.2.1). Two algorithms exist to find long tracks, which is the only track type relevant in the presented analysis. Both start with the forming of VELO tracks from hits in the φ and R sensors of the VELO that lie on a straight line. In case of the forward tracking algorithm, these VELO tracks are subsequently combined with matching hits in the tracking stations T1-T3, taking into account the bending from the magnetic field, and finally assigned to hits in the TT. The second algorithm is called the track matching algorithm, and it directly matches the VELO tracks to independent T tracks. In a second step compatible TT hits are added. After all track finding algorithms have scanned the event in order to find their designated track types, a Clone Killer algorithm removes all duplicate tracks. The principle of the clone killing is to delete tracks that share more hits than a specific limit with another longer one. A global Kalman fit [105] is performed as final step of the offline tracking in order to precisely determine the trajectories and momenta of particles. It considers both
4.4 Offline data processing with the LHCb software multiple scattering effects as well as energy losses and takes the largest portion of the tracking’s computing time. The outcome of the tracking is a state vector ~s = (x, y, tx, ty, q/p)
T
for each reconstructed track. Here, x and y are coordinates, tx and ty the slopes in the xz and x y projections, and q/p is the charge divided by the momentum.
After tracks have been established, particle hypotheses need to be assigned. In- formation from the RICH detectors identifies charged hadrons. Hence, all tracks are extrapolated into RICH1 and RICH2 and information from the HPD hits is ad- ded. Finally, global likelihood values are calculated for each track corresponding to different applied particle hypotheses. Muon hypotheses can be settled or excluded very efficiently, by searching for hits in the muon chambers that lie in the vicinity of extrapolated tracks. Clusters in the electromagnetic calorimeter are used to identify electrons and photons, with pairs of photons often indicating decays of neutral pions. Finally, all available information is used to conclude global PID likelihoods for specific particle hypotheses. Differences of the logarithmic likelihoods (Delta log-likelihood, DLL) with respect to the pion hypothesis are calculated in order to express particle discriminations as decisions between two types of particles. For example, the DLL of a kaon versus a pion hypothesis is given by
DLL(K − π) = ln(LK) − ln(Lπ) , (4.2) while for a muon-kaon separation it is calculated as
DLL(µ − K) = DLL(µ − π) − DLL(K − π) . (4.3) Hence, a DLL(A− B) > 0 implies a higher probability of the particle to be A, whereas DLL(A − B) < 0 favours particle type B. In the following, the most important DLLs are abbreviated as
PIDK = DLL(K − π) , PIDp = DLL(p − π) , and PIDµ = DLL(µ − π) . (4.4)
4.4.2 Global preselection
The full LHCb dataset is far too large to be handled efficiently in offline physics ana- lyses such as the presented CP violation measurement in Bs0→ Ds∓K
±. Thus, a central- ised preselection, known as stripping, is performed. It consists of a large number of stripping lines, which define selection criteria dedicated to the broad range of decay modes and analyses examined by the LHCb collaboration. The software that is used to fill these lines is called the DAVINCIframework.
The DAVINCIframework provides algorithms that further process the so-called pro-
toparticles, which are the output of the preceding event reconstruction. These al- gorithms transform the protoparticles into intermediate states and particle objects, calculate kinematic properties, and build full decay chains. The different stripping lines often share several selection steps in order to save computing time. As an ex- ample, there are minimal requirements applied to stable particles, which can sub- sequently be tightened in individual lines. In general, large overlaps exist between se- lection requirements of lines meant for decay modes with similar or identical particles
in the final state. However, the computing effort of the stripping remains enormous and new revisions are usually not released more often than once a year. Data that is rejected by the stripping is lost for any further analyses, as analysts can only access stripped data. Thus, stripping selections are much looser than the so-called offline selections applied in specific analyses such as the presented one. In this way the stripping maintains very high signal efficiencies, while at the same time enough can- didates for studies on background properties are kept.
The stripping lines used in the course of the presented analysis do not inherit any PID selection criteria, but apply requirements on the particle kinematics and the dis- placement from the primary interaction. Details on the stripping requirements ap- plied in the presented analysis are discussed in Sec. 7.1.
In the offline decay chain reconstruction, the DecayTreeFitter algorithm[106] is used to compute invariant masses and lifetime observables. The DecayTreeFitter, which is also provided in the DAVINCIframework, takes correlations and uncertainties
of its inputs, mostly being vertex positions, particle momenta, and flight distances into account. Furthermore, when the B invariant mass is computed, the invariant D mass is constrained to its nominal value[24], separately for the D and the Ds hypotheses. Additionally, in the calculation of the B decay times the B candidates are constrained to point to the associated PVs.