The sTGC Router <cit.> serves as a packet switch for routing strip charge information from the strip-TDS on the sFEB to the sTGC TP <cit.>. There is one per layer for each sector. They are implemented in radiation- and magnetic field-tolerant electronics and sit in the sector's Rim Crate with the Pad Trigger board.

sTGC Serial and LVDS Repeaters.

Signals on the fast copper TwinAx connecting the FEB to the Pad Trigger and the Router suffer excessive attenuation if the cable length exceeds about 5.
The pad-TDS to Pad Trigger and strip-TDS to Router links operate at a speed of 4.8Gb/; the Pad Trigger to strip-TDS at 640Mb/, based on LVDS signals.
Serial and  LVDS Repeaters <cit.> (as appropriate) are therefore placed on all these lines to mitigate the attenuation.

Low Voltage Distributor Board.

The input power to the FEAST on all the NSW on-detector electronics is supplied by NGPS located in US15. The NGPS provide 280 to the ICS <cit.> modules (see Section <ref>), which convert it to 11 and supply the electronics through the LVDB. One LVDB can supply up to eight front-end boards (section) and up to four digital boards (digital section).
Each MM wedge has eight LVDB which act as splitters for the channels from the ICS. Every input channel is connected to eight MMFE8, with an individual fuse for each MMFE8.
There are two types of sTGC LVDB: one mounted on the Faraday cage of each wedge (64 in total), and one in each Rim-Crate (of which there are 32, one per sector).
The on-wedge LVDB have fuses for each FEB, and each of the four LV power supply channels corresponds to all the FEB on one detector layer (three pFEB and three sFEB); they also power the on-wedge L1DDC.
The Rim-Crate LVDB aggregate two power supply channels each, and power all the Rim-Crate electronics.
The Serial Repeaters typically draw power from a nearby L1DDC or, in a few cases, from a nearby LVDS Repeater.

§.§.§ Trigger

The overall requirements for the trigger electronics (and for the data acquisition — Section <ref>) are stringent: the trigger decision has to arrive at the SL within 1075 (43 BCID) of the collision,
and nearly half this time is required for fibre and cable delays.
The on-detector electronics must be radiation-tolerant to
and operate in a highly inhomogeneous magnetic field, exceeeding 0.5 in places.
Once the detectors are assembled, access to their electronics is extremely limited: most of the FEB are completely inaccessible, and most of the Rim Crates are only accessible during shutdowns long enough for the NSW to be moved out of its running position.
The trigger is therefore designed so that it still functions efficiently even if only a subset of the detector layers are operational, and some key components are redundant.
Despite the fact that the NSW consists of two very different detector technologies, many components were designed to be used by both.
A defining aspect of the architecture is the use of FELIX (see  Section <ref>) for the Readout, Configuration and TTC distribution paths.

The L1 Muon trigger for is described in Section <ref>. As in , forward muon triggers require track segments in the TGC of the EM-TGC; however, for , in order to reduce the fake rate, the requirement of a matching segment in the NSW is added to the L1 Muon SL trigger decision.

This section focuses on relevant features of the detectors designed for NSW triggering, and on the trigger functionality of the front-end electronics located on the detector, and on the rim of the NSW.
Three distinct trigger pathways identify potential signals from the NSW: the sTGC Pad Trigger, the sTGC Strip Trigger and the MM Trigger.
The Pad Trigger (described in Section <ref>) provides an initial RoI defined by an eight-layer coincidence “tower” of pads, defining an azimuthal range (identified by a “$\phi$-ID”) that is used directly by the TP, and a radial range (the “Band-ID”) that uniquely determines which group of sTGC strips should be read out by the sTGC Strip Trigger.
The sTGC Strip Trigger performs fast cluster-finding using only strips within the range of the Band-ID indicated by the Pad Trigger, as described in Section <ref>. The MM Trigger runs independently of the sTGC triggers, looking for particle “roads” based around the first MM strip channel to fire for each VMM; this is explained in Section <ref>.

The Pad Trigger runs in the Rim Crates on the NSW, while the sTGC Strip Trigger and the MM Trigger algorithms run in the NSW-TP, located off the detector in the Service Cavern USA15.
At each bunch crossing, the NSW-TP looks for local track segments that point to the IP, and sends them to the SL
to corroborate muon triggers from the EM-TGC.
The track segments are inputs to the L1-Muon trigger decision, described in Section <ref>.

sTGC Pad Trigger
The VMM sends a discriminated
pulse to the pad-TDS from its
threshold-crossing circuit
as described in Section <ref>.

The pad signals  are captured every BC. The pad-TDS has per-channel programmable delays that compensate for the different time-of-flight and pad trace lengths to the VMM. At the end of the BC, the firing status of all the channels is multiplexed and serialised by the pad-TDS, and the vector of pad “hit” bits in a gas gap is sent within one BC to the Pad Trigger Board in the Rim Crate for the sector.

To reduce the number of strip channels to be read out, while keeping the number of physical pads small, pad patterns are staggered across the four layers of each detector wedge by half a pad in both directions
to make logical towers corresponding to RoI built from virtual pads one quarter the area of a physical pad (about 4 in radial extension), typically corresponding to about 13 strips). The geometry of the pad offsets between the two wedges in each sector ensures that these logical towers point toward the IP.

Because a pad-TDS reads out at most 104 pads per cathode board, this is the maximum that can be used in the trigger. Some pad cathode boards of the innermost quadruplets have up to 112 pads, and in these cases the pads at the smallest radii are not used in the trigger; however these pads are not in the region $\abseta <2.4$ covered by the EM-TGC trigger that the NSW trigger is required to confirm.

The Pad Trigger uses the inputs from the pad-TDS on each of the four layers of the three quadruplets in each of the two sTGC wedges of its sector to tag a bunch crossing and identify the band of strips passing through the triggered tower in each layer that must be selected for readout from the strip-TDS.
Every pattern corresponding to a logical pad tower is checked to see if at least three out of four layers in both quadruplets have hits.
There are approximately 4000 possible trigger “candidates” (logical pad towers corresponding to tracks from the IP) in a Large sector and about 1800 in a Small sector, which are stored in LUT.

The $\phi$-ID of towers satisfying these criteria is sent to the NSW-TP, as well as directly to the FELIX for readout.
The Band-ID is sent to the strip-TDS on the sFEB to request the corresponding band of strips in each layer for their associated BCID.

sTGC Strip Trigger Inputs.
Each layer of each quadruplet has three (four for the inner quadruplets) strip-TDS chips on its sFEB.
At each BC, the Pad Trigger can request up to four strip-TDS chips per wedge-layer, and at most one candidate per strip-TDS, to select and send data for a band of strips.
The strip-TDS in each layer that holds a selected band transmits its digitised strip charges for that BCID to a Router in the Rim Crate.
The data transmitted include the BCID, band-ID, $\phi$-ID and the strip charges.
Although data from 17 strips (the 13 in the RoI and two neighbouring strips on either side) are serialised, there is only enough time to send 120 bits of data from the strip-TDS in one BC.
Since the size of a muon cluster is typically around four to five active strips, it is possible to reduce the number of strips transmitted from 17 to 14 and add one bit indicating whether the highest or lowest 14 are selected.
The Router has inputs from nine strip-TDS chips; however, only four TDS inputs are active for any given BCID.
For each BCID, the Router selects the four active strip-TDS inputs requested by the Pad Trigger and sends their data to the centroid-finding and track-extrapolation logic in the NSW-TP via four optical fibres per layer.
The sTGC strip trigger algorithm in the NSW-TP is described in Section <ref>.

Micromegas Trigger Inputs.
The address of the first strip channel in a BC to fire for each VMM is transmitted to the ADDC, which aggregates and forwards the address data (as described in Section <ref>) to the NSW-TP.
At most eight hits per ART are forwarded to the NSW-TP per BCID (see Section <ref>).
The MM trigger algorithm in the NSW-TP is described in Section <ref>.

NSW Trigger Processor.
The right-hand box of Figure <ref> illustrates the connectivity of the NSW-TP, which is located off the detector, and described in detail in Section <ref>.
The sTGC strip trigger and the MM trigger algorithms run independently on separate FPGA in the NSW-TP, which then merges the sTGC and MM candidate segments and sends at most eight merged NSW candidate segments for each BCID to the SL to be compared with EM-TGC muon candidates. Inputs and outputs are also sent to the FELIX.

§.§.§ Data Acquisition and Readout

MM strips are read out <cit.>
through the MMFE8; sTGC Strips are read out through the sFEB, and pads and wire groups through the pFEB.
All data from all MM readout strips and sTGC pads, wire groups and strips with signals above threshold (along with the signals of the neighbouring channels in the case of the strips) are digitised using the 10-bit ADC of the VMM ASIC on the respective FEB.
The digitised signals are buffered on the VMM until a L1A[From , this will be a L0A.] is received from the CTP.
Zero data loss is guaranteed for a maximum latency of 16, but if the VMM readout is delayed for longer, new data are lost; however, this far exceeds the latency requirements for , unchanged from .
The ROC ASIC on all of these FEB (described above in Section <ref>), receives L0A and L1A bits from the CTP via FELIX (see Section <ref>).
On receipt of a L1A [L0A at HL-LHC.], the ROC reads out data from the VMM and transmits it to the FELIX via the GBTx on the L1DDC mounted on the wedge.

§.§.§ Temperature and Magnetic Field Sensors

The magnetic field is complicated and highly non-uniform in the region occupied by the NSW.
To measure it in situ, twelve 3D Hall probe cards per Large sector, similar to those that were mounted on the MDT chambers of the SW <cit.>, are mounted on the inner (IP-facing) faces of each of the Large-sector sTGC wedges in the plane farthest from the IP (four per quadruplet).

All MM wedges have nine temperature sensors (NTC 10K thermistors) mounted on the same surface as the alignment source platforms (the surface facing toward the corresponding sTGC wedge).
All sTGC wedges also have nine of these temperature sensors, epoxied
in locations spread over the full surface of the non-alignment (outward) face.
All MM and sTGC wedges have four additional NTC sensors, mounted on the cooling water inlet and outlet pipes on either edge of the wedge (Section <ref>).

The B-field sensors and temperature sensors are all read out through ELMB modules <cit.> in crates at the rim of the NSW. ELMB is a general-purpose plug-on board developed by the ATLAS collaboration for various detector control tasks, and used since the beginning of .

§.§.§ Services

The NSW re-use, as far as possible, the services installed for the SW, including the gas racks that supplied the TGC, which use the same n-pentane/CO$_2$ mixture as the TGC, MDT
and CSC.
The MDT gas system was modified to re-purpose the racks supplying the SW.
The former CSC gas system was modified to supply the MM detectors with a new gas mixture.
The TGC gas system distribution racks were modified to allow the supply of the new chambers in the NSW.

The LV requirements of the NSW are different from those of the SW, and required a new system, described in Section <ref>.
Its greater power consumption required upgrades to the chilled water cooling systems of ATLAS, which now provide 175 to each side of ATLAS.

Gas Distribution

*MM Gas

The MM use a mixture of 93% argon, 5% CO$_2$ and 2% isobutane (iC$_4$H$_{10}$). The mixer is required to supply a nominal flow of 600/, with 32 flow cells calibrated to receive the same mixture at a flow of 030/ per flow cell.
The MM gas is supplied to each wheel through 16 input channels, each serving two wedges in the same plane of azimuthally adjacent Large or Small sectors.
A bundle of eight inlet pipes goes to the upper half of each wheel and another to the lower half.
Four of the eight pipes serve one quadrant,
each supplying two adjacent Large or two adjacent Small wedges.
Each pipe then splits into four at a manifold, with an input line going to each edge of each of the two wedges served.
Gas enters the MM wedges at the outer rim.
Impedances in the input lines and manifolds respectively ensure uniform gas flow through every wedge of the same type and through every layer of a wedge.
The gas is provided to each detector layer in every sector via two intermediate buffer volumes.
The average gas pressure in the chambers is 0.10.2
above atmospheric pressure, depending on the height of each chamber.
Gas is provided simultaneously to both inlets of the outer module and distributed by two small pipes to the inner module. The outlet of the inner module goes to the return line.
Outlet lines serving the same groupings of detectors as the inlet lines are connected at the inner end of each wedge.

sTGC Gas

The sTGC use the same strongly quenching mixture of 45% n-pentane and 55% CO$_2$ as the existing TGC, also at atmospheric pressure.
The TGC gas system was modified to add 12 channels for the n-pentane:CO$_2$ mixture and two channels for the CO$_2$ envelope.
The CO$_2$ channel surrounding the sTGC gas volumes, described in Section <ref>, is exhausted to a line equipped with flammable gas sniffers, so that in case flammable gas should leak from the detectors, it would be detected in the output of the CO$_2$ channel, and not escape into the ATLAS cavern.

The maximum flow rate for the entire TGC gas system for , including the sTGC, remains 5000/. This does not constrain the sTGC flow rate, and will change after LS3, when the gas-mixing system will be modified.
Gas is supplied to each wheel through two main gas input channels, each connected to a manifold distributing the gas to the eight sectors of the upper or lower half of the wheel.
Calibrated flow restrictors ensure that all wedges, Large or Small, receive the same number of volume exchanges per day, irrespective of their position on the wheel.
To ensure uniform flow and avoid damaging multiple layers in case of accidental contamination with dirt or debris, each layer of the wedge is separately supplied.
Gas enters each layer at one side of the small end of the innermost quadruplet and follows a serpentine path around the ends of the wire supports inside the gas gap, until it reaches the corner of the large end of the same side of the quadruplet, passes through a tube into the second quadruplet, and then passes in the same way to the outermost quadruplet, finally exiting at the outer radius of the wedge. There are thus four gas input channels entering the wedge at the inner radius and four gas outlet channels leaving it at the outer radius, all on the same edge of the wedge.

The grounding of the MS was designed <cit.> to follow the overall ATLAS policy <cit.>: for the definition of the DC level, and for safety, all wedges are connected from one point to the ATLAS structure ground. This “star” grounding does not allow currents to circulate in ground loops. It is, however, difficult to adhere strictly to this ideal in practice, and additional grounding connections were added in many places during construction and commissioning of the sTGC and MM detectors to suppress noise.

High Voltage Distribution
The sTGC anode wires are biased at 2.8 during running for optimal efficiency. A single HV is supplied to all the wire groups in a single gas volume of each quadruplet, except for the innermost quadruplets, where the wires are divided in two,
and the inner- and outer-radius ends of each gas volume receive separate HV. Each of the 32 wedges in each NSW thus requires sixteen HV channels in total, connected to the wedge with a single, multi-channel Lemo-Redel connector.
The SHV cables from the distributors connect to patch-panels on the rim of the wheel.
Like all the HV and LV systems of the ATLAS MDT, RPC and TGC, the NSW HV distribution uses the CAEN EASY Crate system, with EASY 3000 crates containing the power supplies and HV modules placed in racks in UX15, and mainframes and branch controllers in the USA15 cavern. The AC-DC power supplies in the US15 service cavern are the same that were used for the TGC of the original EI-wheel, and the original power cables are also reused.
The HV distributors occupy the two racks in the main UX15 experimental cavern previously used for the SW TGC.
The HV modules that powered the SW TGC are re-used, supplemented with new, additional radiation-hard modules.
Their cables were all replaced with new ones for .

Low Voltage Distribution
The 7500 on-detector electronics boards of the NSW draw about 110 of power in aggregate.
The boards are all powered by FEAST ASIC <cit.>, which can operate from an input supply of at most 12. As mechanical and thermal considerations limit the permissible cable bulk and require a supply of at least 48 DC,  a power conversion stage on the detector is therefore necessary: the ICS.

The ICS is required to withstand up to 96 of ionising radiation, up to 5.8e12 of 1MeV-equivalent n,
and single-event hadron fluences exceeding e12p (E>20), and to function in a magnetic field of up to (or perhaps exceeding) 0.5. The ICS are installed near the rim of the NSW, water-cooled, monitored and controlled remotely.

Each ICS module provides eight LV channels.
The MM system requires 80 ICS (five per sector),
and the sTGC system needs 48 ICS (three per sector),
for a total of 1024 LV channels in all.

Cooling Water
Numerous chips on the front-end boards of both MM and sTGC wedges require water cooling, as do the L1DDC of both technologies and the ADDC of the MM, as well as the ICS for the LV power,
the repeaters,
and the electronics in the Rim Crates at the edge of the wheel.
For each wheel, two cooling loops supply the eight upper and lower sectors of the wheel respectively.
The maximum height difference between elements supplied by the same loop is therefore 3.6.
Cooling pipes from the cooling station enter each wheel via the flexible chains.
A manifold splits the input flow into twenty individual lines, eight for the  MM sectors, eight for the sTGC sectors, and four supplying the rim electronics.
In each line, flow can be switched off by means of a manual cut-off valve, and adjusted by means of a needle valve.
An identical manifold, with the cut-off valves but without needle valves, combines the return lines from the sectors and rim electronics.

The MM wedges take advantage of the hollow spacer frame between them, which contains integrated stainless steel cooling channels.
The sTGC have no access to the central spacer, so their cooling water circulates along the radii of the wedges: each sTGC wedge has two cooling loops, one on each long edge, outside the main Faraday cage, with both the inlet and outlet at the outer radius. The cooling pipes are made of copper, bent to route them through the hot zones of all the FEB, and thermally coupled via conductive foam and metal connectors to the heat-emitting chips.  They then loop through the L1DDC at the outer radius before exiting the wedge. To minimise the risk of leaks, the cooling loop on each side is a single continuous loop, with electrically insulating connectors placed as far as possible from the wedge electronics.

The FEB have built-in temperature monitoring, and temperature sensors are also mounted on the input and outputs of the cooling pipes and on the outer surfaces of the sTGC and MM wedges, as described in Section <ref>, ensuring that a cooling failure would be rapidly detected.

§.§ Upgrades to the Muon Spectrometer Barrel Coverage

This section describes all upgrades to the Barrel MS since .
MDT chambers serve as the primary precision tracker for the entire barrel of the ATLAS MS, as well as for the EM and EO stations of the endcaps; however, because of the relatively large 30 diameter of the individual drift tubes, they have long drift times, are subject to high occupancies in regions where background rates are high, and there are some regions of the detector where space is very tight.
The RPC that provide the barrel muon trigger are subject to similar constraints.
In response to these challenges, new, smaller-volume versions of both technologies have been developed to fill gaps in coverage in the original MS, and improve trigger coverage in the complicated transition region, where tracks pass through both barrel and endcap chambers. The sMDT and sRPC technologies are described in Sections <ref> and <ref> respectively.
Chambers added during LS1 and are described in  Section <ref>, and those added in LS2 in Section <ref>.

§.§.§ Small-Diameter MDT Chambers

For regions where high backgrounds or tight space constraints make the use of traditional MDT impractical, new sMDT <cit.> chambers have been developed
with a 15 tube diameter: half the diameter of the drift tubes of the MDT chambers. Operated with the same mixture of 93% argon and 7% CO$_2$ gas at 3, with the same gas gain of 20000, and read out by the same eight-channel
ASD chips, the spatial resolution of the sMDT as a function of the drift radius is similar to that of the MDT <cit.>
Section <ref>).
The average sMDT drift tube resolution is expected to remain below or around 110, even for the maximum background rates expected at the HL-LHC in the inner barrel region of ATLAS.

The sMDT spatial resolution and efficiency remain comparable to those obtained with MDT in the absence of any background rate, even when rates are increased by roughly an order of magnitude,
because the smaller tube diameter reduces the tube cross section exposed to background radiation and the maximum drift time from about 720 to 175
and leads to a strong suppression of the effects of
space charge caused by the photon and neutron background radiation in the cavern <cit.>. sMDT chambers have shown no ageing up to a charge accumulation on the wire of 9/ <cit.>, equivalent to several HL-LHC lifetimes in all regions of the detector.

§.§.§ New Thin-Gap Resistive Plate Chambers

Like the MDT, the RPC used in the trigger can also be made more compact and robust, and faster, by shrinking the gas gap.
Each singlet of the ATLAS sRPC, consists of a gas gap of 1 between two 1.2-thick graphite-coated HPL electrodes,
with the precise gap distance maintained by a grid of insulating polycarbonate spacers placed at 7 intervals.

The new chambers are operated with the same gas mixture[Studies are in progress to find a suitable replacement to conform to environmental requirements at the HL-LHC <cit.>.]
as the original ATLAS RPC, a mixture of C$_2$H$_2$F$_4$ (94.7%)-C$_4$H$_{10}$(5%)-SF$_6$(0.3%),
and reach full efficiency at a relatively modest HV of 5.6
with 710 times smaller average avalanche charge than the
legacy RPC.
The rate capability and lifetime are correspondingly enhanced by a factor 10 with respect to the legacy RPC <cit.>, such that the chambers can sustain a 1/ counting rate over the lifetime of the HL-LHC,
at least twice the requirement for the barrel inner layer <cit.>.
The time resolution of the sRPC is better than 350
due to the smaller avalanches, resulting in a triplet time resolution of about 200.

§.§.§ Improved Coverage in the Vicinity of Barrel Feet and Elevator Shafts

In the original configuration, there were acceptance holes in the bottom sector (Sector 13)
of the muon spectrometer barrel middle and outer layers due to the gaps required to allow elevators to pass.
In 2013, during LS1, these acceptance gaps in the outer barrel layer were projectively covered  by the “BOE” chambers, mounted below the outer barrel layer.
The BOE are standard MDT and RPC detectors of the original types used throughout the ATLAS MS.

In addition, two “BME” chambers were installed in Sector 13 in 2014, also during LS1, to cover the elevator holes in the barrel middle layer.
The BME stations use sMDT (operated with spare electronics from the original MDT construction) and sRPC, with new front-end electronics, similar to the BIS78 chambers described in Section <ref>. They are mounted on rails, which allow them to move into a parking position when the elevators are in use.
The BME sMDT chambers were operated in ATLAS throughout , improving the muon momentum resolution in these sectors <cit.> by providing a third track point measurement.

Twelve additional sMDT chambers (BMG) were then installed in the barrel middle layer during the 2016/17 winter shutdown to fill acceptance gaps inside the detector feet in Sectors 12 and 14 that support the calorimeters, the NSW and the endcap toroid cryostats. These were the first sMDT chambers operated using the newer front-end electronics also used for the BIS78 upgrade, described in Section <ref>.
The locations of all the chambers described in this section are shown in Figure <ref>.

Upgraded barrel muon chambers are shown in solid blue, and include the two BOE MDT chambers and the two BME sMDT chambers, covering the elevator shafts, the twelve BMG sMDT chambers in the calorimeter feet, and the eight sMDT and sRPC integrated BIS78 modules on Side A of the transition region between the barrel and endcap.

§.§.§ New BIS78 Muon Chambers

While the requirement of a matching segment in the NSW will reduce the L1 single-muon trigger rate in the $\abseta > 1.3$ region, a similar background exists in the region covered partly by barrel and partly by endcap chambers ($1.0<\abseta <1.3$).
In the original configuration
the L1 trigger rate for muons with $\pT > \SI{20}{GeV}$ originating from this small region was about
20% of the total L1 trigger rate.
As in the region covered by the NSW, this fake-muon background can also be reduced by requiring a coincidence between the trigger chambers of the EM wheels and an additional inner-layer chamber (see Figure <ref>).
In the Large sectors of the MS transition region, the additional trigger inner layer is provided by the EIL4 TGC chambers (mounted between the barrel toroid coils as shown in Figure <ref>), but in the Small sectors, the barrel toroid coils preclude the existence of “EIS” chambers.

To fill these gaps in the Small sectors of the inner layer of the endcap, the barrel inner layer extends into the transition region, with BIS chambers installed on the surface of the barrel toroid magnet coils.
During , these BIS7 and BIS8 chambers served only for tracking, and were not part of the trigger: like the other barrel-inner chambers, they consisted only of MDT.
Because of the limited space between the SW and the barrel toroid magnet coils (see Figure <ref>) the original BIS8 chambers comprised only a single multilayer of MDT.

fig:BIS78position Placement of the BIS78 sMDT and sRPC chambers
in the Small sectors of the inner endcap layer at the interface with the NSW and fig:BIS783D 3D model of a BIS78 module.

In order to add triggering capabilities in this region and thus reduce the trigger rate in the Small sectors, the MDT had to be replaced by a more compact technology with space to add RPC.
Both the BIS7 and BIS8 MDT chambers on side A of ATLAS were removed during LS2, and replaced by eight new integrated modules combining integrated  sMDT BIS7/BIS8 chambers and separate BIS7 and BIS8 sRPC in a single mechanical structure <cit.> (see Figure <ref>).
Because the new integrated modules cover the areas formerly covered by the BIS7 and BIS8 chambers (see Figure <ref>), they are called “BIS78”.
The corresponding BIS7 and BIS8 chambers on side C will be replaced by BIS78 during LS3 for operation at HL-LHC.

The coverage of the range $1< \eta <1.3$
with the sRPC in BIS78 is illustrated in Figure <ref>,
while the resulting anticipated rate reduction
is shown in Figure <ref>.
The new, smaller-volume technologies are also better able to withstand the high background rates anticipated in this region at the HL-LHC.
The BIS78 chambers constitute a pilot project for the complete replacement of the BIS MDT layer by the same type of integrated sMDT and sRPC chambers and the addition of sRPC triplets to the BIL layer after for operation at HL-LHC <cit.>.
The impact of the improved time resolution that could be obtained at the HL-LHC by using sRPC more extensively in the BI layer
will also be studied with the BIS78 chambers in .

[Muon rates]
The figure shows the $\eta-\phi$ distribution of reconstructed muons with $\pT >$ 20 and associated to an endcap trigger (from the TGC of the EM wheels)
from track segments in the EI chambers (blue) and in the BIS chambers (all other colours).

Like the BIS7 MDT chambers they replace, the
BIS78 sMDT chambers consist of two four-layer multilayers of small-diameter aluminium drift tubes.
The two multilayers are separated by a 45.5-high aluminium spacer frame, for an overall sMDT module height of 240 (see  Figure <ref>).

Cross-sectional view of BIS78 module, with inset 3D view (bottom right) and zoomed view of the sRPC triplet (bottom left).

The radially outer multilayer, ML2, covers the full area formerly covered by the BIS7 and BIS8 chambers, while the inner multilayer, ML1, covers only the BIS7 area, and is thus always shorter than ML2 by 30 tubes per layer, to make space for the BIS8 sRPC as shown in the upper part of Figure <ref>.
The BIS78 outer multilayers, ML2, mounted directly against the barrel toroid coils, carry the rail supports,
the in-plane alignment monitoring system, the external
optical alignment sensors connecting chambers to each other (which are the same as for the alignment configuration) and the magnetic field sensors.
The new light sources of optical monitoring systems connecting the barrel to the NSW are mounted on the inner multilayer, ML1, in the gap between the sMDT and the sRPC chambers.
The new chambers have twice as many electronics channels as the previous MDT, in total almost 11000.

Most tubes in the BIS78 sMDT chambers are 1660 long, the full azimuthal width of the chambers. The final 12 tubes per layer at the BIS8 end are in all cases shortened to 1000, giving the chambers the "T"-shape seen in the lower right inset of Figure <ref> and in Figure <ref> that allows them to interleave with the NSW.
In order to accommodate NSW support structures, however, chambers in Sectors 2;12;14;16 have cutouts where 30 tubes per layer in the BIS7 region have a reduced length of 1530.
Because the NSW support structures are not radially symmetric, the lengths of the BIS78 chambers are also different from one sector to another, with 108 tubes per ML1 layer and 78 per ML2 layer for Sectors 2;4;6 and, for all the other sectors, 96 per ML1 layer and 66 per ML2 layer.
The chambers in the uppermost Sectors, 4 and 6 are identical, as are those in Sectors 8 and 10; each of the four bottom chambers is unique.
There are thus six different sMDT chamber types in the eight Small azimuthal sectors.
The chambers that will eventually be installed on Side C of the detector (after LS3) are mirror images of the corresponding Side A chambers with respect to the mid-plane at $z=0$.

The BIS7 and BIS8 sRPC each consist of three sRPC detector singlets, as described in Section <ref>.
With the small gas gap and electrode thickness, these sRPC singlets are just 11.8 thick.
Their readout panels consist of two 0.3-thick PCB carrying the ground plane and the strip pattern, respectively, which are
glued to either side of a 3-thick FOREX® PVC foam spacer.
The ground planes of the two panels constitute the singlet Faraday cage into which the frontend electronics are integrated, in order to fully exploit its high sensitivity.
The RPC singlets are electrically completely decoupled from each other, and each sRPC singlet is individually read out on each side of the detector plane with $\eta$ and $\phi$ strip panels, respectively.
Each of the eight BIS78 sRPC stations has 544 $\eta$ and 544 $\phi$ strips,
so there are, in total, 8704 sRPC readout channels.

The sRPC in the BIS78 chambers are equipped with new highly sensitive readout electronics using silicon BJT charge preamplifiers with highly increased sensitivity of better than 4/ at 1700 electrons RMS noise amplitude,
less than 600 rise time and up to 100 bandwidth <cit.>. The frontend boards also contain new fast 4-channel discriminator ASIC in SiGe BiCMOS technology with 3 minimum threshold and 500 bandwidth.
The discriminated LVDS pulses from each BIS78 module are transmitted through a 5-long cable to a set of 18 external TDC boards employing HPTDC ASIC <cit.>.
The design of the front-end electronics has been made particularly robust, with low power consumption of less than 20/channel, radiation hardness, and ESD protection, as they cannot be replaced after the chamber has been constructed.

The sRPC triplets fit into aluminium support frames 55 high, (see bottom left image of Figure <ref>)
and are pressed together by 2-thick pre-bent aluminium plates at the top and the bottom, which distribute the force.
sMDT chambers and sRPC modules are mounted independently, and electrically insulated from each other on the
BIS MDT rail system using support brackets passing between the chambers in the $z$ direction. They fit within the allowed height envelope of 290.
The plastic gas inlets of the sRPC are designed as part of the gas-gap frame, increasing their mechanical stability and reducing external stress in order to prevent cracking.
The BIS7 sRPC all have an azimuthal dimension of 1840. Those in Sectors 2;4;6 have a $z$ dimension of 1180, while for Sectors 8;10;12;14;16 the $z$ length is reduced to 990.
The BIS8 sRPC all measure 440 in $z$. Those in Sectors 4;6;8;10 occupy the full 1840 azimuthally, while those in Sectors 2;12;14;16 are reduced in azimuth to 1720.

§.§.§ BIS78 Data Acquisition and Trigger System

The BIS78 sMDT are read out in a very similar way to the legacy MDT, except that new HPTDC ASIC <cit.> replaced the original TDC (as for the BMG chambers described in Section <ref>).
The front-end boards
of the sMDT chambers each contain three eight-channel ASD chips <cit.> to read out 24 tubes (as for the legacy MDT) and one HPTDC ASIC. A radiation-tolerant Actel ProASIC3 FPGA is used on each board to configure the ASD and HPTDC chips.
The HPTDC send the hit information via twisted pair cables to an MDT CSM, of which there are two per chamber, mounted in accessible places on the barrel toroid magnet coils. The CSM transmit the serialised
data via optical fibres to the legacy MROD
and also send the ATLAS clock and trigger signals to the HPTDC.

The readout for the RPC is based on the new FELIX <cit.> system described in Section <ref>, with new electronics of the type that will be used in the Phase II upgrades of the RPC system.
The digitised hit times from the strips of a BIS78 sRPC chamber are serialised and transmitted via a GOL <cit.> to the trigger Pad board, which is mounted on the chamber.
The Pad board uses a Xilinx Kintex-7 FPGA <cit.> to determine the local trigger coincidences from the RPC triplet hits.
Radiation-tolerant firmware design employing SEM core and triple redundancy logic is used to ensure robustness against SEU and TID radiation effects.
The RPC data transmission to the FELIX data acquisition system is handled by a GBTx chip on the Pad board, with a GBT-SCA
for monitoring and configuration, while the trigger candidate information is transmitted by the FPGA via an optical fibre to the off-detector endcap Sector Logic board.
The endcap Sector Logic boards combine the trigger information of the BIS78 RPC, the TGC and the NSW to generate the L1 endcap muon trigger, as described in Chapter <ref>.

§ FORWARD DETECTORS

The ATLAS Forward detectors are a set of four detectors installed along the LHC at different distances
from the IP. These four detectors are used for different purposes, all of them using the information carried by particles whose detection is missed by the rapidity coverage of the ATLAS central detector.
The physics topics that can be studied with these detectors range from total cross section measurement (ALFA, described in Section <ref>),
to diffractive physics (AFP — Section <ref> — and ALFA), to heavy ion physics (ZDC, Section <ref>), to absolute luminosity determination (LUCID, Section <ref>).
The layout of the forward detectors is shown in Figure <ref>.

Layout of the forward detectors.
The LUCID detector inside the main ATLAS volume provides a high-precision luminosity measurement; the ZDC, located just beyond the point where the two beams diverge, measure the energy of “spectator” neutrons in heavy-ion collisions; the AFP detectors measure time-of-flight and can trigger on bunch crossings producing forward protons in special low-pileup runs; and the ALFA Roman Pot detectors determine the total proton-proton cross-section by measuring elastic proton scattering at very small angles.

§.§ *LUCID Detector

LUCID is designed for high-precision measurement of the luminosity delivered to the ATLAS experiment by the LHC, both in real time and, with final calibrations and a more refined analysis, for offline reconstruction and physics analyses.

LUCID is the only ATLAS luminometer capable of delivering per-bunch absolute-luminosity measurements under all the various LHC beam conditions: high-luminosity collisions at top energy, heavy-ion collisions, special-purpose collisions at lower energies or very low luminosity conditions, and is therefore the reference luminosity detector for ATLAS. LUCID is complemented by several luminometers with different capabilities and covering various luminosity regimes: the BCM <cit.>, and the MBTS detector with per-bunch absolute-luminosity measurement under specific low-luminosity conditions; the per-bunch relative-luminosity measurements based on counting charged-particle tracks reconstructed in the ID at low and high luminosities, or based on counting pixel-clusters in the Pixel detector (under development); the bunch-integrated luminometers based on currents in the LAr gaps of a subset of EMEC and FCal cells, and on integrated currents of the scintillator-PMT in a selection of Tile extended-barrel modules, mostly for high luminosity conditions. For more details, see <ref>.
The luminosity reported by these luminometers is assumed to be proportional to the flux of charged particles striking the corresponding detector, integrated over a time interval ranging from one second to around one minute.

Online LUCID instantaneous luminosity measurements (bunch-integrated) are provided as fast feedback on a one- to two-second time scale to the ATLAS online-monitoring software and to the LHC control system, as are luminosity measurements from the other  experiments (ALICE, CMS and LHCb). This short latency and high sampling rate are of primary importance for the LHC operators to monitor beam conditions and optimise the accelerator performance. The absolute accuracy of the reported luminosity is limited to about 5 (typically with larger uncertainties early in the running period, and improvements over the course of the data-taking year).

The offline determination of the absolute luminosity scale is based on the vdM method <cit.>, and carried out in dedicated runs at low luminosity ($\mathcal{L} \sim 10^{31}\mathrm{cm^{-2}\,s^{-1}}$), and under accelerator conditions optimised to reduce the systematic uncertainties in the luminosity calibration <cit.>. This calibration is extrapolated to high-luminosity physics conditions and monitored throughout the data-taking year using a methodology that involves most of the ATLAS luminometers, and that is outlined in Section <ref>.
The overall uncertainty in the luminosity for proton collisions at $\rts=\SI{13}{\TeV}$  was determined to be 0.83 <cit.>.
Specialised datasets and heavy-ion periods require their own calibrations, with uncertainties as low as 1.5 in .

The design of the LUCID detector evolved over the course of LHC . A first version of LUCID, described in Ref. <cit.>, was used during ; the version <cit.>, called LUCID 2, will also be used for . The changes in the detector design were dictated by the rapidly changing LHC beam conditions, and by the increase in the annual radiation dose impinging on the detector. LUCID 2 has been shown to perform very well at the highest instantaneous luminosity delivered by the LHC. It was able to provide a highly accurate luminosity determination over the entire period, thanks in part to its built-in redundancy – each LUCID PMT can provide a luminosity measurement either alone or in combination with other PMT – and also to the extensive use of the numerous independent, complementary and well-understood luminosity measurements provided by ID-, LAr- and Tile-based systems, that were used to cross-check or correct the LUCID response.

Mechanical design of the LUCID 2 detector. The left of the diagram is toward the ATLAS cavern wall, and the cone (referred to in the text as the “VJ cone”) points toward the IP, holding LUCID inside the JF shielding, approximately midway between the EM and EO wheels of the MS.  The insets show pictures of a group of PMT and details of one PMT and its magnetic shield case.

§.§.§ *LUCID 2 Detector Description

The LUCID 2 detector is composed of two arms placed symmetrically
at about ±17 on either side of the ATLAS IP. The mechanical design of one arm is shown in Figure <ref>.

The PMT detector is formed by four groups of four PMT each, arranged symmetrically around the . The PMT are of the R760 model manufactured by Hamamatsu. The quartz entrance window of each PMT is used as a Cherenkov radiator. Charged particles with momentum above the Cherenkov threshold in the quartz window produce a number of photons which, on average, correspond to about 35 photoelectrons (p.e.). This signal is well above the noise threshold (1 p.e.) of the readout chain.

The PMT are mounted around an aluminium cooling cylinder, which is in thermal contact with a water cooling pipe, keeping the environmental temperature at an acceptable level for the PMT during the bake-out of the LHC . The PMT detectors are surrounded by a carbon fibre support cylinder that can be opened at four access points to allow easy replacement of the PMT and their high voltage divider bases for each of the four PMT groups.
The main conceptual difference in the LUCID 2 detector for with respect to the configuration is that the bases are now, like the PMT, completely replaceable during the winter shutdowns of the LHC schedule.
The reason for this was that about half of the PMT channels developed contact problems between the bases and the PMT pins after three years of running.
It is possible that this connector problem was due to radiation, due to the location of the connectors;
however, radiation tests with a gamma source have not confirmed this hypothesis.
The possibility of completely replacing a PMT and its base during a winter shutdown will help to maintain a high percentage of working readout channels during each one-year running period.

Each PMT base is of the boosted type, with four HV feeding points to ensure good linearity of the PMT response up to about 100 of current. The whole LUCID HV system consists of 160 independent channels powered by a CAEN SY1527 module <cit.> housing
four HV cards of type A1535N and three of type A1535SN.
The LUCID 2 detector is fully integrated into the ATLAS DCS (see Section <ref>), which continuously monitors the HV and current of every channel as
well as the temperature in various locations of the detector.

§.§.§ Prototypes for HL-LHC

The three LUCID 3 prototypes for installed. From top left, clockwise: the JN PMT, the side C fibre detector, the side A/C JF PMT. JN in this chapter is the same as TX1S in Figure <ref>.

In addition to the LUCID 2 PMT detector, three types of prototypes are present in the LUCID configuration, aiming to both measure luminosity in and to validate the LUCID upgrade project for
HL-LHC (called LUCID 3).
Refer to Figure <ref> (where JN is labelled as “TX1S”) for the locations of the shielding components.
The three prototypes are:

* the JF prototype is a PMT-based detector located in the inner channel of the JF shielding at a larger distance from the than LUCID 2 .

* the JN prototype is a low-rate PMT-based detector located in a shielded region behind the JN shielding surrounding the TAS;

* the Fibre prototype is a fibre-based detector located around the VJ-cone
surrounding LUCID 2

Figure <ref> contains sketch of the three prototypes.
A short description of the prototypes follows, while an extensive description of
the LUCID 3 upgrade project can be found in Ref. <cit.>.

§.§.§ JF detector

Two main limitations will prevent LUCID 2 from measuring the luminosity at the HL-LHC: the increased pileup, which will lead to the saturation of the event/hit-counting algorithms, and the total radiation to which the detector will be exposed, and the resulting activation of material, which will make it unsafe to carry out the necessary annual maintenance of the PMT. In addition, the VAX would strongly interfere with LUCID if it remained in its present location. Both aspects can be mitigated by moving the detector further from the . A possible location was identified in the inner channel of the JF shielding
hosting the , as shown in Figure <ref> (bottom images), where the PMT will be at a radius of about 30, compared to about 12 for LUCID 2. In the new location, both the radiation dose and the charged particle fluxes will be reduced by about 30 with respect to the LUCID 2 location. Moreover, no interference with the VAX will be present. Finally,
the JF shielding is removed and brought to the surface at each end-of-year shutdown, allowing for maintenance in a safer location than that of
LUCID 2 (which cannot be removed from the ).
The prototype detectors consist of four PMT per side. Two PMT of each group will be read out by a LUCROD card while the other two can be considered as spares, and read out in case faults develop in the initial two.
On Side A, four standard R760 PMT
are installed, while on Side C three R760 and one R1635 PMT are installed.
The R1635 is a smaller acceptance PMT (8 diameter instead of 10 for
the R760) which has been custom-modified by Hamamatsu for LUCID
to be equipped with a quartz window, needed both for the Cherenkov light production and for its radiation hardness.
The smaller acceptance will allow a further limitation of the hit-counting algorithm saturation, assuming the new PMT proves suitable for LUCID use.

§.§.§ JN prototypes

A further reduction of the particle flux and radiation exposure can be obtained
by placing PMT in the shadow of the forward shielding: here the levels are
reduced to about 10 with respect to the LUCID 2 location, potentially
avoiding any hit-counting saturation and possibly
reducing or eliminating the non-linearity with the luminosity which has been
observed in LUCID 2. The proposed location is shown in Figure <ref> (top left).
The two R760 PMT are at different radii, therefore with different levels of
shadowing from the JN, and are expected to have quite different acceptances
despite the small distance between them, due to the predicted steep radial dependence of the
particle flux with the position behind the shielding. In this way it will be
possible to have a direct measurement of the relative particle fluxes and
the final PMT position in LUCID 3 can be optimised.

§.§.§ Fibre detector

During , four fibre bundles per side constituted the LUCID Fibre detector. The Cherenkov light produced by charged particles along the fibres
is routed to PMT located in a low-radiation area in the
vertical channel behind the JN shielding. The fibre detector did not behave
as expected, in particular due to poor long term stability. The reason
for this poor behaviour is not entirely clear, but may be related both to
the monitoring system of the PMT gain (based not on the Bismuth source, but
on LED) and to the opacification of the fibres, which was not
On the other hand, the charge algorithms in general, and in particular
that of the fibre detector, showed remarkable linearity with the
luminosity, which was not the case for the hit-counting algorithms. For this
reason, a new attempt to exploit this technology is being made in but
with major modifications aimed at solving the main problems of the former
fibre detector:

* Quartz fibres of type UVNSS 600/624/660 are now used, motivated by the improved radiation hardness of their Fluorine-doped silica cladding compared to that of the silicon cladding of the original fibres. There are two bundles of fibres and each bundle is read out
at the end by a PMT;

* A more effective calibration and monitoring system obtained by the combination of a Bismuth source deposited onto the window of the readout PMT and an LED system to monitor ageing of the fibres.

The fibre detector is shown in Figure <ref> (top right) in which one can see the routing of the two fibre bundles and the placement of the two readout PMT, on top of the support structure for the VJ cone (in black in the figure) in a region of strongly reduced radiation dose. Each fibre bundle starts from the PMT window, reaches the LUCID 2 detector area and then returns back, with an open end used to inject LED light to monitor fibre ageing.
A set of six LED with wavelength variable from the green to the UV injects light both directly to the PMT front window
(prompt signal) and to the opposite end of the fibre bundle (delayed signal).
The prompt and delayed signal have enough time separation to be clearly distinguished, allowing their relative amplitudes to be monitored. Changes in the relative amplitude of the two signals
are expected to provide an estimate of the decrease in the light
transmission of the fibre bundles due to radiation damage: this
information will
be used to make offline corrections to the luminosity measured during the run
to compensate for this effect.
The readout PMT is a Hamamatsu R7459, which has a large area window, allowing it to accommodate both the fibre bundle end and the Bismuth radioactive source used for calibration purposes.

§.§.§ *LUCID 2 Readout Electronics

LUCID 2 is designed to measure the luminosity delivered in each of the 3564 bunch crossings during one LHC orbit.
In order to achieve this, a fast readout and signal processing chain has been designed.
The signals delivered by each PMT are fed into a 15 low-loss coaxial cable and then received by the powerful LUCROD processing card
pictured in Figure <ref>. The relatively short cable length does not significantly degrade the fast PMT signal,
which can then be amplified by a 350 bandwidth amplifier and fed to a fast 12-bit ADC, sampling at a rate of 320 (eight samples
per LHC machine BC). Each digital waveform signal is processed in one FPGA providing two types of information:

* Signal amplitudes above a preset threshold, called  in the following;

* Signal amplitudes integrated over the eight waveform samples, called  in the following.

The signals of each readout channel are then stored in the other FPGA where they are delivered to a second processing card, the LUMAT
, pictured in Figure <ref>, which counts the total number of per detector arm, runs several -based algorithms, and provides two L1 Trigger signals (the AND and OR of the two detector arms) to the ATLAS CTP.

The LUCROD and LUMAT boards are both implemented in the VME 9U standard. The LUCROD card accepts 16 input channels and the connection to the LUMAT card is over a fast optical fibre (s-link <cit.>). Each detector arm is served by two LUCROD cards. All LUCROD cards continuously send to two LUMAT cards which combine the information from the two detector arms. The LUCROD cards sit in one VME crate on each detector side, placed on a service platform close to the detector, in order to limit the length of the signal cables. The two LUMAT cards sit in a VME crate placed in the ATLAS USA15 service area.

Since LUCID has to provide online luminosity measurements not only during ATLAS data-taking but also during LHC machine tuning, it can run continuously in standalone mode, independent of the ATLAS TDAQ system.
A fraction of the fully reconstructed waveforms is stored locally for possible cross-checks or to study detector performance.

Photographs of the  LUCID 2 readout cards: fig:lucroda LUCROD and fig:lucrodb LUMAT.

§.§.§ *LUCID absolute-luminosity calibration and luminosity-measurement methodology

A fundamental ingredient for a stable luminosity estimate based on LUCID is the control, at the 1 level, of the stability of the LUCID PMT gains. This is accomplished by a very effective calibration system based on the radiation emitted by the (approximately)  40 source deposited on each PMT window. This source emits, among other decay products, monochromatic electrons of about 1 kinetic energy, which is enough for them to cross the 1.2 quartz window, and to produce roughly the same amount of light as a high-energy charged particle traversing that same window. At low luminosity, for example, during heavy-ion running or in the tails of vdM-calibration scans, the $\mathcal{O}$ rate from this monochromatic electron source represents a non-negligible background that must be subtracted from the raw LUCID signal.

Gain variation with respect to the first day of calibration in 2017. The PMT HV was corrected between collision runs aiming to keep signals average amplitude constant (red line).

The PMT gains are monitored on an approximately daily basis by recording the amplitude spectrum of the signal from each PMT during periods without beam. The typical amplitude and charge inferred from these spectra, normalised to unity at the beginning of the running period, are shown in Figure <ref> as functions of time over the year 2017. The red points refer to the average amplitude, and the blue ones to the average charge. The average amplitudes of the calibration spectra are kept constant within a few percent throughout the entire period, while the average charge diverges systematically away from unity, decreasing by 8 over the six-month time span shown in the figure. Since the relationship between signal amplitude and charge changes when the HV setting is increased to keep the gain constant <cit.>, only one of the two can be stabilised throughout the data-taking year.

Keeping the amplitude constant is essential for the algorithms, since their luminosity measurement is based on the fraction of beam crossings in which this amplitude exceeds a given threshold (defining a “”); charge algorithms, in contrast, rely on the stability of the charge measurement. In early , the charge algorithms were originally perceived as the most promising. In 2015 and 2016, therefore, the choice was made to keep the average charge constant. Experience, however, demonstrated the superior performance of the algorithms, so that in 2017 and 2018 the average amplitude was stabilised instead. Offline corrections to the hit-counting efficiency that had been introduced in 2015 and 2016 became obsolete.

In  -counting algorithms, the average fraction $f$ of BC containing a (typically a signal above a given threshold) is assumed to obey binomial statistics (while the pileup parameter $\mu$ is assumed to be Poisson-distributed). The luminosity per bunch crossing, $\mathcal{L}_{BC}$, is given by

\begin{equation}
\mathcal{L}_{BC}=\frac{-\ln(1-f)}{\sigma_{vis}}\cdot f_\text{rev},
\end{equation}

where $f_\text{rev}$ is the LHC revolution frequency, and $\sigma_{vis}$ is a calibration constant called the visible cross section that is measured by the vdM method. A -counting algorithm based on one of the two independent sets of eight PMT denoted as Bi1 or Bi2, is  typically chosen as the “preferred” algorithm both for online luminosity monitoring and for a first rough estimate of the offline luminosity. For the final offline luminosity, the preferred algorithm is chosen in each data-taking period (typically one year) based on a detailed analysis of its linearity and relative stability across that period. In , the preferred offline algorithm was based either on a subset of eight PMT (in 2016 and 2017), or on a single PMT (in 2015 and 2018).

For algorithms, the average charge collected in a given BCID, is intrinsically proportional to the bunch luminosity $\mathcal{L}_{BC}$ associated with that BCID:

\begin{equation}
\mathcal{L}_{BC}=\frac{C}{K_{cal}}\, ,
\end{equation}

where $C$ is the charge averaged over a time interval, denoted as a LB[LB have a typical duration of about one minute, within which the instantaneous luminosity and data-taking configuration are considered to be stable, and serve as an approximate “time-unit” in ATLAS luminosity measurement.], collected in the BCID considered[Care must be taken to exclude those bunch crossings in which the LUCID readout chain may be saturating.], and $K_{cal}$ is a calibration constant to be determined by the  vdM method. Because of their intrinsic linearity, algorithms are in principle better behaved than counting algorithms in high pileup conditions. The downside is that the instantaneous luminosity inferred from charge measurements is directly proportional to the PMT gains, which have been observed to vary by up to a few percent over the course of a single LHC fill. Solutions to compensate for this disadvantage are still under study.

The absolute luminosity scale of each LUCID algorithm, or equivalently the corresponding visible cross-section $\sigma_{vis}$, is measured by the vdM method under experimental conditions optimised to minimise systematic uncertainties: low pileup ($\mu \sim 0.5$) to eliminate LUCID non-linearities, at most 150 isolated bunch pairs colliding in the LHC to avoid long-range beam-beam crossings or out-of-time pileup in the luminometer electronics, and therefore low instantaneous luminosity ($\mathcal{L} \sim \SI{e31}{\per\cm\squared\per\s}$). The bunch intensity is lowered to around 0.8e11 protons/bunch, and the injected emittance increased to  [range-phrase = –]2.53.5, so as to minimise longitudinal charge leakage out of the nominally filled positions along the LHC-ring, as well as beam-beam–induced distortions of the vdM-scan curves. In addition, the crossing angle is set to zero to minimise orbit-drift and beam-beam correction uncertainties, and the $\beta$ function[The $\beta$ function describes the single-particle betatron motion around the central orbit, and in particular the variation of the transverse beam envelope along the beam trajectory. $\betastar$ is the value of the $\beta$ function at the IP, and indicates how squeezed the beams are at the IP, by giving the distance along the beam direction after which the $\beta$ function (the transverse beam size) has been multiplied by a factor of 2 ($\sqrt{2}$) compared to its value at the IP. A large $\betastar$ indicates wide and almost parallel beams, a small $\betastar$ indicates narrow, but divergent beams.] at the IP is increased to $\betastar = \SI{19}{\m}$ to widen the luminous region in order to facilitate non-factorisation corrections <cit.>.

These luminosity calibrations, that are obtained in the so-called “vdM regime”, cannot be directly applied to physics data-taking conditions which exhibit non-zero crossing angle, with values in the range 0.30.6, 40 lower emittance, 50 higher bunch intensity, two orders of magnitude higher pileup, up to around 2500  bunches grouped in trains, as well as three orders of magnitude larger instantaneous luminosity. This is primarily because LUCID suffers from significant pileup-dependent non-linearities that result in an overestimate of the luminosity of up to 10 at $\mu \sim 50$. These non-linearities are corrected, separately for each algorithm, using a calibration-transfer procedure based on counting custom-reconstructed charged-particle tracks emerging from inelastic collisions in randomly selected colliding-bunch crossings – an observable proportional to the number of interactions per BC and thus to the instantaneous luminosity.

The custom track reconstruction uses only hits in the IBL, the Pixel and the SCT detectors; the track-selection criteria are optimised for luminosity monitoring over the full range of pileup levels encountered during running ($0.01 < \mu < 60$). During both and , TC demonstrated very good linearity with respect to $\mu$, as well as excellent long-term stability under evolving ID conditions. Because the per-bunch TC-based luminosity is statistically limited under the low-$\mu$ conditions of vdM scans, this algorithm is not independently calibrated by the vdM method, but cross-calibrated to LUCID during an extended head-on collision period in the same LHC fill in which the vdM scans are performed. TC is used to transfer the absolute-luminosity calibration of LUCID to physics data-taking conditions, in a reference, high-luminosity LHC fill in which the measured TC/LUCID luminosity ratio is used to parameterise the $\mu$ dependence of the uncorrected LUCID response.

The linearity of the TC algorithm is cross-validated against relative-luminosity measurements based on the Tile and LAr calorimeters. In the case of Tile, the dynamic range of the cryostat scintillators E3 and E4 (see Figure <ref>) provides sufficiently sensitive bunch-integrated luminosity measurements during head-on collisions all the way from the vdM to the physics regime. For EMEC and FCal, specialised fills with isolated bunches that cover the full range of $\mu$ values are used to compare the TC- and Tile-based measurements with those inferred from LAr energy-flow measurements.

During , the calibration-transfer procedure was applied from one to three times per year, and proved essential to ensure the year-long stability of the LUCID response. This stability is quantified by comparing, over the course of each data-taking year, the TC-corrected, bunch-integrated LUCID luminosity with that inferred from the PMT currents in the D6 cells of the Tile, and from the LAr-gap currents in the EMEC and the FCal. Since these luminometers are not sensitive enough to be calibrated in the low-luminosity LHC fill in which vdM scans are recorded, they are cross-calibrated to TC in a small subset of high-luminosity fills close in time to the vdM-calibration session. Additional luminometers, such as TimePix sensors <cit.>, provide further cross-checks. Finally, monitoring the rate of reconstructed  $\Zboson \rightarrow \ell\ell$ decays, known as $\Zboson$-counting, allows a fully independent check of the relative long-term stability of the ATLAS luminosity measurements, both within each running year and across multiple data-taking years <cit.>. This technique, which does not rely on theoretical predictions of the absolute $\Zboson$ cross-section, is also used to compare the integrated luminosity delivered to the ATLAS and CMS experiments.

The luminosity measurement methodology outlined above provided among the most accurate absolute-luminosity measurements at any hadron collider to date <cit.>, and serves as a starting point for high-precision luminosity determination at the ATLAS IP in .

§.§ *ALFA Roman Pot Detector

The ALFA consists of four stations, each equipped with two scintillator detectors in an upper and lower Roman Pot. Two stations are placed on each side of the ATLAS detector, about 240 from the IP, in the long straight sections of the LHC tunnel.
ALFA is described in Ref. <cit.> as it was operated during special runs  in  for elastic cross-section and diffraction studies at values from 11 to 2.5.
The following paragraphs describe only the changes to allow operation of ALFA in .

The readout electronics of ALFA have aged and some readout parts were already replaced during  because of a water leak in the LHC tunnel.
The scintillating fibre detectors and readout electronics are expected to age further during . Moreover, the LHC TCL6 collimator settings during insertions of the AFP Roman pots in the last years of increased the total radiation dose of the ALFA detectors significantly, by a factor of 510 compared to the situation with no AFP insertion (and TCL6 closure).

Irradiation studies have shown that the readout motherboards and trigger boards start malfunctioning after about 500 and, in particular, that the embedded ELMB start failing after 50 <cit.>. The Kuraray SCSF-78-SJ scintillating fibres only start to degrade above 10, with an efficiency loss of 20 and higher. The dose accumulated in  is about 20 for the motherboards, whereas the dose to the fibres, strongly dependent on the distance to the beam, was measured to be in the range of 13 in the last year of .
To minimise radiation damage, it is therefore important that an ALFA high-run occur early in . To reduce the exposure of ALFA in , a 40 thick iron shielding wall was erected at 221 after TCL6 and before Q6; and two pairs of similar walls between Q6 and each of the two ALFA stations at 235 and 243, as shown in Figure <ref>. The shielding reduces the radiation load to about half
, which should allow ALFA to operate until the end of .

Five new motherboards were produced to replace the most irradiated boards in the outer stations and to have spares in .

The pair of shielding walls between the ALFA far station (left, before Q7) and near (right) station in the LHC tunnel in LSS1. Another pair is situated before the near station (not shown).

During LS2 the Roman Pot movement system <cit.> was refurbished and all the stopper and limit switches were readjusted. In , the ALFA trigger, which operates outside the standard ATLAS latency, was connected directly to the ATLAS CTP (via a specialised ALFA-CTPIN module) to minimise the trigger path length. The firmware of this CTPIN module has been modified to provide a direct path to the CTP for the L1Topo trigger, and to be switched to the ALFA trigger only for ALFA special runs. The Readout system is unchanged.

§.§ *AFP Detector

The AFP Phase I upgrade project
consists of four detector stations, two on either side of the ATLAS IP at ±205 (near stations) and ±217 (far stations).
Together, the near and far stations on one side constitute an Arm of the detector.
Each station contains a single horizontal ($x$) Roman pot housing the AFP detectors. The pots present a 300-thin window to the LHC beam. Each near pot contains a four-plane SiT, which is a 3D pixel detector similar to the IBL except for a 150 thin edge parallel to the long pixel direction ($y$) on the side of the LHC beam <cit.>. Each far pot contains, in addition, a ToF detector <cit.> consisting of novel quartz Cherenkov hodoscopes with radiation-hard electronics behind the tracker to measure the vertex position of double-proton final states with 35 precision.

During the 2015-2016 winter shutdown, the C-side arm of AFP was installed, but without the ToF. The AFP detector was completed with the ToF detectors during the 2016-2017 winter shutdown.
Over the course of 2017, ATLAS collected data where AFP was read out corresponding to an integrated luminosity of 20.
From July 2017 onwards, the Roman pots were operated at a distance of $11.5\sigma_{\mathrm{beam}}+\SI{0.3}{\mm}$ from the LHC beam, which is around 1.7 and 2.8 for the far and near stations respectively for $\betastar=\SI{40}{\cm}$.

In preparation for , the AFP detector was refurbished during LS2: the movement mechanics were re-tuned and all switches were readjusted. The PXI movement controller hardware and software were updated.
Because of radiation damage during , all silicon detectors were replaced by newly produced 3D silicon pixel tracker modules of the same type, as described in Section <ref>. The ToF detector underwent a design change to prevent corona discharge problems in vacuum, described in Section <ref>.
The trigger and the readout electronics and software were updated, as discussed in Section <ref>.

§.§.§ Silicon 3D tracker

The AFP slim-edge 3D silicon detector planes are located in the near pots. During LS2, all of them were replaced with new 3D modules of the same type.
The irradiation pattern on the SiT planes is a characteristic narrow band that extends away from the LHC beam and either diagonally up or down depending on the sign of the vertical crossing angle of the colliding beams. Thus, switching SiT modules between the arms (or changing the sign of the crossing angle), exposes a fresh area of the sensor module to diffractive protons. It is expected that the new modules will operate efficiently for the first two full years of .
After one year of running or an accumulated dose corresponding to about 50, a swap of detectors between the two detector arms is foreseen.
New SiT detector modules may be required for the last years of  and different solutions (based on RD53 <cit.> or TimePix4 <cit.> ASIC) are under consideration.

The cooling for the SiT is based on a two-stage vortex tube system, using compressed air <cit.>. The 3D tracker planes are mounted in good thermal contact on top of a heat exchanger box, and cold air at -30 circulates through the box.
For ,
the heat exchanger efficiency was improved by about 30% by filling it with open-cell metal foam.

§.§.§ *AFP Time-of-Flight detector

The AFP ToF detectors are located in the far Roman Pots.
The latest version consists of solid L-shaped fused silica bars and customized MCP-PMT with an extended lifetime which operate at low gains (order of 1000) <cit.>. The improvements were aimed to increase the efficiency, the lifetime as well as the radiation hardness of the detector which has been designed to operate in high radiation areas (above 400 kGy/year).
They have a time resolution in the expected range of 2026 per proton <cit.>.
In 2017, the ToF efficiency was very low (29), and this was understood to be because the integrated charge received by the PMT during that first year exceeded the limits for which the PMT were intended.
In 2018, it was not possible to install the ToF refurbished with long-life PMT because of unresolved
high-voltage breakdown when the MCP-PMT were operated in the secondary vacuum of the pot. In a change of approach, the new ToF is now read through a quartz window separating the Cherenkov light guides (inside the pot) from the MCP-PMT (outside the pot). This requires a “Cherenkov light-feedthrough” on the pot's flange (which serves as the detector platform) which is adjustable in depth to match the specific depth of the pot.
The design is shown in Figure <ref>.
In this view, forward protons enter the detectors from right-top and the Cherenkov radiators are oriented at 48 with respect to the direction of the forward protons. Vacuum bellows seal the tube holding the square 4$\times$4  multi-anode MCP-PMT <cit.> to the flange, allowing for height adjustment of the ToF structure.

[AFP Silicon 3D Tracker and quartz radiators.]fig:afpSiTToF The AFP far detector platform flange holding the 4-layer Silicon 3D Tracker (SiT, top right) and the Time-of-Flight detector (ToF, bottom left).
The SiT is mounted on a cold-air heat exchanger. The normal to the SiT planes makes a 14 angle with the incoming protons to eliminate dead area between pixels. The ToF multi-anode MCP-PMT is mounted in air inside a tubular feedthrough housing. fig:afpToFLQbarMatrix shows the ends of the 4$\times$4 L-shaped Suprasil (“quartz”) radiators (LQbars). Cherenkov light from the LQbars reaches the MCP-PMT through a quartz window that separates the PMT from the secondary safety vacuum of the detector environment.

§.§.§ AFP Trigger

While at high luminosity most bunch crossings in ATLAS produce at least one forward proton in one of the AFP detectors (and it is therefore usually unnecessary to use this information in the trigger), for special low-pileup runs with $\langle\mu\rangle\sim 1$, it is useful to trigger on events with forward protons. For  this was accomplished with a SiT-plane hit-based majority trigger which had, however, a rather long dead time of about 250. A similar, but ToF-based, option was provided in the  TDC module, using the on-board FPGA to select events where a majority of ToF Cherenkov bars in a train of four successive bars fired. This option is also available in the new picoTDC module.

In addition, a digital trigger module was added for use in , inserted in the digital data path between the constant-fraction discriminator modules and the TDC <cit.>, improving the TDC resolution from 18 to 4.
This new trigger module provides programmable majority logic for each ToF train, and outputs the observed trigger pattern as a sequence of
12-wide NIM pulses (a start/trigger pulse followed by the trigger status of each of the four trains) on the fast air-core trigger cable to the CTP.

§.§.§ AFP Data Acquisition

New DAQ boards <cit.> were designed for the AFP. They are housed in an ATCA crate.
The DCS interface to the ATCA system (see Section <ref>) was implemented for control and
monitoring, and the AFP DCS <cit.> was updated
to control and monitor the voltages, currents, and temperatures
of the new front-ends, digital Trigger modules, picoTDC, and VLDB.
The OptoBoards in the LHC tunnel that were used for digital-to-optical conversion in  were replaced by faster VLDB developed for  and beyond.

Front-end status information is collected by the DAQ, for instance the number of parity errors or module busy signals. This information is monitored and in case the DAQ decides that some SiT or ToF device is corrupted, e.g. by a single event upset, a request is sent to the DCS for power-cycling the affected device.

A new package for AFP data quality monitoring was written for and operates within the general ATLAS multi-threaded data quality monitoring system and conforms to the ATLAS guidelines.

§.§ The Zero Degree Calorimeters

The ZDC play a central role in the ATLAS heavy
ion physics program.  Their primary function is to measure the energy of
“spectator” neutrons which do not participate in hadronic processes as
the nuclei collide, to determine impact parameters when the nuclei do not overlap completely.
The neutrons propagate in the original beam direction, with minimal deflection,
carrying on average the per-nucleon beam energy.
Because of its ability to observe neutrons from nuclear breakup,
the ZDC plays several critical roles during heavy ion operations and data analysis:

* It is an integral component of the heavy ion triggering scheme and of some BSM searches, as it allows the deliberate enhancement and suppression of electromagnetic processes, including photonuclear and elementary photon-photon processes such as light-by-light scattering.

* It is the only part of the detector that records an unbiased selection of peripheral collisions at low multiplicities, essential for studies of angular correlations in heavy ion collisions.

* Correlation of the ZDC energy with transverse energy in the
central detector demonstrates the clear geometric nature of particle
production in heavy ion collisions. It also provides a well-tested
means, using two-dimensional cuts, to reject both in-time and
out-of-time pileup, which is key for precise physics measurements.

§.§.§ Overview of the *ZDC upgrades

In , the ZDC detector was designed to nearly fill the space
available in the TAN region, which sits 140 from the nominal
IP, just after the beams diverge, and protects one
of the LHC beamline dipoles.
As shown in Figure <ref>, there are four modules on each side
(forward and backward), each of which consists of 1.1 nuclear
interaction lengths of tungsten plates (11 plates, each of 1
thickness) interleaved with a row of 1.5-diameter quartz
rods.  Light produced by Cherenkov radiation from shower products is
transported up to the top of the detector, guided through a
trapezoidal prism light guide and into a Hamamatsu H6559 PMT <cit.> assembly.
The signals from each PMT are carried by cables of approximately
200 to USA15, where they are digitised and included in the
ZDC trigger.

The left-hand diagrame shows the arrangement of the ATLAS ZDC arms on Side A (top) and Side C (bottom), including the new RPD and indicating the different BRAN detectors being used in the first year of . The new ATLAS RPD detector is shown on the right, with a built detector shown head-on, next to a CAD rendering showing the various cable connections on the side.

began with a detector very similar to that used in , after
periodic replacements of the commodity-grade quartz, which was
inexpensive but susceptible to radiation damage, particularly during
proton-proton operation.  However, the increased rates relative to led to large anode currents, and consequently to large changes in the
observed detector gain.  To mitigate these effects, the PMT were replaced
with a modified version (H6559 MOD) with high voltage boosters in the
last three dynode stages.

Several modifications to the detector were implemented for :

* To minimise the impact of radiation damage on the signal
properties, the quartz rods were replaced with fused silica
rods of the same dimensions.  A combination of irradiation studies
and comparisons of fused silica samples placed in the TAN (in a prototype of
the BRAN detector utilised by the LHC for luminosity measurements <cit.>),
were used to determine that high concentrations of OH and
H$_2$ doping provide additional radiation hardness.  Studies of the
expected dose in have led to a final choice of fused silica rods doped with
H$_2$, which provides good stability in the ultraviolet range up to
several million .

* Digitisation is handled by the PPM, which run
at a sampling rate of either 40 or 80.  This is well matched to the
signal shape induced by the long coaxial cables, which transform a
fast signal into one with a rise time of 4 and an exponential decay
time of about 25, for a total signal length of about 70.
This was already just barely acceptable for the 75 bunch spacing
reached in 2018, but is too long for the 50 expected for heavy ion operations in
To provide a faster signal with less attenuation, the coaxial
cables used in have been replaced by air-core coaxial cables similar to those
used in for the AFP detector.  These reduce the attenuation
by a factor of nearly 10 and the signal shaping is substantially
reduced, such that nearly 97 of the charge is contained within a single bunch crossing.

* The necessary updates to the digitisation scheme will be
discussed in the next section. The sampling rate is
increased by a factor of 46, making the after-pulsing of
the PMT, observed in test beam data with much shorter cables,
visible in typical events.  While it would be desirable to find a
photomultiplier tube specifically designed to reduce the impact of
after-pulsing, it turns out that the reduction in the effective
aperture of the photocathode is strong enough to make this
option unnecessary in the next LHC run.

* A new RPD has been built, and
tested in an SPS test beam, to determine the direction of the
event-by-event deflection of the cloud of spectator neutrons on each
side, and to measure the correlation of the directions between the
two sides.  The two sides are expected to show a clear
anti-correlation of the deflection direction, reflecting the angle
of the internuclear impact parameter, referred to as the
Reaction Plane.  The reaction plane angle can be utilised to
study the directed flow
of emitted particles, and also
provides sensitivity to the presence of strong magnetic fields in
the initial state of the nuclear collision.  The RPD consists of a [parse-numbers=false]4x4 array of
rad-hard optical fibres of different lengths read
out by Hamamatsu R1635 PMT at the top of the TAN.  These provide an
effective [parse-numbers=false]4x4 array of [parse-numbers=false]1x1 cells in two dimensions.  Since
the longer fibres overlap the shorter ones, machine learning
approaches are needed to disentangle the correlated signals between
the fibres.  In simulations, the resolution of the reaction plane
angle is found to be excellent and comparable to similar
detectors, for example in the STAR experiment at the RHIC accelerator.

§.§.§ *ZDC Readout and Trigger Electronics

The shorter signals from the air-core cables dramatically
mitigate the impact of both in-time and out-of-time pileup on the
measured ZDC waveforms, nearly eliminating the overlapping signals
from adjacent filled bunch crossings and even collisions closer in
time due to debunched beam.  However, this requires a much faster
sampling rate than the readout system (based on
electronics originally developed for the L1 calorimeter system) can provide.
The LUCROD card designed for LUCID, as described in Section <ref>, was adapted to rework the entire trigger and readout
approach for the ZDC detectors.  The new card has modified
firmware and is referred to as the LUCROD/ZDC.

The ZDC trigger
and readout scheme split the incoming signals into two
paths, one for digitising the signal and the other for providing
L1 triggers for ATLAS.  In the trigger path, the incoming signals were summed
in hardware and a threshold was applied just below the single neutron peak for each side, using NIM
discriminators.  The readout path involved a fourfold splitting of the
incoming signals into both high and low gain, to obtain an effective 12-bit dynamic range,
and applying a 12.5 delay to achieve an 80 effective sampling rate even when using the L1Calo PPM,
which sampled at 40.

For , the LUCROD card, with special firmware for the ZDC,
combines digitisation, triggering and event logging into the same
card, with waveform sampling performed at 320.
Each LUCROD/ZDC card provides 8 channels, sampled with 12-bit flash ADC, with an FPGA for
each channel (FPGACH), one FPGA (FPGAV) which receives data from all 8
channels simultaneously to perform trigger calculations, and one
main FPGA (FPGAM) which serialises and transports the channel data to ATLAS.
One LUCROD is used to digitise the signals without amplification,
while providing an copy to a second card which amplifies the
signals by a factor of 16. Combined, the two cards provide an effective
16-bit dynamic range.  The high-gain LUCROD/ZDC also runs trigger
algorithms that provide the functionality previously provided by the
NIM modules.  Peak finding is performed for each channel in the FPGACH
using a threshold on the second derivative of the waveform, while
FPGAV performs digital sums and uses two sets of lookup tables to form
a L1 decision for the ATLAS CTP.  A lookup table for each side is used
to generate multiple energy thresholds – specifically, distinguishing
one neutron from no activity, which tags nuclear breakup, and
distinguishing five neutrons or more, which distinguishes hadronic and
electromagnetic processes.  A combined lookup table then incorporates
the threshold level from the two sides, and provides a three-bit output
word to the ATLAS CTP which reflects the correlations between the
energies of the two sides, distinguishing (for example) between events with
energy on only one side and those with substantial energy on both
sides.  Upon receipt of a L1A from ATLAS, the FPGAM
serialises the data from the channel FPGACH, prepares packets for
transmission over s-link and manages s-link transmission to the
ATLAS ROS.  With this implementation, the LUCRODs replaces essentially
all of the ZDC electronics utilised for .

§.§.§ *ZDC Detector control

The ZDC PMT are controlled by a CAEN mainframe
located in USA15, with long HV cables running to distribution
boxes located under the TAN, and finally to the detectors, with
standard SHV cables to drive the primary PMT HV, and with multicore
HV cables to drive the three boosters per PMT.  The ATLAS DCS (as described in Section <ref>) is used
to set and monitor the high voltage and current for each channel.
It is crucial to track the booster currents at higher rates,
to prevent damage to the PMT.
As the signals were calibrated in short intervals of several minutes throughout , based on a calibration
peak from events with one neutron – at full beam energy – in either
ZDC, a stable response was not required over longer timescales, and the detector was simply continually monitored for degradation
of the observed energy of the one-neutron peak.  The HV in one or
more PMT on each side was then increased when the fluctuations of that peak
began to approach the noise peak seen in empty events.  In , the
radiation-hard fused silica rods replacing the quartz should
provide good stability throughout each heavy ion run period, and
minimise or eliminate any need for HV adjustments.

§ TRIGGER AND DATA ACQUISITION SYSTEM

§.§ System Overview

As described in Section <ref> and shown in Figure <ref>, the TDAQ system is based on a two-level trigger (event selection) system served by  the DAQ system that transports triggered data from custom subdetector electronics through to offline processing. The L1 trigger system is based on custom-built electronics  and the HLT  is based on software implemented on commodity computers.

Schematic overview of the Trigger and DAQ system at the beginning of .

The L1 Trigger, shown in Figure <ref>, uses reduced-granularity information from the calorimeters and muon system to search for signatures from high-muons, electrons, photons, jets, and $\tau$-leptons decaying into hadrons, as well as events with large missing transverse energy or large total transverse energy.  It consists of the L1Calo and L1Muon trigger systems, the MuCTPI, the L1Topo and the CTP. The L1Calo trigger system (Section <ref>) identifies high-objects such as electrons, photons, jets, and $\tau$-leptons.  Isolation requirements may also be applied to these objects.  It also selects events with large or large total transverse energy.  The L1Muon trigger system (Section <ref>) selects events containing high-muons, based on inputs from the RPC in the barrel region and from the TGC and NSW in the endcaps, and then transmits data to the CTP via the MuCTPI. The L1Topo trigger system (Section <ref>) takes input TOB containing kinematic information (e.g. and $\eta-\phi$ coordinates) from the L1Calo and L1Muon systems and applies topological selections. As shown in the figure, both the legacy L1Topo and upgraded L1Topo systems are in use during the commissioning phase.

The final L1 trigger decision is made by the CTP (Section <ref>).  The CTP receives hit multiplicities from the L1Calo, L1Muon, and L1Topo systems and accepts events satisfying requirements based on object type and threshold multiplicity.  Up to 512 distinct L1 trigger items may be configured in the CTP.  The L1 trigger decision, as well as the 40.08 MHz LHC bunch-crossing clock, is distributed to the detector front-end and readout systems via the TTC system <cit.>.

The parameters of the L1 trigger system depend on the pipeline memories, as specified and built for the original construction of the detector,  in custom electronics located on or near the detector to store information while the trigger decision is in progress.
This necessitates that the L1 latency, the time from a given bunch crossing to the trigger decision, must adhere to the original specification of the detector.
The design of the trigger and detector front-end systems requires that the L1 latency be less than 2.5.  The maximum L1A rate supported by the detector readout systems is 100, and so the menu of the trigger selections is tuned to allocate a share of the rate budget to each underlying physics object according to ATLAS analysis goals.

Schematic overview of the L1 trigger system in .  The new and refurbished elements of the L1Muon Phase-I trigger system are shown in yellow.  During the commissioning period, both the legacy (shown in green) and Phase-I L1Calo (shown in yellow) modules will run in parallel.  Once the Phase-I system has been commissioned, the legacy L1Calo JEP, CP and L1Topo modules will be removed; the Phase-I L1Calo system and upgraded L1Topo module will provide triggers for physics in .

If accepted by the L1 trigger, events are then sent to the HLT. At this level, software processes reconstruct the event at higher levels of detail than L1, seeded by RoI, which are regions of the detector in which possible trigger objects have been identified by the L1 trigger.
HLT algorithms use full-granularity information from the calorimeters and the muon and tracking systems to provide better energy and momentum resolution for threshold selections, as well as precision tracking for particle identification. The overall selection criteria for the HLT are once again provided by the trigger menu, tuned so as to maximise the data available for key analyses for the given resources.

The HLT software is designed to reproduce the offline selection as closely as possible. On average, the event processing time at the HLT in 2018 was approximately 400 for runs with a peak luminosity of . In the HLT reduces the event rate from 100 after the L1 selection to approximately 3 (averaged over the course of an LHC fill); the data are then stored for offline analysis.
The HLT software has undergone a significant redesign in order to take advantage of multithreaded CPU architectures; this framework, which is also used in the offline software, is called AthenaMT and is described in Section <ref>.

Underpinning the operation of the two trigger levels, the data acquisition system begins with detector-specific on- and off-detector electronics which perform a variety of data processing and monitoring features before passing events either to the L1 trigger or to the downstream system. In the off-detector stage was performed in (typically VME-based) detector-specific custom hardware modules called ROD. On receipt of a L1A, these ROD read out their data to the first common stage of the DAQ system, the ROS. The ROS buffers event data and serves it to HLT nodes on request to facilitate a trigger decision. As is described in Section <ref>, will see the introduction of the new FELIX and SW ROD  systems into the readout path, with the goal to reduce the amount of custom hardware in the system and perform more processing in the software domain. In the new system the ROD and ROS are replaced by FELIX, which receives readout data from L1 trigger processors  and detector front-end electronics via point-to-point links and then routes them to software applications running on commodity servers (the SW ROD) that perform the same tasks previously handled in the hardware ROD, plus the buffering function of the ROS. By , all of ATLAS readout will be via this new mechanism, but in it has been rolled out for those systems with new or upgraded front-end electronics. The interface to the HLT is identical between ROS and SW ROD, with events routed on demand to HLT processing nodes in both cases.

The final stage of the DAQ system, once HLT processing has been completed, is for accepted events to be sent to a dedicated cluster of servers, known for historical reasons as SFO, for packing, compression, and finally transfer to offline storage.

§.§.§ Motivation for upgrades

Since , the instantaneous luminosity and number of interactions per bunch crossing (pileup) have increased substantially, as illustrated in Figure <ref>.  In , the improvements in the LHC (see Section <ref>) and luminosity levelling will allow a much larger fraction of each run to be near the peak instantaneous luminosity of , causing the average pileup to increase to  or beyond. Increased pileup degrades the calorimeter resolution and isolation of single particles, which leads to decreased trigger efficiency and necessitates the use of higher trigger thresholds to mitigate the resulting increase in rate.  One of the main goals of the ATLAS trigger upgrade is to reduce the impact of pileup in order to maintain low thresholds, especially at L1, thereby maximising the dataset recorded for precision measurements (e.g. of the Higgs boson) as well as for searches for physics beyond the Standard Model.  Since the events passing the L1 selection will contain a larger number of pileup interactions, further upgrades at the HLT, including improved precision tracking and the expansion of the computing farm, are intended to maintain a reasonable output rate within bandwidth and storage limitations.

§.§.§ Improvements for

Substantial upgrades to the ATLAS TDAQ system were made prior to the beginning of in 2015.  These changes are described in detail in <cit.>, but are briefly summarised here for completeness.

During LS1, the L1Muon barrel system was equipped with additional trigger electronics to improve the acceptance in the feet and elevator regions (where new detectors were also installed, as discussed in Section <ref>).  In the endcap region, new trigger coincidence logic was deployed in order to improve the rejection of background originating outside the IP.
This logic also made use of new signals derived from the outermost Tile calorimeter cells.

Several significant upgrades were made to the L1Calo system as shown in Figure <ref>.   The PPM <cit.> were upgraded to provide improved bunch-crossing identification and pedestal subtraction capabilities, resulting in better pileup suppression and lower L1 jet and trigger rates.  The CP and JEP systems were upgraded to allow an increased data transmission rate. Additional improvements were made to the CP to allow for energy-dependent isolation requirements to be applied on EM object candidates.  New extended CMX <cit.> were added to replace the existing CMM, which transmitted the threshold multiplicities to the CTP.  In addition to this functionality, the CMX permits the transmission of TOB, containing such information as the position and energy of physics objects passing the L1 trigger, to the new L1Topo system.

The L1 Topological trigger system (L1Topo) <cit.>, described in Section <ref>, was installed and commissioned during . The system uses TOB from L1Calo and L1Muon and applies topological selections in order to reduce background rates while preserving signal efficiency.

For the DAQ system, saw the introduction of a newer version of the I/O card housed in the ROS servers which provides the interface to front-end optical links and buffers data throughout the HLT selection process. The move to this new board, the RobinNP, resulted in a system up to 4 times denser than its predecessor, saving significant rack space, while also providing 10 times higher buffering capacity per data-link than before. The performance of the upgraded ROS was also nearly 4 times that of its predecessor in terms of supported maximum data request rate from the trigger.

Alongside the new ROS, the HLT itself was significantly redesigned for . What was previously two separate farms, one focused on RoI-driven selection and one studying full events, was merged into one with a more dynamic event-building approach. The combined farm eliminated the previously complex load balancing required to manage the two-level version, while also minimising any duplication of data requests to the ROS. Thanks to this redesign, it was also possible to greatly simplify the data collection network connecting the HLT to the ROS and SFO. What was previously two separate networks became one high-performance implementation, with 20 times higher bandwidth than before (40 GbE vs 2 GbE).

Finally, the SFO systems were also upgraded for . While the functionality remained the same, the new servers provided significantly improved staging and streaming capability, able to buffer more than twice as much data as before, making it possible to stably process and write much higher data volumes to offline storage.

All of these upgrades combined allowed the
ATLAS trigger system
in to execute more complex algorithms with higher overall processing time and to writing out larger and richer datasets, making it possible to significantly improve the sophistication of the trigger menu and greatly enhance the ATLAS physics programme.

§.§ Level-1 Calorimeter Trigger

The L1Calo trigger, pictured in Figure <ref>, identifies events containing electrons, photons, jets, and $\tau$-leptons decaying into hadrons, as well as events with large missing transverse energy () or large total transverse energy () using custom hardware processors based on FPGA technology. To manage increasing rates in this regime, while preserving an effective and efficient calorimeter trigger, significant upgrades are necessary.  These upgrades include more refined processing of electromagnetic calorimeter information at higher granularity, which provides improved identification of isolated electrons and photons and improved rejection of jets, thereby maintaining low trigger thresholds, which are especially important for electroweak physics.  Improved processing at higher granularity and new algorithms will also enable better identification of jets and discrimination against pileup, which will benefit searches for physics involving boosted objects and .

The system includes new electromagnetic and jet feature extractors: the eFEX (Section <ref>) identifies electron, photon, and $\tau$ objects, while the jFEX (Section <ref>) identifies jets, , and $\tau$s.  A global feature extractor (gFEX, Section <ref>) identifies large-area jets, , and .
The new FEX modules are shown in Figure <ref>.

fig:TDAQL1CaloeFEXPhoto A production eFEX module.
fig:TDAQL1CalojFEXPhoto A production jFEX module.
fig:TDAQL1CalogFEXPhoto A production gFEX module.

Compared to , L1Calo receives finer-granularity input data from the LAr calorimeter in .  In , these inputs consisted of “trigger towers” spanning $0.1 \times 0.1$ in $\eta$ and $\phi$.  In the system, the LAr Digital Processing System (LDPS; Section <ref>) provides electromagnetic calorimeter information in the form of SC containing sums of four or eight calorimeter cells.  The detailed mapping is provided in Table <ref> and summarised here. Each trigger tower contains 10 SC, as shown in Figure <ref>: one in the presampler, four in each of the first and second layers, where the majority of shower energy is deposited, and one in the third layer.  The full granularity, corresponding to $\Delta\eta \times \Delta\phi = 0.025 \times 0.1$ in the first and second layers, is available to the $e/\gamma$ and $\tau$ triggers, while the jet, , and triggers use coarser granularity, comparable to the size of the $0.1 \times 0.1$ trigger towers.  For comparison, in , L1 jet triggers were based on $0.2 \times 0.2$ jet elements.

The finer granularity of the L1Calo trigger towers after the upgrade of the liquid argon calorimeter electronics.  Each tower is divided into ten SC, each providing an  value.

In , the calorimeter data arrived at L1Calo in format, and was then digitised and calibrated by the pre-processors.  In , the digitisation and calibration of the LAr calorimeter data are now performed in the LAr calorimeter electronics (<ref>).  The Tile calorimeter data are still received in format and are digitised by the pre-processors, and then the new TREX (Tile Rear EXtension; Section <ref>) modules transmit them to the FEX and the legacy system.  It is planned to upgrade the Tile calorimeter system to perform the signal digitisation for running at the HL-LHC <cit.>.

The digitised and calibrated calorimeter inputs are sent to L1Calo via optical fibres. Mapping and routing of the fibres to the FEX is performed by the FOX optical plant (Section <ref>).

The output from L1Calo consists of TOB which include the position, , object type, and energy sum.  These are sent to L1Topo, which computes the multiplicity of TOB passing a given threshold and sends the information to the CTP.  Another optical plant (TopoFOX; Section <ref>) is used to map the output fibres from L1Calo to L1Topo.  In addition, L1Calo sends RoI information to the HLT and readout data to the FELIX and SW ROD (Section <ref>).

During the start-up and commissioning phase of , triggers for physics will be provided by the legacy () L1Calo system.  Once the Phase-1 system has been commissioned and validated, it will be enabled to provide physics triggers and the legacy system will be removed.

§.§.§ Electron Feature Extractor (eFEX)

*eFEX module design
The eFEX system consists of 24 modules located within two ATCA shelves, with each module containing four algorithm-processing FPGA and one control FPGA.  A block diagram of an eFEX module is shown in Figure <ref>, and a photograph in Figure <ref>.

The system covers a region of $|\eta|\le 2.5$ and the full $\phi$ range.  Each of the 24 modules receives data on up to 136 fibre links (11.2 Gb/s), covering a calorimeter area of up to $\Delta\eta\times\Delta\phi = 1.7 \times 1.0$.  Each FPGA processes data for 32 algorithm cores of area
$\Delta\eta\times\Delta\phi = 0.1\times 0.1$, for a total area of $\Delta\eta\times\Delta\phi = 0.4 \times 0.8$ per FPGA.  On the borders, the total number of algorithm cores processed per FPGA increases to 40.  The input to each algorithm core includes the surrounding environment, which measures $\Delta\eta\times\Delta\phi = 0.3 \times 0.3$.  Each FPGA contains an algorithm module which produces $e/\gamma$ and $\tau$ TOB. The internal clock for processing is 200 and the output rate is 280. TOB are first sorted locally on each FPGA before being sent to dedicated $e/\gamma$ and $\tau$ sorter modules on two of the four FPGA; this sorting is also performed at 280.

Block diagram of an eFEX module, illustrating the real-time and readout paths.  Control and monitoring signals, except for the L1A, are not shown.

The TOB computed by the eFEX algorithms are merged and sorted across the entire system.  A maximum of six TOB per algorithm ($e/\gamma$ and $\tau$) per module may be sent to L1Topo; in case more than six TOB are identified, the six with the highest transverse energy TOB are sent.

Timing and readout  TTC signals are received on the backplane from the Hub (see Section <ref>).  Upon receiving a L1A, TOB and input data (prescaled to limit the bandwidth usage) are sent to the ROD (described in Section <ref>).  Each eFEX module sends its readout data over 8 electrical links (6.4Gb/) on the ATCA backplane using the multi-lane Aurora protocol <cit.>.  From the ROD, the readout data are then sent to the FELIX and SW ROD (Section <ref>).

Configuration, control, and monitoring Configuration is performed by the control FPGA.  Monitoring and control are handled by the IPbus <cit.> firmware implemented in the control FPGA.  A CERN-standard IPMC module <cit.> performs low-level control functions.

*eFEX algorithms

$e/\gamma$ algorithm  The eFEX $e/\gamma$ algorithm searches for a “seed”, i.e. a local energy maximum, by comparing the four SC in a given algorithm core in the second layer of the electromagnetic calorimeter.  This process is illustrated in Figure <ref>.  The $\phi$-direction of the cluster is established by finding the highest-energy
SC adjacent to the seed.  A cluster of $3 \times 2$, SC (see Figure <ref>),  is formed around the seed, and the cluster energy is then computed by adding the energy of the corresponding SC in the presampler, first, and third layers of the calorimeter.

fig:TDAQL1CaloeFEXSeed  The L1Calo eFEX seed finder algorithm.  The four potential seeds (S) in the algorithm core are compared in order to determine the local energy maximum.  The directionality of the cluster, upward (U) or downward (D) is determined by finding the largest energy deposit among the SC surrounding the seed.
fig:TDAQL1CaloeFEXfield The dashed rectangle shows of $3 \times 2$ SC used to compute the cluster energy, assuming that the local energy maximum was at cell $S_0$ and that the most energetic directly neighbouring SC to $S_0$  was $U_0$.  The dotted rectangle shows the  $7 \times 3$ SC   area used for the calculation of the shower width in the second calorimeter layer.

To improve background rejection, isolation requirements may be applied. These are generally defined as a ratio between the energy sum in the cluster and that in the surrounding area.  Such requirements are applied in the form of selections based on several electromagnetic shower observables; the following observables can be computed in the eFEX:

* Shower width in the second calorimeter layer
\begin{equation} R_{\eta} = 1 - \frac{E_{\mathrm{T}, 3 \times 2}}{E_{\mathrm{T}, 7 \times 3}},\end{equation}

where $E_{\mathrm{T}, 3 \times 2}$ is the transverse energy sum in an area of $3 \times 2$ SC in the second layer of the calorimeter centred on the local maximum and its highest-neighbour in $\phi$, and $E_{\mathrm{T}, 7 \times 3}$ is the transverse energy sum in an area of $7 \times 3$ SC in the second layer of the calorimeter centred on the same locus.

* Hadronic fraction
\begin{equation} R_{\mathrm{had}} = \frac{E_{\mathrm{T,had}}}{E_{\mathrm{T,EM}}+E_{\mathrm{T,had}}} \end{equation}

where $E_{\mathrm{T,had}}$ is the transverse energy sum in a window of $0.3 \times 0.3$ in the hadronic calorimeter and $E_{\mathrm{T,EM}}$ is the transverse energy sum in the four layers of the electromagnetic calorimeter, computed in a window of $3 \times 2$ ($1 \times 3$) SC in the presampler and third layers, centred as in the case of $R_\eta$.

* Shower width in the first calorimeter layer
\begin{equation} w_{\mathrm{s, tot}} = \sqrt{\frac{\sum{E_{\mathrm{T},i} \times (i-i_{\mathrm{max}})}^2}{\sum{E_{\mathrm{T},i}}}},\end{equation}

where $i$ runs over five SC in $\eta$, centred on the most energetic SC in the first layer of the calorimeter.

$\tau$ algorithm The eFEX $\tau$ algorithm has been designed to identify prompt hadronic decays of $\tau$-leptons.
First, the cluster seed tower ($\Delta\eta \times \Delta\phi = 0.1 \times 0.1$) is chosen by identifying a local maximum in an environment of $3 \times 3$ towers.
From this seed tower, the seed SuperCell is then chosen by identifying its constituent SuperCell with the highest energy; this search is performed only in the second layer of the EM calorimeter.
A cluster is then formed in the direction (up or down in $\phi$) of the highest-energy adjacent SuperCell.  In the fine-granularity layers of the EM calorimeter (the first and second layers), the cluster spans a region of $5 \times 2$ SC ($\Delta\eta \times \Delta\phi = 0.125 \times 0.2$).
In the coarse-granularity layers (the presampler and the third layer of the EM calorimeter, plus the hadronic calorimeter), the cluster comprises $3 \times 2$ SC ($\Delta\eta \times \Delta\phi = 0.3 \times 0.2$).  The energies in each of these regions are summed to compute the total cluster energy.
The $\tau$ clustering algorithm is illustrated in Figure <ref>.

fig:TDAQL1CaloeFEXTauFine The L1Calo eFEX tau cluster, as defined in the first and second EM calorimeter layers.  The seed SC is shown in red, while the other SC making up the cluster are shown in orange.  The surrounding environment, which is not included in the cluster energy computation, is shown in blue.
fig:TDAQL1CaloeFEXTauCoarse The L1Calo eFEX tau cluster, as defined in the presampler and third EM calorimeter layers, as well as in the hadronic layer.

The eFEX $\tau$ algorithm can also apply an isolation criterion based on the shower shape in the EM calorimeter.  The discriminating variable $F_{\mathrm{core}}$ is used; this variable is defined as the ratio of the transverse energy deposited in a region of $3 \times 2$ SC surrounding the seed ($E_{\mathrm{T}, 3\times2}$) to that deposited in a region of $9 \times 2$ SC surrounding the seed ($E_{\mathrm{T}, 9\times2}$):

\begin{equation} F_{\mathrm{core}} = \frac{E_{\mathrm{T}, 3\times2}}{E_{\mathrm{T}, 9\times2}}. \end{equation}

§.§.§ Jet Feature Extractor (jFEX)

*jFEX module design
The jFEX system identifies jets, hadronically-decaying $\tau$-leptons, , and in the range $|\eta| \le 4.9$.  The system consists of one ATCA shelf, equipped with six jFEX modules.  Digitised electromagnetic and hadronic calorimeter data arrive at the jFEX via the FOX (Section <ref>) and are received by optoelectronic devices (MiniPODs).  Each module contains 24 MiniPODs (20 receivers and four transmitters) and four Xilinx® Ultrascale+™ processor FPGA.  Each processor FPGA contains 120 MGT and can handle an input bandwidth of up to 3.6Tb/.  TOB identified by the jFEX are sent to L1Topo.  A block diagram of a jFEX module is shown in Figure <ref> and a photograph in Figure <ref>.

Block diagram of a jFEX module, illustrating the real-time and readout paths.  Control and monitoring signals are only shown for the L1A.

Timing and readout
Timing and TTC signals are received on the backplane from the Hub (Section <ref>). For each L1A, a single readout data packet is constructed per event from the processor FPGA data and is sent to the Hub via high-speed links on the backplane.  Upon receiving a L1A, TOB and input data (prescaled to limit the bandwidth usage) are sent to the ROD (described in Section <ref>), which then sends the data to FELIX and the SW ROD (Section <ref>).

Configuration, control, and monitoring
The processor FPGA are configured by the control FPGA.  Control and monitoring of the FPGA is done via IPbus <cit.>, which executes such functions as setting parameters for the algorithms, controlling high-speed links, access of playback and spy memories, and environmental monitoring.  Low-level control, compliant with ATCA standards, is performed by an IPMC module <cit.>.

*jFEX algorithms

Each jFEX module provides full $\phi = 2\pi$ coverage.  Four jFEX modules cover the barrel region, spanning $|\eta| \le 1.6$, and two modules cover the endcap and forward regions corresponding to $1.6 < \abseta < 4.9$.  Each of the four processor FPGA in a given module covers a core of $\Delta\eta\times\Delta\phi = 0.8 \times 1.6$ in the barrel region or $3.3 \times 1.6$ in the endcap and forward regions.  In order to properly identify TOB on the edges of a single FPGA, each FPGA is supplied with a copy of the data from the surrounding environment, corresponding to a so-called “overlap” area of $2.4 \times 3.2$.

Calorimeter data inputs to the jFEX consist of $0.1 \times 0.1$ trigger towers in the region $|\eta| < 2.5$.  The granularity is slightly coarser in the endcap and forward regions: $0.2 \times 0.2$ in the region $2.5 < |\eta| < 3.1$ and $0.1 \times 0.2$ in the region $3.1 < |\eta| < 3.2$.  In the forward region, $3.1 < |\eta| < 4.9$, the inputs consist of SC;  in this region, the granularity is irregular, corresponding to the positions of the calorimeter electrodes; this is illustrated in Figure <ref>.

Granularity of trigger tower ($|\eta| < 3.1$) and SC ($3.1 < |\eta| < 4.9$) inputs to the jFEX.  The different colours serve to highlight the different granularities, as described in the text.  The dashed lines illustrate the boundaries between the core region of a particular FPGA ($1.6 < |\eta| < 4.9$, $0 < \phi < \pi/2$) and the surrounding environment.

Pileup subtraction and noise cuts. The pileup density $\rho$ is computed and subtracted from each trigger tower $\ET$.  Noise cuts may also be applied to individual trigger towers.  Separate noise cuts can be applied for the computation of $\MET$ versus all other objects.

jFEX small-radius jet algorithm. The jFEX small-radius jet algorithm is illustrated in Figure <ref>.  Small-radius jets are identified using a sliding-window algorithm in a search window of $5 \times 5$ towers, spanning $\eta \times \phi = 0.5 \times 0.5$ (equivalent to $\Delta R < 0.3$).  “Seeds” of $3 \times 3$ towers (equivalent to $\Delta R < 0.2$) are constructed around each tower in the search window.
To identify local maxima without double counting and without missing jet objects,  the energy sums of the seeds in the search window are compared using either $\geq$ or $>$ operators.
The central tower of the seed with the largest energy sum in a given search window is then chosen as the centre of the jet.  The energy sum of the seed is added to the sum of the tower energies in a ring of radius $0.2 \leq R < 0.4$ to form a “round” jet object consisting of 45 towers.

fig:TDAQL1CalojFEXJetSeeding1 The seeding process by which local maxima are identified in the jFEX.
fig:TDAQL1CalojFEXJetSeeding2 Comparative operators used to identify local maxima in a given search window.
fig:TDAQL1CalojFEXSmallRJetEnergySum A small-radius jet as defined by the jFEX.

*jFEX large-radius jet algorithm. The large-radius jet algorithm also uses a sliding-window algorithm.  In order to reduce resource usage, it uses some elements of the small-radius jet algorithm.  The energy sum of a small-radius jet is added to the energy sum of a ring of radius $0.4 \leq R < 0.8$ to form a large-radius jet of $R < 0.8$ consisting of 148 trigger towers.

*jFEX and algorithms
The total transverse energy sum () is computed by adding the EM and hadronic trigger tower values in slices of constant $\eta$.  Each TOB contains two sums corresponding to different regions in $|\eta|$.  The final energy summation over the full detector area is done by L1Topo.

is computed in a manner analogous to : transverse energy values are summed in slices of constant $\phi$ and then weighted by $\mathrm{cos}(\phi)$ and $\mathrm{sin}(\phi)$ in order to determine the $x$- and $y$-components, respectively.

*jFEX $\tau$ algorithm
jFEX identifies hadronically-decaying $\tau$-leptons in the range $|\eta| \leq 2.5$.  Seeds are identified as for jets, using a search window of size $R < 0.2$.  In order to minimise resource usage, the algorithm reuses jet seeds ($R < 0.2$) as $\tau$ cluster energies.  The isolation is computed using the energy ring of $0.2 \leq R < 0.4$ used by the small-radius jet algorithm.

*jFEX forward electron algorithm
jFEX identifies electrons in the region $2.3 \leq |\eta| < 4.9$.  This region extends beyond the acceptance of eFEX whose coverage is limited to that of the tracking acceptance.   The seeding procedure, which uses only EM trigger towers as inputs, is analogous to that used for jets and $\tau$-leptons.  The search window varies in size depending on the calorimeter granularity: $R < 0.2$ in the region $2.3 \leq |\eta| < 2.5$ and $R < 0.3$ in the region $2.5 \leq |\eta| < 4.9$.  The cluster energy is defined as the energy sum of the electron seed (a single EM trigger tower) and the most energetic neighbouring tower.  The EM isolation is defined as the transverse energy sum of all EM towers within $R < 0.4$, excluding the electron cluster itself.

§.§.§ Global Feature Extractor (gFEX)

*gFEX module design

The gFEX has been designed such that the data from the entire calorimeter can be processed on a single module, thus permitting the use of full-scan algorithms.  This functionality is intended to facilitate identification of boosted objects and global observables such as , which are of particular interest in a number of searches for new physics. Jet substructure algorithms may be employed to discriminate between signals from boosted boson or top quark decay products and the QCD multi-jet background.  The gFEX also incorporates pileup subtraction capabilities, which provide robustness against pileup for triggers.  trigger rates are particularly sensitive to pileup and are of great importance for searches for SUSY, dark matter, and Higgs bosons decaying to invisible final states.

The gFEX module, illustrated as a block diagram in Figure <ref> and with a photograph in Figure <ref>, includes three processor FPGA and a Zynq+ SOC which performs control and monitoring functions.  Each processor FPGA covers the entire $\phi$ ring; two cover the barrel region $|\eta| < 2.5$ and the remaining FPGA covers the endcap and forward regions.  Data arrive at the gFEX from the LDPS (LAr – Section <ref>) and TREX (Tile) via the FOX (Section <ref>) at a transmission speed of 11.2Gb/.

Block diagram of the L1Calo global Feature EXtractor (gFEX).

Timing and readout
TTC information is transmitted to and from the Zynq+ FPGA via FELIX (described in Section <ref>).  Upon receipt of a L1A, readout data and TOB are sent to FELIX.  From the FELIX, readout data are sent to the SW ROD, which builds event fragments to be sent to the HLT via the DAQ system.

Configuration, control, and monitoring
The IPbus protocol <cit.> is used to control access to playback and spy memories on the board for diagnostic and commissioning purposes.  Monitoring and control of the module are performed via IPMC <cit.>, as well as by DCS (see Section <ref>).

*gFEX algorithms

Inputs to the gFEX are combined into “gTowers” by summing  transverse energy from the electromagnetic and hadronic calorimeters and
subsequently applying a calibration with a lookup table.
The granularity in the barrel region is $0.2 \times 0.2$, increasing in the endcaps and forward region as illustrated in Figure <ref>.  Contiguous groups of $3 \times 3$ gTowers ($2 \times 3$ gTowers on the boundaries between FPGA and FPGA divisions) are called “gBlocks”. gBlocks have configurable thresholds and can be used as seeds for large-radius jet identification as described below.

Two types of TOB are identified by the gFEX.  Jet TOB are produced on a single processor FPGA and include large-radius jets, gBlocks, the local pileup energy density ($\rho$) and optionally substructure information.
Global TOB are produced on the Zynq FPGA using information from all of the processor FPGA and can include such global observables as  , , and .  All TOB computed by the gFEX are sent to L1Topo.

Schematic of the gFEX processor FPGA coverage, illustrating the granularity of the gTower inputs.  $3 \times 3$ ($2 \times 3$ on FPGA region boundaries)  groups of gTowers make up gBlocks.  Note that both gBlocks and large-radius jets  are permitted to overlap.
All possible  large-radius ($R < 0.9$) jets are constructed and those passing an optional seed requirement are sorted by energy and transmitted separately to L1Topo in two
$\eta$ regions per FPGA.

gFEX pileup suppression algorithm.  Pileup suppression is performed on an event-by-event basis in the firmware. The energy density $\rho$ is computed per processor FPGA on an event-by-event basis, and then multiplied by a factor of 69 to take into account the 69 gTowers that make up a large-radius jet as defined below. This value is then subtracted from the of the large-radius jet.

gFEX large-radius jet algorithm.  Large-radius jets (“gJets”) are formed using a cone algorithm by summing the gTower in a “circular” $1.8 \times 1.8$ area ($R < 0.9$) around each gTower.
A total of 69 gTowers are used for each large-radius jet as shown in Figure <ref>.
Since gJets may span the area covered by two different processor FPGA, information is shared between processor FPGA in the form of partial energy sums. gJets are permitted to overlap.
Large-radius jets  and gBlocks TOB are separately sorted on both the right and left $\eta$ divisions of the A and B  processor  FPGA and sent to L1Topo on separate fibres.
Initially, only the most energetic gJet in each division will be transmitted.
If latency allows, a sub-leading non-overlapping gJet will be transmitted as well.
A non-zero seed threshold can be applied to the central gBlock of the large-radius gJets before sorting.  For the gBlocks, the sub-leading gBlock is required to have its centre outside of the area of the leading gBlock.

gFEX “jets-without-jets” algorithm.  The “jets without jets” (JwoJ) algorithm <cit.> is based on the concept that jet observables may be transformed into global event-shape observables.
The JwoJ algorithm is motivated by the fact that
diffuse transverse energy  is likely to be associated with pileup interactions whereas clustered transverse energy is more likely to be associated with the interaction of interest.
The gFEX computes by separating the sums into “hard” (MHT) and “soft” (MST) terms, where the hard term consists of the sum of towers with the associated gBlock satisfying $\ET > 25$ GeV and the soft term consists of the sum of the remaining towers.  The is then computed as a linear combination of the hard and soft terms:

\begin{equation}E_{\mathrm{T} x,y}^{\mathrm{miss}} = a_{x,y}{\mathrm{MHT}}_{x,y} + b_{x,y}{\mathrm{MST}}_{x,y},\end{equation}

where the $a$ and $b$ coefficients can be optimised for resolution and overall performance.

§.§.§ L1Calo infrastructure

In , the output signals from the Tile calorimeter will still be in format (Section <ref>) but inputs to the FEX must be in digital format.  The digitisation is performed in the PPM of the legacy L1Calo system <cit.>, and new TREX modules, located on the PPM, process and duplicate the digitised Tile signals and send them to the Phase-1 L1Calo system via optical links at 11.2 Gb/s.  For backwards compatibility with the legacy system, the Tile signals are sent electrically to the legacy CP and JEP.  The readout data are sent to both the FELIX and the legacy ROD via optical links (9.6 Gb/s and 960 Mb/s, respectively).  TTC info is received from the PPM via a VME-P2 connector and from the FELIX via an optical link at 4.8 Gb/s.

The TREX module, pictured in Figure <ref>, consists of a pre-processor data collector (PREDATOR) Xilinx® Ultrascale™ FPGA, and four LVDS data in-out (DINO) FPGA (Xilinx® Artix® -7).  It includes six Samtec FireFly™ optical transceivers: four 12-channel transmitters to the FEX and two four-channel Duplex transceivers to handle TTC and readout signals.  Monitoring of environmental conditions is performed using a Zynq® Ultrascale+™ MPSoC (multi-processor system-on-chip) device, and the data are sent to DCS via Gigabit Ethernet interface.  Configuration, control, and monitoring of the module are performed via the PPM using interfaces to VME.

fig:TDAQL1CaloTREXDiagram Schematic diagram of the TREX.
fig:TDAQL1CaloTREXPhoto A photo of a TREX module.

The digitised inputs to L1Calo from the LAr  calorimeter and the TREX  arrive via the FOX optical plant.  The FOX  separates the fibre bundles (approximately 7500 fibres in total) and re-routes them according to the necessary mapping required by the L1Calo FEXes.  It also routes the input signals as required for data sharing between modules covering contiguous areas.  Duplicate output connectors are provided in order to allow for spares for the gFEX board.

The FOX  is internally divided into LArFOX and TileFOX components, which route the fibres from the LAr  calorimeter and TREX, respectively.  The LArFOX consists of four “FOX  boxes”, which route the EM and hadronic inputs to the eFEX, while the TileFOX consists of two FOX  boxes, which route the EM and hadronic inputs to the jFEX and gFEX.  Fibres may also be routed from one FOX  box to another before finally being sent to a given FEX.  A FOX  box consists of a 19-inch rack-mount “2U” chassis containing internal shuffle modules specified by their input and output MTP connectors and the input-to-output fibre mapping.

Inputs to L1Topo from the L1Calo FEXes and MuCTPI are handled by the TopoFOX, which performs fibre mapping and routing to the three L1Topo processor modules in a manner analogous to the FOX.  Each of the four processor FPGA in a given FEX module sends a 12-fibre ribbon to the 48-fibre output connector of that module, while each of the side-A and side-C FPGA of the MuCTPI send two 12-fibre ribbons to the 48-fibre muon output bundle.  The TopoFOX receives and sorts these fibre outputs, combining them into twelve 72-fibre bundles, two of which are sent to each of the six FPGA making up the three L1Topo modules.

Hub & ROD
Common communications functionalities for the eFEX, jFEX, and L1Topo ATCA shelves are provided by the Hub modules.  The Hub supports the system readout via a ROD daughter card
contained on a mezzanine on the module, provides switching functionality for module control and DCS, and distributes timing and control signals to the modules.  Each ATCA shelf contains two Hub modules.  In total, the L1Calo system contains seven Hub modules: four for the eFEX system, two for the jFEX system, and one for L1Topo.

In a given shelf, the Hub module located in logical slot 1 provides switching capability for module control signals; it also receives the LHC clock and TTC information from the FELIX via a 12-channel MiniPOD optical receiver.  This information is then fanned out to the ROD daughter card contained on the Hub, the FEX modules and the second Hub in the shelf.  This second Hub module, located in logical slot 2, provides switching for the DCS network.  Readout control data from its ROD is sent to the Hub in slot 1 to be included in the combined readout data stream.  At the HL-LHC, FEX data will be multiplexed between the two ROD in the shelf in order to cope with the higher data rate.

High-level control of the Hub is performed via an IPbus interface <cit.>.  The Hub also connects to the IPMB <cit.>) via an IPMC card <cit.> located on the module.  An I$^2$C bus is used to manage communications on the Hub itself.

Readout data from the eFEX, jFEX, and L1Topo modules are sent to the new FELIX and SW ROD readout system (described in Section <ref>) by the ROD daughter card mounted on the Hub module.  The gFEX sends its data directly to FELIX.  The ROD receives the readout data from all FEX modules in a given shelf. The data are then decoded, the checksum evaluated, and finally merged into a single packet and buffered before being transmitted to FELIX.

The ROD includes a Xilinx® Virtex® -7 FPGA and four MiniPOD optical transceivers, which transmit the readout data to FELIX.  A photo of a Hub module, with the ROD mounted, is shown in  <ref>.

A Hub module, with the ROD mezzanine mounted (at the top of the module, outlined in pink).

§.§ L1 Muon Trigger

In , the L1Muon trigger decision in the endcap region ($1.05 < |\eta| < 2.4$) was based on the coincidence of hits in the TGC stations of the endcap middle layer (EM-TGC), called the Big Wheels.  The EM-TGC have three stations (TGC-M1, TGC-M2, and TGC-M3) per side, with the M1 station consisting of three layers and the outer two stations (M2 and M3) each consisting of two layers, for a total of seven layers.

To improve the rejection of fake muons in the full $\eta$ range of the EM-TGC, several upgrades have been performed, with the aim of reducing the L1 trigger rate while keeping the efficiency high <cit.>.  During , an additional requirement of a coincidence between the EM-TGC and the D-layer cells of the Tile calorimeter (see Figure <ref>) in the range $1.05 < |\eta| < 1.3$, was introduced.