{'fraction_non_alphanumeric': 0.026906894679695984, 'fraction_numerical': 0.0122828447339848, 'mean_word_length': 4.605363255990871, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Real time data analysis with the ATLAS Trigger at the LHC in Run-2

The trigger selection capabilities of the ATLAS detector have been significantly enhanced for the LHC Run- 2 in order to cope with the higher event rates and with the large number of simultaneous interactions (pile-up) per protonproton bunch crossing. A new hardware system, designed to analyse real time event-topologies at Level-1 came to full use in 2017. A hardware-based track reconstruction system, expected to be used real-time in 2018, is designed to provide track information to the high-level software trigger at its full input rate. The high-level trigger selections are largely relying on offline-like reconstruction techniques, and in some cases multivariate analysis methods. Despite the sudden change in LHC operations during the second half of 2017, which caused an increase in pile-up and therefore also in CPU usage of the trigger algorithms, the set of triggers (so called trigger menu) running online has undergone only minor modifications thanks to the robustness and redundancy of the trigger system, and the use of a levelling luminosity scheme in agreement with LHC and other experiments. This presentation gives a brief yet comprehensive review of the real-time performance of the ATLAS trigger system in 2017. Considerations will be presented on the most relevant parameters of the trigger (efficiency to collect signal and output data rate) as well as details on some aspects of the algorithms which are run real-time on the High Level Trigger CPU farm.


I. INTRODUCTION
One of the main objectives of the LHC physics program in Run-2 is to discover new phenomena beyond the Standard Model (SM) of particle physics. Following the tight constraints set on many Beyond the Standard Model (BSM) scenarios by the Run-1 LHC analyses, a large spectrum of still BSM viable models require very exclusive final states in small regions of the phase space. One other central piece of the LHC physics program is the precision SM measurements of electroweak and QCD processes, as well as a complete mapping of the various Higgs boson couplings and parameters. In order to meet these research objectives data samples with very high statistics must be used for the searches and the measurements. To maximize the amount of data to be collected by the detectors, the LHC is constantly increasing the luminosity delivered to the experiments. This constitutes a challenge for the trigger and data acquisition system of the LHC experiments because of the limited CPU and storage available.
During Run-1, the ATLAS trigger system operated efficiently at instantaneous luminosities of up to 8 × 10 33 cm −2 s −1 and primarily at center-of-mass energies of 7 and 8 TeV 1 . In Run-2, the center-of-mass energy increased to 13 TeV, enhancing the total proton-proton (pp) cross section by more than a factor of two (depending on the physics processes), therefore increasing the trigger rate, by more than 100%. In addition, changes in the LHC beam parameters resulted in an increase of the instantaneous luminosity by a factor of up to about 3, with a number of pp-interactions per bunch-crossing (in-time pile-up) reaching 80 in 2017. Finally, a reduction of the bunch spacing from 50 ns to 25 ns added interactions from neighboring bunch-spacing (out-of-time pile up). These changes in the LHC operation, designed to allow for the experiments to take larger statistics data samples, made the Run-1 trigger menu completely unsustainable. To preserve the physics program of the experiment, a significant upgrade of the ATLAS trigger system was needed for Run-2.

II. RUN-2 IMPROVEMENTS OF THE ATLAS TRIGGER SYSTEM
Improvements of the hardware, firmware and software parts of the trigger system must aim at a better rate control and processing time per event, higher reconstruction and identification efficiencies with respect to offline selections, and resolution effects closer to offline measurements. A detailed discussion of these trigger improvements is presented in [2].

A. Level 1 Trigger Improvements
From the hardware perspective, a fourth layer of RPC chambers was added, before Run-1, to the muon spectrometer in order to recover acceptance lost at the first trigger level (L1) near detector feet and elevator shafts. These chambers were however only equipped with electronics during the long shutdown following Run-1. A net increase of 3.6% in the muon L1 trigger efficiency resulted from this hardware addition. However, during Run-1, a significant fraction of the muon trigger rate from the end-cap region of the muon spectrometer was found to be due to particles not originating from the interaction point as illustrated on the left panel of Fig. 1. In order to reject these background events, a new trigger logic was introduced in Run-2: a coincidence requirement 1 For a full description of the ATLAS detector, see [1] arXiv:1806.08475v1 [hep-ex] [2]. The curved arrows shows an example of a trajectory from slow particles generated at the beam pipe around z ∼ 10m. Triggers due to events of this type are mitigated by requiring an additional coincidence with the TGC-FI chambers in the region 1.3 < |η| < 1.9*. Right: Number of events with an L1 muon trigger with transverse momentum (p T ) above 15 GeV (L1 MU15) as a function of the muon η coordinate, when a coincidence with the TGC-FI chambers is required (upper histogram) or no requirement is applied (lower histogram) [2]*. between the TGC chambers and the TGC-FI in the region 1.3 < |η| < 1.9 was added reducing the trigger rate by up to 60% in this detector region, as can be seen on the right panel of Fig. 1.
Multiple changes have been brought to the hardware and firmware L1 trigger system. A new Fast Tracking reconstruction system (FTK) has been added [3], and will become operational in the course of 2018. The FTK system provides global inner detector (ID) track reconstruction at L1, using lookup tables in associative memory chips for pattern recognition. This FPGA-based track fitter performs a fast linear fit and the tracks are made available to the High-Level Trigger system (HLT). The FTK will allow the use of tracks at much higher event rates in the HLT than is currently affordable using CPU systems, improving, among others, the tau and the Bphysics trigger performances. In order to refine the muons and calorimeter-based objects kinematic calculations and to make more sophisticated event selections at L1 (e.g. invariant mass cuts, angular distance between jets, etc.), two FPGAbased processor modules (L1-Topo) have been added to the L1 trigger system, and became fully operational in 2017. To communicate with these L1-Topo modules, the central trigger processor (CTP) had to be upgraded. In addition, the ASICbased chips used in Run-1 to digitalize and calibrate the analogue calorimeter signal at L1 (L1CALO) were replaced by a new FPGA-based multi-chip module (nMCM). It allowed for a bunch-by-bunch pedestal subtraction that significantly reduced the rate of L1 Jets and E miss T triggers for a given transverse momentum (p T ) threshold, as can be seen in Fig. 2. It also linearized the L1 trigger rate as a function of the luminosity and the position of bunches in a train, and improved the bunch-crossing identification. Finally, the CTP upgrades allowed to double the number of L1 trigger signatures and bunch-group selections providing more sophisticated trigger chains for very exclusive event topologies. The improvements brought to the entire L1 trigger system allowed for a L1 accept rate of 100 kHz, which constitutes approximatively a 30% increase with respect to the corresponding rate in Run-  Fig. 2. The per-bunch trigger rate for the L1 missing transverse momentum trigger with a threshold of 50 GeV (L1 XE50) as a function of the instantaneous luminosity per bunch [2]. The rates are shown with and without the pedestal correction applied*. 1, allowing to keep a similar trigger composition, at L1, as in Run-1, despite the dramatic increase in the luminosity and pile-up.

B. High Level Trigger Improvements
The entire High-Level Trigger (HT) architecture has been changed after Run-1. The Level 2 and Event Filter farms have been merged to allow for more flexibility, to simplify the hardware and the software, and to remove rate limitations between fast and precision processing by using the resources more efficiently. The entire Run-2 trigger architecture is sketched in Fig. 3. To deal with the increase in the readout rate due to higher L1 accept rate, but to also increase the output rate of the TDAQ system, the Read-Out System (ROS) has also been upgraded. Thanks to these improvements, data have been stored at a rate of 1.1 kHz in Run-2, almost a factor of 3 increase with respect to Run-1.
The output rate is however not the only limiting factor; the HLT processing time is also limited by the amount of   CPU cores available at HLT. The time taken to process one event at the LHC is determined by both the trigger menu, and by the number of pile-up interactions which are continuously increasing with time, as can be seen in Fig. 4. At an instantaneous luminosity of 5.2 × 10 33 cm −2 s −1 and an average pile-up of < µ >= 15, the average HLT processing time is of 230 ms, which is well within the 2-3 seconds time available before time-out. However, as can be seen for the left panel of Fig. 5, the average processing time increases with luminosity and pile-up, and, as can be seen on the right panel of Fig. 5, the distribution of HLT processing time has a tail that goes well above the time-out threshold. Part of these events can be recovered thanks to the data stream procedure (debug stream), but it nevertheless demonstrate that HLT algorithms have to cleverly deal with pile-up to avoid a significant decrease in the triggering performance.
Many improvements have been brought to the online inner detector and muon spectrometer tracking. For example, to limit CPU usage, multiple stage track reconstruction was implemented, thanks to the redesign of the HLT architecture in Run-2. It allows, among other things, to use larger region of interest around L1 objects to seed hadronic taus or b-jets reconstruct, before precision tracking exploit aspects of offline tracking to improve resolution and reduce rate at no cost in efficiency, as can be seen in Fig. 6    The signal output from the calorimeter readout is also processed to produce cells or clusters that are then used to reconstruct physics objects like electrons, photons, taus, jets and E miss T . The cells and the clusters are also used in the determination of the shower shape and isolation characteristics of these particles to enhance the purity of their identification. Two different clustering algorithms are used to reconstruct the clusters of energy deposition in the calorimeter: the slidingwindow algorithm [5], and the topo-clustering algorithm [6]. The first stage of their reconstruction consists in unpacking the data from the calorimeter. With the very high amount of pile-up events produced in Run-2, the possibility to reconstruct topoclusters for the full calorimeter on each event was compromised. However, with a new memory caching mechanism allowing for a very fast unpacking of the data, and with the development of offline-like clustering algorithms for HLT, the mean processing time for topo-clustering has been kept to 82 ms, as can be seen on the left panel of Fig. 8, allowing for tau, jets and E miss T algorithms to use topoclusters available for every event, in order to reach energy resolution comparable to what is obtained with offline reconstruction, as can be seen on the right panel of Fig. 8. We can also see   Building on these various improvements, the trigger menu composition and the lowest transverse energy/momentum thresholds used by the different trigger objects for selecting events without random rejection (i.e. without prescale) has been designed to comply with the requirement of the LHC physics program. In 2015, it was even more inclusive than it was in Run-2. To maximize the output of the experiment relevant to the complete set of physics analyses to be carried during Run-2, the trigger menu is optimized for several luminosity ranges, changing even during a fill to use all available resources while the instantaneous luminosity and the average pile-up drop during a fill. An example of the bandwidth usage of the various triggering objects is presented in Fig. 9. Finally, the streaming strategy has been simplified, using only one single Main Physics stream to channel all the events to be used in the bulk of physics analyses. This change reduced event duplication, thus reducing storage and CPU resources required for online reconstruction by roughly 10%. In addition, a new streaming strategy, based on a partial event storage of only HLT reconstructed objects, sacrificing the ATLAS detector data needed for offline reconstruction, has been developed in Run-2. Such streams are used for calibration purposed, and to carry Trigger-Level Analyses (TLA) [7]. Such analyses are particularly useful for physics studies where the phase space probed is at kinematics lower than what is provided by the lowest unprescaled triggers. We can for example see in Fig. 10 that more than one order of magnitude of dijet low p T events are recovered by the Trigger-Level Analyses compared to what standard offline analyses can afford. This is another example of how creativity on real-time analysis serve the physics objective of the experiment. Common features to all rates are their exponential decay with decreasing luminosity during an LHC fill. The rates periodically increase due to change of prescales to optimize the bandwidth usage, dips are due to deadtime, and spikes are caused by detector noise*.

III. EXAMPLES OF REAL TIME DATA ANALYSES
Inner detector and muon spectrometer tracks, as well as calorimeter cells and clusters, are not directly used to select events at trigger level but are used as ingredients to reconstruct electrons, muons, taus, jets, b-jets, and E miss T objects. In turn, these objects can be used to select multiple particle events, such as the triggers dedicated to B-physics for example 2 . The reconstruction and identification of these particles is critical for selecting as many events containing W bosons, Z bosons, H bosons and top-quarks as possible, on which most of the LHC precision measurements bare. The particles reconstructed at trigger level are also used to signal new phenomena. Inefficiencies in their reconstruction, or too high kinematic thresholds could compromise a BSM discovery or the precision of the SM parameters and cross sections to be obtained from these data. The task of the trigger is therefore to control rate in a way that keeps very high efficiency particle selections with thresholds as low as possible. Because of the small cross section and the small fake rate for processes involving multiple reconstructed particles when one of them is an electron or a muon, the largest trigger bandwidth is attributed to the lowest unprescaled single lepton (electron, muon, and tau) triggers. This is illustrated in Fig. 11 that gives an example of the single electron trigger rate compared to the dielectron trigger rate with even lower p T threshold on each electrons (left), as well as an estimate of the physics processes contributing to the lowest unprescaled single electron trigger used in 2016 (right). Similar patterns apply to muons. Jets are however more tricky. Because the LHC is a hadron collider, realm of the strong interaction, the production rate of dijet and multijet events is so large that the jet thresholds have to be very high to keep rate manageable. For example, the lowest unprescale single jet trigger has a threshold of 360 GeV, more than one order of magnitude larger than for the corresponding electron and muon triggers. Similar arguments apply to tau and E miss T . That was already the case in Run-1. However, in Run-2, these triggers had to also develop strategies to stay robust against pile-up in order to keep the thresholds relatively stable with respect to what they were in Run-1. Improvements in the different object reconstruction algorithms, building on the improvements of the overall trigger system presented in Sec. II, however succeeded in meeting the objective of keeping high efficiency at comparable kinematic thresholds as in Run-1 for all particles (e, µ, τ , etc.), despite the increase in rates and pile-up in Run-2. Some of these successes are summarized below.

A. Electron trigger
Like any other objects, the objective of HLT electron reconstruction algorithms is to reject events as fast as possible, while identifying electrons and reconstructing their kinematic almost as efficiently and accurately as what can be done offline. Because of the Run-2 improvements to the ATLAS TDAQ system, especially of the better CPU time management  Fig. 12. Comparison of the likelihood-base and the cut-base HLT electron triggers efficiency as a function of the offline electron candidate's transverse energy E T with respect to true reconstructed electrons in Z → ee simulation. The HLT e24 medium iloose L1EM18VH trigger is the Run-1 algorithm requiring an electron candidate with E T > 24 GeV satisfying the cutbased medium identification, while HLT e24 lhmedium iloose L1EM18VH corresponds to the Run-2 algorithm using the likelihood-based lhmedium electron identification. Both trigger chains also require the same track isolation selection and are seeded by the same level-1 trigger (L1 EM18VH) [4]*.
at the HLT, multivariate techniques are now being used online to a) calibrate the energy of the clusters used to reconstruct electrons and photons; and b) implement the likelihood discriminant developed offline to identify electrons with different purity and efficiency figures of merit. Three working points are used at HLT: loose, medium, and tight. The composition of the likelihood is the same as offline, with the exception of the momentum loss due to bremsstrahlung that is not accounted for in the online algorithm. This approach has a better rejection for the same efficiency as the simple cutbase approach that was used in Run-1, or, conversely, a better efficiency for the same rate, as is demonstrated in Fig. 12 with simulation. Because of the high rejection rate of these electron identification algorithms, the lowest unprescaled p T threshold at the HLT can be kept very close to the corresponding threshold at L1. This is impressive because the L1 accept rate is about 100 time larger than the HLT output. In Fig. 13 we can see that the HLT efficiency turn-on curve is steeper than the L1 one. The cost for keeping such a low HLT threshold is however that a 100% efficiency is never reached by the HLT identification algorithm compared to offline. Comparing the left and right panel of Fig. 14 shows that the tighter is the identification working point, the larger is the signal efficiency lost. However, as can be seen in Fig. 15, reporting the positron p T in W + decay selected for the W mass measurement, the most precise measurement at the LHC [8], increasing the p T threshold well beyond 30 GeV would compromise any W measurement. It is therefore better to sacrifice a few percent efficiency for all p T , to keep the bulk of the electron p T distribution. These hard decision have to be taken, while designing the trigger menu, by the whole ATLAS community, but the high performance of the trigger makes this decision easier to take. Note, as we can see in Fig. 14, that the data to Monte Carlo agreement is excellent, showing that we have a good understanding of the behavior of this trigger.  Fig. 13. Efficiency of the L1 EM20VHI trigger (circles) as well as the combined L1 EM20VHI and HLT e24 lhtight nod0 ivarloose trigger (blue triangles) as a function of the offline electron candidate's transverse energy (E T ). A variable-size cone isolation criteria is applied ("ivarloose"). The HLT trigger requires an electron candidate with E T > 24 GeV satisfying the likelihood-based tight identification. The offline reconstructed electron is required to pass a likelihood-based tight identification [4]*.

B. Muon trigger
For the muon trigger, the largest challenge is not so much the large background reduction, but the efficiency lost at L1 due to limited instrumentation coverage. As can be seen in  Fig. 16. Absolute efficiency of Level 1 (L1) MU20 trigger and absolute and relative efficiencies of the OR of mu26 ivarmedium with mu50 High Level Triggers (HLT) plotted as a function of φ of offline muon candidates in the barrel detector region. The efficiency is computed with respect to offline isolated muon candidates which are reconstructed using standard ATLAS software and are required to pass "Medium" quality requirement. The selection is restricted to the plateau region with p T > 27 GeV [4]*. The efficiency is computed exactly like described in the caption of Fig. 16.   Fig. 16, there are significant variations of the L1 muon trigger efficiency as a function of the azimuth angle φ because of the limited RPC coverage for central rapidity (|η| < 1.05) due to the detector feet, elevator shafts, and toroid magnets. We can see that the HLT adds almost no inefficiency in selecting muons that can be reconstructed offline compared to the L1 trigger as HLT and offline both use the same detector signal. Fig. 17 present the muon trigger efficiency respect to offline as a function of the transverse momentum of the offline muons. We can see on the left panel that the L1 inefficiency due to lack of coverage of the RPC chambers amount to about 30%. The problem is however about three times smaller for the region covered by the TGC detector, as can be seen on the right panel of Fig. 17. In both cases we can see that the HLT-only muon trigger algorithm is performing very similarly than the offline muon reconstruction and identification algorithm: the HLT turn-on curve with respect to L1 is very close to be a step function. Note that despite this limited of acceptance, the trigger and offline reconstruction algorithm are very precise and the background usually well understood, such that measurements in the muon channel are often the most precise.

C. Jet trigger
Beside the rate difficulties discussed above, the main challenge of jet triggers at the HLT is to calibrate them and to deal with pile-up in such a way that jet events are selected as efficiently as possible. As presented in Sec. II-B, topoclusters very similar to the offline ones are used as input to HLT jet algorithm. Jets are then calibrated in a two-step procedure similar to that adopted for offline analyses: first, pile-up contribution is subtracted on an event-by-event basis using the calculated area of each jet and the measured energy density in the central part of the calorimeter; second, the response of the calorimeter is corrected using a series of p T -and ηdependent calibration factors derived from simulation. The calibration strategy is continually improving as can be seen in Fig. 18. Starting in 2017, the calibration also used track information. The sharp HLT efficiency turn-on curves presented in this figure prove that there is a good agreement between the HLT and the offline jet energy measurements. Note that in contrary to electron and muon efficiency measurements, a bootstrap method [9] is used to obtain the jet trigger efficiency as is illustrated on the left panel of Fig. 19. Many physics analyses focus on events with heavily boosted massive particles decaying to multiple jets that are collimated. To avoid large efficiency lost due to jet reconstruction algorithm not adapted to this kind of event topologies, the jet reconstruction algorithm is fast enough to be run twice on an event in order to produce large size (large-R) from the output of the standard jet algorithm. Special jet trigger elements are then added to the menu to efficiently select such large-jet events. The performance of this jet algorithm is illustrated on the right panel of Fig. 19.

D. Tau trigger
While data sample enriched in leptonically decaying tau particles are selected by electron and muon triggers, hadronically decaying taus require a dedicated trigger. These are in essence narrow jets. Keeping their rate under control for p T thresholds low enough for the physics of interest is particularly challenging. To meet this objective, a 3-step reconstruction algorithm is deployed at the HLT. In the first step, narrow calorimeter energy deposits are identified from the reconstructed topoclusters found in a cone of size ∆R = 0.2 around the L1 object used to seed the HLT. In a second step, tau candidates are selected if there is a small number of reconstructed tracks pointing to the tau cluster, with the leading track central to it. Finally, a collection of variables built from the topoclusters and the tracks obtained by a precision   Fig. 19. Left: Efficiencies for HLT single-jet triggers as a function of leading offline jet p T . Triggers denoted HLT jX accept an event if a jet is reconstructed at HLT with E T > X GeV*. The unprescaled trigger with the lowest threshold requires a jet with E T > 380 GeV [4]. Right: Efficiencies for HLT large-R single-jet triggers as a function of the leading offline trimmed [11] jet p T . Blue circles represent a trimmed large-R jet trigger with a p T threshold of 420 GeV. Adding an additional 30 GeV cut on the jet mass of the selected trimmed trigger jet is shown in green triangles. The mass cut significantly suppresses the QCD di-jet background, allowing a lower p T threshold of 390 GeV, while retaining nearly all signal-like jets with a mass of above 50 GeV*. tracking algorithm is used in a Boosted Decision Tree (BDT) multivariate algorithm to produce a score with which the final tau identification is done. To maximize the correlation between online and offline identification, the BDT is trained using offline inputs. To mitigate pile-up effects, all variables used in the BDT are corrected according to the expected average interaction per bunch-crossing. The behavior of the BDT and the kinematics of the reconstructed taus at the HLT are well understood as can be seen from the excellent data-to-MC agreement observed in both panels of Fig. 20. Measurements of the tau trigger efficiency as a function of the offline tau p T have been obtained using the tag-and-probe technique on high purity samples. Results are presented on the left panel of Fig. 21. As can be seen on this figure, the tau trigger efficiency is well-modeled by the Monte Carlo (left), and the HLT is only adding a marginal extra source of inefficiency compare to L1 (right).
The largest challenges however probably come from the E miss T triggers which require information about the entire detector, but which is also highly sensitive to pile-up. To  Fig. 21. Left: Tau trigger efficiency measured in data and compared to simulation, with respect to offline reconstructed tau candidate with one or three tracks and passing the offline medium identification criteria, as function of the offline transverse momentum. The trigger efficiency is measured in a tag and probe analysis with Z → τ τ → µτ had event from the 2016 dataset in 13TeV collision (8.0 fb −1 )*. Right Comparison of this HLT tau trigger efficiency with the L1 tau trigger efficiency [4]*.
benefit from the pile-up removal from jet energy measurements at the HLT, an offline-like E miss T was developed using trigger jets as input (MHT) rather than calorimeter cells or topoclusters. While such reconstruction algorithm performed very well in 2015 and in early 2016, it rapidly became clear that this was not sufficient: the MHT algorithm is exponentially dependent on the pile-up increase. During the shutdown between Run-1 and Run-2 another algorithm was developed that was suppressing pile-up energy on an eventby-event basis beyond what is reconstructed in the jets. This algorithm uses topoclusters energy in region of the calorimeter where the hadronic activity is less intense to model the pileup and uses a fit, under the assumption that the total pileup does contribute to no net E miss T , to estimate the pileup contribution to region of the detector where the hadronic activity of the main process is likely to be situated [2]. As can be seen in Fig. 22, this algorithm (PuFit) succeeded in linearizing the E miss T rate dependence on pile-up, allowing much lower thresholds than would be otherwise possible. As can be seen in Fig. 23, the PuFit algorithm is even a little bit more efficient than the MHT algorithm, despite being much more different than the offline E miss T reconstruction algorithm. Note that because of L1 improvements presented above, the L1 threshold is kept so low (50 GeV) that the only source of inefficiency with respect to offline comes from the much more precise HLT algorithms.

IV. CONCLUSION
Large statistic data samples constitute one of the key ingredients for exploring new physics and performing highprecision measurements. To do this, the LHC luminosity is continually increased. This constitutes a challenge for data-taking. Thanks to improvements to the ATLAS Trigger and DAQ system, ATLAS succeeds in selecting the relevant physics events with high efficiency and close-to-offline performances, while coping with the objects rate increases.