Alignment of the ATLAS Inner Detector in Run-2

The performance of the ATLAS Inner Detector alignment has been studied using pp collision data at √ s = 13 TeV collected by the ATLAS experiment during Run 2 (2015–2018) of the Large Hadron Collider (LHC). The goal of the detector alignment is to determine the detector geometry as accurately as possible and correct for time-dependent movements. The Inner Detector alignment is based on the minimization of track-hit residuals in a sequence of hierarchical levels, from global mechanical assembly structures to local sensors. Subsequent levels have increasing numbers of degrees of freedom; in total there are almost 750,000. The alignment determines detector geometry on both short and long timescales, where short timescales describe move-mentswithinanLHCﬁll.Theperformanceandpossibletrack parameter biases originating from systematic detector deformations are evaluated. Momentum biases are studied using resonances decaying to muons or to electrons. The residual sagitta bias and momentum scale bias after alignment are reduced to less than ∼ 0 . 1 TeV − 1 and 0 . 9 × 10 − 3 , respectively. Impact parameter biases are also evaluated using tracks within jets.


Introduction
The precise reconstruction of the trajectories of charged particles created in proton-proton (pp) and heavy-ion collisions at CERN's Large Hadron Collider (LHC) is a key ingredient in many of the physics processes studied by the ATLAS Collaboration. Almost every measurement performed using the ATLAS detector [1], from Standard Model processes to searches for new physics phenomena, relies on the accurate reconstruction of charged particles.
In order to reconstruct the trajectories of charged particles, ATLAS uses the Inner Detector (ID) tracking system to provide efficient, robust and precise position measurements of charged particles as they traverse the detector. The energy deposits from charged particles (hits) recorded in individual detector elements of the ID are used to reconstruct their trajectories (tracks) and estimate the associated track parameters. The precision achieved for the track parameters is determined by several factors: the intrinsic resolution of sensitive devices; the knowledge of the magnetic field; the distribution of material in and before the ID and the knowledge of it; and the knowledge of the geometry, i.e. the location and orientation, of the detector elements. The purpose of the detector alignment is to determine, as precisely as possible, the actual geometry of the active detector elements of the tracking system, and to follow changes in the geometry with time.
Poor knowledge of the actual geometry of the active detector elements results in a deterioration of the resolution of reconstructed track parameters. The criteria for the minimum precision required were defined in order to limit the degradation of the resolution of the track parameters for high-momentum tracks to less than 20% in comparison to a perfectly aligned detector [2]. In addition, correlated geometrical distortions can lead to systematic biases in the reconstructed track parameters. Correlated systematic biases can be introduced either by real detector deformations to which the alignment procedure has little sensitivity or by the procedure used to determine the alignment parameters. These correlated biases are referred to as 'weak modes' of the alignment.
In this document, the ATLAS ID alignment procedure and its performance during Run 2 of the LHC is presented. A new layer of pixel sensors was included in the detector for Run 2, which posed additional challenges for the alignment of the detector compared to those faced during Run 1 [3,4]. The greatest new challenge was the short-timescale movement of parts of the detector during data taking. This paper is organised as follows: a brief description of the ATLAS detector is given in Section 2. Section 3 presents the formalism of the ATLAS track-based ID alignment. Section 4 introduces the different alignment levels and Section 5 discusses the detector stability and describes the time-dependent alignment. The performance of the ATLAS Run 2 alignment is presented in terms of track parameter biases in Sections 6 and 7. Concluding remarks are made in Section 8.

The ATLAS detector
The ATLAS detector [1] at the LHC is a multipurpose particle detector with a forward-backward symmetric cylindrical geometry that covers nearly the entire solid angle around the collision point. The global ATLAS reference frame is a right-handed Cartesian coordinate system, where the origin is at the nominal pp interaction point, corresponding to the centre of the detector. The positive x-axis points to the centre of the LHC ring, the positive y-axis points upwards and the z-axis points along the beam direction. Polar coordinates (r, φ) are used in the transverse plane, φ being the azimuthal angle around the beam pipe. The pseudorapidity is defined in terms of the polar angle θ as η = − ln tan(θ/2). Angular distance is measured in units of ∆R ≡ (∆η) 2 + (∆φ) 2 .
ATLAS consists of the ID (described in Section 2.1), electromagnetic and hadronic calorimeters, a muon spectrometer and a magnet system. Lead/liquid-argon sampling calorimeters provide electromagnetic energy measurements with high granularity and a steel/scintillator-tile hadronic calorimeter covers the central pseudorapidity range of |η| < 1.7. The endcap and forward regions are instrumented with liquid-argon calorimeters for measurements of both electromagnetic and hadronic showers up to |η| = 4.9. The outer part of the detector consists of a muon spectrometer with high-precision tracking chambers for coverage up to |η| = 2.7, fast detectors for triggering over |η| < 2.4, and three large superconducting toroid magnets with eight coils each. The ATLAS detector has a two-level trigger system to select events for offline analysis [5].

Inner Detector structure
The ATLAS ID [2,6] consists of three subdetectors utilising three technologies: silicon pixel detectors, silicon strip detectors and straw drift tubes, all surrounded by a thin superconducting solenoid providing a 2 T axial magnetic field [7]. The ID is designed to reconstruct charged particles within a pseudorapidity range of |η| < 2.5 (see Figure 1 for a schematic view of the ID barrel region and Table 1 for a list of the main detector characteristics). The material distribution inside the ID has been studied in data through use of hadronic interactions and photon conversion vertices [8,9]. During the second LHC data-taking run (2015)(2016)(2017)(2018) with pp collisions at a centre-of-mass energy √ s = 13 TeV, the ID collected data with an efficiency greater than 99% [10]. The innermost part of the inner detector consists of a high-granularity silicon pixel detector and includes the insertable B-layer (IBL) [11,12], a new tracking layer added for Run 2 which is closest to the beam line and designed to improve the precision and robustness of track reconstruction. The IBL consists of 280 silicon pixel modules arranged on 14 azimuthal carbon fibre staves surrounding the beam pipe at a radius of 33.25 mm. Each stave is instrumented with 12 two-chip planar modules, covering the region of |η| < 2.7, and 8 single-chip modules with 3D sensors [13,14], four at each end of the stave (2.7 < |η| < 3). The remainder of the Pixel detector [2,6,15] consists of 1744 silicon pixel modules arranged in three barrel layers and two endcaps with three disks each. Each pixel module comprises 16 front-end chips bump-bonded to the sensor substrate. The barrel modules were assembled on staves of 13 modules each, whilst the endcap modules were assembled directly on the disks. In order to simplify the notation throughout the rest of the paper, the term Pixel is used to refer only to the detector already in place during Run 1 and the new layer is referred to explicitly as the IBL.
The Semiconductor Tracker (SCT) [16][17][18] consists of 4088 silicon strip modules. They are arranged in four barrel layers and two endcaps with nine disks each. Each module consists of two pairs of single-sided strip sensors glued back-to-back with a 40 mrad angle between them. Each module comprises 12 128-channel chips. The barrel modules are mounted directly on the cylindrical support structures of each layer in 12 rings, whilst the endcap modules are assembled in 3 rings on the disks. The barrel SCT sensors have a uniform pitch strip of 80 µm, while the endcap sensor strips run radially with a 161.5 µrad angular pitch.
The Transition Radiation Tracker (TRT) [19][20][21] is the outermost subdetector and extends track reconstruction radially outwards to a radius of 1082 mm. It is made of 350 848 gas-filled straw tubes of 4 mm diameter. The tubes are arranged in 96 barrel modules in 3 layers (32 modules per layer) and 40 disks in each endcap. The expected hit resolutions for each subdetector are summarised in Table 1. Table 1: Summary of the main characteristics of the ID subdetectors. The intrinsic resolution of the IBL and the Pixel sensors are reported along r-φ and z, while for SCT and TRT only the resolution along r-φ is given [1,11]. For SCT and TRT the element size refers to the spacing of the read-out strips and the diameter of the straw tube, respectively.

Local coordinate system
The local coordinate system of an individual sensor of the detector is a right-handed system frame with the origin placed in the geometrical centre of the sensor. The local coordinate system for each subsystem component is illustrated in Figure 2. The convention used is the following: the local-x axis points along the most sensitive direction of the sensor. This corresponds to the shorter pitch side for Pixel and IBL modules, and perpendicular to the strip-orientation for the SCT. In the silicon detectors, the local-y axis is oriented along the long side of the sensor (i.e. longer pitch direction for the Pixels and IBL and the strip direction in the SCT), while the local-z direction is orthogonal to the local x-y plane. In the case of the TRT, the local-y axis points along the wire: either in the same direction as the global z-axis (barrel) or radially outwards (endcaps). In the barrel, the local-z axis points radially outwards (from the origin of the global frame to the straw centre). In the endcaps, the local-z axis points outwards (parallel to the beam line). The local-x axis is perpendicular to both the TRT wire and the radial direction.
Hits are reconstructed in the local reference frame. As the SCT consists of double-sided modules, a separate local frame is associated with each side of the module. The TRT measures the radial distance of the primary ionisation from the wire as √ x 2 + z 2 , taking both x and z in the local frame.

Alignment principles and formalism
This section reviews the formalism for in situ alignment of the ATLAS ID using reconstructed tracks. The concept of Global χ 2 alignment is introduced, followed by a discussion of 'weak modes' (Sections 3.2.4 and 6) and how they can be avoided by adding constraints on track parameters. The section closes with a detailed description of the alignment procedure and its implementation within the ATLAS software.  Figure 2: Schematic representation of the ATLAS global reference frame (x, y, z) and the local reference frame of each component of the ID. The Pixel, IBL, and SCT modules are grouped in the 'Silicon' category. For each component, the local-x axis points along the most sensitive direction; the local-z axis points away of the ATLAS centre; and the local-y direction is chosen according to the right-handed frame. For TRT tubes, the local reference frame is determined by the orientation of the module they are mounted on. For visualisation purposes only, the local reference frame is referred to as (x , y , z ) in the drawing.
The approach used is based on the Newton-Raphson method and determines both the trajectory parameters and a set of alignment parameters, α. In this context, α are chosen as the six degrees of freedom (DoF) of each alignable structure that uniquely define its position and orientation in space. These correspond to three translations (T x , T y , T z ) and three rotations (R x , R y , R z ). Translations are relative to the origin of the reference frame of each alignable structure and rotations are around the Cartesian axes.

Track fitting with the Newton-Raphson method
The Newton-Raphson method uses an iterative approach to find the best fit to a set of measurements of a track left in the detector by a charged particle traversing active detector elements. The quality of the fit is characterised by a track χ 2 , determined from the distances between the hits in the detector, which constitutes the track measurements, and the fitted track (residuals). The trajectory of a track in a magnetic field is parameterised by a set of five parameters. The chosen parameterisation in ATLAS is: τ = (d 0 , z 0 , φ 0 , θ 0 , q/p), where d 0 and z 0 are the transverse and longitudinal impact parameters and φ 0 and θ 0 the azimuthal and polar angles of the track, all defined at the point of closest approach to the z-axis of the reference frame [22]. The ratio q/p is the inverse of the particle momentum (p) multiplied by its charge (q) (see Ref. [4] for more details).
The track χ 2 is calculated from all measured track-hit residuals, r i = e i (τ) − m i . where m i is the position of the i th measurement, and e i is the position of the intersection of the fitted track with the surface on which the i th measurement is made. The determination of the intersection position (e i ) includes the measurement in question, which causes r i to be a biased residual. The track χ 2 is defined, using vector notation, as where r is the vector of track residuals and Ω is the covariance matrix of the corresponding measurements. 1 The parameters of a track's trajectory, τ, are those that minimise this χ 2 . The minimisation is done using the first and second derivatives of the χ 2 with respect to τ. Defining the derivative G = dr/dτ, the condition for the minimisation of the χ 2 is Figure 3: Schematic representation of a charged particle crossing detector planes. The measurement, m i , on each the i th layer is indicated by a red star. Also shown are the fitted track trajectory for a given set of track parameters, τ (black line), the position of the intersection of the fitted track with the surface on which the i th measurement is made, e i (τ) (green ellipse), and the residuals, r i (blue line).
In practical terms, the values of τ satisfying Eq. (2) are found using an iterative procedure by evaluating the first and second derivatives of χ 2 with respect to the track parameters of the current iteration, τ 0 . If the derivative G were constant, then the problem would be linear and the solution would be exact. In general, the derivative G depends on the track parameters themselves. Therefore, the procedure is repeated until a convergence criterion is met.
The track fit can be further improved by adding parameters, θ, which attempt to account for the effects of multiple Coulomb scattering (MCS) of the particle with the detector components, as detailed in Appendix A. Consequently, the residuals now also depend on θ and the variance of the scattering angles, Θ: Thus, χ 2 Track has to be minimised for τ and θ simultaneously. The derivatives of residuals with respect to track and scattering parameters are defined as G ≡ ∂ r/∂τ and S ≡ ∂ r/∂θ, respectively. In the following, 1 The local position and uncertainty of each measurement are provided by the corresponding subsystem after applying its own clustering and hit reconstruction techniques. The Pixel detector uses an artificial neural network, trained on simulation, to determine the position of a cluster and its uncertainty [23]. The SCT parameterises the position of the cluster and its uncertainty, using simulation, as a function of the number of strips in the cluster and the incident angle of the particle. For the TRT the drift radius and its uncertainty is calibrated using an iterative procedure in data and simulation [21].
the Global χ 2 method for alignment including MCS is described and the following simplified notation is adopted: 3.2 The Global χ 2 method for alignment 3

.2.1 General definition of the Global χ 2 method for alignment
The Global χ 2 is a track-based alignment method which uses a χ 2 built from a large sample of reconstructed tracks and their associated hits in the detector elements being aligned. The alignment parameters are determined by minimising the Global χ 2 with respect to the alignment parameters: where χ 2 Track i is the χ 2 of the i th track as given by Eq. (3). The residuals used in Eq. (5) depend on the alignment parameters (α) as both, the measurements and the track extrapolations depend on α, the former directly and the latter through the fitted track parameters. Therefore, the minimisation of χ 2 Global with respect to α uses the total derivative operator with respect to α, which can be expressed as: The dπ/dα term is determined from the condition that, once χ 2 Global is at a minimum, χ 2 Track is also at a minimum with respect to the track parameters: Using Eq. (7) in Eq. (6), this results in: which allows the nested dependence of the π on α to be resolved, thereby removing the need to determine both (the track parameters and alignment parameters) simultaneously.
Ignoring second-order derivatives, using the covariance matrix of the track parameters, C, expressed as and defining A as the derivative of the residuals with respect to the alignment parameters: using Eqs. (8) and (9) the total derivative operator with respect to α can be rewritten as: The first-and second-order derivatives of χ 2 Global with respect to α are thus: Here, the term HCH represents the covariance of the track parameters in the measurement space, whereas the covariance of the residuals of the track fit is given by

Newton-Raphson method for Global χ 2 alignment
In analogy to the general method for track fitting (Section 3.1) an iterative approach is used to solve for the alignment parameters. The first-and second-order derivatives are obtained using Eqs. (10) and (11) and evaluated for an initial set of alignment parameters, α 0 . Such an initial geometry description is available from design drawings, survey measurements, or previous alignment results. The alignment corrections, to the initial geometry, are given by The above step is repeated for successive iterations until a convergence criterion is met and ∆α is negligible. This requires re-fitting the tracks using the updated geometry (initial alignment constants α 0 plus their corrections ∆α), to obtain new residuals and new derivatives, and solving again to compute the next set of corrections to the alignment constants.

Locality ansatz
If the initial track parameters, π 0 , minimise χ 2 Global for a given α 0 , Eq. (10) simplifies to as the term H V −1 ρ is zero. Consequently, if the measurements are independent and V is diagonal, the derivative with respect to a particular parameter α i only receives contributions from residuals for which A elements are non-zero. In other words, if α i is an alignment parameter of a given detector module, only the measurements in this module contribute to the first-order derivative of χ 2 Global with respect to α i . Therefore, contributions to the χ 2 Global from measurements in other subdetectors and MCS effects can be ignored. This useful property is labelled as the so-called locality ansatz [24] and provides an important simplification for the software implementation.

Adding constraints on track parameters
It is of particular importance to assure that the determination of the track parameters is free from systematic biases that can occur due to poorly determined 'weak modes' of the alignment. These modes are geometry distortions that leave the χ 2 of the fitted tracks nearly unchanged and typically lead to an incorrect solution of the alignment. They can be controlled by imposing constraints on track parameters [25]. Examples of such constraints, discussed in detail in Sections 6 and 7, are the beam-spot constraint, track parameter constraints from external detector systems (e.g. calorimeters), and constraints determined using reconstructed physics events (e.g. mass constraints from narrow resonances). These constraints are included in the Global χ 2 method by adding extra terms to the expression for the χ 2 in Eq. (5). For one track the modified contribution to χ 2 is where q is a vector defining the constraint on π and T is its covariance matrix.
In the ATLAS implementation, this constraint is implemented by adding a pseudo-measurement on a track [22]. The solution for the alignment parameters is given by Eq. (12), where for each constrained track the covariance matrix is now defined as In this context, the first-order derivative of the Global χ 2 is given by If the tracks have been re-fitted with the imposed constraint, the locality ansatz drastically simplifies Eq. (15), reducing it to Eq. (13). This property is used in the ATLAS implementation.

Constraints on alignment parameters
Often one has some prior knowledge of the geometry from either survey measurements or mechanical constraints. These constraints can be included by adding terms to the χ 2 in Eq. (5). In the general case, one can write where a is a vector defining the constraint on α and W is its covariance matrix. The added term leads to extended expressions for the first and second derivatives of χ 2 with respect to α (Eqs. (10) and (11)): while the solution is computed using Y and M in Eq. (12).
The special case when a ≡ α 0 and W is diagonal, i.e. when the alignment parameters are constrained to their initial values, is further discussed in Section 3.3.3.

The Local χ 2 method
The main advantage of the Global χ 2 method arises from its rigorous treatment of correlations between alignable objects through the tracks connecting them. However, this approach becomes technically challenging when the number of alignment parameters is very large, such as in the case of the alignment of individual TRT straws (≈ 700 000 parameters). In order to overcome this challenge, a simplified version of the χ 2 approach (the Local χ 2 method) is used. It is based on the minimisation of the same χ 2 , Eq. (5), but the implicit dependence on the fitted track parameters is dropped, reducing Eq. (6) to a simpler form: Consequently, Eqs. (10) and (11) are reduced to: In addition, the problem is reduced to separate systems of equations describing individual alignable modules. The Local χ 2 method eliminates the numerical challenges of the Global χ 2 since only systems of equations with up to six parameters (albeit many of them) need to be solved. However, due to the loss of the correlations between alignable objects, the Local χ 2 method needs a much larger number of iterations to converge.

Solving the linear system of alignment equations
In general, the properties of the matrix representing a system of linear equations determine the most suitable solution technique. The matrix M in Eq. (11) as defined in the Global χ 2 ansatz is found to be symmetric and singular and to have a poor matrix condition number if no constraints are applied. The addition of appropriate constraints generally renders the matrix positive definite. The singular nature of the matrix is the result of detector movements that leave a track's χ 2 unchanged. The simplest examples are global transformations of the detector (either translations or rotations), which are generally singular modes.2 A trivial way to remove these global degrees of freedom is to fix a detector element, making it the reference point for all other detector elements. This method has the unwanted drawback of arbitrarily selecting one detector module as the reference frame. In the following section, two methods used to obtain a solution to the alignment system of linear equations are discussed along with how 'weak modes' are removed or mitigated.

Diagonalisation of the matrix
The symmetric matrix M is decomposed into its diagonal basis: PDP where D is a diagonal matrix containing the eigenvalues of M, and P is a matrix containing the eigenvectors of M. Of course, in the diagonal basis all parameters (directions) are linearly independent, and the solutions plus their associated uncertainties are given by the eigenvalues (λ i ) with: where Singular and weak modes must be excluded as their eigenvalues are zero or have an arbitrarily large associated uncertainty, respectively. Although this can be achieved in many ways, the primary method employed is to set D −1 i,i = 0 for the modes that need to be removed, thereby creating a new diagonal matrix D −1 which provides the solution: The DSPEV function in the LAPACK [26] software package is used as a baseline in the ATLAS implementation to diagonalise large matrices. Alternative implementations using ROOT [27], EIGEN [28] and CLHEP [29] linear algebra classes are also available. In general, the computation time for matrix diagonalisation scales as O(DoF 3 ) and solutions for very large systems become untenable on a single machine. If the initial matrix is poorly conditioned, the accuracy of the numerical solution can be limited by the precision of 64-bit floating-point computations for problems exceeding O(10 000) DoFs.

Direct solving
Even for very large problems, direct solvers offer an accurate and CPU-efficient method for solving sparse linear equations. In addition, less memory is required as no matrix is inverted or diagonalised in the process. The LDLT Cholesky factorisation method provided within EIGEN [28] is used within the ATLAS ID alignment and takes less than 10 minutes to solve an alignment problem with 35 000 parameters (the approximate number of parameters needed to align all modules in the ID simultaneously) on a modern CPU. Direct solving is used when aligning thousands of degrees of freedom (usually when aligning at individual module level). Obtaining a direct solution does not offer the possibility of eliminating specific eigenmodes. Thus, other preconditioning techniques are used in order to extract a meaningful solution (e.g. Section 3.3.3). It is noteworthy that, although not extensively utilised within ATLAS, it is possible to iteratively find the eigenvalues and associated eigenvectors of large systems by solving Mx = λx for x and λ [30], which can be useful in understanding the weak modes of very large systems and identifying the underconstrained degrees of freedom.

Constraining alignment parameters in the solution (the Soft Mode Cut)
As introduced in Section 3.2.5, setting a ≡ α 0 and having a diagonal W constrains the alignment parameters to their initial values. Here, W denotes a diagonal matrix with diagonal elements: σ(α i ) 2 , providing the tolerances to the corrections of the alignment parameters.
For this special case, the top row of Eq. (17) simplifies to Eq. (10) and the diagonal of the matrix M in Eq. (11) is incremented by the reciprocal of assumed variances of alignment corrections: The above equation can be rearranged as yielding an equation in which the corrections to the alignment parameters are normalised to their assumed uncertainties ∆α i −→ ∆α i /σ(α i ). Apart from the extra identity matrix I, Eq. (19) is exactly equivalent to Eq. (12).
To illustrate the effect of such a constraint, consider the case that all σ(α i ) are equal (σ(α i ) = σ c ). The extra identity matrix does not affect the eigenmodes of M, but adds an offset to its spectrum of eigenvalues: The solution in the diagonal basis, Eq. (18), takes the form: Hence, one obtains a solution explicitly free from ill-defined (weak) modes. This operation does not require an explicit diagonalisation and can be used as preconditioning prior to fast solving, providing powerful control over solutions for an arbitrarily large number of DoFs. Due to the typically exponential nature of the eigenspectrum, Eq. (20) represents a solution with a clear cut-off in the diagonal basis for λ i 1/σ 2 c . This technique is extensively used in the ATLAS implementation.

Inner Detector alignment
The ID is composed of a large number of active detector components (see Section 2.1 for details). Each component or grouped collection of modules (e.g. a subdetector) can be treated as an alignable structure. The alignment is performed at different hierarchical levels following the assembly structure of the ID. Starting with the largest physical structures at level 1, the detector subsystems are aligned separated into endcaps and barrel regions in order to correct for collective movements. Level 2 treats individual barrel layers and endcap disks as physical structures (barrel modules and endcap wheels in the case of the TRT). Level 3 corresponds to a silicon module or TRT wire alignment. In this context, the SCT modules are considered as a single element in the alignment procedure due to their high construction precision [16,17]. The levels are addressed sequentially during the alignment procedure, see Table 2.
In Run 2, the alignment levels were updated to accommodate the IBL. These changes are straightforward for levels 2 and 3, as the IBL represents merely an additional Pixel layer or additional silicon modules, respectively. The support structure of the IBL is mechanically independent from the previously installed Pixel subdetector, so IBL movement is not expected to be correlated with collective Pixel movements. Consequently, the IBL is treated as a separate physical structure at level 1.

Time-dependent alignment
Time-dependent alignment is performed for each LHC fill prior to data reconstruction to determine if the detector, or individual subsystems, have moved significantly compared to a reference alignment. Such detector movements occur on different timescales, which are classified as short, medium, or long. Short timescales describe movements during a single LHC fill that are a result of variations of the thermal load of the ID. These movements are caused by fluctuations in the power consumption of the front-end electronics, due to variations in the trigger rate, that additionally affect the temperature of the cooling system. On medium timescales, in the range of days to a month, changes to the environmental conditions of the detector, such as ramping the magnetic field or cycling the power or cooling systems, often lead to significant movements of the detector. Slow gradual movements of the subsystems over several months (long timescales) were also observed and attributed to mechanical relaxations after sudden changes. An automated time-dependent level 1 alignment is performed within the ATLAS prompt calibration loop [10] to address all known time-dependent movements, as detailed in Section 5. These results are monitored and new alignment corrections are automatically obtained during the calibration period. They serve as input for the bulk reconstruction of the corresponding dataset.

Baseline alignment constants
The baseline alignment constants are a set of reference constants that serve as initial estimates for the time-dependent refinements of the alignment. In order to achieve an accurate detector alignment and a minimisation of track parameter biases over a data-taking period, a large quantity of data are used (typically ∼ 2 fb −1 ). The levels of alignment performed are summarised in Table 2. The alignment using the global χ 2 method typically converges within two to four iterations for levels 1 and 2, while at least four iterations are required at level 3 (silicon). The TRT level 3 (straw level) uses the local χ 2 method and requires up to 30 iterations to converge, owing to the large number of DoFs.
Depending on the alignment level, some DoFs may be fixed during the alignment procedure if poor sensitivity is expected. Alignment levels targeting the silicon subdetectors use all tracks, whereas alignment levels including the TRT require tracks based on silicon and TRT hits. In order to remove weak modes from the alignment solution, appropriate constraints are added to the global χ 2 method (see Section 3.2.4). Different constraints are considered depending on the expected misalignment and DoF for each alignable structure, listed in Table 2. Additionally, each subsystem can be aligned at any required level independently from the others. Further subdivision of alignment levels into smaller physical detector components, e.g. the division of individual barrel layers into staves, is also supported and used. At level 1, the SCT barrel is kept fixed due to its good stability and to serve as reference for the rest of the structures.

Residuals
As described in Section 3.2, the solution of the Global χ 2 is the one that minimises the track-hit residuals. Figures 4 to 6 show track-hit residual distributions for data and simulation in different ID subdetectors.
Data and simulation correspond to a set of muons selected in Z → µ + µ − candidate events triggered by the lowest-threshold unprescaled single and dimuon triggers. The simulation sample was generated with the P -B v1 Monte Carlo event generator [31][32][33] at next-to-leading order (NLO) in α S interfaced to P 8.186 [34] for the modelling of the parton shower, hadronisation, and underlying event, with parameter values set according to the AZNLO tune [35]. The CT10 (NLO) set of parton distribution functions (PDF) [36] was used for the hard-scattering processes, whereas the CTEQ6L1 PDF set [37] was used for the parton shower. Events are required to contain two muons (satisfying 'medium' quality criteria as defined in Ref. [38]) with opposite charge and p T > 20 GeV. In addition, requirements on the opening angle between the two muons, γ(µ + , µ − ) > 45 • , and their invariant mass, 70 GeV < m µ + µ − < 110 GeV, Table 2: Typical alignment configurations used throughout Run 2 data taking to derive baseline alignment constants. Translational degrees of freedom (DoF) are denoted by a T, rotational ones by an R. As shown in Figure 2, TRT barrel straws run parallel to the beam line. That corresponds to T z at level 1 and T y at level 2.  Adequate agreement is seen between data and simulation in the residual distributions, where differences are quantified in terms of the 'full width at half maximum' (FWHM) figure of merit. A similar level of agreement is observed for the data collected during the other years of Run 2. In the case of the IBL, Pixel and SCT barrel, larger residual widths are observed in data. As shown in Section 5.3, the Run 2 alignment accuracy and stability in the central pseudorapidity range for both the Pixel and SCT barrel modules is controlled to a precision better than 0.5 µm and 2 µm in local-x and local-y, respectively. Consequently, several other possible causes of the observed discrepancy between data and simulation are considered, such as imperfect modelling of the interactions of muons with detector material in the simulation, the material description, delta ray production modelling, mis-modelling of the detector response (and resolution) in simulation, and residual biases not uniform across individual modules in data. The latter particularly impacts the local-y track-hit residuals in Figure 4. The poorest agreement is seen for the IBL residuals, which have not yet been corrected for sensor distortions, in contrast to the Pixel layers. The sensor distortion can result in track-hit residual biases of up to 10 µm within a given module, thus causing a broadening of the overall distribution [39]. The shape of the IBL modules was recently parameterised with Bernstein-Bézier functions and will be corrected in the track fitting procedure for Run 3 data taking. The cause of the small bias of 4 µm in the IBL local-y track-hit residuals in simulation in Figure 4 is currently unidentified. Simulated samples use a perfectly aligned detector with no track-based alignment correction, hence this bias originates from the track or cluster reconstruction. On data, this small reconstruction bias is removed by the alignment without a significant effect on alignment precision.

Detector stability and time-dependent alignment
This section discusses the main sources of time variation in ID geometry and the methods implemented to mitigate these effects within the ATLAS prompt calibration loop [10]. In addition, the stability of the ID in Run 2 is summarised, final time-dependent corrections for all subsystems are presented, and the precision of the alignment is determined. All results use pp collision data at √ s = 13 TeV. The alignment precision for heavy-ion data in Run 2 is at least as good as the final precision of pp collision data, as the instantaneous luminosity, and therefore the thermal load variations in the ID, is typically lower.

Short-timescale movements
Detector movements on short timescales are particularly challenging, since the ID track-based alignment calculates an average position correction for the time interval under study.3 The procedure used to correct for rapid movements must balance two competing effects: the alignment corrections must be determined in time intervals that are short enough to capture the motion of the particular deformation, but long enough to include sufficient data to obtain precise corrections.

Temperature-dependent IBL distortions
During the Run 2 commissioning of the IBL, it was already noticed that the IBL staves can be distorted by hundreds of micrometers relative to the design geometry. It was soon observed that these distortions depend on the operating temperature and correspond to module displacement in the azimuthal direction of the staves, equivalent to their local-x direction. The distortion was understood to be caused by tight, asymmetric mechanical coupling of materials with different coefficients of thermal expansion (CTE). The correlation between temperature and the size of the IBL distortion was studied using cosmic-ray data in March 2015 with a controlled variation of the IBL temperature, T set , in the range −20 • C to 15 • C [40]. The size of the distortion was measured in situ using the track-based alignment and a fit to a model determined from a three-dimensional finite-element analysis. This model parameterises the IBL distortion in local-x, δx(z), using a parabolic function, where z is the global-z coordinate of the module, z 0 ≡ 366.5 mm is the coordinate of the stave mount at both ends, B is the baseline describing the overall translation of the stave in local-x, and M is the magnitude of the distortion at the stave centre. The temperature gradient of M with respect to T set is found to be dM/dT set = (−10.6 ± 0.7) µm/K. The local-y position shows no temperature-dependent effect within 20 µm uncertainty, whereas the local-z (bending out of the plane of the stave) was not included in this study.
The IBL distortion is shown in Figure 7 for different T set values using 2015 and 2016 pp collision data.
From the initial data taking in Run 2 through September 2015, the IBL power consumption per module was found to be stable, and fluctuations in T set were within ∼ 0.2 K resulting in a stable detector (δx(z) < 3 µm) [40]. This situation changed with the rapid increase in integrated luminosity per LHC fill after September, which induced an increase in the low-voltage (LV) currents in the IBL module front-end electronics. This increase was traced back to radiation-induced leakage current in transistors [41]. The change in LV currents depends on the total ionisation dose. Studies show that the increase reaches a peak value for radiation doses between 10 and 30 kGy and decreases for higher doses to a value close to the pre-irradiation case. No error bars associated with data are shown. The IBL distortion was constant during all three LHC fills. Here, only the correction due to the IBL distortion is shown. The baseline, which describes the overall translation of the whole stave, is subtracted using Eq. (21). The fit represents only a first-order correction. Additional corrections are computed as part of the detailed alignment corrections at a later stage.
These variations in the LV currents caused an increase in IBL module temperatures that resulted in changes in IBL distortions on short timescales. In this context, values of δx(z) of up to 30 µm were observed between LHC fills and up to 10 µm within a single fill, corresponding to a variation of 0.5 µm h −1 .

Vertical movements of the Pixel detector
Another systematic deformation on short timescales is a change in the vertical position (global-y direction) of the Pixel detector by up to 8 µm at the start of an LHC fill. Figure 8 shows the Pixel detector vertical movement from the start of an LHC fill. The position is computed every 20 minutes, which is the shortest time interval used in the ATLAS prompt calibration loop. As is evident from Figure 8 The cause of this movement is understood to be the following. When the Pixel detector is switched on at the start of a fill, modules reach their new temperature almost immediately as a result of the strong thermal coupling between the modules and the evaporative cooling system [1,42]. The LV current in the read-out electronics also increases immediately, while the temperature in the Pixel detector volume rises gradually during the first 60 minutes. The smaller mass load due to the change in density of the bi-phase cooling liquid causes the Pixel detector to rise. After this initial rise, as the instantaneous luminosity and thus the occupancy decreases over the course of the fill, LV digital currents, module temperature and Pixel volume temperature gradually decrease as well. This in turn causes an additional slow drift in the direction opposite to the initial movement. The speed of this slow drift depends on the peak luminosity per LHC fill. This speed increased during 2016 to reach values of 0.2 µm h −1 , as shown in Figure 9. The vertical speed is determined as the average speed of the Pixel detector excluding the first hour after the start of data taking. This vertical drift was monitored and corrected for throughout Run 2.

Dynamic alignment on short timescales
In an effort to mitigate the effects of systematic short-timescale distortions and ensure adequate data quality for all analyses relying on tracking, conceptual improvements within the alignment framework and strategy were made. A key improvement was the introduction of a new alignment DoF, B x , to parameterise the IBL distortion deformation magnitude M. The B x DoF correlates the local-x coordinate of each module along the IBL stave using the parabolic function defined in Eq. (21). Minimising the global χ 2 with respect to B x provides corrections for varying degrees of IBL stave distortion using a single DoF, which can be done with small amounts of data. In contrast, a full level 3 alignment, which relies on a large amount of data, had been required previously, which did not allow short-timescale movements to be determined.  The automated alignment scheme that is performed within the ATLAS prompt calibration loop in Run 2 data taking determines level 1 and IBL B x (per stave) dynamic alignment constants every 20 minutes at the start of a fill and every 100 minutes for the rest of the fill. This level of granularity in time is adequate to mitigate the effects of short-timescale vertical movements on track parameter resolution. The alignment is performed in two iterations of the level 1 calibration loop (level 1 CL) followed by two dedicated iterations to correct for IBL distortions. The B x correction in the level 1 CL corresponds to a collective, uniform correction for all IBL staves. The dedicated IBL bowing iterations determine B x individually for each stave, as summarised in Table 3. The SCT barrel is used as the reference in the dynamic alignment.

Time-dependent corrections for all subsystems
The performance of the dynamic alignment scheme using 2016 pp collision data is shown in Figures 10  and 11. The average bowing magnitude of the 14 IBL staves relative to the baseline alignment is compared with the results of the dynamic alignment in Figure 10. Figure 11 shows the average IBL distortion computed after different alignment corrections versus time in the form of luminosity blocks (LB), which correspond to stable data-taking conditions in periods of approximately one minute. It also compares the unbiased4 local-x residuals computed using the a fill-averaged correction (for illustration only) with those obtained after computing the full dynamic alignment correction, which is derived in short time-intervals. A clear improvement in the residual distributions is seen after applying dynamic alignment corrections. Figures 10 and 11 illustrate that, averaged over an LHC fill, even very large values of M (up to 30 µm) are accurately corrected for using B x as an alignment DoF. These features were present for all Run 2 data, although there was some saturation of the effect in the later years of Run 2, as observed in the radiation damage studies of the IBL [41].
The long-term trend of the Pixel and IBL detector movements relative to the baseline alignment correction is shown in Figure 12 for the average B x correction, the global T x correction, and the global T y correction. For the sake of clarity, the plots in Figure 12 show only a fraction of the Run 2 data; the remaining data follow the same trend.

Final alignment precision of each subsystem
The final alignment precision of each ID subsystem is determined from the track-hit residuals of individual silicon modules for each LHC fill in 2015 and 2016 data taking after the dynamic alignment corrections are applied. These dynamic alignment corrections are computed either for large structures (e.g. the Pixel detector) as a collective movement of all modules or using a simplified parameterisation (like B x ). In this context, less significant module-to-module movements remain uncorrected by the dynamic alignment. This effect is seen as a residual time-dependent misalignment or 'instability' of the modules. This instability is estimated for each silicon layer and module z-position by integrating modules over φ into one group. Results are presented for the 'in-plane' translation DoFs only (local-x and local-y).
For each module, the average track-hit residual, r x,y , is computed for each LHC fill, for both local-x and local-y, on a set of calibration data, whose size is approximately independent from the fill conditions. Its statistical uncertainty, σ r x, y / √ N, where N is given by the number of tracks per module and σ r x, y is the standard deviation of the residuals, is computed assuming that the residual distribution is approximately Gaussian. The dispersion σ r x, y of the distribution in r x,y obtained from all LHC fills is an estimate of the total instability of the module position after all alignment corrections are applied. This total uncertainty can be divided into a statistical component (σ r x, y / √ N) and a component describing residual instability due to uncorrected time-dependent movements and stochastic fluctuations, σ time x,y : As the size of the statistical contribution per module per LHC fill is generally small, σ time x,y is estimated by . Figures 13 to 15 show the estimated instability in local-x and local-y of the Pixel and SCT barrel layers as a function of module z-position. Figure 16 shows the local-x and local-y instabilities of the modules in the Pixel endcap layers. The alignment in the central pseudorapidity range for both the Pixel and SCT barrel modules is controlled to a precision better than 0.5 µm and 2 µm in local-x and local-y, respectively. This level of control is considered to be very good given the time-dependent corrections of O(10 µm) due to the IBL distortion and the vertical movement of the Pixel detector. The same level of precision is not achieved for the outermost IBL modules (3D sensors) corresponding to the range |η| > 2.5. There the alignment precision in local-x (local-y) is measured with an uncertainty better than 3 µm (15 µm). This region is particularly challenging due to the low number of tracks. Moreover, the tracks in this region have only small overlap with other ID tracking layers. Furthermore, the large IBL local-y uncertainty may be related to a deformation of IBL staves in local-z over time, which is not corrected for in the prompt calibration loop.
The instability for Pixel endcap modules is larger than for barrel modules; the local-x and local-y instabilities are 2-4 µm and 4-7 µm, respectively. This instability corresponds to the size of the movements of the Pixel endcap modules relative to the baseline alignment over time. The precision achieved is nearly one order of magnitude better than the required precision [2]. This required precision was defined in order to limit the degradation of the resolution of the track parameters for high-momentum tracks to less than 20% in comparison with a perfectly aligned detector. While succeeding in its primary goal, these results, specifically the residual Pixel endcap movements, also imply that the current dynamic alignment scheme, which allows time-dependent alignment of the entire Pixel detector as one unit, is not optimal. A higher level of precision might be achieved if the Pixel endcap disks were aligned individually. This improvement is under study for LHC Run 3, including detailed cross-checks for new weak modes that may be introduced due to the additional DoFs within the calibration loop.

Momentum biases
The alignment corrections described in Sections 4 and 5 target misalignments that change the χ 2 of the track fit in Eq. (1). In contrast, correlated geometrical distortions referred to as weak modes leave the χ 2 of the fitted tracks virtually unchanged and can systematically bias the reconstructed track parameters. Momentum biases induced by correlated detector misalignments can generally be classified into two categories: • Sagitta deformations consist of detector geometry distortions in the bending plane that affect the reconstructed track curvature differently for positively and negatively charged particles (Figure 17 left).
• Length scale biases are characterised by detector geometry distortions along the track trajectory and affect the reconstructed curvature identically for positively and negatively charged particles (Figure 17 right).
These biases can be mitigated through the use of constraints either on track parameters (Section 3.2.4) or on alignment parameters (Section 3.2.5), or on both simultaneously. Residual momentum biases, after corrections to the detector alignment have been made, are sufficiently small that they can be accounted for by directly correcting track parameters.
detector layers real hit position reconstructed hit position real trajectory fitted track Figure 17: A simplified representation of two common weak modes that bias the track momentum. A sagitta bias (left) is caused by a deformation in the bending plane of the tracks, e.g. a rotation of the detector layers depending linearly on the radius. A length scale bias (right) caused by a deformation along the track trajectory, e.g. a radial expansion of the detector layers depending linearly on the radius. The real (dashed black line) and fitted (solid black line) particle trajectories are shown. Red stars indicate real measurement positions and grey stars show the reconstructed hit positions (biased measurements).

Sagitta bias
Displacements of the reconstructed hits in the bending plane orthogonal to the track path result in a charge-antisymmetric alteration of the track curvature, which is parameterised as where the un-primed quantities correspond to the true values, the primed quantities correspond to the reconstructed values, q refers to the sign of the electric charge of the particle and δ sagitta is a bias parameter common to all measured momenta and uniquely defines the detector geometry deformation.
Two iterative methods are used to determine the sagitta biases. The first method uses Z → µ + µ − decays. The second uses the electromagnetic calorimeter as a reference, and utilises the ratio of the measured energy deposited in the calorimeter (E) to the momentum (p) measured by the ID for electrons and positrons. Both methods allow the detector to be segmented arbitrarily in η and φ, allowing the study of localised sagitta biases. Sagitta biases have, to a great extent, been corrected for during the determination of the alignment constants by adding constraints to the parameters of the tracks used to perform the detector alignment, as given by Eqs. (14) and (16) and explained in Sections 3.2.4 and 3.2.5, and also in Refs. [3,43]. The methods used to calculate the constraints are described below, and the residual sagitta biases after alignment corrections are shown.

Measuring sagitta biases using
The invariant mass, m, of two highly relativistic opposite-charge particles is given approximately by where p + and p − are the magnitudes of the momenta of the positively and negatively charged particles, and γ is defined as their opening angle. In the following, + and − superscripts refer to the properties of the positively and negatively charged muons respectively. Sagitta biases can be measured using any particle (of reasonably narrow width) that decays into pairs of stable particles. In LHC conditions, resonances that decay into pairs of muons (such as J/ψ, Υ and Z) present the advantage that the dimuon signature can be clearly distinguished from the large hadronic background. For δ sagitta studies, Z → µ + µ − decays are preferred due to the high momentum of the Z decay products. Data quality selection criteria, summarised in Table 4, are applied to both the selected muon candidates and the dimuon system. In total, more than 70 million Z → µ + µ − candidate events were selected.
In general, geometrical distortions that bias sagitta measurements can be localised in specific regions of the detector. As a result, the sagitta bias parameter explicitly depends on the path of the track, which can be approximated by the direction of the track at the pp interaction point, given by η and φ: δ sagitta → δ sagitta (η, φ). The difference at leading order in δ sagitta (η, φ) between the reconstructed dimuon invariant mass using the uncorrected geometry (m µµ ) and the expected mass (m Z ) for each event is given by: An iterative procedure is used to determine δ sagitta (η, φ). For the i-th iteration, δ sagitta,i (η, φ) is computed for every muon in the Z → µ + µ − sample with: where δ sagitta,i−1 (η, φ) is the mean of the previous iteration for all muons in that (η, φ) region. The value of m 2 µµ is computed as in Eq. (23) also using the mean of δ sagitta from the previous iteration. The iterations are repeated until convergence is reached. Table 4: Event selection criteria for Z → µ + µ − (Section 6.1.1) and Z → e + e − (Section 6.1.2) candidate events for the analyses of the sagitta biases in data. Events triggered by the lowest-threshold unprescaled single and double electron and muon triggers are used to select Z → µ + µ − and Z → e + e − event candidates. γ(µ + , µ − ) is the opening angle between the muons. ∆d 0 (µ + , µ − ) and ∆z 0 (µ + , µ − ) are defined as the difference in d 0 and z 0 between the two muons.

Lepton selection
Two muons 1 associated Two electrons 5 associated with the primary vertex 2 with the primary vertex 2 p T > 12 GeV Both muon candidates are required to satisfy the 'medium' quality criteria as defined in Ref. [38]. 2 The reconstructed vertex with the largest p 2 T of its tracks. 3 Excluding the transition region between the barrel and forward calorimeters. 4 The significance is defined as |d 0 |/σ(d 0 ), where σ(d 0 ) is the uncertainty on the d 0 from the track fit. 5 Both electron candidates are required to satisfy the 'loose' quality criteria as defined in Ref. [45].
The method, as described by Eq. (23), is only sensitive to relative sagitta biases in different sectors of the detector. An alternative method, comparing the p T spectrum of the µ + and µ − [44] was also tested. This method is sensitive to global sagitta biases, although it is also subject to detector acceptance effects and requires more data to achieve the same statistical precision as the mass-based method. Figure 18 shows the measured sagitta distortions depending on the track direction using this technique. The central barrel region of the detector is largely free of sagitta bias, while the endcap regions exhibit some areas of small residual sagitta bias. The distribution of δ sagitta for the full Run 2 data is shown in Figure 18. Figure 19 shows the average δ sagitta versus η and φ, as well as its RMS. The distributions, split by data-taking year, have compatible shapes indicating a consistent and stable detector geometry during Run 2.

Measuring sagitta biases using the E/p ratio of electrons and positrons
Assuming that the calorimeter response is independent of the charge of the incoming particle and that a perfectly aligned detector reconstructs the momentum of charged particles correctly, charge-dependent momentum biases are expected to manifest themselves as differences in the E/p ratio of these particles. This ratio is defined as the ratio of the calorimeter energy measurement (E) to the track momentum measurement (p). This technique is mainly suitable for electrons and positrons. In the presence of a sagitta bias, the E/p ratio would be modified as E/p = E/p + q E T δ sagitta , where E T ≡ E/cosh η is referred to as the transverse energy. Assuming that the average transverse momentum of positrons and   electrons is equal, the sagitta bias can be estimated [3] as The value of δ sagitta is determined iteratively, correcting the momentum using Eq. (22), taking into account any biases introduced by the aforementioned assumptions. It should be noted that biases in the calorimeter energy scale cancel out to first order and any residual dependence would be reduced by this iterative procedure. In addition, this method is, by construction, sensitive to global sagitta biases. Data quality selection criteria are applied to both the selected electron candidates and the electron-positron system and are summarised in Table 4. Figure 20 shows the δ sagitta as obtained from the E/p method. These results support the observations from Section 6.1.1: the central barrel region of the detector is largely free of sagitta bias, while the endcap regions exhibit regions of small residual sagitta bias. Compared to Figure 18 (right) a global offset of ∼0.05 TeV −1 can be seen in Figure 20 (right) indicating the presence of a small global sagitta bias. Figure 21 shows the average δ sagitta versus η and φ, as well as its RMS. The δ sagitta distributions from the E/p method split by data-taking year have comparable shape to those obtained from the Z → µ + µ − mass method, further supporting the observation of a consistent and stable detector geometry during Run 2. The change in position due to the residual sagitta bias (∼0.1 TeV −1 ) when extrapolating a track from the detector origin to the outermost SCT endcap disk (radius of 500 mm and a z-axis distance of 2720 mm from the detector origin) is less than 10 µm.

Length scale biases
Displacements of the reconstructed hits parallel to the track direction result in a charge-symmetric alteration of the measured track curvature. In a tracker with a solenoidal magnetic field these can be induced by changes in the radial or longitudinal length scale of the detector with little impact on the track fit quality. If the actual radius of a detector module, R, is assumed to be R (1 + ε r ), then for small distortions (|ε r | 1), the reconstructed momentum will be: Equation (25) assumes that the length scale in the bending plane also expands by a factor (1 + ε r ), which implies that dimensions of sensitive detector modules would also expand by the same factor. If it is assumed that detector modules do not expand in the bending plane then the reconstructed transverse momentum will be biased by a factor of (1 + 2ε r ).
Similarly, if the actual longitudinal dimension of a detector module, z, is assumed to be z (1 + ε z ), the reconstructed momentum will be : Linear combinations of both the radial and longitudinal biases are also considered. It is worth noting that there is a degeneracy between the effects of a bias in the magnetic field and a global scaling of the detector (radial and longitudinal: ε s ), as both lead to a momentum bias of the form p p p (1 + ε s ). Consequently, if B is assumed to be B (1 + ε s ) the particle momentum scales as p p p (1 + ε s ).
The relationship between the reconstructed invariant mass of a particle decaying into two muons (m µµ ), and the true mass (m µµ ), assuming that the radial and longitudinal biases in Eqs. (25) and (26) are both small, is given by: where the β β β = p p p/E is the velocity of the particle. This approximation is valid to first order in ε.
In a simpler case, where only a global radial and longitudinal bias are present, the reconstructed mass is: which, in the limit where the muon mass is ignored leads to m 2 µµ ≈ m 2 µµ + 2m 2 µµ ε r sin 2 α + 2m 2 µµ ε z cos 2 α ≈ m 2 µµ + 2m 2 µµ ε s + ε r sin 2 α , ε s = ε z , and ε r = ε r − ε z is the difference between the radial and longitudinal components of the momentum scale.5 Thus, by measuring the mass as function of sin 2 α it is possible to differentiate between radial and scale biases. Figure 22 shows the measured scale using J/ψ and Z decays into µ + µ − in the barrel of the ID. The results show a clear momentum scale bias but no significant radial scale (ε r ) as the reconstructed mass is constant as a function of sin 2 α.
An analysis using an iterative procedure similar to the δ sagitta method, Eq. (24), is also performed. Here, the momentum scale factor (ε s ) is computed and consequently used to update the momentum of the tracks at the next iteration. This method allows biases to be measured as a function of any kinematic or geometric parameter. The results as a function of the track p T are presented in Figure 23. The magnitude of the momentum scale bias is observed to be constant as a function of track p T as expected from a length scale or magnetic field strength bias.
The magnitude of the measured scale bias is consistent for the two studies, demonstrating that there is a global momentum scale bias of ε s ≈ −0.9 × 10 −3 . This result is in agreement with the momentum scale at the ID for muons [38]. As previously highlighted, the origin of such a global momentum scale bias cannot be unambiguously resolved by these studies.

Impact parameter biases
The weak modes of the alignment can also lead to a bias in the transverse (d 0 ) and longitudinal (z 0 ) impact parameters. For example, a rotation of the IBL or radial distortions of the Pixel layers can lead to transverse impact parameter biases. The quality of the detector alignment can be assessed by analysing impact parameter biases as a function of track p T and η. For this study, events are selected using a combination of single-jet triggers with several jet p T thresholds starting at 100 GeV. The standard ATLAS event cleaning selection is applied, ensuring that all detectors were fully operational. In order to disentangle the biases due to residual misalignment from those originating from the track reconstruction algorithms, recorded data are compared with a dijet Monte Carlo simulation sample generated with P [46]. The primary vertex of each selected event must have at least three tracks associated with it. Tracks are selected by requiring them to be assigned to jets using ghost association [47], a procedure that treats them as four-vectors of infinitesimal momentum magnitude during the jet reconstruction and assigns them to the jet with which they are clustered. Jets are reconstructed using the anti-k t algorithm [48] with radius parameter R = 0.4. In addition, tracks are required to have at least 9 silicon (Pixels + SCT) hits for |η| ≤ 1.65, at least 11 silicon hits for |η| > 1.65, a maximum of 2 SCT holes6, no Pixel hole, p T > 3 GeV, |η| < 2.5, and an opening angle ∆R(track, jet) < 0.4 relative to the reconstructed jet axis. A track p T of 3 GeV corresponds to the lowest momentum threshold typically used within the alignment to reduce MCS effects (see Section 3.1). The impact parameters are obtained relative to the primary vertex by extrapolating the particle trajectory to its position. This is particularly relevant for the longitudinal impact parameter, as the width of the luminous region in the z direction is very broad. The impact parameter biases are extracted by iteratively7 fitting the distribution of impact parameters relative to the primary vertex with a Gaussian function within a ±2σ range until the fitted µ and σ are stable within 1%. The resulting value of the Gaussian mean (µ) represents the estimate of the impact parameter bias. respectively. The small bias in the longitudinal impact parameter as a function of track η is present in simulation and data and is consequently not introduced by the track-based alignment because it is not applied to simulation (where perfect alignment is assumed). The resulting bias has no significant effect on the ATLAS tracking performance as the longitudinal impact parameter resolution is on the order of 100 µm for tracks with p T > 10 GeV. 6 A hole is defined as a missing hit in a module where a hit is expected, based on the extrapolation of the particle trajectory to the module surface. 7 This procedure is adopted as the impact parameter distributions have long tails. 8 The impact parameters of tracks used in ATLAS physics analyses are corrected by a time-dependent constant to remove the observed biases. In addition, this bias will be corrected in future data processing campaigns.   Figure 24; the first part of the 2016 data also show no impact parameter dependence on track p T .  Figure 24; the first part of 2016 data also shows no impact parameter dependence on track η.

Conclusion
This paper describes the precision alignment of the ATLAS Inner Detector (ID) for Run 2 and quantifies the impact of alignment uncertainties on track parameter biases. The alignment procedure consists of a track-based algorithm that minimises track-hit residuals. It calculates the track parameters at each measurement surface and encodes the relationship between track-hit residuals and the alignment parameters of each alignable structure. To resolve ambiguities, it imposes externally determined constraints on track parameters, e.g. using tracks from resonance decays. The alignment procedure is performed at different hierarchical levels, starting from the largest physical structures and proceeding to individual detector modules or sensor elements. The number of degrees of freedom increases for each subsequent alignment level. In total, more than 36 000 degrees of freedom are considered when aligning all silicon modules (IBL, Pixel and SCT) and more than 700 000 degrees of freedom are added for the TRT.
It has been observed that operational conditions affect the positions of ID elements. The Pixel detector moves rapidly upwards every time the data acquisition is activated. The staves of the IBL bow depending on the temperature; the degree of variation depends on the thermal load and is a function of the accumulated radiation dose and of the luminosity. The remaining detector structures are quite stable during an LHC fill; the movements of individual modules in the barrel have an RMS at the micrometer level while those in the endcap regions range from 2 µm to O(10 µm).
An automated alignment procedure that corrects for relatively rapid movements of the Pixel detector and IBL and the relative positions of all of other subdetectors is executed for every LHC fill for which the ID collects data. The detailed alignment of all the other structures (subdetectors, barrel, endcaps, layers, disks, modules or wires) is determined in dedicated alignment campaigns. The impact of alignment weak modes, namely distortions that leave the track fit quality largely unchanged and can bias the measured track parameters, is minimised during these campaigns by employing external constraints on track parameters. Independent measurements are performed to quantify potential biases, enabling them to be largely removed. The residual sagitta bias and momentum scale bias after the full Run 2 alignment are reduced to less than ∼0.1 TeV −1 and 0.9×10 −3 , respectively. Remaining track parameter biases do not significantly impact ATLAS physics analyses.

Appendix A Track fitting with multiple Coulomb scattering effects
The track fit can be improved by allowing the charged particle to scatter as it passes through material in the detector. To include the effects of multiple scattering, terms are added directly to the track χ 2 as it is done in Eq. (3), which can be written as: It should be noted that the residuals now also depend on the scattering angles, θ. The scattering expectation value,θ, is zero and its variance, Θ j j , depends on the particle momentum and amount of material traversed. The uncertainty of the i-th measurement is denoted by σ i .
The χ 2 has to be minimised for τ and θ simultaneously. Defining the derivative of residuals with respect to track and scattering parameters to be: the derivatives of χ 2 with respect to the track and scattering parameters are: