An embedding technique to determine $\tau\tau$ backgrounds in proton-proton collision data

An embedding technique is presented to estimate standard model $\tau\tau$ backgrounds from data with minimal simulation input. In the data, the muons are removed from reconstructed $\mu\mu$ events and replaced with simulated tau leptons with the same kinematic properties. In this way a set of hybrid events is obtained that does not rely on simulation except for the decay of the tau leptons. The challenges in describing the underlying event or the production of associated jets in the simulation are avoided. The technique described in this paper was developed for CMS. Its validation and the inherent uncertainties are also discussed. The demonstration of the performance of the technique is based on a sample of proton-proton collisions collected by CMS in 2017 at $\sqrt{s}=$ 13 TeV corresponding to an integrated luminosity of 41.5 fb$^{-1}$.


Introduction
An important background for many measurements at the CERN LHC is the decay of Z bosons into pairs of tau leptons (Z → ττ). Among those measurements are studies of Higgs boson events in the ττ [1-5] and WW [6, 7] decay channels, and searches for additional supersymmetric and charged Higgs bosons [3,[8][9][10][11][12][13]. This background can be estimated from observed events, using selected Z boson events in the µµ final state (Z → µµ). Whereas the Z → ττ decay is the most prominent source of ττ background events at the LHC and is used as an example, the same is true for other standard model (SM) background processes decaying into two tau leptons.
In the embedding technique, all energy deposits of the recorded muons are removed from the Z → µµ events collected by CMS and replaced by the energy deposits of simulated tau lepton decays with the same kinematic properties for the tau leptons as for the removed muons. In this way, a hybrid event is created, comprised of information from both observed and simulated events. The parts of an event that are challenging to describe in the simulation, such as the underlying event or the production of additional jets, are taken directly from observed data. Only the tau lepton decay, which is well understood, relies on the simulation. In Higgs boson analyses, the small coupling strength of the muon with respect to the tau lepton guarantees a negligible contamination by signal events. The Z → µµ selection thus serves as a sideband region for those analyses that rely on this technique, referred to as target analyses in the following. In this picture, the simulation of the tau leptons in place of the removed muons corresponds to the extrapolation into the signal region.
The method itself can be studied by applying the embedding technique to a reference sample of simulated Z → µµ events and comparing the result to an independent validation sample of simulated Z → events, where = e, µ, τ stands for the embedded lepton flavor. All lepton flavors are embedded for the validation of the technique. The corresponding application is referred to as e-, µ-, or τ-embedding throughout the text. The µ-embedding holds the special role of validating the technique itself. The e-embedding serves to validate the sophisticated electron identification in CMS, which relies on many detector quantities. Reconstruction efficiencies are determined from each application, using the "tag-and-probe" method, as described in Ref. [14]. This monitors the level of understanding of the reconstruction of each lepton flavor, and allows us to derive residual correction factors for final use in the target analyses. Since these correction factors are derived for the simulated leptons that have been embedded into the event, they are expected to be similar to the correction factors obtained without the embedding technique. The branching fractions for Z → ee, Z → µµ, and Z → ττ are equal so the normalizations for all the decays are equal.
The embedding technique was implemented successfully for the first time by the CMS Collaboration in the search and analysis of Higgs boson events in the context of the SM and its minimal supersymmetric extension (MSSM) based on the data set obtained during the first operational run of the LHC between 2009 and 2013 (Run-1) [3-6, 9, 10]. The technique has been upgraded since then to cope with the new challenges of the most recent LHC data-taking periods that are related to the increased proton-proton (pp) collision rate, which have also led to a general rewriting of the CMS event reconstruction software. Further developments of the method include (i) the inclusion of other processes than Z → ττ; (ii) the estimate of the normalization of the corresponding background processes from data; (iii) and an improved description of the electron identification. The upgraded embedding technique served as a cross-check of the estimate of the Z → ττ background events from simulation in the first CMS search for additional Higgs bosons in the ττ final state at 13 TeV, in the context of the MSSM [15]. A similar tech-nique was used during the LHC Run 1 data-taking period by the ATLAS Collaboration [1, 2, 8] and is described in Ref. [16].
In this paper, the methodology, validation, and application of the embedding technique developed for the CMS experiment are described. The data sample used for the demonstration of the technique has been recorded in 2017 and corresponds to an integrated luminosity of 41.5 fb −1 . The validation of the method is based on event samples that have been simulated for the same run period.
In Sections 2 and 3 the CMS detector and event reconstruction are introduced. The production of simulated events used for the validation of the technique is described in Section 4. In Sections 5 and 6 the technique itself and its validation are discussed. Section 7 contains a demonstration of the performance of the technique, when applied to data, for the selection and analysis of Z or Higgs boson events in the ττ final state. The paper is concluded with a brief summary in Section 8.

The CMS detector
The central feature of the CMS apparatus is a superconducting solenoid of 6 m internal diameter, providing a magnetic field of 3.8 T. Within the solenoid volume are a silicon pixel and strip tracker, a lead tungstate crystal electromagnetic calorimeter (ECAL), and a brass and scintillator hadron calorimeter (HCAL), each composed of a barrel and two endcap sections. Forward calorimeters extend the pseudorapidity coverage provided by the barrel and endcap detectors. Muons are detected in gas-ionization chambers embedded in the steel flux-return yoke outside the solenoid.
The silicon tracker measures charged particles within the pseudorapidity range |η| < 2.5. It consists of 1440 silicon pixel and 15 148 silicon strip detector modules. For nonisolated particles with a transverse momentum of 1 < p T < 10 GeV and |η| < 1.4, the track resolutions are typically 1.5% in p T and 25-90  µm in the transverse (longitudinal) impact parameter [17]. The electron momentum is estimated by combining the energy measurement in the ECAL with the momentum measurement in the tracker. The momentum resolution for electrons with p T ≈ 45 GeV from Z → ee decays ranges from 1.7% for nonshowering electrons in the barrel region to 4.5% for showering electrons in the endcaps [18]. Matching muons to tracks measured in the silicon tracker results in a relative transverse momentum resolution, for muons with p T up to 100 GeV, of 1% in the barrel and 3% in the endcaps. The p T resolution in the barrel is better than 7% for muons with p T up to 1 TeV [19]. In the barrel section of the ECAL, an energy resolution of about 1% is achieved for unconverted or late-converting photons in the tens of GeV energy range. The remaining barrel photons have a resolution of better than 2.5% for |η| ≤ 1.4. In the endcaps, the resolution of unconverted or late-converting photons is about 2.5%, while the remaining endcap photons have a resolution between 3 and 4% [20]. When combining information from the entire detector, the jet energy resolution typically amounts to 15% at 10 GeV, 8% at 100 GeV, and 4% at 1 TeV, to be compared to about 40, 12, and 5% obtained when the ECAL and HCAL calorimeters alone are used.
Events of interest are selected using a two-tiered trigger system [21]. The first level, composed of custom hardware processors, uses information from the calorimeters and muon detectors to select events at a rate of around 100 kHz within a time interval of less than 4 µs. The second level, known as the high-level trigger, consists of a large array of processors running a version of the full event reconstruction software optimized for fast processing, and reduces the event rate to around 1 kHz before data storage.
A more detailed description of the CMS detector, together with a definition of the coordinate system used and the relevant kinematic variables, can be found in Ref. [22].

Event reconstruction
The reconstruction of the pp collision products is based on the particle-flow (PF) algorithm described in Ref. [23], which combines the available information from all CMS subdetectors to reconstruct an unambiguous set of individual particle candidates. The particle candidates are categorized into electrons, photons, muons, and charged and neutral hadrons. A good understanding of the CMS lepton reconstruction is an important prerequisite for the assessment of the embedding technique. Therefore the reconstruction of electrons, muons, and decays of tau leptons to hadrons (τ h ) from charged and neutral PF candidates is discussed in more detail in this section.
In 2017, the CMS experiment operated with a varying instantaneous luminosity with, on average, between 28 and 47 pp collisions per bunch crossing. Collision vertices are obtained from reconstructed tracks using a deterministic annealing algorithm [24]. The reconstructed vertex with the largest value of summed physics-object p 2 T is the primary collision vertex (PV). The physics objects for this purpose are the jets, clustered using the anti-k T jet finding algorithm [25,26], as described below, with the tracks assigned to the vertex as inputs, and the associated missing transverse momentum is the negative vector p T sum of those jets. Any other collision vertices in the event are associated with additional soft inelastic pp collisions called pileup (PU).
Electrons are reconstructed by combining energy deposits in the ECAL with tracks obtained from hits in the tracker [18]. Due to the strong curvature of the trajectory of charged particles in the magnetic field and the significant amount of intervening material, an average fraction of 33% (at η ≈ 0) to 86% (at |η| ≈ 1.4) of the electron energy is radiated via bremsstrahlung before the electron reaches the ECAL. All energy deposits above noise thresholds are combined into clusters, using different algorithms for the ECAL barrel and endcap sections. The clusters are further grouped into superclusters in a narrow window in η and an extended window in the azimuthal angle φ (measured in radians). The energy and position of the superclusters are obtained from the sum of the energies and the energy-weighted mean of the positions of the building clusters. This way of clustering is complemented by an alternative clustering algorithm, based on the PF-reconstruction algorithm [23], resulting in an independent collection of PF clusters.
Hits in the tracker are combined into tracks, using an iterative tracking procedure as described in Ref. [23]. To be efficient for the reconstruction of electrons, the track finding must include the additional bending of the particle trajectory due to the bremsstrahlung emissions. This is achieved by a dedicated Gaussian-sum filter algorithm [27]. Since this method of track reconstruction can be time consuming, it is initiated only on a selected set of electron track seeds, which are likely to correspond to electron trajectories. Two approaches are followed to determine these seeds. In the first approach, starting from the ECAL, the energy and position of the superclusters are used to extrapolate the electron trajectory to its origin. The intersections of this extrapolation with the innermost tracker layers or discs are matched to hits in the corresponding detectors. In the second approach, starting from the tracker, reconstructed tracks obtained from a less efficient, but also less CPU intensive, algorithm are extrapolated to the ECAL surface and matched to PF clusters. The seeds of both approaches are combined to initiate the final electron track finding with an efficiency of 95% for electrons from Z boson decays.
The combination of the electron tracks with the ECAL clusters is achieved via a matching of the track extrapolated to the ECAL surface with the supercluster in η-φ space with an efficiency of ≈93% for electrons from Z boson decays. Alternatively, the electron track is matched to a PF cluster, while at each intersection with a layer or disc of the tracker a straight line is extrapolated to the ECAL surface, tangent to the electron trajectory, to identify further PF clusters due to bremsstrahlung emission. This approach improves the reconstruction for low p T electrons and electrons in jets. To increase their purity, the reconstructed electrons are required to pass a multivariate electron identification discriminant [18], which combines information on the quality of the differently reconstructed tracks, shower shape, and kinematic quantities. In the target analyses, for which the embedding technique is primarily foreseen, working points of this discriminant with an efficiency between 80 and 90% are used to identify electrons.
Two main approaches are also pursued to reconstruct muons with the CMS detector [19]: in the initial steps tracks are reconstructed independently in the inner silicon tracker and the outer track detectors of the muon system. In the first approach inner and outer tracks are matched by comparing their parameters propagated to a common surface. If a match is found, a globalmuon track is fitted combining the hits from both tracks. In a second approach, tracks from the inner tracker are extrapolated to the muon system taking into account the magnetic field, the average expected energy losses, and multiple Coulomb scattering in the detector material. If at least one muon segment (i.e., a short track stub made of drift tube or cathode strip chamber hits) matches the extrapolation, the corresponding track is identified as a muon track. The second approach improves the reconstruction efficiency for muons with p T ≤ 5 GeV, which are unlikely to traverse the entire muon system. For muons within the geometrical acceptance and with sufficiently high p T to reach the muon system, the reconstruction efficiency reaches up to 99%. It is supplemented by specialized algorithms for muons with a p T of several hundreds of GeV. The presence of hits in the muon chambers already leads to a strong suppression of particles misidentified as muons. Additional identification requirements on the track fit quality and the compatibility of individual track segments with the fitted track can reduce the misidentification rate further. In the analyses for which the embedding technique is primarily foreseen, muon identification requirements with an efficiency of about 99% are chosen.
The contribution from nonprompt leptons to the electron (muon) selection is further reduced by requiring the selected leptons to be isolated from any hadronic activity in the detector. This property is quantified by a relative isolation variable which uses the sum of the p T of all charged and transverse energy of all neutral particles in a cone of radius ∆R = (∆η) 2 + (∆φ) 2 around the lepton direction at the PV, where ∆η and ∆φ correspond to the angular distance of the particle to the lepton in the η and φ directions. The chosen cone sizes are ∆R = 0.3 and 0.4 for electrons and muons, respectively. The lepton itself is not included in this calculation. To mitigate any distortions from PU, only those charged particles whose tracks are associated with the PV are included in the sum. The presence of neutral particles from PU around muons is estimated by summing the p T of charged particles in the isolation cone whose tracks have been associated with PU vertices and multiplying this quantity by a factor of 0.5 to account for the approximate ratio of neutral to charged hadron production, such that E neutral, PU . For electrons, the FASTJET technique [28,29] is applied as described in Ref. [18]. The energy of neutral particles from PU is estimated as E neutral,PU T = ρA eff , where ρ is the median of the energy density distribution per area in the η-φ plane around any jet in the event and A eff is an effective area in η and φ. The value obtained is subtracted from the transverse energy sum, and the result set to zero in the case of negative values. Finally, the result is divided by the p T of the lepton to result in I e(µ) rel . For further characterization of the event, all reconstructed PF candidates are clustered into jets using the anti-k T jet clustering algorithm as implemented in FASTJET [25,26] with a distance parameter of 0.4. To identify jets resulting from the hadronization of b quarks (b jets), a reoptimized version of the combined secondary vertex b tagging algorithm is used that exploits information from the decay vertices of long-lived hadrons and the impact parameters of charged-particle tracks in a combined discriminant [30]. A typical working point for analyses for which the embedding technique is foreseen corresponds to a b jet identification efficiency of ≈70% and a misidentification rate for light quarks and gluons of 1%.
Jets are also used as seeds for the reconstruction of τ h candidates. The τ h reconstruction is performed by further exploiting the substructure of the jets, using the hadrons-plus-strips algorithm described in Refs. [31,32]. The decay into three charged hadrons, and the decay into a single charged hadron, accompanied by up to two neutral pions with p T > 2.5 GeV, are used for the target analyses. The neutral pions are reconstructed as strips, i.e., clusters of electron or photon constituents of the seeding jet with stretched energy deposits along the azimuthal direction. The strip size varies as a function of the p T of the electron or photon candidate. The τ h decay mode is then obtained by combining the charged hadrons with the strips. High-p T tau leptons are expected to be isolated from any hadronic activity in the event, as are high-p T electrons and muons. Furthermore, in accordance with its finite lifetime, the charged decay products of the tau lepton are expected to be slightly displaced from the PV. To distinguish τ h decays from jets originating from the hadronization of quarks or gluons, a multivariate τ h identification discriminant is used [31]. It combines information on the hadronic activity in the detector in the vicinity of the τ h candidate with the reconstructed properties related to the lifetime of the tau lepton. Of the predefined working points given in Ref. [31], the tight, medium, and very loose working points are used in the target analyses. These have efficiencies between 27% (tight) and 71% (very loose) for genuine tau leptons, e.g., from Z → ττ decays, for quark/gluon misidentification rates of less than 4.4 × 10 −4 (tight), and 1.3 × 10 −2 (very loose). Finally, additional discriminants are imposed to reduce the misidentification probability for electrons and muons as τ h candidates. Predefined working points are used to discriminate against electrons, with τ h identification efficiencies for genuine tau leptons ranging from 65% (tight) to 94% (very loose), and against muons with a typical τ h identification efficiency of 99%.
The missing transverse momentum vector p miss T , defined as the negative vector p T sum of all reconstructed PF objects, is also used to characterize the events. Its magnitude is referred to as p miss T . It enters the target analyses via selection criteria and via the calculation of the final discriminating variable used for the statistical analysis, which is usually correlated with the invariant mass of the ττ system.

Simulation
For the validation of the embedding technique and to demonstrate its performance, simulated events are used to model the most important processes contributing after the event selections described in Sections 5 and 7. The Drell-Yan production in the ee, µµ, and ττ final states, and the production of W bosons in association with jets (W+jets) are generated at leading order (LO) precision [33] in the strong coupling constant α S , using the MADGRAPH5 aMC@NLO 2.2.2 event generator [34]. To increase the number of simulated events in phase space regions with high jet multiplicity, supplementary samples are generated with up to four outgoing partons in the hard interaction. For diboson production MADGRAPH5 aMC@NLO is used at next-to-leading order (NLO) precision. For tt and single t quark production samples are generated at NLO precision using POWHEG 2.0 [35][36][37][38][39][40]. For the generation of all processes the NNPDF3.0 parton distribution functions [41] are used. The simulation of the underlying event is parametrized according to the CUETP8M1 tune [42]. Hadronic showering and hadronization, as well as the τ decays, are modeled using PYTHIA 8.212 [43]. For all generated events the effect of the PU is included by generating additional inclusive inelastic pp collisions with PYTHIA and adding them to the simulated events according to the expected PU distribution profile in data. Differences between this expectation and the observed PU profile are mitigated by reweighting the simulated events. All events generated are passed through a GEANT4based [44] simulation of the CMS detector and reconstructed using the same version of the CMS event reconstruction software as used for the data.

Embedding procedure
The embedding procedure can be split into four steps: the selection of µµ events from data (Section 5.1); the removal of tracks and energy deposits of the selected muons from the reconstructed event record (Section 5.2); the simulation of two τ leptons with the same kinematic properties as the removed muons in an otherwise empty detector (Section 5.3); and the combination of the energy deposits of the simulated tau lepton decays with the original reconstructed event record (Section 5.4). For validation purposes, electrons or muons can also be injected into the simulation to form an embedded ee or µµ event, referred to as an e-or µ-embedded event. A schematic view of the procedure is given in Fig. 1.

Selection of µµ events
In the first step of the embedding procedure, µµ events are selected from data. Although the selected muons might not necessarily originate from Z boson decays, Z → µµ events are a natural target of this selection, which helps to identify genuine µµ events. The selection should be tight enough to ensure a high purity of genuine µµ events and at the same time loose enough to minimize biases of the embedded event samples. The selection of the muons defines the minimal selection requirements to be used in the target analyses that are discussed in more detail in Section 5.3. Inefficiencies of the reconstruction and selection of the muons due to the geometrical acceptance of the detector are estimated, giving correction factors which are applied to the final distributions.
While strict isolation requirements help to increase the purity of prompt muons, e.g., from Z → µµ decays, in the selection, they introduce a bias towards less hadronic activity in the vicinities of the embedded leptons that will appear more isolated than expected in data. To minimize this kind of bias, which cannot be corrected by a scale factor, isolation requirements are omitted as much as possible. At the same time the selected phase space is desired to be as inclusive as possible for the embedded event samples to be applicable for a variety of target analyses. The loose selection in turn leads to an admixture of other processes in addition to Z → µµ. This admixture and the consequences for the embedded event samples are carefully checked and assessed.

Selection requirements
At the trigger level, the events are required to be selected by at least one of a set of µµ trigger paths, with a minimum requirement between 3.8 and 8.0 GeV on the invariant mass of the two muons, m µµ . All trigger paths require p T > 17 (8) GeV for the leading (trailing) muon, very Figure 1: Schematic view of the four main steps of the τ-embedding technique, as described in Section 5. A Z → µµ candidate event is selected in data ("Z → µµ Selection"), all energy deposits associated with the muons are removed from the event record ("Z → µµ Cleaning"), and two tau lepton decays are simulated in an otherwise empty detector ("Z → ττ Simulation"). Finally all energy deposits of the simulated tau lepton decays are combined with the original reconstructed event record ("Z → ττ Hybrid"). In the example, one of the simulated tau leptons decays into a muon and the other one into hadrons. loose isolation in the tracker, and a loose association of the muon track with the PV. Offline, the reconstructed muons are required to match the objects at the trigger level, their distance extrapolated to the PV is required to be |d z | < 0.2 cm along the beam axis, and both muons are required to have |η| < 2.4. Their transverse momentum is required to be p T > 17 (8) GeV for the leading (trailing) muon to match the online selection requirements. No additional selection requirements are imposed on the isolation of the muons to minimize any bias of the embedded event samples in this respect.
To form a Z boson candidate, each muon is required to originate from a global-muon track. The muons are required to be of opposite charge with an invariant mass of m µµ > 20 GeV. If more than one Z boson candidate is found in the event, the one with the value of m µµ closest to the nominal Z boson mass is chosen. This selection results in a total of more than 65 million events, with an average rate of about 1.5 million events per 1 fb −1 of collected data. The expected event composition after these and several further selection requirements that will be specified in the following discussion is given in Table 1. SM events composed exclusively of jets produced via the strong interaction are referred to as quantum chromodynamics (QCD) multijet production. Throughout the paper this contribution is estimated from data using a background estimation method described in Ref. [15]. The distributions of m µµ and p T of the trailing muon for all selected events are shown in Fig. 2. Also shown are the contributing processes estimated by the simulation, to illustrate their kinematic distributions.

Expected sample composition
In Table 1, a relaxed selection of two muons compatible with the properties of a Z boson candidate already results in a sample of Z → µµ events with an expected purity of more than 97%. Smaller contributions are expected from Z → ττ events, mostly where both tau leptons subsequently decay into muons, and from QCD multijet, tt, and diboson production.
Without further correction, the presence of QCD multijet and Z → ττ events in the selected event sample leads to an overestimate of the Z → µµ event yield and a bias of the m and p T distributions of the embedded leptons towards lower values. This can be inferred from Fig. 2, where the accumulation of these events is visible for m µµ < 70 GeV and p µ T < 20 GeV. The fraction of QCD multijet and Z → ττ events can be significantly suppressed by raising the requirement on m µµ to be higher than 70 GeV, at the cost of a loss of ≈13% of selected Z → µµ Table 1: Expected event composition after the selection of two muons, as described in Section 5.1. The compositions after adding selections on m µµ > 70 GeV or on the number of b jets with p T > 20 GeV in the event are shown in column 3 and 4 respectively. In the second column the fraction of events where the corresponding process has two genuine muons in the final state is given in parentheses.

Fraction (%) Process
Inclusive  events. However, because of the low transverse momentum of the selected muons, these events have a low probability to end up in the final sample of τ-embedded events, see Section 5.3.
The contribution from tt and diboson events is distributed over the whole range of m µµ . Its relative contribution is larger at high values of m , where the overall event yield is small, and in event selections with b jets, as shown in the last column of Table 1. These conditions are met, e.g., in searches for additional Higgs bosons in models beyond the SM [15]. A large fraction of this contribution originates from events where the W bosons e.g., from both t quark decays subsequently decay into a muon and neutrino (tt(µµ)). The contribution from tt and diboson production in all other modes is below the current accuracy requirements of the method. The substitution of the muons by tau leptons provides an additional estimate for tt and diboson production with two tau leptons in the final state from data. This class of events needs to be removed from simulation in the target analyses to prevent double counting. For simplicity, all further discussion of the embedding technique will refer to the estimate of all genuine ττ events from either Z → ττ, tt, or diboson production, unless explicitly stated otherwise.

Correction for the detector acceptance
As discussed above, inefficiencies in the reconstruction and selection of the µµ events lead to kinematic biases in the embedded event samples because of the limited detector acceptance. The global efficiency of the trigger selection in the kinematic regime where embedded event samples can be applied amounts to about 80%, the combined reconstruction and identification efficiency lies well above 95%. Both efficiencies are estimated differentially in a fine grid in muon η and p T , using the "tag-and-probe" method. They are then used to correct for the effects of the detector acceptance.
As a consequence, not only the kinematic distributions but also the yield of the estimated ττ events can be obtained directly via the embedding technique, assuming the same branching fraction of the Z boson into muons and tau leptons. This is achieved by correcting for the detector acceptance and selection efficiency of the µµ events and applying the reconstruction and selection efficiency from the τ-embedded event sample. Residual corrections of these efficiencies with respect to the data, are discussed in Section 7.1. When applied to the data this estimate renders uncertainties in the production cross sections and integrated luminosity irrelevant for the involved processes, as will be further discussed in Section 7.2.

Removal of µ energy deposits from the reconstructed event record
In the second step, all energy deposits of the selected muons are removed from the reconstructed event record. This is done at the level of hits in the inner tracker and muon systems, and clusters in the calorimeters. Hits in the tracker are identified by their association to the fitted global-muon track. Clusters in the calorimeters are identified by the intercept of the muon trajectory interpolated through the calorimeters, as discussed in Section 3. If an intercept matches with the position of a calorimeter cluster, an energy amount corresponding to a minimum ionizing particle is subtracted from the cluster. If the energy of the modified cluster drops below the noise threshold defined for the event reconstruction, the cluster is removed from the event record. By this procedure, all traces of the selected muons in the detector can be removed from the event reconstruction even in detector environments with additional hadronic activity in the vicinity of the selected muons.
Effects of the removal of energy deposits in the calorimeters can arise in cases where the energy deposit of the muon is not completely removed or leads to the split of a geometrically extended cluster into more than one piece. Such a removal may lead to the reconstruction of spurious photon or neutral hadron candidates. These additionally reconstructed objects are usually of low energy and low reconstruction quality, and play a negligible role in the target analyses. The removal of the energy deposits of the muons from the detector is illustrated in Fig. 3. In Fig. 3 (left), a selected Z → µµ candidate event in the 2017 data set is displayed in the η-φ plane of the calorimeters, with the intercepts of the reconstructed muons with the calorimeter surface and clusters in the ECAL (HCAL) shown. One muon (with p T = 32 GeV) in the upper and one muon (with p T = 59 GeV) in the lower parts of the figure are visible. Several clusters in the calorimeters have been associated with the incident muon trajectories. In Fig. 3 (right) the same detector area is shown after the hits and energy deposits associated with the muons have been removed from the reconstructed event record. The HCAL clusters associated with each corresponding muon have been completely removed, whereas the energy of the ECAL cluster associated with the muon in the lower part of the figure has been reduced. The remaining ECAL cluster is identified as low-energy photon in the subsequent reconstruction.

Simulation of tau lepton decays
In the third step, the energy and momentum of the selected muons are either directly injected as electrons or muons into the detector simulation, for validation purposes, or used to seed the simulation of tau lepton decays via PYTHIA, before entering the detector simulation. For this purpose an event record is prepared that contains only the information related to the kinematic properties of the two selected muons in an otherwise empty detector that is free of any other particles from additional jet production, underlying event, or PU. The invariant mass of the selected muons is fixed to the reconstructed value, as shown in Fig. 2 (left). Polarization effects are neglected in embedded events, since they are below the sensitivity of the target analyses.
To account for the mass difference between the muon and the tau lepton or electron (referred to by = e, τ), the four-momenta of the muons are boosted into the center-of-mass frame of the µµ pair, where the energy (E * ) and momentum ( p * ) of each lepton, with mass m , are determined from The corrected values p * and E * are then boosted back into the laboratory frame and used either for the electrons or to seed the tau lepton decays. The event vertex for the simulation of the embedded leptons is set to the PV of the initially reconstructed µµ event. Four distinct samples of τ-embedded events are produced from the same µµ event sample, for use in the most important final states of the target analyses, namely eµ, eτ h , µτ h , and τ h τ h . This is achieved by enforcing the subsequent decay of the injected τ lepton pair in the simulation, with a branching fraction of 100%. It has been checked that the overlap of the resulting τ-embedded event samples is small enough, such that even those distributions that are related to the part of the event that originates from the observed data, e.g. like jet distributions, are fully uncorrelated.

Post-processing of the simulated tau lepton decays
A significant amount of the energy and momentum of the tau lepton is not transferred to the visible decay products, but carried away by the neutrino(s) in the decay. As a consequence, the visible products of the tau lepton decays are usually significantly lower in p T than that of the originally selected muons. A restricted phase space of the selected muons results from the finite detector acceptance. For each set of τ-embedded events, this translates into a finalstate-dependent kinematic range, for later use in the target analyses. This range is further restricted by the acceptance requirements that have to be imposed in the target analyses. For example, the ability to create τ-embedded events in the τ h τ h final state, with reconstructed τ h candidates with a p τ h T as low as 20 GeV each is useless for an analysis with a trigger threshold of p τ h T > 30 GeV. To save computing time during the CPU-intensive detector simulation, a kinematic filtering is applied to the visible decay products, after the simulation of the tau lepton decay and before the detector simulation. The final-state-dependent thresholds of this filtering on the p T of the visible decay products (prior to the detector simulation) define the kinematic range of eligibility of the τ-embedded event samples for later use in the target analyses. They are given in Table 2.
To increase the number of µµ events that can be used in the target analyses, the decay is re-peated 1000 times for each tau lepton pair. This is done to give the decay products a higher probability to pass the eligibility requirements. Only the last trial that fulfills the kinematic requirements for the given final state is saved for the subsequent detector simulation. If at least one trial succeeds, the number of successful trials divided by 1000 times the branching fraction of the subsequent ττ decay is saved as an additional weight factor to the event. These weights take values below the corresponding branching fraction and can be as low as 10 −4 at the kinematic thresholds of eligibility. Depending on the ττ final state, the fraction of events that pass the kinematic filtering ranges between kin = 27% (in the τ h τ h final state) and 58% (in the eµ final state). In the τ h τ h final state this means that 73% of the τ-embedded events that could in principle be used, according to the acceptance restrictions of the originally selected µµ events, are usually not accessible due to the stricter acceptance requirements in the target analyses. The relative binomial (per event) uncertainty in the probability of the simulated tau lepton pair to pass the requirements of the kinematic filtering for a given final state is less than 1.5% in all final states.
Overall this procedure allows for the production of final-state-specific τ-embedded event samples of approximately 5 to 60 times the size of the event sample of selected tau lepton pairs in the target analyses, independent of the integrated luminosity corresponding to this event sample. The efficiency of the kinematic filtering and the size of each τ-embedded event sample are given in Table 2.
In Section 5.1.2, Z → ττ events where both tau leptons subsequently decay into muons and the corresponding neutrinos are discussed as a potential source of bias of the τ-embedded event samples. Of all Z → ττ events in this final state a fraction of less than 0.25% is expected to end up in the τ-embedded event samples, in the given eligibility ranges. This corresponds to less than 2.8% of the events indicated by the Z → ττ contribution in Fig. 2, and a fraction far below the 1% level in the initial event composition as given in Table 1.

Discussion of additional reconstruction effects
Two more reconstruction effects arise in the discussion of the simulation step. First, the fourmomenta of the selected muons correspond to already reconstructed objects, which are reinjected into the simulation of the detector response, effects due to the finite momentum resolution of the detector lead to a broadening, especially of the p T and m distributions of the embedded leptons. The distributions are corrected for this effect by an m µµ -dependent rescaling of the energy and momentum of the selected muons on an event-by-event basis, before using them to generate the simulated leptons for embedding. Figure 4 (left) shows the m µµ dis- Table 2: Kinematic range of eligibility for each τ-embedded event sample in the eµ, eτ h , µτ h , and τ h τ h final states. The expression "First/Second object" refers to the final state label used in the first column. Also given are the probability of the simulated tau lepton pair to pass the kinematic filtering ( kin ), described in the text, and the equivalent of the integrated luminosity L int , of the corresponding τ-embedded event sample, in multiples of the data set, from which the embedded event sample has been created. tribution from a sample of simulated Z → µµ events as well as the corresponding µ-embedded event sample before and after the correction. In the lower panel of the figure, the ratio is given with respect to the simulated Z → µµ sample. The µ-embedded event sample without the correction reveals a slight broadening with respect to the simulated Z → µµ sample, which is compensated by the correction.
A second effect can be attributed to the emission of photons from the initially selected muons, referred to as final-state radiation (FSR) in the following. When missed in the reconstruction, FSR leads to an additional broadening of the kinematic distributions and a systematic shift to lower values of the energy and momentum of the initially selected muons. This shift is subsequently transferred to the embedded leptons. Figure 4 (right) shows the m µµ distribution of the Z → µµ simulation sample for muons before and after FSR, to illustrate the effect. For the validation of µ-embedded events, this effect can be eliminated by executing the simulation step of the embedding procedure without FSR. The Z → µµ simulation sample and the corresponding µ-embedded event data sample are then subjected to the same FSR effects during the initial simulation. For e-embedded events the effects of FSR are underestimated; for τ-embedded events they are overestimated.
In the case of τ-embedding, both effects that were discussed in this section are negligible compared to the energy and momentum fluctuations introduced by the undetected neutrinos in the decay, which already lead to a significant broadening of the related kinematic distributions. A more detailed discussion is given in Section 6.

Hybrid event creation
In a fourth and final step of the procedure, all energy deposits of the simulated electrons, muons, or tau lepton decays are combined with the original reconstructed event record, from which the energy deposits of the initially selected muons had been removed, to form a hybrid event that is mostly obtained from data and only relies on the simulation for the embedded lepton pair. This is done at the earliest possible reconstruction step to guarantee that all subsequent quantities for the lepton identification are based on the full event information and not only on parts of the event. The ideal way is to combine the reconstructed object collections at the level of tracker hits and energy deposits in the calorimeter crystals. However, in practice, the information is combined at the level of reconstructed objects (tracks, calorimeters clusters and muons) rather than at the level of individual hits. This is to avoid complications with residual small differences between the simulation geometry and the real detector. The tracks of the embedded leptons are reconstructed based on the geometry used for the simulation, in the otherwise empty detector, of the simulation step. Since the detector in the simulation step is free from other particles, jet production, underlying event, or PU there may be a biased track reconstruction efficiency that must be checked and possibly corrected. Residual effects are discussed in Section 6.

Validation of the method
Simulation-based closure tests are performed to test the validity of the embedding method. For this purpose, a validation sample for embedded events is created from simulated Z → µµ events, in which the embedding technique is applied in the same way as in the observed data: the selected muons are removed from the reconstructed event record and replaced with electrons, muons, or tau leptons. The embedded event data samples created in this way are compared to simulated events in the same final states. For e-and τ-embedded events, this comparison is performed on statistically independent event samples. For µ-embedded events, the comparison is performed on exactly the same simulated events, such that only the effects of the removal of energy deposits of the initially selected muons, and the reconstruction of the reinjected muons are tested.
For e-and τ-embedded events, the normalization of the distributions is obtained from the yield of selected Z → µµ events in the first step of the procedure, as described in Section 5.1. For the τ-embedded events, the yield of selected ττ events matches the yield of the simulated Z → µµ sample within 1% with a statistical uncertainty of 0.5%. For the e-embedded events a similar agreement is achieved.

Validation using the µ-embedding technique
The muon plays a special role in validating the embedding procedure itself. The broadening of the kinematic distributions of the embedded muons, due to the repeated reconstruction and the finite angular and p T resolution of the detector, and the effects of FSR, have already been discussed in Section 5.3. For the following discussion, the simulation of FSR is switched off in the simulation step of the embedding procedure. In this way FSR is simulated only once, during the initial simulation of the validation sample, and all FSR effects are the same for the simulated and the embedded event. Figure 5 shows the η and p T distributions of the leading muon in p T , the p miss T , the invariant mass of the two leading jets in p T , m jj , the number of jets with p T > 30 GeV and |η| < 4.5, and the number of b jets with p T > 20 GeV and |η| < 2.1. The blue dots correspond to the µ-embedded event sample and the red histogram to the original simulation. The red-shaded bands represent the statistical uncertainty of the simulated event sample that is a reference for the comparison. All distributions are based on exactly the same events, so that the observed differences can exclusively be attributed to the removal and repeated simulation and reconstruction of the embedded muons. The uncertainty bands are added to facilitate the as-  sessment of the observed differences between the compared samples. These differences are considered acceptable if they are compatible with the statistical uncertainty of the validation sample, which is chosen with 10 times more events than the expected number of events in the target analyses.
The kinematic distributions of the muons and jets, and the jet multiplicities are well reproduced. The structure in the distributions of the muon η follows the geometry of the detector. The Jacobian peak corresponding to the Z boson decay is clearly visible in the p T distribution of the muon. A 5% effect in the ratio is visible for low values of p miss T , which is caused by the finite angular and p T resolution of the detector that can lead to small residual values of p miss T for events with little or no p miss T . Corrections due to the finite momentum resolution of the detector, as described in Section 5.3, are not propagated to the p miss T . For τ-embedded events this effect is negligible compared to the kinematic fluctuations related to the neutrinos involved in the decays, as will be discussed in Section 6.3. Another 5% effect in the ratio for p miss T > 100 GeV is explained by rare reconstruction effects, where muons of high p T may create additional track segments, e.g., due to multiple scattering in the outer tracker, which are not associated with the initially reconstructed global muon track. After the cleaning step of the embedding procedure, such track segments may be picked up in a different way and thus lead to a different assignment of p miss T . Since the validation is based on simulated Z → µµ events, without genuine p miss T , it is clear that such events point to a poor reconstruction of the original event. The fact that this is a 5% effect only for a small fraction of events, and that the size of the effect is small compared to the statistical uncertainty of the validation sample, indicates that it is subdominant to the effect at low p miss T . Figure 6 shows the mean transverse momentum flux per muon, ∆p T , from all reconstructed particles within the distance R from the muon, split by charged hadrons originating from the PV and PU vertices, photons, and neutral hadrons. It is defined as the average sum of the p T (transverse energy in case of neutral particles) of all corresponding particles between two cones with radii R and R+∆R in the distance R from the muon, where ∆R corresponds to the widths of the histogram bins. All distributions are shown for the µ − for events with m µµ close to the nominal Z boson mass.
The figures indicate that in most cases no other particles are reconstructed in the spatial vicinity of the muon. For a uniform p T flux distribution, ∆p T is expected to increase linearly, because of the increasing area of the ring segments. This trend is roughly observed for all reconstructed particle types with a slope of 32 (550) MeV per unit of R for ∆p T from charged hadrons originating from the PV (PU vertices), 110 MeV for photons, and 66 MeV for neutral hadrons. The larger slope for charged hadrons from PU vertices, photons, and neutral hadrons is related to the simulated PU profile and may vary in data. The displayed distributions are shown for the simulated PU profile between 40 and 70 additional inelastic pp collisions. For charged hadrons and photons, the progression from the simulation is well reproduced, apart from small regions close to the muon, which show a small excess in ∆p T for charged hadrons from the PV and photons, and a small deficit in ∆p T for charged hadrons from PU vertices. A larger difference is observed for neutral hadrons, which is due to an incomplete removal of energy deposits of the muon in the HCAL, as discussed in Section 5.2. When integrated over R, and all reconstructed particle types, the additional hadronic energy in the predefined isolation cone adds up to less than 200 MeV.  Figure 7: Comparison of e-embedded events with a statistically independent sample of simulated Z → ee events. Shown are distributions of the energy-weighted standard deviations of a 5 × 5 crystal array in (upper left) η, σ iηiη , and (upper right) φ, σ iφiφ , as described in the text, (lower left) the number N GSF of detector hits, used for the Gaussian Sum Filter algorithm [27] as described in Section 3, and (lower right) the multivariate discriminator for the identification of electrons (electron-ID BDT). The black arrow, shown in addition to the electron-ID BDT distribution, indicates the working point with 80% efficiency in the displayed electron η region. For better visibility, the statistical uncertainties of both samples, red-shaded band for simulated Z → ee events, and blue vertical bars for e-embedded events, are multiplied by 10 for the figures.

Validation using the e-embedding technique
The identification of electrons in CMS is based on O(20) closely related detector variables that are combined into a multivariate discriminator [18]. As discussed in Sections 5.3 and 5.4 the simulation of the embedded lepton pair takes place in an otherwise empty detector with no other particles from PU, underlying event, or additional jet production. The tight relation of the electron reconstruction and identification to closely related detector quantities poses an extra challenge to the embedding technique for this lepton flavor, which therefore requires a unique validation procedure. To monitor the success in simulating the distribution of this discriminator and its inputs, e-embedded events are created and compared to a statistically independent sample of simulated Z → ee events. Figure 7 shows, for the leading electron in p T , the energy-weighted standard deviation of the position of a 5×5 ECAL crystal array in η (σ iηiη ) and φ (σ iφiφ ), and the number N GSF of detector hits used for the Gaussian Sum Filter algorithm [27], as introduced in Section 3. The quantities iη and iφ are measured in integer crystal units, such that in a 5×5 array a peripheral crystal can be one or two units away from the central crystal in the array. All quantities are in reasonable agreement given their high sensitivity to the exact geometry, intercalibration, and level of noise suppression of the detector. Also shown is the multivariate discriminator itself (output of the electron-ID boosted decision tree (BDT)), which, among others, has the discussed quantities as input. The vertical arrow added to Figure 7 (lower right) corresponds to the 80% working point for the electron identification. Residual differences in the distributions of the electron-ID BDT are comparable to the differences between data and simulation. Correction factors for these differences are derived and applied to the τ-embedded event samples in Section 7.1. In Fig. 8, the distributions of m ee and the p T of the leading electron are shown. The observed differences are explained by differences in FSR, as discussed in Section 5.3. Also shown is the effect of a variation of the electron energy scale by ±1%, which is usually applied to the target analyses and fully covers the effect.

Validation using the τ-embedding technique
The main target of the embedding technique, the estimation of Z → ττ events is validated by comparing τ-embedded events to a statistically independent sample of simulated Z → ττ events in each of the previously discussed ττ final states. In Fig. 9 the p T and η distributions of the electron, muon, and τ h candidate are shown using the eµ, eτ h and, µτ h final states. To increase the statistical significance of the validation results, the distributions of the purely lepton related quantities are shown for the combination of multiple final states. Figure 10  In general, a good agreement is observed, within the statistical precision. Effects of FSR in the selection of the µµ event are not visible in the muon p T and m vis distributions. This is true for all ττ final states under investigation. Also shown for these distributions are the effects of a shift of the electron energy scale by ±1% and a shift of the tau lepton energy scale by ±1.2%, corresponding to the uncertainties usually applied to the target analyses. Differences in the electron and muon η are covered by the additional uncertainties in the correction for the geometrical µµ detector acceptance. Potential differences in the electron p T are small compared to the electron energy scale uncertainty usually applied to the target analyses, as discussed above. The effect of a corresponding shift in the electron energy scale is also shown in the corresponding subfigure. The same is true for the p T of the τ h candidate. More pronounced deviations are visible in the I µ rel distribution. These are explained by an incomplete removal of the energy deposits of the initially selected muons. Integrated over the full isolation cone, the expected difference in p T amounts to less than 200 MeV, corresponding to the excess in ∆p T , as observed in the context of the discussion of Fig. 6. The fact that similar effects are not visible in I e rel can be explained by the different reconstruction of electrons that may associate parts of the remaining energy deposits of the initially selected muons in the calorimeters to the electron clusters, thus removing them from the objects taken into account for the calculation of I e rel . A 20% difference in the highest bin of the τ h -ID BDT distribution is explained by the reconstruction of tracks in the otherwise empty detector in the simulation step, for τ h decays with one or three charged and no additional neutral hadrons. The overall effect on the identification efficiency is small and included in corresponding correction factors that are discussed in Section 7.1.
In summary, in all investigated Drell-Yan final states, the agreement of the embedded event samples with the corresponding validation sample is observed to be compatible with the simulation. Most of the observed differences are within the statistical precision of the validation sample and smaller than the statistical precision of the target analyses in the ττ final state. Residual systematic trends have been checked to have negligible effects on the target analyses. No further measures are taken to improve the agreement of the embedded event samples with the simulation. Instead, correction factors for the reconstruction and identification of the simulated electrons, muons and tau leptons are derived from e-, µ-and τ-embedded events, in analogy to the correction factors usually provided for fully simulated events, as will be discussed in Section 7.1.

Application of the τ-embedding technique to data
The τ-embedded event samples used for the target analyses are obtained using the µµ data event selection. They replace the simulation of all Z → ττ, tt(ττ) and diboson(ττ) events in the ττ final states. To prevent double counting, tt(ττ) and diboson(ττ) events are removed from background estimates that use simulation. Their selection must be performed on the undecayed tau leptons, at the stable particle level.
The τ-embedded event sample, except for the τ decays, provides a data description better than the Z → ττ simulation. The simulation can only reach an equivalent performance after a significant amount of tuning. This is true for the time-dependent PU profile of the data, the production of additional jets, especially in exclusive kinematic corners, like for multijet, multi b jet, forward jet, or vector boson fusion topologies and the underlying event. Other event quantities which are typically difficult to model in the simulation are the number of reconstructed primary interaction vertices, or p miss T . All quantities referring to the part of the event that is obtained from the data may be used in the target analyses without any further corrections. The time needed to produce the τ-embedded event sample is of the order of time necessary to reprocess the collected µµ data set. The size of the τ-embedded event sample is 5 to 60 times the size of the data sample used for the target analyses. These are advantages over the simulation that will become even more important for the planned High-Luminosity LHC upgrade, where typically between 140 and 200 PU collisions are expected.
The ability of the τ-embedded event samples to describe the data is demonstrated below using a data set corresponding to an integrated luminosity of 41.5 fb −1 , collected with the CMS detector in 2017.

Correction factors
Residual differences between the τ-embedded event samples and the data in individual control distributions, related to the simulated part of the event, can be adjusted by p T -and η-dependent correction factors for the efficiencies of the selection and isolation requirements on each corresponding lepton. These correction factors map the efficiencies observed in the embedded event samples to the efficiencies observed in data. For electrons and muons they are obtained from a comparison of ee (µµ) selected events on the e (µ)-embedded event samples with the same event selection on data, using the "tag-and-probe" method [14]. They are provided as individual correction factors for the lepton identification and isolation efficiency, and the corresponding leg of the triggers used in the target analyses. The estimate of the reconstruction efficiency is included in the identification efficiency.
For the τ h candidate, a global scale factor of 0.97 ± 0.02 is obtained from a likelihood fit to the yield of Z → ττ events in the µτ h final state in a control region. Figure 11 shows typical correction factors for the electron and muon identification and isolation efficiencies in the central region of the detector, as function of the p T of the corresponding lepton. Clear turn-on curves are visible for the muon isolation and the electron identification and isolation efficiencies. In each case, a plateau is reached for each efficiency above a p T threshold of about 30 GeV, which is close to the 80% efficiency working point discussed in Section 3 for the electron identification, and close to unity otherwise. In general, the correction factors differ from the efficiencies observed in data by less than 5% in the relevant kinematic regions, and they are smaller for the embedded event samples than for the simulated ones.

Uncertainties
When applied to the target analyses, the following uncertainties, which are specific to the method, should be applied: • For the normalization of the τ-embedded event samples, a global uncertainty of 2% should be assumed due to the insufficient knowledge of the unfolding corrections of the initially selected muons, as described in Section 5.1. The 2% is chosen in accordance to the usual uncertainty in trigger leg efficiencies. This uncertainty should be applied per muon, resulting in an overall uncertainty in the normalization of 4%.
• For the simulated leptons, a variation of 1.2% in the τ h energy scale, split by decay mode, as described in Ref. [45], should be applied; a variation in the electron energy scale of 1% in the central detector and 2.5% in the endcaps of the ECAL should be applied.
• The uncertainty in the expected fraction of tt(ττ) events in the embedded event samples is estimated from a 10% up and down variation of the expected fraction in simulation. The estimation is based on a study in a tt-enriched control region.
• The uncertainties in the correction factors for the trigger leg, identification, and isolation efficiencies are usually in the order of 2% in the kinematic regions relevant for the target analyses.
• The effects of the finite angular and p T resolutions of the detector are checked and have negligible influence on the τ-embedded events. They are covered by the variation in the τ h and electron energy scale given above. This is also true for a variation of p miss T within the observed discrepancies visible in Fig. 5 (middle left).
These uncertainties are usually a part of a more complex uncertainty model such as described in Ref. [45]. For the simulated processes that are replaced by the τ-embedded event sample, they replace uncertainties in the integrated luminosity, production cross sections, jet energy scale, p miss T scale and resolution, as well as in the tagging and mistag rates of b jets.

Comparison to data
To demonstrate how the embedding technique can help in a physics analysis on data, an inclusive event selection is performed for the ττ final states following typical selection requirements, as detailed in Ref. [45].
The online selection for the eµ final state relies on a logical or of two lower-threshold triggers that both require the presence of an electron and a muon in the event with p T > 23 GeV for the higher-p T lepton and p T > 12 (8) GeV for the lower-p T electron (muon).
In the offline selection of the eµ final state, an electron with p T > 13 GeV and |η| < 2.5 and a muon with p T > 9 GeV and |η| < 2.4 are required. If the event passed only one trigger, the lepton identified with the higher-p T trigger object is required to have a p T > 24 GeV, which guarantees a trigger acceptance well above the turn-on of at least one of the triggers used. Both leptons are required to pass identification criteria and to be isolated according to I e(µ) rel < 0.15 (0.20). Events with additional electrons or muons fulfilling looser selection requirements than these are rejected.
The eτ h (µτ h ) final state is based on the presence of at least one electron (muon) with p T > 35 (27) GeV and |η| < 2.1 at the trigger level. In these final states, an electron (muon) with p T > 36 (28) GeV and |η| < 2.1 and a τ h candidate with p T > 30 GeV and |η| < 2.3 are required. The electron (muon) and the τ h candidate must fulfill the identification requirements described in Section 3. The τ h candidate is required to pass the tight working point of the τ h identification discriminant, the tight (very loose) working point of the discriminant to suppress electrons and the loose (tight) working point of the discriminant to suppress muons in the eτ h (µτ h ) case. In addition, the electron (muon) is required to be isolated, according to I e(µ) rel < 0.10 (0.15). Events with additional electrons or muons fulfilling looser selection requirements are rejected.
In the τ h τ h final state, a trigger decision based on the presence of two hadronically decaying tau leptons with p T > 35 GeV and |η| < 2.1 is used. Furthermore, two τ h candidates with p T > 40 GeV and |η| < 2.1 are required. Both must pass the tight working point of the τ h identification discriminant, the very loose working point of the discriminant against electrons and the loose working point of the discriminant against muons. Events with additional electrons or muons fulfilling looser requirements on identification, isolation, and p T than described for the eτ h or µτ h final state above are rejected.
In all cases, the decay products of the two tau leptons are required to be oppositely charged, separated by more than 0.5 units in ∆R, and associated with the PV within a distance of 0.045 cm in the transverse plane for electrons and muons and 0.2 cm along the beam axis for all final-state particles. The vetoing of additional electrons or muons ensures that no event is used for more than one ττ final state. At most 0.8% of the selected events contain more τ h candidates than required for the corresponding final state. In this case, the ττ pair with the most isolated final state products is chosen. In the eτ h and µτ h final state, the events are further selected according to the transverse mass, where p e(µ) T refers to the p T of the electron (muon) and ∆φ to the difference in the azimuthal angle between the electron (muon) momentum and p miss T . In the eµ final state the events are further selected according to the event variable where p e(µ) T corresponds to the transverse momentum vector of the electron (muon) andζ to the bisectional direction between the electron and the muon momenta in the transverse plane [46]. In Fig.12, the distributions of p miss T , D ζ , m e T , and m µ T are shown. In addition to the expectation using the τ-embedded event samples, the overall expectation when using the simulation of Z → ττ, tt(ττ), and diboson(ττ) events is shown by an open histogram in the upper panel of the subfigures. For this comparison a series of corrections have been applied to the simulation, including a correction to match the pileup distribution in data, a reweighting of the Z boson p T distribution of the LO simulation to that in Z → µµ events observed in data, corrections for the electron and muon legs of the corresponding trigger paths, and for the electron and muon identification and isolation, and corrections of the Z boson recoil, to mitigate differences in detector resolution, between the simulation and data, for the calculation of p miss T . For τ-embedded events the corrections related to simulated leptons are applied, discussed in Section 7.1. A generally good agreement between the expectation and the data is observed, within the applied uncertainty model. A better agreement is found when using the τ-embedded event samples In the target analyses, a large fraction of W+jets and QCD multijet events are usually estimated from data, which implies that a fraction of up to 90% of the typical background expectation for the target analyses can be estimated from data.
In the target analyses the distributions of a variable related to the invariant mass of the ττ system are usually used as input for a maximum likelihood fit to extract the actual signal. This signal can be an SM process, such as the SM Z or Higgs boson production in the ττ final state, or any other process of physics beyond the SM. In Fig. 13 the distributions of m vis , as such a variable, in the eµ, eτ h , µτ h , and τ h τ h final states are shown, after the event selections, as described above, and after applying a maximum likelihood fit to the observation with the τ-embedded event sample as signal. For this purpose, a likelihood model has been adapted from Ref. [45]. It incorporates O(100) uncertainties in form of nuisance parameters that may be correlated across the processes contributing to the input distributions, and across final states. Within a single input distribution the nuisance parameters may allow for correlated shifts across bins, such as process normalization or energy scale uncertainties, and for shifts of individual bins, within the statistical precision of the template distributions used in the model. The ability of the model to describe the data can be quantified using a goodness-of-fit test, based on a saturated likelihood model (SAT) described in Ref. [47], which corresponds to a generalization of a χ 2 test including all systematic uncertainties of the model and their correlations. The SAT test indicates the overall statistical compatibility of the model with the observation, treating each bin of the input distributions as an independent measurement. Goodness-of-fit tests based on the empirical distribution function are usually more sensitive than a χ 2 -like test to small deviations that are correlated across several bins of a single histogram. A classical test of this kind that is mostly sensitive to deviations correlated across bins in the center of a given binned distribution is the Kolmogorov-Smirnov (KS) test [48,49]. A variant of this test that gives more emphasis to the edges of the given input distribution is the Anderson-Darling (AD) test [50]. The p-values for each of these tests, split by final state, are shown in Table 3. They have a one-to-one correspon- Figure 13: Invariant mass distribution of the visible ττ decay products, m vis , in the (upper left) eµ, (upper right) eτ h , (lower left) µτ h , and (lower right) τ h τ h final states, after a fit to the data exploiting a typical uncertainty model as, e.g., discussed in Ref. [45].
dence to the distributions shown in Fig. 13, with the small difference that these distributions are shown for a fit to the observation in all final states combined. The p-values are obtained from the comparison of the observed value for the corresponding test statistic with the outcome of pseudo-experiments based on the expectation. Their statistical precision is better than 0.5%. The actual values range from 17%, for the p-value of the AD test in the eτ h final state, to 82%, for the p-value of the AD test in the µτ h final state. All tests reveal good compatibility of the statistical model with the observation, which implies a successful description of the data with the given template distributions, especially with the τ-embedded event samples. The fit to the observation in all final states combined reveals a p-value of 51% and a normalization of 1.00± 0.05 0.05 for the τ-embedded event samples, which is in good agreement with the observations of Ref. [45] that have been made on an independent data set. Also a good compatibility of the normalization across all final states is observed. The normalization of the τ-embedded samples is obtained from the data.

Summary
The τ-embedding technique developed for the CMS experiment is described and its validation and relevant uncertainties are discussed. The 13 TeV proton-proton collisions collected by CMS in 2017 are used to demonstrate the performance of the technique with the data sample corresponding to an integrated luminosity of 41.5 fb −1 .
The main goal of the procedure is to estimate the background from Z → ττ events using recorded Z → µµ events. The estimate also includes events from tt and diboson production with two tau leptons in the final state. Recorded µµ events are selected, the muons are removed from the reconstructed event record, and replaced with simulated tau leptons with the same kinematic properties as the removed muons. In that way hybrid events are obtained, which rely on the simulation only for the decay of the tau leptons. Challenges in describing the underlying event or the production of associated jets in the simulation, as well as the costly simulation of PU events thus are avoided. The embedding technique decreases the uncertainties inherent in a typical simulation process, such as the uncertainties in the missing transverse momentum, jet energy scale and resolution, b tagging efficiency, and misidentification probability.

A Performance of the τ-embedding method on data
Distributions of more quantities relevant for the analysis of ττ events. The distributions are shown prior to the maximum likelihood fit discussed in Section 7.3. In addition to the expectation using the τ-embedded event samples, the overall expectation when using the simulation of Z → ττ, tt(ττ), and diboson(ττ) events is shown by a red line in the upper panel of the subfigures. For this comparison a series of corrections have been applied as discussed in Section 7.3. For τ-embedded events the corrections related to the simulated leptons, discussed in Section 7.1, have been applied. For these figures, no uncertainties that affect the shape of the distributions have been included in the uncertainty model.