LHCb detector and trigger performance in Run II

The LHCb detector is a forward spectrometer at the LHC, designed to perform high precision studies of band chadrons. In Run II of the LHC, a new scheme for the software trigger at LHCb allows splitting the triggering of events into two stages, giving room to perform the alignment and calibration in real time. In the novel detector alignment and calibration strategy for Run II, data collected at the start of the fill are processed in a few minutes and used to update the alignment, while the calibration constants are evaluated for each run. This allows identical constants to be used in the online and offline reconstruction, thus improving the correlation between triggered and offline selected events. The required computing time constraints are met thanks to a new dedicated framework using the multi-core farm infrastructure for the trigger. The larger timing budget, available in the trigger, allows to perform the same track reconstruction online and offline. This enables LHCb to achieve the best reconstruction performance already in the trigger, and allows physics analyses to be performed directly on the data produced by the trigger reconstruction. The novel real-time processing strategy at LHCb is discussed from both the technical and operational point of view. The overall performance of the LHCb detector on the data of Run II is presented as well.


Introduction
The LHCb experiment is dedicated to flavour physics studies at the Large Hadron Collider (LHC) at CERN.In particular, it is designed for precision measurements of CP violation and rare decays of beauty (b) and charm (c) hadrons, in order to indirectly search for new physics effects beyond the Standard Model.The LHCb detector [1] [2] has been designed to accomplish these delicate measurements.It is a single-arm forward spectrometer, shown in figure 1, covering a pseudorapidity, η, range unique among the LHC detectors, 2 < η < 5.The detector includes a high-precision tracking system, which provides a measurement of momentum of charged particles, with a relative uncertainty that varies from 0.5% at low momentum to 1.0% at 200 GeV/c.The minimum distance of a track to a primary vertex, the impact parameter, is measured with a resolution of (15 + 29/p T ) µm, where p T is the component of the momentum transverse to the beam in GeV/c.The tracking system consists of a silicon-strip vertex detector (VELO) surrounding the proton-proton (pp) interaction region [3], a large-area silicon-strip detector (TT) located upstream of a dipole magnet with a bending power of about 4 Tm, and three T stations of silicon-strip detectors, Inner Tracker (IT), and straw drift tubes, Outer Tracker (OT) [4], placed downstream of the magnet.After travelling about 10 m in the LHCb detector, from the VELO to the end of the three T stations, a particle has traversed about 60% of a radiation length and 20% of an absorption length.
Different types of charged hadrons are distinguished using information from two ring-imaging Cherenkov detectors (RICHs) [5].Photons, electrons and hadrons are identified by a calorimeter system consisting of scintillating-pad and preshower detectors (SPD/PS), an electromagnetic calorimeter (ECAL) and a hadronic calorimeter (HCAL).Muons are identified by a system composed of alternating layers of iron and multiwire proportional chambers (M1-M5) [6].In Run I, this system allowed to obtain a kaon identification efficiency larger than 95%, together with a pion misidentification fraction of ∼10% over the full momentum range and a muon identification efficiency larger than 97% [2].
The nominal LHC rate, including empty bunches, is 40 MHz.This rate is too large to allow data to be written to storage.The main goal of the trigger is to reduce this rate to O(10) kHz, keeping the most relevant pp interactions for subsequent physics analysis.In particular, LHCb is mainly interested in heavy flavour physics and the signatures of these decays are the presence of high transverse momentum (p T ) tracks, high transverse energy (E T ) in the calorimeters and displaced vertices, because b and c hadrons fly on average over few centimetres before they decay.Moreover, the presence of displaced vertices implies that some of the decay products have a large displacement from the pp interaction vertex.The trigger [7] consists of a hardware stage (L0), based on information from the calorimeter and muon systems, followed by a software stage (HLT), split into two steps, which applies a full event reconstruction.The trigger system as a crucial role in LHCb since for precision measurements the main gain comes from the availability of more data.Thus, increasing the speed of the system and improving the quality of the data coming from the trigger was one of the main priority in view of the Run II of the LHC.
In Run I (2010-2012) of the LHC, the LHCb experiment has collected a total luminosity of 3 fb −1 of pp collisions at 7 and 8 TeV centre-of-mass energy, as well as 5 TeV centre-of-mass protonion data.A very successful physics program has been carried out, leading to over 300 publications, thanks to the excellent performance of the detector and the LHC, covering a wide range of physics topics.After the Long Shutdown 1 (LS1), in 2015 LHC started the Run II, which will continue until 2018, allowing to collect a total luminosity of ∼5 fb −1 pp collision data.The centre-of-mass energy delivered by the LHC was increased to 13 TeV, leading to a ∼60% increase in the bb and cc cross-sections.In these new conditions, LHCb will continue pursuing its core physics program with increased statistics, trying to keep (and increase) the variety of studied topics.During LS1, a large amount of work has been spent in consolidation, maintenance and repair of the subdetectors and of the general infrastructure.The main challenge has been to keep (and even improve) the performance achieved during Run I despite the increase in centre-of-mass energy.The key point to achieve this delicate point was a completely revisited trigger strategy that allows to get the same performance obtained offline already at the trigger level.
In Run II the visible rate is almost the double compared to Run I.The larger cross-sections in Run II, especially in the case of charm hadrons, demand a more efficient trigger strategy, since the offline processing resources won't go up as much as the signal rate.To achieve this, a completely new trigger scheme, see figure 2 on the right, has been devised that allows to have the same offline-data quality already at the trigger level.Clearly, this is a difficult challenge due to the time constraints imposed by the trigger.The major change to the trigger strategy that allowed to achieve this goal is that the processing of the second step of the software trigger (HLT2) has been completely deferred, in order to optimise the usage of the event filter farm (EFF) where the software trigger is run.The EFF is a computing cluster consisting of 1800 server nodes, with a combined storage space of 5.2 PB in 2015 and ∼ 10 PB in 2016.This can accommodate up to two weeks of LHCb data taking in nominal conditions.Since LHC does not spend 100% of its time in stable running due to e.g.planned technical stops, machine development phases and time between data taking fills needed for the ramping of the LHC dipole magnets, it is possible to use the time in which the farm is not busy to process the HLT2 data.In order to achieve this, the farm nodes were equipped with local storage space permitting to buffer the first level of the HLT (HLT1) output into the nodes and to process it during the LHC downtime.This strategy allows to have more time to process a single event and gives the opportunity to calibrate and align the subdetectors in real time using data from HLT1.Here, real time is defined as the interval between the collisions in the detector and the moment the data are sent to permanent storage.This task, however, presents an unprecedented challenge as it requires to align more than 1700 detector components and compute almost 2000 calibration constants on the fly; in Sect. 3 it will be explained the strategy used to align and calibrate the detector in such a small time window.This continuous calibration and alignment, which only updates the constants when necessary, provides offline-quality variables, such as particle identification (PID), at the trigger level; this fact, combined with the doubling of the trigger farm capacity and the improved track reconstruction, allows to have the same online reconstruction as the offline one and to increase the output rate to 12.5 kHz.Indeed, a lot of work has been put into optimizing the code and algorithms used in the trigger and the reconstruction: • Faster implementations of large areas of the code thanks to vector instructions.
• New algorithms have been put in place to improve the performance and/or reduce the execution time with respect to their Run I counterparts.
• A faster reconstruction has been achieved thanks to a linear extrapolation of tracks from the VELO to the TT as an intermediate step before the so-called forward tracking.
• The primary vertex reconstruction has been updated and optimized, with the same algorithm now used online and offline.
This optimized trigger strategy has several advantages.First, it minimises the difference between the online and offline performance, allowing to use a more effective trigger selection that can take advantage of the hadron identification information.For example charm physics is limited by trigger output rate constraints; using hadron identification in the trigger allows to have a higher selection efficiency and purity for the doubly Cabibbo suppressed modes and, at the same time, satisfy the output rate constraints by pre-scaling the more abundant Cabibbo favourite modes.Second, it ensures the stability of the alignment quality and hence of the physics performance.

Alignment and calibration in Run II
In order to achieve the same offline performance already in the trigger one key point is to perform the spatial alignment and calibration of the detector in real time.Both the alignment and calibration are  crucial to achieve the best physics performance.In particular, the correct alignment of the VELO is needed to identify secondary vertices from the decay of particles with b or c quarks while a misalignment of the all tracking system would degrade the mass resolution.As an example, the improvement of the alignment significantly increases the Υ mass resolution from 92 MeV/c 2 with the first alignment to 49 MeV/c 2 with the improved alignment, as is shown in figure 3. Similarly, good alignment and calibration of the ring-imaging Cherenkov detectors are necessary in order to use hadron identification criteria in exclusive selections to suppress background.Figure 4 shows the effect in the B 0 → h + h − mass spectrum of hadron identification criteria: the ratio between the signal, B 0 → π + π − , and the combinatorial background increases by approximately a factor 2 and the ratio between the signal and the favoured B 0 → Kπ increases by a factor 35.
It is then clear that a more effective selection and a higher signal purity of studied channels can be achieved mainly thanks to a real-time alignment and calibration of the detector.This allows to better select the channels interesting to pursue LHCb's physics program without increasing the overall trigger rate.
The automatic calibration and alignment is performed in the trigger farm within a few minutes once the necessary data samples are collected.Dedicated samples from HLT1 are taken as input for each system, for instance D 0 → K + π − candidates for the Tracker alignment and J/ψ → µ + µ − candidates for the alignment of the Muon system.When the new alignment and calibration are available, and a significant variation is observed, a change of run is triggered.The new constants are updated for the new run to be used online by the two stages of the software trigger, and offline, for every further reconstruction and selection.The events collected in the previous run, during the automatic alignment and calibration processing, are still reconstructed in HLT2 and offline with the previous constants for consistency with HLT1.This flow is schematically shown in Figure 5.
The spatial alignment of the LHCb detector consists in the alignment of tracking system, namely the VELO, the Tracker (TT, IT e OT) and the Muon system and of the RICH mirrors.Here only the main features will be highlighted, more information can be found in [8].Concerning the calibration, at LHCb the Ring imaging Cherenkov detectors and the Outer Tracker must be calibrated in real time in order to get the relation connecting the measured quantity to the physical quantity that one wants to achieve.Again, only the main features will be highlighted, more information can be found in [8].

Alignment of the Tracking system
The alignment of the LHCb tracking detector uses information from optical and mechanical surveys and from reconstructed charged particle trajectories.Although the final alignment precision is obtained with reconstructed tracks, a precise survey is essential both as a starting point for the trackbased alignment and to constrain degrees of freedom to which fitted track trajectories are insensitive.The alignment is achieved through minimisation of the residuals of a Kalman fit [10]  reconstructed tracks from HLT1.The alignment of the VELO is performed first, followed by the corresponding alignment of the tracking stations.This order is chosen due to the nature of the VELO, which centres itself around the collision point.On average the VELO alignment constants change significantly every 2-3 fills, while tracker constants change only every several fills.The muon system alignment is run only in monitoring mode, and the constants are updated only after hardware intervention.As an example, in figure 6 the stability of the alignment of the VELO halves during the first data taking period of Run II is shown.Each point is obtained running the online alignment procedure and shows the difference between the initial alignment constants (the ones used in the previous fill) and the new ones computed by the alignment.The alignment is updated (filled dots) only if the variation is significant (in the plot the red or the blue points must be outside the horizontal lines at ±2 µm).However, since there are more degrees of freedom for which the VELO is aligned for than those shown in figure 6, the filled dots do not necessarily corresponds to points outside the horizontal lines.

RICH mirror alignment
Both RICH detectors have two sets of mirrors where photons are reflected before to be deflected out of the LHCb acceptance onto the photon detection plane.Misalignment of the RICH detectors causes the circular rings on the detection plane to become distorted.Due to the fact that the projected position of the track is not centered with respect to the Cherenkov ring, the Cherenkov opening angle varies as a function of the azimuthal angle.This distortion requires an individual correction for each mirror, that is calculated using a set of well reconstructed tracks from HLT1.

RICH calibration
The refractive index of the gas radiators used in the RICH varies as a function of the ambient temperature and pressure.Using a set of well reconstructed tracks originating from a particle of known mass the expected Cherenkov angle can be calculated using accurate momentum measurements provided by the tracking stations.By comparing the measured Cherenkov angles with the expected angles it is possible to extract scale factors to calibrate the refractive index of the radiator.Similarly, the anode images produced by the Hybrid Photon Detectors (HPDs) that detect the Cherenkov photons have to be calibrated, since they are affected by magnetic and electric fields.

Outer Tracker calibration
The outer tracker is composed by straw tubes in which the drift time in the gas is measured.This measurement could be different from the time estimated from the distance of the track to the wire since it can be affected by differences between the true collision time and the LHCb clock.On top of this effect, a delay in the electronic readout also causes a time difference that is characteristic for each module.However this contribution is small compared to the global offset and can be calibrated offline.The drift time residuals of a sample of well reconstructed tracks are used to provide the global drift time offset correction.

Trigger and detector performance in Run II
Thanks to the fact that the alignment and calibration are performed in real time and thanks to all the improvements in the reconstruction sequence, it has been possible to achieve the same offline performance of Run I already in the data coming from the trigger.As an example, in Figure 7 (left) it is shown a comparison of the resolution of the x component of the impact parameter, defined as the distance in x between a track and the associated primary proton-proton vertex (PV), between 2012 data (black) and 2015 data (red), with a bunch spacing of 50 ns and 25 ns, respectively.In this figure, only events with one reconstructed PV are used, where the PV fit is reperformed excluding each track in turn.The resulting PV is required to have more than 25 tracks to minimise the contribution from PV resolution.It is possible to see that the same performance as Run I is obtained.Similarly, in Figure 7 (right) it is shown a comparison of the track reconstruction efficiency in Run I (black) and in Run II (red), with a bunch spacing of 50 ns and 25 ns, respectively.Here, only so called long tracks are considered, which are reconstructed using the information from the whole tracking system in LHCb.Again, despite the more harsh environment due to the greater centre-of-mass energy in Run II, the same performance is achieved.Moreover, this completely revisited trigger strategy and the excellent performance obtained allows to achieve better trigger efficiencies.Thanks to the usage, e.g., of more powerful particle identification criteria in the trigger, the signal to background ratio have been increased.As an example, the efficiency to select B 0 → D 0 π + events in the HLT2 was around 75% in Run I while it is greater than 90% in Run II.
. Turbo data processing versus the traditional approach (Full stream).The time taken for each step in hours is provided for a 3 GB raw data file.

Turbo and Turbo++
Finally, as in Run II the last level of the trigger performs the same reconstruction as the one performed offline, it is possible to run physics analyses, with the same offline performance, directly on the output of the trigger using the special stream of data known as Turbo stream [11].The Turbo stream is designed to store part of the trigger bandwidth (around 20%) in a special format that allows to bypass the offline reconstruction, saving CPU and storage resources.The schematic data flow of the Turbo stream compared to the traditional data flow (represented by the Full stream) is shown in Figure 8.This approach has the advantage that, for some events, it will be possible to save only the information on the signal candidate tracks (∼15 kB per event) instead of all the electronic signals recorded from the detector (∼70 kB per event).This decrease of almost one order of magnitude of the event size allows a higher selection rate, for example in the charm analyses that during Run I used trigger lines which were pre-scaled due to output rate requirements.It is obvious that the real-time alignment and calibration becomes essential when the raw event is not saved and it was an essential achievement to have the Turbo stream functioning efficiently.For standard Run-II conditions ∼20% of the HLT2 selected events will be sent to the Turbo stream at a cost of less than 2% of the output bandwidth.In order to perform physics analyses with the online reconstruction, decay candidates must appear in the same format as expected by the output of the traditional processing, such that the existing analysis infrastructure can be used.This is the purpose of the Tesla application [11].The use of the Turbo stream in 2015 proved to be successful.The first two published physics measurements from the LHCb experiment based on data collected in the 2015 run were based on the Turbo stream [12][13].Moreover, since 2016, it is also possible to store in the Turbo stream not only the candidates that pass the trigger selection but also the full event, allowing to use in the trigger selection higher level variables.This enabled even more analyses to profit of the Turbo stream.In 2016, out of the 420 HLT2 trigger lines developed, around 150 use the Turbo stream.Using this stream it has been possible to successfully select key channels and to monitor the data distributions already few days after the beginning of the data taking in 2016, as shown in Figure 9, where the invariant mass distribution of B + → J/ψ(µ + µ − )K + events is shown.

Conclusions
LHCb is the first High Energy Physics experiment with a full calibration, alignment and reconstruction done in real-time.The revisited trigger strategy allows to achieve Run I offline performances already in the trigger.Reaching the ultimate precision of the LHCb experiment already in real time as the data arrive has the power to transform the experimental approach to processing large quantities of data.In particular, this allowed the usage of the so-called Turbo stream to perform physics analyses directly on the trigger output, increasing the physics program that can be covered.

Рис. 1 . 1 Рис. 1 . 2 5 Figure 1 .
Figure 1.Schematic view of the LHCb detector in the y−z plane.The right-handed coordinate system used has the z axis along the beam direction pointing from the interaction point into the experiment, the y axis vertically upwards and the x axis pointing towards the outside of the LHC ring. Figure taken from [1].

ICNFP 2016 Figure 2 .
Figure 2. LHCb trigger scheme in Run I (left) and in Run II (right).The rate of collisions, including empty bunch crossings, is 40 MHz.

Figure 4 .
Figure 4. Invariant mass distribution for B 0 → h + h − decays [9] in the LHCb data before the use of the RICH information (left), and after applying RICH particle identification (right).The signal under study is the decay B 0 → π + π − , represented by the turquoise dotted line.The contributions from different b-hadron decay modes (B 0 → Kπ red dashed-dotted line, B 0 → 3-bodies orange dashed-dashed line, B s → KK yellow line, B s → Kπ brown line, Λ b → pK purple line, Λ b → pπ green line), are eliminated by positive identification of pions, kaons and protons.Only the signal and two background contributions remain visible after applying hadron identification requirements.The grey solid line is the combinatorial background.

EPJFigure 5 .
Figure 5. Schematic diagram showing the overall data processing model in Run-II, where the blue solid line represents data flow, and the red dashed line the propagation of calibration and alignment constants.

Figure 6 .
Figure 6.Stability of the alignment of the VELO halves during Run II fills.See the text for more explanations.

EPJFigure 7 .
Figure 7. Left: Resolution of the x component of the impact parameter in 2012 50 ns data (black) and 2015 25 ns data (red).Right: Track reconstruction efficiency for long tracks for 2012 50 ns (black) and 2015 25 ns (red) data.