1 Introduction

To find signals of physics beyond the Standard Model, many interesting processes at the LHC are being studied with ever increasing precision. An important part of these efforts is the development of methods that enable \(\hbox {N}^3\hbox {LO}\) QCD calculations, at least for the simplest processes where color-singlet final states are produced. In the absence of fully-developed \(\hbox {N}^3\hbox {LO}\) subtractions schemes, a promising approach is the slicing method [6,7,8,9] that has seen a recent resurgence in the context of LHC physics.

Any slicing method is based on the idea that one can split the phase space for a process of interest into partially-resolved and fully-unresolved parts. The fully-unresolved contribution originates from virtual, real-soft and real-collinear emissions. Conversely, the resolved one requires a final state that contains at least one additional QCD jet in comparison to the lowest order final state and, for this reason, it must be computed through lower order in the perturbative expansion in QCD than the unresolved one.

Phase-space separation into fully-unresolved and resolved parts can be accomplished using different kinematic variables. The two most popular ones are \(p_\perp \) and N-jettiness variables that have been used recently in many NNLO QCD computations [10,11,12,13,14,15,16,17,18,19,20,21]. In this paper we will deal with the so-called zero-jettiness variable that can be used to perform a slicing computation of \(\hbox {N}^3\hbox {LO}\) QCD corrections to the production of a colorless final state V (H, W, Z, \(\gamma ^*\), WW, ZZ, \(\gamma \gamma \), etc.) in hadron collisions. This variable reads [22]

$$\begin{aligned} \tau =\sum _{m} \min _{ \mathrm {i} \in \{1,2\}} \left[ \frac{2 p_i \cdot k_m}{Q_i} \right] , \end{aligned}$$
(1.1)

where \(p_i\) are the four-momenta of incoming partons, \(k_m\) are the momenta of final state QCD partons and \(Q_i\) are the so-called hardness variables. In the limit of small \(\tau \), the cross section factorizes [23] into a product of hard H, beam B and soft S functions

$$\begin{aligned} \lim _{\mathcal \tau _0 \rightarrow 0} \hbox {d}^{}\sigma ^{\mathrm {N^3LO}}_{pp\rightarrow V+X} \ \left( \tau <\mathcal \tau _0 \right) = B \otimes B \otimes S \otimes H \otimes \hbox {d}^{} \sigma ^{\mathrm {LO}}_{pp\rightarrow V} \ . \end{aligned}$$
(1.2)

All quantities that appear in Eq. (1.2) are known through NNLO QCD. Moreover, the hard function H is known through \(\hbox {N}^3\hbox {LO}\) QCD for single vector boson and Higgs boson production [24, 25] and, recently, the three-loop quark-to-quark matching coefficient, needed to relate the beam function to parton distribution functions, was computed in the generalized large-\(N_c\) approximation in Ref. [26]. Footnote 1 The computation reported in Ref. [26] required the knowledge of certain NNLO beam functions through second order in the dimensional regularization parameter \(\epsilon \). These functions were calculated in Ref. [29] and the results of that computation were used in Ref. [26].

The goal of this paper is twofold. First, we aim to extend the calculation reported in Ref. [29] and to compute all NNLO QCD matching coefficients through the second order in \(\epsilon \), as required for the calculation of matching coefficients through \(\hbox {N}^3\hbox {LO}\) QCD. Second, we will compute the NNLO QCD soft function through the second order in \(\epsilon \), as required for the calculation of the \(\hbox {N}^3\hbox {LO}\) QCD soft function. We note that NNLO QCD zero-jettiness beam functions were computed in Refs. [1,2,3] through zeroth order in \(\epsilon \), whereas the NNLO soft function was originally calculated in Refs. [4, 5].

To extend the calculation of beam and soft functions to higher orders in \(\epsilon \), we use methods that may be of interest in their own right. Indeed, we employ collinear and soft limits of QCD amplitudes [30, 31], reverse unitarity [32] and integration-by-parts identities [33] to show that computation of soft and all NNLO beam functions for zero-jettiness can be significantly simplified. In the case of the soft function, we rewrite step functions that arise from the definition of the zero-jettiness variable as integrals of delta functions over auxillary parameters before applying reverse unitarity. We note that these methods allow one to express any NNLO zero-jettiness beam function through just twelve and the NNLO soft function through just nine simple (phase-space or loop) integrals. In case of the soft function, integrations over auxillary parameters turn out to be remarkably simple.

The remainder of the paper is organized as follows. In Sect. 2 we describe the computation of the partonic beam functions through \({{\mathcal {O}}}(\epsilon ^2)\) starting from collinear limits of scattering amplitudes and explain how the master integrals are calculated. We discuss the calculation of the bare soft function through \({{\mathcal {O}}}(\epsilon ^2)\) in Sect. 3. We conclude in Sect. 4. Finally, we note that results for the NNLO bare soft function and beam function matching coefficients are collected in an ancillary file provided with this submission.

2 Calculation of the beam function

In this section we describe the calculation of the bare partonic beam function. We split the discussion into two parts. In Sect. 2.1 we explain the general set up and relate the calculation of the beam functions to collinear limits of QCD amplitudes. We also use reverse unitarity to express bare beam functions through master integrals. In Sect. 2.2 we describe the calculation of these master integrals. We present some results in Sect. 2.3.

2.1 General setup

It was pointed out in Ref. [34] that a bare partonic beam function \(B^{b}_{ij}\), that describes the transition of a parton j to a parton i, can be obtained by integrating spin- and color-averaged collinear splitting functions \( \left\langle P_{j\rightarrow i^* \{m\}} \right\rangle \) over an unresolved m-particle phase-space

$$\begin{aligned} B^b_{ij}\sim \sum _{\{m\}} \int \hbox {d}^{} \mathrm {PS^{(m)}} \left\langle P_{j\rightarrow i^* \{m\}} \right\rangle . \end{aligned}$$
(2.1)

The phase-space measure is defined as follows

$$\begin{aligned} \hbox {d}^{}\mathrm {PS^{(m)}}&=\left( \prod _n^m \frac{\hbox {d}^{d}{k_n}}{{(2 \pi )}^{d-1}} \ \delta ^+ \left( k_n^2 \right) \right) \delta \left( 2 \sum _n^m k_{n} \cdot p - \frac{t}{z} \right) \nonumber \\&\quad \times \delta \left( 2\sum _n^m\frac{ k_{n} \cdot {\bar{p}}}{s} - (1-z)\right) , \end{aligned}$$
(2.2)

where \(\{m\}\) is the set of collinearly-radiated partons. In Eq. (2.2) we denote the momentum of the incoming parton j as p, its complementary light-cone momentum as \({\bar{p}}\) and the momenta of final state partons as \(k_m\). Furthermore, t is the so-called transverse virtuality of the off-shell parton i, \(z \cdot p\) is its longitudinal momentum and \(s=2 p\cdot {\bar{p}}\). It was explained in Ref. [30] how splitting functions \(P_{j \rightarrow i^*}\) for all parton-to-parton transitions can be calculated. This requires the use of a physical (axial) gauge for gluons and projection operators that decouple collinear emissions from hard matrix elements. These projection operators act on matrix elements \(M_{j\rightarrow i^* \{m\}}\) describing the process of a parton j splitting into on-shell partons \(\{m\}\) and an off-shell parton \(i^*\).

Following Ref. [30], we write

(2.3)
(2.4)

where

$$\begin{aligned} d_{\mu \nu }(k)&=-g_{\mu \nu }+\frac{k_\mu {\bar{p}}_\nu + {\bar{p}}_\mu k_\nu }{ \ k \cdot {\bar{p}}},&p_s&=p-\sum _m k_m, \end{aligned}$$
(2.5)

and the sums in Eq. (2.4) run over color, polarization and spin degrees of freedom of all external particles. Combining Eqs. (2.1) and (2.3), we write the beam function as

$$\begin{aligned} B^b_{ij}=\sum _{\{m\}} \frac{1}{\mathcal {N}_m} \int \hbox {d}^{} \mathrm {PS^{(m)}} \mathcal {P}|M_{j\rightarrow i^* \{m\}}|^2, \end{aligned}$$
(2.6)

where \(\mathcal {N}_m\) are symmetry and averaging factors. To compute all beam functions it is sufficient to consider i’s and j’s from the following set \(\left( i,j \right) \in \{(q_l,q_m),(q_l,g),(q_l,{\bar{q}}_m),(g,g),(g,q_m)\}\) [1, 2], where the indices l and m denote quark flavours. We note that a flavour-preserving transition in \(B^b_{q_lq_m}\) is obtained by setting \(l=m\). Similar to regular splitting functions, all other beam functions can be obtained from the above set. Examples of diagrams that are required for the calculation of beam functions are shownFootnote 2 in Fig. 1.

Fig. 1
figure 1

Example diagrams contributing to the \(B_{qq}\) (a) and \(B_{gq}\) (b) beam functions. The dashed line represents a “cut” so that all particles crossing it are on the mass-shell. The vertex \(\otimes \) denotes the insertion of the projection operator defined in Eq. (2.4)

The bare partonic beam functions \(B^b_{ij}\) Eq. (2.6) can now be calculated as standard phase-space and loop integrals with the projection operator \(\mathcal {P}\) as a special Feynman rule. To facilitate this computation, we apply reverse unitarity [32] and rewrite delta functions in Eq. (2.2) as differences of two “propagators” with opposite signs in the i0 prescription, mapping phase-space integrals in Eq. (2.6) onto loop integrals. We then use integration-by-parts (IBP) identities [33] to express the beam function through master integrals. The IBP reduction is performed using FIRE [36].

We find that all five beam functions can be expressed through just twelve master integrals. They include nine double-real master integrals

$$\begin{aligned}&I_1= \left[ 1 \right] _{(2)} ,\qquad \qquad I_2= \left[ \frac{ 1 }{{\bar{p}}\cdot (p-k_1)} \right] _{(2)}, \nonumber \\&I_3= \left[ \frac{1}{(p-k_{12})^2}\right] _{(2)},\nonumber \\&I_4= \left[ \frac{ 1 }{(p-k_1)^2 \ k_{12}^2 \ {\bar{p}}\cdot k_2}\right] _{(2)} , \nonumber \\&I_5= \left[ \frac{1}{(p-k_1)^2 \ (p-k_{12})^2 \ {\bar{p}}\cdot k_1} \right] _{(2)},\nonumber \\&I_6= \left[ \frac{1}{(p-k_1)^2 \ (p-k_{12})^2 \ {\bar{p}}\cdot k_2}\right] _{(2)}, \nonumber \\&I_7= \left[ \frac{1}{(p-k_{12})^2 \ [{\bar{p}}\cdot (p-k_1)]}\right] _{(2)}, \nonumber \\&I_8= \left[ \frac{1}{k_{12}^2 \ [ {\bar{p}}\cdot (p-k_1)] \ (p-k_1)^2}\right] _{(2)}, \nonumber \\&I_9= \left[ \frac{1}{(p-k_{12})^2 \ (p-k_2)^2 \ (p-k_1)\cdot {\bar{p}}}\right] _{(2)}, \end{aligned}$$
(2.7)

and three real-virtual master integrals

$$\begin{aligned}&I_{10}= \left[ \frac{1}{l^2 \ l \cdot {\bar{p}}\ (p-l)^2 \ (p-k-l)^2}\right] _{(1)},\nonumber \\&I_{11}=\left[ \frac{1}{l^2 \ (p-k-l)^2}\right] _{(1)} ,\nonumber \\&I_{12}=\left[ \frac{1}{l^2 \ (p-l)^2 \ (l-k)^2 \ (l-k) \cdot {\bar{p}}}\right] _{(1)}, \end{aligned}$$
(2.8)

where for a given integrand f we write

$$\begin{aligned}&\left[ f \right] _{(2)}=\int \hbox {d}^{}\mathrm {PS^{(2)}} \; f,&\left[ f \right] _{(1)}=\int \hbox {d}^{}\mathrm {PS^{(1)}} \int \frac{\hbox {d}^{d}l}{(2 \pi )^{d}} \; f. \end{aligned}$$
(2.9)

We note that phase-space measures \(\hbox {d}^{}\mathrm {PS^{(2,1)}}\) are defined in Eq. (2.2). We also note that the gluon and quark beam function share the same set of master integrals. We describe the calculation of these master integrals in the next section.

2.2 Master integrals

The master integrals shown in Eqs. (2.7) and (2.8) are sufficiently simple to be evaluated directly. To illustrate the computation, we discuss three representative examples. All other master integrals can be calculated along similar lines.

We begin with the master integral

$$\begin{aligned} I_4&= \int \frac{\hbox {d}^{d}k_1}{(2 \pi )^{d-1}} \int \frac{\hbox {d}^{d}k_2}{(2 \pi )^{d-1}} \ \delta ^+\left( k_1^2\right) \delta ^+\left( k_2^2\right) \nonumber \\&\quad \times \delta \left( 2 k_{12} \cdot p - \tfrac{t}{z} \right) \frac{ \delta \left( \tfrac{ 2 k_{12} \cdot {\bar{p}}}{s} - (1-z) \right) }{(p-k_1)^2 \ k_{12}^2 \ {\bar{p}}\cdot k_2}. \end{aligned}$$
(2.10)

We start by rescaling the momenta p, \({\bar{p}}\), \(k_1\) and \(k_2\) in such a way that the dependencies of the integrals on t and s factor out. To this end, we writeFootnote 3

$$\begin{aligned}&{\bar{p}}=\tilde{{\bar{p}}}\frac{s}{\sqrt{t}},&p={\tilde{p}} \sqrt{t},&k_i={\tilde{k}}_i \sqrt{t}, \end{aligned}$$
(2.11)

and obtain

$$\begin{aligned} I_4 \left( s,t,z \right) =t^{d-5}s^{-1}I_4 \left( 1,1,z\right) . \end{aligned}$$
(2.12)

To simplify the notation we drop tildes over momenta and turn to the calculation of the following integral

$$\begin{aligned} I_4 \left( 1,1,z\right)&= \int \frac{\hbox {d}^{d}k_1}{(2 \pi )^{d-1}} \int \frac{\hbox {d}^{d}k_2}{(2 \pi )^{d-1}} \ \delta ^+\left( k_1^2\right) \delta ^+\left( k_2^2\right) \nonumber \\&\quad \times \delta \left( 2 k_{12} \cdot p - \tfrac{1}{z} \right) \frac{ \delta \left( 2 k_{12} \cdot {\bar{p}} - (1-z) \right) }{(p-k_1)^2 \ k_{12}^2 \ {\bar{p}}\cdot k_2} . \end{aligned}$$
(2.13)

We insert \(1=\int \hbox {d}^{d}Q \ \delta ^d(k_1+k_2-Q) \) into the integrand and change the order of integration. We find

$$\begin{aligned}&I_4 \left( 1,1,z\right) \nonumber \\&\quad = \int \hbox {d}^{d}Q \ \delta \left( 2 Q \cdot p - \tfrac{1}{z} \right) \nonumber \\&\qquad \times \delta \left( 2 Q \cdot {\bar{p}} - (1-z) \right) \frac{ F(Q^2,p \cdot Q, {\bar{p}} \cdot Q)}{Q^2}, \end{aligned}$$
(2.14)
$$\begin{aligned}&F(Q^2,p\cdot Q, {\bar{p}} \cdot Q)\nonumber \\&\quad = \int \frac{\hbox {d}^{d}k_1}{(2 \pi )^{d-1}} \int \frac{\hbox {d}^{d}k_2}{(2 \pi )^{d-1}} \ \nonumber \\&\qquad \times \frac{\delta ^+\left( k_1^2\right) \delta ^+\left( k_2^2\right) }{(p-k_1)^2 \ {\bar{p}}\cdot k_2 } \delta ^d(Q-k_1-k_2). \end{aligned}$$
(2.15)

We first compute the function F in Eq. (2.15) in the rest frame of the time-like vector Q. In that frame \( Q=(Q_0,0,0,0) \) and F becomes

$$\begin{aligned} F&=-\frac{1}{2}\int \frac{\hbox {d}^{d-1}\vec {k}_1}{(2 \pi )^{d-1}2|\vec {k}_1|} \int \frac{\hbox {d}^{d-1}\vec {k}_2}{(2 \pi )^{d-1}2|\vec {k}_2|}\nonumber \\&\quad \times \frac{\delta ^{d-1}(\vec {k}_1+\vec {k}_2)}{{\bar{p}}_0 |\vec {k}_2|-\vec {{\bar{p}}} \cdot \vec {k}_2} \ \frac{\delta (Q_0-|\vec {k}_1|-|\vec {k}_2|) }{p_0 |\vec {k}_1|-\vec {p} \cdot \vec {k}_1 } \nonumber \\&=-\frac{1}{2}\int \frac{\hbox {d}^{d-1}\vec {k}_1}{(2\pi )^{2d-2} 4 |\vec {k}_1|^2} \nonumber \\&\quad \times \frac{\delta (Q_0-2|\vec {k}_1|)}{{\bar{p}}_0 |\vec {k}_1|+\vec {{\bar{p}}} \cdot \vec {k}_1 }\frac{1 }{p_0 |\vec {k}_1|-\vec {p} \cdot \vec {k}_1 }. \end{aligned}$$
(2.16)

We parameterize the two light-like momenta as \(p= p_0 (1,\vec {n}_p) \), \({\bar{p}}= {\bar{p}}_0 (1,\vec {n}_{{\bar{p}}}) \),Footnote 4 and introduce spherical coordinates for \(\vec {k}_1\). We obtain

$$\begin{aligned} F&= -\frac{1}{8 p_0 {\bar{p}}_0} \int \frac{\hbox {d}^{d-1}\vec {k}_1}{(2 \pi )^{2d-2}|\vec {k}_1|^4} \delta \left( Q_0 - 2 |\vec {k}_1| \right) \nonumber \\&\quad \times \frac{1}{1-\vec {n}_p \cdot \vec {n}_k} \; \frac{1}{1+\vec {n}_{{\bar{p}}} \cdot \vec {n}_k} \nonumber \\&= - \frac{1}{(2p_0 Q_0)(2{\bar{p}}_0 Q_0)} \left( \frac{Q_0}{2} \right) ^{d-4} \nonumber \\&\quad \times \int \frac{\hbox {d}^{}\Omega _k^{(d-1)}}{(2 \pi )^{2d-2}} \frac{1}{(k_n \cdot p_1) \ (k_n \cdot p_2)} , \end{aligned}$$
(2.17)

where we introduced the notation \( \ p_1=(1, \vec {n}_p) \), \( \ p_2=(1, -\vec {n}_{{\bar{p}}}) \) and \( \ k_n=(1,\vec {n}_{k}) \). The angular integral in Eq. (2.17) was discussed in Refs. [37, 38]. The result reads

$$\begin{aligned}&\int \frac{\hbox {d}^{}\Omega _{k}^{(d-1)}}{(k_n \cdot p_1) \ (k_n \cdot p_2)}\nonumber \\&\quad =-\Omega ^{(d-2)} \frac{2^{-2\epsilon }}{\epsilon }\nonumber \\&\qquad \times \frac{\Gamma (1-\epsilon )^2}{\Gamma (1-2\epsilon )} \ _2F_1\left( 1,1,1-\epsilon ,1-\frac{\rho _{12}}{2}\right) , \end{aligned}$$
(2.18)

where \( \Omega ^{(d)}= 2 \pi ^{\frac{d}{2}}/ \Gamma (\tfrac{d}{2}) \) is the d-dimensional solid angle, \(_2F_1\) is the Gauss hypergeometric function and \(\rho _{12}=(1-\vec {n}_{p_1}\cdot \vec {n}_{p_2})\). Finally, we rewrite \(\rho _{12}\) in a Lorentz-invariant way

$$\begin{aligned} 1-\frac{\rho _{12}}{2}&=\frac{1}{2}\left( 1+\vec {n}_{p_1} \cdot \vec {n}_{p_2}\right) =\frac{Q^2}{(2 Q \cdot p) (2 Q \cdot {\bar{p}})}. \end{aligned}$$
(2.19)

The function F in Eq. (2.17) becomes

$$\begin{aligned}&F(Q^2,p \cdot Q, {\bar{p}} \cdot Q)\nonumber \\&\quad = \frac{\Omega ^{(d-2)}}{(2 \pi )^{2d-2}} \frac{(Q^2)^{-\epsilon }}{(2 p \cdot Q)(2 {\bar{p}} \cdot Q)} \frac{\Gamma (1-\epsilon )^2 }{\epsilon \ \Gamma (1-2\epsilon )} \nonumber \\&\qquad \times \ _2F_1 \left( 1,1,1-\epsilon ,\frac{Q^2}{(2 Q \cdot p) (2 Q \cdot {\bar{p}})}\right) . \end{aligned}$$
(2.20)

We substitute Eqs. (2.20) into (2.14) and find

$$\begin{aligned} I_4 \left( 1,1,z\right)&= \int \hbox {d}^{d}Q \ \delta \left( 2 Q \cdot p - \tfrac{1}{z} \right) \delta \left( 2 Q \cdot {\bar{p}} - (1-z) \right) \nonumber \\&\quad \times \frac{\Omega ^{(d-2)}}{(2 \pi )^{2d-2}}\frac{(Q^2)^{-1-\epsilon }}{(2 p \cdot Q)(2 {\bar{p}} \cdot Q)} \nonumber \\&\quad \times \frac{\Gamma (1-\epsilon )^2 }{\epsilon \ \Gamma (1-2\epsilon )} \nonumber \\&\quad \times \ _2F_1 \left( 1,1,1-\epsilon ,\frac{Q^2}{(2 Q \cdot p) (2 Q \cdot {\bar{p}})}\right) . \end{aligned}$$
(2.21)

To integrate over Q we employ the Sudakov decomposition \(Q^\mu =\alpha p^\mu +\beta {\bar{p}}^{\mu }+Q_\perp ^\mu \) so that

$$\begin{aligned} \int \hbox {d}^{d}Q&=\frac{1}{2}\int _0^\infty \hbox {d}^{}\alpha \int _0^\infty \hbox {d}^{} \beta \int \hbox {d}^{d-2} Q_{\perp }\nonumber \\&=\frac{\Omega ^{(d-2)}}{4}\int _0^\infty \hbox {d}^{}\alpha \int _0^\infty \hbox {d}^{} \beta \int \hbox {d}^{}Q_\perp ^2 \ (Q_\perp ^2)^{-\epsilon } \nonumber \\&\quad \times \theta \left( \alpha \beta -Q_\perp ^2 \right) . \end{aligned}$$
(2.22)

In Eq. (2.22) we used the fact that \(Q^2>0\), \(Q\cdot p>0\) and \(Q \cdot {\bar{p}}>0\) to constrain integrations over \(\alpha \) and \(\beta \). After eliminating the delta functions \(\delta \left( \beta -1/z\right) \) and \(\delta \left( \alpha -(1-z)\right) \) by integrating over \(\alpha \) and \(\beta \), we obtain

$$\begin{aligned} I_4 \left( 1,1,z\right)&= \frac{z}{(1-z)} \frac{\left[ \Omega ^{(d-2)}\right] ^{2}}{4(2 \pi )^{2d-2}}\frac{\Gamma (1-\epsilon )^2 }{\epsilon \ \Gamma (1-2\epsilon )} \nonumber \\&\quad \times \int _0^{\frac{1-z}{z}} \hbox {d}^{}Q_\perp ^2 \ (Q_\perp ^2)^{-\epsilon } \left( \tfrac{1-z}{z}-Q_\perp ^2 \right) ^{-(1+\epsilon )} \nonumber \\&\quad \times {}_2F_1\left( 1,1,1-\epsilon ,1-\tfrac{Q_\perp ^2 \ z}{1-z} \right) . \end{aligned}$$
(2.23)

We substitute \(Q_\perp ^2=(1-z)(1-u)/z\), integrate over u and find

$$\begin{aligned} I_4 \left( 1,1,z\right)&= - \frac{\left[ \Omega ^{(d-2)}\right] ^2}{4 (2 \pi )^{2d-2}} \left( \frac{1-z}{z} \right) ^{-1-2\epsilon }\nonumber \\&\quad \times \frac{\Gamma (1-\epsilon )^4}{\epsilon ^2 \ \Gamma (1{-}2\epsilon )^2} \ _3F_2 \left( 1,1,{-}\epsilon ;1{-}2\epsilon ,1{-}\epsilon ,1 \right) , \end{aligned}$$
(2.24)

where \( \ _3F_2\) is the generalized hypergeometric function [39]. The expansion of the hypergeometric function in \(\epsilon \) is easily obtained using the program HypExp [40, 41].

Our next example is the master integral

$$\begin{aligned} I_9 \left( 1,1,z\right)&= \int \frac{\hbox {d}^{d}k_1}{(2 \pi )^{d-1}} \int \frac{\hbox {d}^{d}k_2}{(2 \pi )^{d-1}} \ \delta ^+\left( k_1^2\right) \nonumber \\&\quad \times \delta ^+\left( k_2^2\right) \frac{\delta \left( 2 k_{12} \cdot p - \tfrac{1}{z} \right) \delta \left( 2 k_{12} \cdot {\bar{p}} - (1-z) \right) }{(p-k_{12})^2\ \ (p-k_2)^2 \ (p-k_1)\cdot {\bar{p}}}. \end{aligned}$$
(2.25)

We again insert \(1=\int \hbox {d}^{d}Q \ \delta ^d(k_1+k_2-Q) \) into the integrand and write the integral as

$$\begin{aligned}&I_9 \left( 1,1,z\right) \nonumber \\&\quad = \int \hbox {d}^{d}Q \ \delta \left( 2 Q \cdot p - \tfrac{1}{z} \right) \delta \left( 2 Q \cdot {\bar{p}} - (1-z) \right) \nonumber \\&\qquad \times \frac{ F_9(Q^2,p \cdot Q, {\bar{p}} \cdot Q)}{(p-Q)^2}, \end{aligned}$$
(2.26)
$$\begin{aligned}&F_9(Q^2,p\cdot Q, {\bar{p}} \cdot Q)\nonumber \\&\quad = \int \frac{\hbox {d}^{d}k_1}{(2 \pi )^{d-1}} \int \frac{\hbox {d}^{d}k_2}{(2 \pi )^{d-1}} \nonumber \\&\qquad \times \frac{\delta ^+\left( k_1^2\right) \delta ^+\left( k_2^2\right) }{ {\bar{p}}\cdot (p-k_1) \ (p-k_2)^2 } \delta ^d(Q-k_1-k_2). \end{aligned}$$
(2.27)

We compute the integral Eq. (2.27) in the rest frame of the vector Q. To this end, we parameterize the phase space as shown in Eq. (2.16), integrate over \(\vec {k}_1\) to remove the delta function, introduce spherical coordinates for \(\vec {k}_2\) and integrate over the absolute value of \(\vec {k}_2\) to remove the remaining delta function. We obtain the angular integral

$$\begin{aligned} F_9&= - \left( \frac{Q_0}{2}\right) ^{d-2} \frac{1}{Q_0^2 \ Q_0 p_0 \ Q_0 {\bar{p}}_0} \frac{1}{\lambda } \int \frac{\hbox {d}^{}\Omega _k^{(d-1)}}{(2 \pi )^{2d-2}}\nonumber \\&\quad \times \frac{1}{1-\frac{1}{\lambda }\vec {n}_{{\bar{p}}} \cdot \vec {n}_k} \frac{1}{1-\vec {n}_p \cdot \vec {n}_k} \nonumber \\&= - \left( \frac{Q_0}{2}\right) ^{d-2} \frac{1}{Q_0^2 \ Q_0 p_0 \ Q_0 {\bar{p}}_0} \frac{1}{\lambda } \nonumber \\&\quad \times \int \frac{\hbox {d}^{}\Omega _k^{(d-1)}}{(2 \pi )^{2d-2}} \frac{1}{(k_n \cdot p_1) \ (k_n \cdot p_2)} , \end{aligned}$$
(2.28)

where we introduced the notation \( \ p_1=(1, \frac{1}{\lambda }\vec {n}_{{\bar{p}}} ) \), with \(\lambda =1/(Q_0 {\bar{p}}_0)-1\),\( \ p_2=(1,\vec {n}_{p}) \) and \( \ k_n=(1,\vec {n}_{k}) \). The angular integration in Eq. (2.28) was discussed in Ref. [38]; the result reads

$$\begin{aligned}&\int \frac{\hbox {d}^{}\Omega _k^{(d-1)} }{(k_n \cdot p_1) \ (k_n \cdot p_2)}\nonumber \\&\quad =-\frac{1}{\epsilon }\frac{2^{1-2 \epsilon } \pi ^{1-\epsilon } \ \lambda \Gamma (1-\epsilon )}{(\lambda -\vec {n}_{p} \cdot \vec {n}_{{\bar{p}}} ) \ \Gamma (1-2 \epsilon )} \nonumber \\&\qquad \times F_1\left( 1,-\epsilon ,-\epsilon ,1- 2 \epsilon ,- \frac{1+\vec {n}_{p} \cdot \vec {n}_{{\bar{p}}}}{\lambda - \vec {n}_{p} \cdot \vec {n}_{{\bar{p}}}}, \frac{-1+\vec {n}_{p} \cdot \vec {n}_{{\bar{p}}}}{-\lambda +\vec {n}_{p} \cdot \vec {n}_{{\bar{p}}}} \right) . \end{aligned}$$
(2.29)

In Eq. (2.29) \( F_1\) is the Appell hypergeometric function (see e.g. Ref. [42]). Writing Eq. (2.29) in a Lorentz-invariant way, we obtain

$$\begin{aligned}&F(Q^2,p\cdot Q, {\bar{p}} \cdot Q)\nonumber \\&\quad =\frac{1}{(2 \pi )^{2d-2}} \frac{1}{\epsilon } \frac{\pi ^{1-\epsilon } \ (Q^2)^{-\epsilon } \ \Gamma (1-\epsilon )}{(Q^2+2 p\cdot Q (1- 2{\bar{p}}\cdot Q))\Gamma (1-2\epsilon )} \nonumber \\&\qquad \times F_1\left( 1,-\epsilon ,-\epsilon ,1-2\epsilon ,\frac{Q^2- 4 p\cdot Q \ {\bar{p}}\cdot Q }{Q^2+2 p\cdot Q (1-2 {\bar{p}}\cdot Q)},\right. \nonumber \\&\qquad \times \left. \frac{Q^2}{Q^2+2 p\cdot Q (1- 2 {\bar{p}}\cdot Q)}\right) . \end{aligned}$$
(2.30)

We substitute Eqs. (2.30) into (2.26), introduce the Sudakov decomposition \(Q^\mu =\alpha p^\mu +\beta {\bar{p}}^{\mu }+Q_\perp ^\mu \) and integrate over Q . We substitute \(Q_\perp ^2=l (1-z)/z\) and find

$$\begin{aligned} I_9 \left( 1,1,z\right)&=-\frac{\Omega ^{(d-2)}}{4 (2 \pi )^{2d-2}}\frac{1}{\epsilon } \int _0^1 \hbox {d}^{}l \frac{ \pi ^{1-\epsilon }\ z\ (1-z) \ }{[1-l\ (1-z)] \ [l\ (1-z)+z] \ }\nonumber \\&\quad \times \left( \frac{(1-l) \ l \ (1-z)^2}{z^2}\right) ^{-\epsilon } \nonumber \\&\quad \times \frac{\Gamma (1-\epsilon )}{\Gamma (1- 2\epsilon )} F_1\left( 1,-\epsilon ,-\epsilon ,1-2\epsilon ,\right. \nonumber \\&\quad \times \left. \frac{l \ (1-z) }{l(1-z)-1},\frac{(l-1) \ (1-z)}{l(1-z)-1}\right) . \end{aligned}$$
(2.31)

To perform the l-integration we use the integral representation of the Appell function [39]

$$\begin{aligned}&F_1\left( a,b_1,b_2,c,z_1,z_2 \right) \nonumber \\&\quad = \int _0^1 \hbox {d}^{}u\frac{\Gamma (c) \ u^{a-1} \ (1-u)^{c-a-1}}{\Gamma (a) \Gamma (c-a)} \ (1-u \ z_1)^{-b_1} (1- u\ z_2)^{-b_2}. \end{aligned}$$
(2.32)

We find

$$\begin{aligned} I_9 \left( 1,1,z\right)&= \int _0^1 \hbox {d}^{}u \int _0^1 \hbox {d}^{}l \ \frac{\left[ \Omega ^{(d-2)}\right] ^2}{(2\pi )^{2d-2}}\nonumber \\&\quad \times \frac{(z-1)\ z \ (1-u)^{-1-2\epsilon } \ \Gamma (1-\epsilon )^2}{4 \ [1+l \ (z-1)]\ [l\ (z-1)-z] \ \Gamma (1-2\epsilon )} \nonumber \\&\quad \times \left[ \frac{(1-l) \ l \ (1-z)^2}{z} \right] ^{-\epsilon } \nonumber \\&\quad \times \left[ \frac{z\ [1+l \ (-1+u+z-u \ z)]}{1+l\ (z-1)}\right] ^{\epsilon } \nonumber \\&\quad \times \left[ \frac{1+u\ (z-1)+ l \ (-1+u+z-u z)}{1+l\ (z-1)} \right] ^\epsilon . \end{aligned}$$
(2.33)

We would like to expand the integrand in a Laurent series in \(\epsilon \) and compute the integral order by order in this expansion. This can be done if the integrand remains integrable at \(\epsilon =0\). It is easy to see that this is not the case; while the integral over l in Eq. (2.33) converges if we Taylor expand around \(\epsilon =0\), the integral over u diverges at \(u=1\).

We remove the divergence by performing an end-point subtraction at \(u=1\), splitting the integral into two pieces. To write the result, we define two functions

$$\begin{aligned} M(u,l)&=\left[ \frac{z\ [1+l \ (-1+u+z-u \ z)]}{1+l\ (z-1)}\right] ^{\epsilon }\nonumber \\&\quad \times \left[ \frac{1+u\ (z-1)+ l \ (-1+u+z-u z)}{1+l\ (z-1)} \right] ^\epsilon , \end{aligned}$$
(2.34)
$$\begin{aligned} G(l)&=\frac{\left[ \Omega ^{(d-2)}\right] ^2}{(2\pi )^{2d-2}}\frac{(z-1)\ z \ \Gamma (1-\epsilon )^2}{4 \ [1+l \ (z-1)]\ [l\ (z-1)-z] \ \Gamma (1-2\epsilon )} \nonumber \\&\quad \times \left[ \frac{(1-l) \ l \ (1-z)^2}{z} \right] ^{-\epsilon }, \end{aligned}$$
(2.35)

and write Eq. (2.33) as

$$\begin{aligned} I_9 \left( 1,1,z\right)&= \int _0^1 \hbox {d}^{}u \int _0^1 \hbox {d}^{}l \ (1-u)^{-1-2\epsilon } \ G(l) \ M(u,l) \nonumber \\&= \int _0^1 \hbox {d}^{}u \int _0^1 \hbox {d}^{}l \ (1-u)^{-1-2\epsilon } \ G(l) \ \left[ M(u,l)-M(1,l) \right] \nonumber \\&\quad +\int _0^1 \hbox {d}^{}u \int _0^1 \hbox {d}^{}l \ (1-u)^{-1-2\epsilon } \ G(l) \ M(1,l). \end{aligned}$$
(2.36)

The \(u=1\) singularity in the first term on the right hand side of Eq. (2.36) is now regulated, while the last term in Eq. (2.36) can be easily integrated over u. We find

$$\begin{aligned} I_9 \left( 1,1,z\right)&= \int _0^1 \hbox {d}^{}u \int _0^1 \hbox {d}^{}l \ (1-u)^{-1-2\epsilon } \ G(l) \ \left[ M(u,l)-M(1,l) \right] \nonumber \\&\quad - \frac{1}{2 \epsilon }\int _0^1 \hbox {d}^{}l \ G(l) \ M(1,l). \end{aligned}$$
(2.37)

All remaining integrands in Eq. (2.37) can now expanded to the required order in \(\epsilon \) and integrated using the HyperInt package [43]. The final result reads

$$\begin{aligned} I_9 \left( 1,1,z\right)&=\frac{\left[ \Omega ^{(d-2)}\right] ^2}{(2\pi )^{2d-2}} \ (1-z)^{-2\epsilon }\nonumber \\&\quad \times \Bigg [\frac{1}{\epsilon }\;\frac{z }{ \ 4 \ (1+z)} \ H(0,z) \nonumber \\&\quad - \frac{z}{8\ (1{+}z)}\left( \pi ^2+4\ H(-1,0,z){-}8 \ H(0,0,z)\right. \nonumber \\&\qquad \left. +4 \ H(1,0,z) \right) \Bigg ]+ {\mathcal {O}}{(\epsilon )} \end{aligned}$$
(2.38)

where \(H(\vec {m}_w,z)\) are harmonic polylogarithms (HPLs) [44].

Finally, we consider the real-virtual master integral \(I_{10}\). It reads

$$\begin{aligned} I_{10} \left( 1,1,z\right)&=\int \frac{\hbox {d}^{d}k}{(2 \pi )^{d-1}}\int \frac{\hbox {d}^{d}l}{(2 \pi )^{d}} \ \delta ^+\left( k^2\right) \nonumber \\&\times \frac{\delta \left( 2 k \cdot p - \tfrac{1}{z} \right) \ \delta \left( 2 k \cdot {\bar{p}} - (1-z) \right) }{l^2 \ (l \cdot {\bar{p}}) \ (p-l)^2 \ (p-k-l)^2} . \end{aligned}$$
(2.39)

We perform the l-integration first. To this end, we combine the propagators \(1 / l^2 \) and \(1 / l \cdot {\bar{p}} \ \). We write

$$\begin{aligned} \frac{1}{l^2} \frac{1}{(2 l \cdot {\bar{p}})} = \int _0^\infty \frac{\hbox {d}^{}y}{(l^2+2 \ l \cdot {\bar{p}} \ y)^2} =\int _0^\infty \frac{\hbox {d}^{}y}{[(l+y \ {\bar{p}} )^2]^2} , \end{aligned}$$
(2.40)

and obtain the standard loop integral over l

$$\begin{aligned} \int _0^\infty \hbox {d}^{}y \int \frac{\hbox {d}^{d}l}{(2 \pi )^d} \frac{1}{[(l+y \ {\bar{p}} )^2]^2 \ (p-l)^2 \ (p-k-l)^2}. \end{aligned}$$
(2.41)

The integration is now straightforward and we obtain

$$\begin{aligned}&\int \frac{\hbox {d}^{d}l}{(2 \pi )^d} \frac{1}{l^2 \ (l \cdot {\bar{p}}) \ (p-l)^2 \ (p-k-l)^2} \nonumber \\&\quad = -i \ 2^{-2+2 \epsilon } \pi ^{-2+\epsilon } \frac{ \Gamma (1-\epsilon )^2 \Gamma (1+\epsilon )}{\epsilon ^2 \ \Gamma (1- 2 \epsilon )} \nonumber \\&\qquad \times (2 p \cdot k)^{-1-\epsilon } \ _2 F_1\left( 1, -\epsilon , 1-\epsilon , 2 {\bar{p}} \cdot k \right) . \end{aligned}$$
(2.42)

The remaining integration over the on-shell momentum k is performed by introducing the Sudakov decomposition \(k^\mu =\alpha p^\mu +\beta {\bar{p}}^\mu +k_\perp ^\mu \). We find

$$\begin{aligned} I_{10} \left( 1,1,z\right)&=-i \frac{ \left[ \Omega ^{(d-2)}\right] ^2}{4 (2 \pi )^{2d-2}} \ (1-z)^{-\epsilon } z^{1+2\epsilon }\nonumber \\&\quad \times \frac{\Gamma (1-\epsilon )^3 \Gamma (1+\epsilon )}{\epsilon ^2 \ \Gamma (1- 2 \epsilon )} \ _2F_1(1,-\epsilon ,1-\epsilon ,1-z) . \end{aligned}$$
(2.43)

This concludes the discussion of the evaluation of the master integrals. All manipulations with hypergeometric functions that appear in master integrals, including their expansions in \(\epsilon \), are performed with the help of the HypExp package [41]. We describe some results for the beam functions in the next section.

2.3 Results

We are now in a position to present the bare partonic beam functions \(B^{b}_{q_iq_j}\), \(B^b_{q_ig}\), \(B^b_{q_i{\bar{q}}_j}\), \(B^b_{gg}\) and \(B^b_{gq_i}\) through \({\mathcal {O}}{(\epsilon ^2)}\) at NNLO QCD. By performing the renormalization procedure and matching onto partonic distribution functions, as discussed in Refs. [1, 2, 23, 26], we also obtain the matching coefficients \(I_{q_iq_j}\), \(I_{q_ig}\), \(I_{q_i{\bar{q}}_j}\), \(I_{gg}\) and \(I_{gq_i}\). To present the results, we write the beam functions and the matching coefficients as a series in the renormalized \(\overline{\mathrm {MS}}\) coupling constant

$$\begin{aligned} B^{b}_{ij}&=\sum _{k=0}^n \left( \frac{\alpha _s}{4 \pi }\right) ^k B^{b \ (k)}_{ij},\nonumber \\ I_{ij}&=\sum _{k=0}^n \left( \frac{\alpha _s}{4 \pi }\right) ^k I^{(k)}_{ij}. \end{aligned}$$
(2.44)

Since the expressions for the bare partonic beam functions \(B^b_{ij}\) and the matching coefficients \(I_{ij}\) through \({\mathcal {O}}{(\epsilon ^2)}\) are lengthy, we only discuss some features of the most complicated coefficient \(I_{gg}\); complete expressions for all other matching coefficients are given in an ancillary file provided with this submission. We write the matching coefficient in the following form

$$\begin{aligned} I^{(2)}_{gg}&=\sum _{k=0}^5 \frac{1}{\mu ^2}L_k\left( \frac{t}{\mu ^2} \right) F_+^{(k)}(z)+\delta (t) F_\delta (z), \end{aligned}$$
(2.45)
$$\begin{aligned} F_\delta (z)&=C_{-1} \delta (1-z)+ \sum _{k=0}^5 C_k L_k(1-z)+F_{\delta ,h}(z), \end{aligned}$$
(2.46)

where we define the plus distribution

$$\begin{aligned} L_n(z)=\left[ \frac{\ln ^n(z)}{z} \right] _+. \end{aligned}$$
(2.47)

For brevity, we only show the coefficient \(C_{-1}\) as well as the function \(F_{\delta ,h}(z)\) in pure gluodynamics (\(n_f=0\)). For the coefficient \(C_{-1}\) we find

$$\begin{aligned} C_{-1}&= \ C_A^2 \left( -\frac{110 \zeta (3)}{9}+\frac{2428}{81}-\frac{67 \pi ^2}{18}+\frac{11 \pi ^4}{90}\right) \nonumber \\&\quad +C_A n_f T_F \left( \frac{40 \zeta (3)}{9}-\frac{656}{81}+\frac{10 \pi ^2}{9}\right) \nonumber \\&\quad + \epsilon \Bigg [C_A^2 \left( -\frac{938 \zeta (3)}{27}+\frac{65 \pi ^2 \zeta (3)}{3}-150 \zeta (5)\right. \nonumber \\&\quad \left. +\frac{14576}{243}-\frac{202 \pi ^2}{27}+\frac{77 \pi ^4}{540}\right) \nonumber \\&\quad +C_A n_f T_F \left( \frac{280 \zeta (3)}{27}-\frac{3904}{243}+\frac{56 \pi ^2}{27}\right. \nonumber \\&\qquad \left. -\frac{7 \pi ^4}{135}\right) \Bigg ] \nonumber \\&\quad + \epsilon ^2 \Bigg [ C_A^2 \Bigg (-\frac{5656 \zeta (3)}{81}+\frac{220 \pi ^2 \zeta (3)}{27}\nonumber \\&\qquad +\frac{1142 \zeta (3)^2}{9}-\frac{638 \zeta (5)}{15}+\frac{87472}{729} \nonumber \\&\quad -\frac{1214 \pi ^2}{81}+\frac{67 \pi ^4}{216}-\frac{593 \pi ^6}{11340}\Bigg )\nonumber \\&\quad +C_A n_f T_F \Bigg (\frac{1568 \zeta (3)}{81}-\frac{80 \pi ^2 \zeta (3)}{27}+\frac{232 \zeta (5)}{15} \nonumber \\&\quad -\frac{23360}{729}+\frac{328 \pi ^2}{81}-\frac{5 \pi ^4}{54}\Bigg )\Bigg ]. \end{aligned}$$
(2.48)

To present the result for the function \(F_{\delta ,h}(z)\) in gluodynamics we write

$$\begin{aligned} F_{\delta ,h}(z)|_{n_f=0}&=C_A^2 \left( F_0(z)+ \epsilon \ F_1(z)+ \epsilon ^2 \ F_2(z) \right) , \end{aligned}$$
(2.49)

and introduce the short-hand notation \(H_{\vec {a}}=H(\vec {a},z)\). Due to its large size, we do not display the function \(F_2\) and only show the functions \(F_0\) and \(F_1\). They read

$$\begin{aligned} F_0&=48 \left( z^2-z-\frac{1}{z}+2\right) H_{1,1,1}\nonumber \\&\quad +\frac{4 \left( 55 z^3-47 z^2+58 z-55\right) H_{1,1}}{3 z}\nonumber \\&\quad +\frac{2 \left( 286 z^4-365 z^3+342 z^2-307 z+66\right) H_{0,0}}{3 (z-1) z}\nonumber \\&\quad +\frac{4 \left( 55 z^4-102 z^3+105 z^2-102 z+55\right) H_{1,0}}{3 (z-1) z}\nonumber \\&\quad +\frac{32 \left( z^4-3 z^3+3 z^2-z+1\right) H_{2,0}}{(z-1) z}\nonumber \\&\quad +\frac{8 \left( 7 z^4-18 z^3+21 z^2-10 z+7\right) H_{2,1}}{(z-1) z}\nonumber \\&\quad +\frac{8 \left( 3 z^4-10 z^3-7 z^2+10 z+7\right) H_{0,0,0}}{(z-1) (z+1)}\nonumber \\&\quad +\frac{8 \left( 6 z^4-12 z^3+18 z^2-11 z+6\right) H_{1,1,0}}{(z-1) z}\nonumber \\&\quad +\frac{\left( z^2+z+1\right) ^2}{z (z+1)} \left( -16 H_{-2,0}-16 H_{-1,2}\right. \nonumber \\&\quad \left. +16 H_{-1,-1,0}-32 H_{-1,0,0}+4 \pi ^2 H_{-1}\right) \nonumber \\&\quad +\frac{\left( z^2-z+1\right) ^2}{(z-1) z} \left( 56 H_{1,2}+56 H_{1,0,0}\right) \nonumber \\&\quad +\frac{16 H_3 \left( 4 z^5-7 z^4+7 z^2+3\right) }{z \left( z^2-1\right) }\nonumber \\&\quad +H_1 \left( \frac{2 \left( 134 z^4+102 z^3+131 z^2+163 z-134\right) }{9 z (z+1)}\right. \nonumber \\&\left. -\frac{4 \pi ^2 \left( 7 z^4+7 z^2+13 z-7\right) }{3 z (z+1)}\right) \nonumber \\&\quad +\frac{4 H_2 \left( 99 z^4-133 z^3+123 z^2-111 z+33\right) }{3 (z-1) z}\nonumber \\&\quad +H_0 \Bigg (\frac{-268 z^4-563 z^3+462 z^2-167 z+804}{9 (z-1) z}\nonumber \\&\quad -\frac{\pi ^2 \left( 44 z^5-60 z^4+12 z^3+64 z^2-8 z+28\right) }{3 (z-1) z (z+1)}\Bigg )\nonumber \\&-\frac{2 \pi ^2 \left( 99 z^4+65 z^3+55 z^2+67 z-33\right) }{9 z (z+1)}\nonumber \\&\quad +\frac{2 \left( 2460 z^4+553 z^3+350 z^2+255 z-2406\right) }{27 z (z+1)}\nonumber \\&\quad -\frac{\left( 120 z^5-112 z^4+88 z^3+120 z^2-200 z+80\right) \zeta (3)}{(z-1) z (z+1)}, \end{aligned}$$
(2.50)
$$\begin{aligned} F_1&=-\frac{4 \zeta (3) \left( 154 z^4+97 z^3+96 z^2+109 z-66\right) }{3 z (z+1)}\nonumber \\&\quad +\frac{\pi ^2 \left( 402 z^4+2323 z^3+2618 z^2+2037 z+1742\right) }{54 z (z+1)}\nonumber \\&\quad +\frac{16627 z^4+12881 z^3+4460 z^2-3169 z-16231}{81 z (z+1)}\nonumber \\&\quad +\frac{\pi ^4 \left( 15 z^5-83 z^4-41 z^3+83 z^2+11 z+27\right) }{45 (z-1) z (z+1)}\nonumber \\&\quad +\left( -\frac{\pi ^2 \left( 64 z^4-168 z^3+192 z^2-84 z+64\right) }{3 (z-1) z}\right. \nonumber \\&\quad \left. -\frac{2 \left( 134 z^4+841 z^3-708 z^2+403 z-938\right) }{9 (z-1) z}\right) H_2\nonumber \\&\quad +\frac{4 \left( 341 z^4-443 z^3+429 z^2-393 z+99\right) H_3}{3 (z-1) z}\nonumber \\&\quad +\frac{16 \left( 10 z^5-19 z^4-2 z^3+19 z^2+2 z+7\right) H_4}{z \left( z^2-1\right) }\nonumber \\&\quad +\left( \frac{-1340 z^4-699 z^3+66 z^2+633 z+1876}{9 (z-1) z}\right. \nonumber \\&\quad \left. -\frac{4 \pi ^2 \left( 27 z^5-38 z^4+7 z^3+38 z^2-7 z+18\right) }{3 z \left( z^2-1\right) }\right) H_{0,0}\nonumber \\&\quad +\left( \frac{4 \left( 201 z^4-302 z^3+333 z^2-299 z+201\right) }{9 (z-1) z}\right. \nonumber \\&\quad \left. -\frac{4 \pi ^2 \left( 22 z^4-44 z^3+66 z^2-43 z+22\right) }{3 (z-1) z}\right) H_{1,0}\nonumber \\&\quad +\left( \frac{2 \left( 402 z^4+197 z^3+259 z^2+330 z-402\right) }{9 z (z+1)}\right. \nonumber \\&\quad \left. -\frac{8 \pi ^2 \left( 10 z^4+10 z^2+19 z-10\right) }{3 z (z+1)}\right) H_{1,1}\nonumber \\&\quad +\frac{4 \left( 55 z^4-102 z^3+105 z^2-102 z+55\right) H_{1,2}}{(z-1) z}\nonumber \\&\quad +\frac{4 \left( 253 z^4-344 z^3+333 z^2-308 z+99\right) H_{2,0}}{3 (z-1) z}\nonumber \\&\quad +\frac{4 \left( 253 z^4-344 z^3+333 z^2-308 z+99\right) H_{2,1}}{3 (z-1) z}\nonumber \\&\quad +\frac{32 \left( 4 z^4-11 z^3+12 z^2-5 z+4\right) H_{2,2}}{(z-1) z}\nonumber \\&\quad +\frac{16 \left( 7 z^5-15 z^4-3 z^3+15 z^2+3 z+5\right) H_{3,0}}{z \left( z^2-1\right) }\nonumber \\&\quad +\frac{32 \left( 6 z^5-10 z^4+z^3+10 z^2-z+5\right) H_{3,1}}{z \left( z^2-1\right) }\nonumber \\&\quad +\frac{2 \left( 770 z^4-985 z^3+954 z^2-871 z+198\right) H_{0,0,0}}{3 (z-1) z}\nonumber \\&\quad +\frac{4 \left( 121 z^4-214 z^3+219 z^2-214 z+121\right) H_{1,0,0}}{3 (z-1) z}\nonumber \\&\quad +\frac{4 \left( 55 z^4-102 z^3+105 z^2-102 z+55\right) H_{1,1,0}}{(z-1) z}+4 \nonumber \\&\quad \times \left( 55 z^2-47 z+58-\frac{55}{z}\right) H_{1,1,1}\nonumber \\&\quad +\frac{8 \left( 20 z^4-40 z^3+60 z^2-39 z+20\right) H_{1,1,2}}{(z-1) z}\nonumber \\&\quad +\frac{16 \left( 5 z^5-9 z^4-z^3+9 z^2+z+3\right) H_{2,0,0}}{z \left( z^2-1\right) }\nonumber \\&\quad +\frac{48 \left( 3 z^4-8 z^3+9 z^2-4 z+3\right) H_{2,1,0}}{(z-1) z}\nonumber \\&\quad +\frac{24 \left( 7 z^4-18 z^3+21 z^2-10 z+7\right) H_{2,1,1}}{(z-1) z}\nonumber \\&\quad +\frac{8 \left( 3 z^5-22 z^4-23 z^3+22 z^2+23 z-4\right) H_{0,0,0,0}}{z \left( z^2-1\right) }\nonumber \\&\quad +\frac{\left( z^2-z+1\right) ^2}{(z-1) z} \left( 176 H_{1,3}+144 H_{1,2,0}\right. \nonumber \\&\quad \left. +168 H_{1,2,1}+136 H_{1,0,0,0}+112 H_{1,1,0,0}\right) \nonumber \\&\quad +\frac{24 \left( 6 z^4-12 z^3+18 z^2-11 z+6\right) H_{1,1,1,0}}{(z-1) z}\nonumber \\&\quad +\frac{160 \left( z^3-z^2+2 z-1\right) H_{1,1,1,1}}{z}\nonumber \\&\quad +H_1 \Bigg (-\frac{5 \pi ^2 \left( 55 z^4+8 z^3+11 z^2+14 z-55\right) }{9 z (z+1)}\nonumber \\&\quad +\frac{2 \left( 5333 z^4+1111 z^3+721 z^2+472 z-5279\right) }{27 z (z+1)}\nonumber \\&\quad -\frac{8 \left( 56 z^4+56 z^2+115 z-56\right) \zeta (3)}{3 z (z+1)}\Bigg )\nonumber \\&\quad +H_0 \Bigg (\frac{\pi ^2 \left( 583 z^4-753 z^3+735 z^2-675 z+165\right) }{9 (1-z) z}\nonumber \\&+\frac{2 \left( 7021 z^4-10345 z^3+9138 z^2-8624 z+3609\right) }{27 (z-1) z}\nonumber \\&\quad -\frac{16 \left( 49 z^5-49 z^4+31 z^3+53 z^2-27 z+31\right) \zeta (3)}{3 z \left( z^2-1\right) }\Bigg )\nonumber \\&\quad +\frac{\left( z^2+z+1\right) ^2}{z (z{+}1)} \Bigg (8 \pi ^2 H_{-2}{-}32 H_{-3,0}\nonumber \\&\quad {-}32 H_{-2,2}{-}8 \pi ^2 H_{-1,-1}\nonumber \\&\quad +12 \pi ^2 H_{-1,0}-64 H_{-1,3}+32 H_{-2,-1,0}\nonumber \\&\quad -64 H_{-2,0,0}+32 H_{-1,-2,0}+32 H_{-1,-1,2}-32 H_{-1,2,0}\nonumber \\&\quad -32 H_{-1,2,1}-32 H_{-1,-1,-1,0}+64 H_{-1,-1,0,0}\nonumber \\&\quad -80 H_{-1,0,0,0}+56 H_{-1} \zeta (3)\Bigg ) . \end{aligned}$$
(2.51)

Computer-readable expressions for all partonic beam functions and matching coefficients can be found in an ancillary file provided with this submission. We check the results for all matching coefficients against the \({\mathcal {O}}{(\epsilon ^0)}\) results in Refs. [1, 2] and find full agreement. We discuss the calculation of the soft function in the next section.

3 Calculation of the soft function

In this section we describe the calculation of the bare zero-jettiness soft function S at NNLO in QCD. We begin by discussing the general setup in Sect. 3.1, relating the calculation of the soft function to soft limits of QCD amplitudes for color singlet production. We re-write step functions, that originate from the zero-jettiness measure, as integrals of delta functions over auxillary parameters. We then use reverse unitarity to express the soft function through master integrals. In Sect. 3.2 we describe the calculation of master integrals as functions of the auxillary parameters and explain in Sect. 3.3 how the remaining integrations over auxillary parameters can be performed.

3.1 General setup

The zero-jettiness bare soft function can be calculated by considering soft limits of scattering amplitudes for colour singlet production. These soft limits, described by eikonal functions, were calculated through NNLO QCD in Refs. [30, 31]. We extract them from that reference and integrate the obtained expression over the m-particle unresolved phase space \(\hbox {d}^{}\text {PS}_S^{(m)}\) including the m-particle zero-jettiness measure \(M_m\) for the set of radiated partons \(\{m\}\) with momenta \(k_m\).

We begin by writing the bare soft function as a series in the bare strong coupling constant

$$\begin{aligned} S&=\sum _{i=0}^n [\alpha _s]^i S^{(i)}, \end{aligned}$$
(3.1)

where we defined

$$\begin{aligned} {[\alpha _s]}=\frac{g_{b,s}^2}{8 \pi ^2} \frac{(4 \pi )^\epsilon }{\Gamma (1-\epsilon )}. \end{aligned}$$
(3.2)

The lower order results read

$$\begin{aligned} S^{(0)}&=\delta (\tau ), S^{(1)}=4 \ C_a \frac{\tau ^{-1-2 \epsilon }}{\epsilon }, \end{aligned}$$
(3.3)

where \(C_a=C_F(C_A)\) if the incoming particles are quarks(gluons), respectively. At NNLO we need to consider the following contributions to the soft function

$$\begin{aligned} S^{(2)}&= \int \hbox {d}^{}\text {PS}_S^{(1)} \ M_1 \ \xi ^{(2)}_{g}{+}\frac{1}{2!}\int \hbox {d}^{}\text {PS}_S^{(2)} \ M_2 \ \xi ^{(2)}_{gg}{+}\int \hbox {d}^{}\text {PS}_S^{(2)} \ M_2 \ \xi ^{(2)}_{q{\bar{q}}},\nonumber \\&= S^{(2)}_{g}+S^{(2)}_{gg}+S^{(2)}_{q{\bar{q}}}, \end{aligned}$$
(3.4)

where the functions \(\xi ^{(2)}_{g,q{\bar{q}},gg}\) denote various eikonal functions and for \(m=1,2\) we introduced the short-hand notation

$$\begin{aligned} \hbox {d}^{}\mathrm {PS}_S^{(m)}=\left( \frac{8 \pi ^2 \ \Gamma (1-\epsilon )}{(4 \pi )^\epsilon } \right) ^{2}\prod _n^m \frac{\hbox {d}^{d}{k_n}}{{(2 \pi )}^{d-1}} \ \delta ^+ \left( k_n^2 \right) . \end{aligned}$$
(3.5)

The first term in Eq. (3.4) describes the emission of one real gluon and an additional loop correction. The second and third terms in Eq. (3.4) describe the emission of two gluons and the emission of a quark anti-quark pair, respectively. The single gluon emission contribution \(S^{(2)}_{g}\) has been calculated to arbitrary order in \(\epsilon \) in Ref. [4]. It reads

$$\begin{aligned} S^{(2)}_{g}=-2 C_a C_A \frac{ \Gamma (1-\epsilon )^5 \Gamma (1+\epsilon )^3}{\Gamma (1-2 \epsilon )^2 \Gamma (1+2 \epsilon )} \frac{\tau ^{-1-4 \epsilon }}{\epsilon ^3 }, \end{aligned}$$
(3.6)

and we thus focus on the double-real emission pieces.

The zero-jettiness measure for two real partons reads [4]

$$\begin{aligned} M_2&= [ \delta \left( \tau - 2 p\cdot k_1 - 2 p \cdot k_2 \right) \theta \left( 2 {\bar{p}} \cdot k_1 - 2 p\cdot k_1 \right) \nonumber \\&\quad \times \theta \left( 2 {\bar{p}} \cdot k_2 - 2 p \cdot k_2 \right) + \left( p^{\mu } \leftrightarrow {\bar{p}}^{\mu }\right) \nonumber \\&\quad + \ \delta \left( \tau - 2 {\bar{p}}\cdot k_1 - 2 p \cdot k_2 \right) \theta \left( 2 p \cdot k_1 - 2 {\bar{p}}\cdot k_1 \right) \theta \nonumber \\&\quad \times \theta \left( 2 {\bar{p}} \cdot k_2 - 2 p \cdot k_2 \right) + \left( p^{\mu } \leftrightarrow {\bar{p}}^{\mu }\right) ], \end{aligned}$$
(3.7)

where the momenta p and \({\bar{p}}\) are again two complementary light-like vectors and we set \(p \cdot {\bar{p}}=1/2\). We refer to different sets of delta functions and step functions in Eq. (3.7) as “configurations”. Since the integrands in Eq. (3.4) are invariant under exchange of p and \({\bar{p}}\), it is sufficient to only consider two configurations \(M_2=2 \ M_A+2 \ M_B\), which we refer to as A and B. Hence, we write

$$\begin{aligned} M_A(k_1,k_2)&=\delta \left( \tau {-} 2 p\cdot k_1 {-} 2 p \cdot k_2 \right) \theta \left( 2 {\bar{p}} \cdot k_1 {-} 2 p\cdot k_1 \right) \theta \nonumber \\&\quad \times \theta \left( 2 {\bar{p}} \cdot k_2 - 2 p \cdot k_2 \right) , \end{aligned}$$
(3.8)
$$\begin{aligned} M_B(k_1,k_2)&=\delta \left( \tau - 2 {\bar{p}}\cdot k_1 - 2 p \cdot k_2 \right) \theta \nonumber \\&\quad \times \theta \left( 2 p \cdot k_1 - 2 {\bar{p}}\cdot k_1 \right) \theta \left( 2 {\bar{p}} \cdot k_2 - 2 p \cdot k_2 \right) . \end{aligned}$$
(3.9)

For color-singlet production, the quantities \(\xi ^{(2)}_{q{\bar{q}}}\) and \(\xi ^{(2)}_{gg}\) in Eq. (3.4) can be found in Eq. (A1) and Eq. (A3) of Ref. [30]

$$\begin{aligned} \xi ^{(2)}_{q{\bar{q}}}&= \ T_F \ C_a \left( {\mathcal {T}}_{11} +{\mathcal {T}}_{22} -2 {\mathcal {T}}_{12} \right) , \end{aligned}$$
(3.10)
$$\begin{aligned} \xi ^{(2)}_{gg}&= C_a \ \left[ 4 \ C_a \ \xi _{12}(k_1) \ \xi _{12}(k_2)+ C_A \left( 2\xi _{12}-\xi _{11}-\xi _{22} \right) \right] , \end{aligned}$$
(3.11)

where

$$\begin{aligned} {\mathcal {T}}_{ij}&={-}\frac{2 (p_i \cdot p_j)(k_1 \cdot k_2){+}[p_i \cdot (k_1{-}k_2)][p_j\cdot (k_1{-}k_2)]}{2 (k_1 \cdot k_2)^2[p_i \cdot (k_1{+}k_2)][p_j \cdot (k_1{+}k_2)]}, \end{aligned}$$
(3.12)
$$\begin{aligned} \xi _{ij}&=\frac{(1-\epsilon )}{(k_1 \cdot k_2)^2}\frac{p_i \cdot k_1 \ p_j \cdot k_2 + p_j \cdot k_1 \ p_i \cdot k_2}{p_i \cdot (k_1 + k_2) \ p_j \cdot (k_1 + k_2)} \nonumber \\&\quad - \frac{(p_i \cdot p_j)^2}{2 p_i\cdot k_1 \ p_j \cdot k_2 \ p_i \cdot k_2 \ p_j \cdot k_1} \nonumber \\&\quad \times \left[ 2-\frac{p_i\cdot k_1 \ p_j \cdot k_2+p_i\cdot k_2 \ p_j \cdot k_1 }{p_i \cdot (k_1 + k_2) \ p_j \cdot (k_1 + k_2)} \right] \nonumber \\&\quad +\frac{p_i \cdot p_j}{2 k_1 \cdot k_2} \left[ \frac{2}{p_i \cdot k_1 \ p_j \cdot k_2} \right. \nonumber \\&\quad \left. + \frac{2}{p_j \cdot k_1 \ p_i \cdot k_2}\right. \nonumber \\&\quad - \left. \frac{1}{p_i\cdot (k_1+k_2) p_j \cdot (k_1+k_2)} \right. \nonumber \\&\quad \left. \times \left( 4 + \frac{\left( p_i \cdot k_1 \ p_j \cdot k_2+ p_i \cdot k_2 \ p_j \cdot k_1 \right) ^2}{p_i \cdot k_1 \ p_j \cdot k_2 \ p_i \cdot k_2 \ p_j\cdot k_1} \right) \right] , \end{aligned}$$
(3.13)
$$\begin{aligned} \xi _{ij}(k_1)&=\frac{p_i \cdot p_j}{(p_i\cdot k_1)(p_j \cdot k_1)}, \end{aligned}$$
(3.14)

with \(p_1=p\), \(p_2={\bar{p}}\).

We note that \(S^{(2)}_{q{\bar{q}}}\) and \(S^{(2)}_{gg}\) were obtained in Refs. [4, 5] by directly integrating \({\mathcal {T}}_{ij}\) and \(\xi _{ij}\) over the relevant phase space. We will discuss an alternative to this approach, that is in line with the beam function calculation discussed in Sect. 2. We hope that this approach can be extended to enable an \(\hbox {N}^3\hbox {LO}\) calculation of the zero-jettiness soft function.

To this end, we would like to employ reverse unitarity and IBP technology to simplify calculation of the soft function. To do so, we map step functions on to delta functions, using the following identity

$$\begin{aligned} \theta (b-a)=&\int _0^1 \hbox {d}^{}z \ \delta \left( z \ b - a \right) \ b , \end{aligned}$$
(3.15)

which holds for \(a,b \in [0,\infty )\). Since \(k_{1,2} \cdot p\), \(k_{1,2} \cdot {\bar{p}}\) \(\in [0,\infty )\), Eq. (3.15) is applicable. We therefore rewrite Eqs. (3.8) and (3.9) as follows

$$\begin{aligned} M_A&=\delta \left( \tau - 2 p\cdot k_1 - 2 p \cdot k_2 \right) \theta \left( 2 {\bar{p}} \cdot k_1 - 2 p\cdot k_1 \right) \nonumber \\&\quad \times \theta \left( 2 {\bar{p}} \cdot k_2 - 2 p \cdot k_2 \right) \nonumber \\&= \int _0^1 \hbox {d}^{}z_1 \int _0^1 \hbox {d}^{}z_2 \ \delta \left( \tau - 2 p\cdot k_1 - 2 p \cdot k_2 \right) \delta \nonumber \\&\quad \times \theta \left( 2 z_1 {\bar{p}} \cdot k_1 - 2 p\cdot k_1 \right) 2 {\bar{p}} \cdot k_1 \nonumber \\&\quad \times \theta \delta \left( 2 z_2 {\bar{p}} \cdot k_2 - 2 p \cdot k_2 \right) 2 {\bar{p}} \cdot k_2, \end{aligned}$$
(3.16)
$$\begin{aligned} M_B&=\delta \left( \tau - 2 {{\bar{p}}}\cdot k_1 - 2 p \cdot k_2 \right) \theta \nonumber \\&\quad \times \theta \left( 2 p \cdot k_1 - 2 {{\bar{p}}}\cdot k_1 \right) \theta \left( 2 {\bar{p}} \cdot k_2 - 2 p \cdot k_2 \right) \nonumber \\&= \int _0^1 \hbox {d}^{}z_1 \int _0^1 \hbox {d}^{}z_2 \ \delta \left( \tau - 2 {{\bar{p}}}\cdot k_1 - 2 p \cdot k_2 \right) \delta \nonumber \\&\quad \times \theta \left( 2 z_1 p \cdot k_1 - 2 {{\bar{p}}}\cdot k_1 \right) 2 p \cdot k_1 \nonumber \\&\quad \times \delta \left( 2 z_2 {\bar{p}} \cdot k_2 - 2 p \cdot k_2 \right) 2 {\bar{p}} \cdot k_2. \end{aligned}$$
(3.17)

Equations (3.16) and (3.17), allow us to use reverse unitarity and IBP relations to express the soft function in terms of master integrals.

To illustrate this point, we discuss the computation of \(S_{q{\bar{q}}}^{(2)}\) in detail; the computation of \(S_{gg}^{(2)}\) is analogous. According to our earlier discussion, contributions to the soft functions due to an emission of a \(q{\bar{q}}\) pair read

$$\begin{aligned} S^{(2)}_{q{\bar{q}}}&=2 \int \hbox {d}^{}\text {PS}^{(2)}_S \ M_A \ \xi ^{(2)}_{q{\bar{q}}}+2 \int \hbox {d}^{}\text {PS}^{(2)}_S \ M_B \ \xi ^{(2)}_{q{\bar{q}}} \nonumber \\&= \ T_F \ C_a \ n_f \left( 2 \ S^{(2)}_{q{\bar{q}},A}+2 \ S^{(2)}_{q{\bar{q}},B}\right) . \end{aligned}$$
(3.18)

We note that we have split Eq. (3.18) into two contributions, stemming from configurations A and B. They read

$$\begin{aligned} S^{(2)}_{q{\bar{q}}, A,B}= \int \hbox {d}^{}\text {PS}^{(2)}_S\ M_{A,B} \left( {\mathcal {T}}_{11} +{\mathcal {T}}_{22} -2 {\mathcal {T}}_{12} \right) . \end{aligned}$$
(3.19)

We proceed by writing all delta functions in Eqs. (3.16) and (3.17) as linear combinations of the corresponding “propagators” and performing partial fractioning. We find that in configuration A all integrals can be mapped onto two integral families

$$\begin{aligned} I^{q{\bar{q}},1}_{n_1n_2}&= \Bigg \langle \left( p \cdot k_1 \right) ^{-n_1} \left( \ k_1 \cdot k_2 \right) ^{-n_2}\Bigg \rangle _{(1)}, \end{aligned}$$
(3.20)
$$\begin{aligned} I^{q{\bar{q}},3}_{n_1n_2}&= \left\langle \left( p\cdot k_1 - \frac{\tau z_1}{2 (z_1-z_2)}\right) ^{-n_1} \left( k_1 \cdot k_2 \right) ^{-n_2}\right\rangle _{(1)} , \end{aligned}$$
(3.21)

where for a given integrand f we write

$$\begin{aligned} \left\langle f \right\rangle _{(1)}&= \int \hbox {d}^{}\mathrm {PS}_S^{(2)}\ \delta \left( \tau - 2 p \cdot k_1 - 2p\cdot k_2 \right) \nonumber \\&\quad \times \delta (2 p\cdot k_1 - z_1 2 {{\bar{p}}} \cdot k_1 ) \delta ( 2 p\cdot k_2 - z_2 2 {{\bar{p}}} \cdot k_2 ) \; f. \end{aligned}$$
(3.22)

We perform the IBP reduction using FIRE [36] and obtain the following master integrals

$$\begin{aligned}&I^{q{\bar{q}},3}_{00}=\left\langle 1 \right\rangle _{(1)},\nonumber \\&I^{q{\bar{q}},3}_{10}=\left\langle \left( p \cdot k_1 - \frac{\tau z_1 }{2 (z_1 - z_2)} \right) ^{-1}\right\rangle _{(1)}, \nonumber \\&I^{q{\bar{q}},3}_{01}=\left\langle \left( k_1 \cdot k_2\right) ^{-1}\right\rangle _{(1)},\nonumber \\&I^{q{\bar{q}},3}_{11}=\left\langle \left( p \cdot k_1 - \frac{\tau z_1 }{2 (z_1 - z_2)} \right) ^{-1} \left( k_1 \cdot k_2\right) ^{-1}\right\rangle _{(1)}. \end{aligned}$$
(3.23)

For configuration B, we obtain two integral families

$$\begin{aligned} I^{q{\bar{q}},2}_{n_1n_2}&= \left\langle \left( p\cdot k_1 + \frac{\tau z_1}{2 (1-z_1)} \right) ^{-n_1} \left( k_1 \cdot k_2 \right) ^{-n_2}\right\rangle _{(2)}, \end{aligned}$$
(3.24)
$$\begin{aligned} I^{q{\bar{q}},4}_{n_1n_2}&= \left\langle \left( p\cdot k_1 -\frac{\tau }{2 (1-z_2)} \right) ^{-n_1} \left( k_1 \cdot k_2 \right) ^{-n_2}\right\rangle _{(2)}, \end{aligned}$$
(3.25)

that are mapped on the following master integrals

$$\begin{aligned}&I^{q{\bar{q}},2}_{00}=\left\langle 1\right\rangle _{(2)},\nonumber \\&I^{q{\bar{q}},2}_{10}=\left\langle \left( p\cdot k_1 + \frac{\tau z_1 }{2 (1 - z_1)} \right) ^{-1}\right\rangle _{(2)},\nonumber \\&I^{q{\bar{q}},2}_{01}=\left\langle \left( k_1 \cdot k_2 \right) ^{-1}\right\rangle _{(2)},\nonumber \\&I^{q{\bar{q}},2}_{11}=\left\langle \left( p \cdot k_1 + \frac{\tau z_1 }{2 (1 - z_1)} \right) ^{-1} \left( k_1 \cdot k_2\right) ^{-1}\right\rangle _{(2)}, \nonumber \\&I^{q{\bar{q}},4}_{10}=\left\langle \left( p\cdot k_1 - \frac{\tau }{2 (1 - z_2)} \right) ^{-1}\right\rangle _{(2)},\nonumber \\&I^{q{\bar{q}}.4}_{11}=\left\langle \left( p \cdot k_1 - \frac{\tau }{2 (1 - z_2)} \right) ^{-1} \left( k_1\cdot k_2\right) ^{-1}\right\rangle _{(2)}. \end{aligned}$$
(3.26)

In Eq. (3.24)–(3.26) we used

$$\begin{aligned} \left\langle f \right\rangle _{(2)}&=\int \hbox {d}^{}\mathrm {PS}_S^{(2)} \ \delta (\tau - 2 {{\bar{p}}}\cdot k_1 - 2 p\cdot k_2) \nonumber \\&\quad \times \delta ( 2 {{\bar{p}}} \cdot k_1 - z_1 2 p \cdot k_1) \ \delta ( 2p\cdot k_2 - z_2 2 {{\bar{p}}} \cdot k_2 ) \; f. \end{aligned}$$
(3.27)

We describe the calculation of the master integrals in the next section.

3.2 Master integrals

The master integrals shown in Eqs. (3.23) and (3.26) can be evaluated directly. When describing this calculation below, we will always assume that \(z_1 > z_2\) since all contributions to the soft function are symmetric with respect to \(z_1 \leftrightarrow z_2\) permutation.

To illustrate the simplicity of the computation, we discuss the calculation of the most complicated master integral. We provide explicit solutions to all other master integrals in Section A. We consider the master integral

$$\begin{aligned} I^{q{\bar{q}},3}_{11}&=\int \hbox {d}^{}\mathrm {PS}_S^{(2)}\ \delta \left( \tau - 2 p \cdot k_1 - 2p\cdot k_2 \right) \nonumber \\&\quad \times \delta (2 p\cdot k_1 - z_1 2 {{\bar{p}}} \cdot k_1 ) \ \delta ( 2 p\cdot k_2 - z_2 2 {{\bar{p}}} \cdot k_2 ) \nonumber \\&\quad \times \left( p \cdot k_1 - \frac{\tau z_1 }{2 (z_1 - z_2)} \right) ^{-1} \left( k_1 \cdot k_2\right) ^{-1}, \end{aligned}$$
(3.28)

The computation proceeds as follows. We begin by performing the Sudakov decomposition of the two light-like momenta \(k_{1,2}\)

$$\begin{aligned} k_{1,2} = \alpha _{1,2} \, p + \beta _{1,2} \, {{\bar{p}}} + k_{1,2\perp }. \end{aligned}$$
(3.29)

The integration measure \(\hbox {d}^{}\mathrm {PS}_S^{(2)}\) is then written as

$$\begin{aligned} {}\hbox {d}^{}\mathrm {PS}_S^{(2)} =\frac{\left[ \Omega ^{(d-2)}\right] ^{-2} }{4} \prod _{i=1}^{2} \mathrm{d} \alpha _i\ \mathrm{d} \beta _i\ [ \alpha _i \beta _i ]^{-\epsilon } \mathrm{d} \Omega _i^{(d-2)}. \end{aligned}$$
(3.30)

Note that integrations over \(\alpha \) and \(\beta \) extend from zero to infinity with constraints imposed by \(\delta \)-functions. We write

$$\begin{aligned} I^{q {{\bar{q}}}, 3}_{11}&= \frac{\left[ \Omega ^{(d-2)}\right] ^{-2} }{4} 2 \int \prod _{i=1}^{2} \mathrm{d} \alpha _i \ \mathrm{d} \beta _i \nonumber \\&\quad \times \left[ \alpha _i \beta _i \right] ^{-\epsilon } \mathrm{d} \Omega _{i}^{(d-2)} \, \delta ( \tau - \beta _1 - \beta _2) \delta (\beta _1 - z_1 \alpha _1)\nonumber \\&\quad \times \delta ( \beta _2 - z_2 \alpha _2)\left( \frac{\beta _1}{2} - \frac{\tau z_1}{ 2 (z_1 - z_2)} \right) ^{-1} \left( 2 k_1 \cdot k_2\right) ^{-1}. \end{aligned}$$
(3.31)

The angular integrations in Eq. (3.31) were discussed in Ref. [4]. The result reads

$$\begin{aligned}&\int \frac{\mathrm{d} \Omega _1^{(d-2)} \mathrm{d} \Omega _2^{(d-2)} }{2 k_1 \cdot k_2 } \nonumber \\&\quad = \frac{\left[ \Omega ^{(d-2)} \right] ^2 }{(\sqrt{\alpha _1 \beta _2} + \sqrt{\alpha _2 \beta _1} )^2} \nonumber \\&\qquad \times _2 {F_1} \left( 1,\frac{1}{2}-\epsilon ,1-2\epsilon ,\frac{4 \sqrt{\alpha _1 \alpha _2 \beta _1 \beta _2} }{ (\sqrt{\alpha _1 \beta _2} + \sqrt{\alpha _2 \beta _1} )^2 }\right) . \end{aligned}$$
(3.32)

Because of the delta functions in Eq. (3.31), we need Eq. (3.32) for \(\alpha _i = \beta _i/z_i\). It becomes

$$\begin{aligned}&\int \frac{\mathrm{d} \Omega _1^{(d-2)} \mathrm{d} \Omega _2^{(d-2)} }{2 k_1 \cdot k_2 } \left| _{\alpha _i \rightarrow \frac{\beta _i}{z_i}} \right. \nonumber \\&\quad = \frac{\left[ \Omega ^{(d-2)} \right] ^2 z_1 z_2 }{ \beta _1 \beta _2 (\sqrt{z_1} + \sqrt{z_2} )^2} \nonumber \\&\qquad \times _2F_{1} \left( 1,\frac{1}{2}-\epsilon ,1-2\epsilon ,\frac{4 \sqrt{z_1 z_2} }{ (\sqrt{z_1} + \sqrt{z_2} )^2 }\right) \nonumber \\&\quad = \frac{\left[ \Omega ^{\times (d-2)} \right] ^2 z_2 }{ \beta _1 \beta _2 \left( 1 + \sqrt{\frac{z_2}{z_1} } \right) ^2} \nonumber \\&\qquad \times \ _2F_{1} \left( 1,\frac{1}{2}-\epsilon ,1-2\epsilon ,\frac{4 \sqrt{z_2/z_1} }{ (1+ \sqrt{z_2/z_1} )^2 }\right) . \end{aligned}$$
(3.33)

The hypergeometric function can be simplified using the following identity

$$\begin{aligned}&_2F_{1} \left( 1,\frac{1}{2}-\epsilon ,1-2\epsilon ,\frac{4 z }{ (1+ z )^2 }\right) \nonumber \\&\quad = (1+z)^2 \ _2F_{1}\left( 1, 1+ \epsilon , 1-\epsilon , z^2 \right) , \end{aligned}$$
(3.34)

which is valid for \(|z| < 1\). Since we work in the region where \(z_2 < z_1\), we can immediately use Eq. (3.34) to simplify Eq. (3.33). We obtain

$$\begin{aligned}&\int \frac{\mathrm{d} \Omega _1^{(d-2)} \mathrm{d} \Omega _2^{(d-2)} }{2 k_1 \cdot k_2 } \left| _{\alpha _i \rightarrow \frac{\beta _i}{z_i}} \right. \nonumber \\&\quad = \frac{\left[ \Omega ^{(d-2)} \right] ^2 z_2 }{ \beta _1 \beta _2} \ _2F_{1} \left( 1,1+\epsilon ,1-\epsilon ,\frac{z_2}{z_1} \right) . \end{aligned}$$
(3.35)

Remarkably, the hypergeometric function in Eq. (3.35) is independent of the parameters \(\alpha _i\) and \(\beta _i\), allowing for a straightforward integration. We substitute Eqs. (3.35) back into (3.31), integrate over \(\alpha _1\), \(\alpha _2\), \(\beta _2\) and change the integration variable \(\beta _1 \rightarrow \beta _1^\prime =\beta _1/\tau \). We find

$$\begin{aligned} I^{q {{\bar{q}}}, 3}_{11}&= -\frac{ \tau ^{-2-4\epsilon }}{(z_1 z_2)^{1-\epsilon }} z_2 \ _2F_{1}\left( 1,1+\epsilon ,1-\epsilon , \frac{z_2}{z_1} \right) \nonumber \\&\quad \times \frac{(z_1 - z_2)}{z_1} \int \limits _{0}^{1} \mathrm{d} \beta _1^\prime \frac{ \left( \beta ^\prime _1 (1-\beta ^\prime _1) \right) ^{-2\epsilon - 1} }{1 - \frac{z_1-z_2}{z_1}\beta _1^\prime }. \end{aligned}$$
(3.36)

Upon integrating over \(\beta ^\prime _1\), we obtain the following result for the most complicated of the nine master integrals needed to describe the NNLO soft function

$$\begin{aligned} I^{q {{\bar{q}}}, 3}_{11}&= -\frac{\tau ^{-2-4\epsilon }}{(z_1 z_2)^{1-\epsilon }} \frac{\Gamma ^2(-2\epsilon )}{\Gamma (-4\epsilon ) } z_2 \frac{z_1 - z_2 }{z_1 }\nonumber \\&\qquad \times \ _2F_{1}\left( 1,1+\epsilon ,1-\epsilon , \frac{z_2}{z_1} \right) \nonumber \\&\qquad \times \ _2F_{1} \left( 1, -2\epsilon , -4 \epsilon , \frac{z_1-z_2}{z_1} \right) . \end{aligned}$$
(3.37)

A complete list of master integrals can be found in Section A. We note that for the gluon emission contribution \(S^{(2)}_{gg}\) no further master integrals are required.

This concludes our discussion of the evaluation of master integrals. We discuss the remaining integration over the auxillary parameters \(z_{1,2}\) in the next section.

3.3 Integration over auxillary parameters

We express the double-real contributions in terms of master integrals and write \(S^{(2)}_{q{\bar{q}}, A}\) as follows

$$\begin{aligned}&S^{(2)}_{q{\bar{q}}, A}=2\int _0^1 \hbox {d}^{}z_1 \int _0^{z_1} \hbox {d}^{}z_2 \bigg [ \frac{32 \epsilon (2 \epsilon -1) z_1 z_2 }{\tau ^2 ( z_1- z_2)^2}\; I^{q{\bar{q}},3}_{00}\nonumber \\&+\frac{8 \epsilon (2 \epsilon -1) z_1 z_2 ( z_1+ z_2) }{\tau ( z_1- z_2)^3}\; I^{q{\bar{q}},3}_{10} \nonumber \\&+\frac{8 ( z_1{+} z_2) \left( 16 \epsilon ^3 z_1 z_2{-} \epsilon ^2 ( z_1{+} z_2)^2{+} \epsilon \left( z_1^2{-}6 z_1 z_2{+} z_2^2\right) {+}z_1 z_2\right) }{(4 \epsilon -1) ( z_1- z_2)^4}\; I^{q{\bar{q}},3}_{01} \nonumber \\&+\frac{8 \tau z_1 z_2 \left( \epsilon ^2 ( z_1+ z_2)^2-z_1 z_2\right) }{( z_1- z_2)^5}\; I^{q{\bar{q}},3}_{11} \bigg ]. \end{aligned}$$
(3.38)

It appears that upon substituting solutions for the master integrals Eqs. (A.1)–(A.4) into (3.38), we will have to perform non-trivial integrations over \(z_1\) and \(z_2\). However, after changing variables \(z_2=t \ z_1\), the \(z_1\) integration factors out. The remaining t integration seems to include terms that are proportional to \((1-t)^{-4}\). However, upon taking the limit \(t \rightarrow 1\) we find that the most singular term actually scales like \((1-t)^{-1-2\epsilon }\) and, therefore, can be easily subtracted. We perform an endpoint subtraction at \(t=1\), expand the integrand in a Laurent series in \(\epsilon \) and compute the integral order by order in \(\epsilon \) with the help of HyperInt [43]. The final result reads

$$\begin{aligned} S^{(2)}_{q{\bar{q}}, A}&=\tau ^{-1-4\epsilon } \Bigg [-\frac{2}{3 \epsilon ^2}-\frac{10}{9 \epsilon }-\frac{38}{27}-\frac{2 \pi ^2}{9}\nonumber \\&\quad +\epsilon \left( -\frac{16 \zeta (3)}{3}-\frac{238}{81}-\frac{10 \pi ^2}{27}\right) \nonumber \\&\quad +\epsilon ^2 \left( -\frac{80 \zeta (3)}{9}-\frac{962}{243}-\frac{92 \pi ^2}{81}-\frac{8 \pi ^4}{45}\right) \nonumber \\&\quad +\epsilon ^3 \left( -\frac{736 \zeta (3)}{27}+\frac{104 \pi ^2 \zeta (3)}{9}-168 \zeta (5)\right. \nonumber \\&\quad \left. +\frac{4394}{729}-\frac{832 \pi ^2}{243}-\frac{8 \pi ^4}{27}\right) +{\mathcal {O}}{(\epsilon ^4)} \Bigg ] . \end{aligned}$$
(3.39)

The physical meaning of the auxillary variables \(z_1\) and \(z_2\) can be understood by considering the Sudakov decomposition of \(k_{1,2}\). The singularity at \(z_1=z_2\) describes the limit were the quark and the anti-quark become collinear to each other, while the \(z_1=0\), singularity describes the kinematic configuration in which the gluon, that emits the \(q{\bar{q}}\) pair, becomes collinear to the light-like directions \(p^\mu \). The \(\tau \rightarrow 0\) limit controls the double-soft divergence.

Next, we discuss the contribution \(S^{(2)}_{q{\bar{q}}, B}\) that describes the emission of a \(q{\bar{q}}\) pair in configuration B. Written in terms of master integrals, this contribution reads

$$\begin{aligned} S^{(2)}_{q{\bar{q}}, B}&=2\int _0^1 \hbox {d}^{}z_1 \int _0^{z_1} \hbox {d}^{}z_2 \Bigg [\frac{32 \epsilon (4 \epsilon -1) z_1 z_2}{\tau ^2 (z_1 z_2-1)^2}\; I^{q{\bar{q}},2}_{00} \nonumber \\&\quad -\frac{8 \tau z_2 \left( \epsilon ^2 (z_2{+}1) \left( z_1^2 z_2^2{-}1\right) {+}\epsilon (z_1{-}1) z_2 (z_1 z_2{+}1){-}z_1 (z_2{-}1) z_2\right) }{(z_2{-}1)^3 (z_1 z_2{-}1)^3}\;I^{q{\bar{q}},4}_{11} \nonumber \\&\quad + \Bigg (\frac{16 z_1 z_2 (z_1 (-z_2)+z_1+z_2-1)}{(z_1-1)^2 (z_2-1)^2 (z_1 z_2-1)^2} \nonumber \\&\quad +\epsilon \frac{8 \left( z_1^3 ({-}(z_2{-}3)) z_2^2{+}z_1^2 z_2 \left( 3 z_2^2{-}11 z_2{+}6\right) {+}z_1 \left( 6 z_2^2{-}11 z_2{+}3\right) {+}3 z_2{-}1\right) }{(z_1{-}1)^2 (z_2-1)^2 (z_1 z_2-1)^2} \nonumber \\&\quad +\epsilon ^2 \frac{32 \left( z_1^3 z_2^2+z_1^2 z_2 \left( z_2^2-4 z_2+2\right) +z_1 \left( 2 z_2^2-4 z_2+1\right) +z_2\right) }{(z_1-1)^2 (z_2-1)^2 (z_1 z_2-1)^2} \Bigg )\; I^{q{\bar{q}},2}_{01} \nonumber \\&\quad +\frac{8 \tau z_1 \left( \epsilon z_1^2 z_2^2 (\epsilon z_1+\epsilon +1){-}(\epsilon {+}1) (z_1{-}1) z_1 z_2{-}\epsilon (\epsilon z_1{+}\epsilon {+}z_1)\right) }{(z_1-1)^3 (z_1 z_2-1)^3}\;I^{q{\bar{q}},2}_{11} \nonumber \\&\quad +\frac{8 \epsilon z_1 z_2 (2 \epsilon (z_1+1) (z_1 z_2-1)-(z_1-1) (z_1 z_2+1))}{\tau (z_1-1) (z_1 z_2-1)^3}\;I^{q{\bar{q}},2}_{10} \nonumber \\&\quad -\frac{8 \epsilon z_1 z_2 (2 \epsilon (z_2+1) (z_1 z_2-1)-(z_2-1) (z_1 z_2+1))}{\tau (z_2-1) (z_1 z_2-1)^3}\;I^{q{\bar{q}},4}_{10} \Bigg ] . \end{aligned}$$
(3.40)

While the expression in Eq. (3.40) appears to be even more complicated than the one in Eq. (3.38), it is actually much simpler. This can be expected since, in configuration B, the quark and the anti-quark are emitted into different hemispheres. Thus both \(z_1=0\) and \(z_1=z_2\) (collinear) singularities should be absent. We therefore expect that we can simply expand the integrand in Eq. (3.40) in a Laurent series in \(\epsilon \) and integrate the result order by order in that expansion. This is indeed what happens. The final result reads

$$\begin{aligned} S^{(2)}_{q{\bar{q}}, B}&=\tau ^{-1-4\epsilon } \Bigg [ \frac{4 \pi ^2}{9}-\frac{2}{3}+\epsilon \left( \frac{56 \zeta (3)}{3}+\frac{22}{9}-\frac{32 \pi ^2}{27}\right) \nonumber \\&\quad +\epsilon ^2 \left( -\frac{448 \zeta (3)}{9}+\frac{226}{27}+\frac{172 \pi ^2}{81}+\frac{34 \pi ^4}{45}\right) \nonumber \\&\quad +\epsilon ^3 \left( \frac{2480 \zeta (3)}{27}-\frac{88 \pi ^2 \zeta (3)}{3}+\frac{1640 \zeta (5)}{3}\right. \nonumber \\&\quad \left. +\frac{1438}{81}-\frac{668 \pi ^2}{243}-\frac{272 \pi ^4}{135}\right) +{\mathcal {O}}{(\epsilon ^4)} \Bigg ]. \end{aligned}$$
(3.41)

The calculation of terms in \(S_{gg}^{(2)}\) proportional to \(C_a \ C_A\) can be performed in the same way. While the gluon emission amplitudes include an additional singular configuration compared to the \(q{\bar{q}}\) case, the \(z_{1,2}\) singularity structure remains unchanged. The additional “single-soft” divergence, which is absent in \(q{\bar{q}}\) emission, is accounted for by an additional factor \(\epsilon ^{-1}\) that originates from the IBP reduction, and thus the complexity of the \(z_{1,2}\) integrations remains unchanged. The remaining terms in \(S_{gg}^{(2)}\), proportional to \(C_a^2\), are fully determined by NLO contributions. We present our results for the soft function in the next section.

3.4 Results

We now present our final result for the bare soft function \(S^{(2)}\) through \({\mathcal {O}}{(\epsilon ^2)}\) at NNLO QCD. To this end, we write

$$\begin{aligned} S^{(2)}&=\tau ^{-1-4 \epsilon }\Bigg ( C_a^2 \ S^{(2)}_A + C_a T_Fn_f \ S^{(2)}_B +C_A C_a \ S^{(2)}_C\Bigg ) . \end{aligned}$$
(3.42)

The individual contributions shown in Eq. (3.42) read

$$\begin{aligned} S^{(2)}_A&= -\frac{8}{\epsilon ^3}+\frac{16 \pi ^2}{3 \epsilon }+128 \zeta (3)+ \epsilon \frac{16 \pi ^4}{5}\nonumber \\&\quad +\epsilon ^2 \left( 1536 \zeta (5)-\frac{256 \pi ^2 \zeta (3)}{3}\right) \nonumber \\&\quad + \epsilon ^3 \left( \frac{2528 \pi ^6}{945}-1024 \zeta (3)^2 \right) , \end{aligned}$$
(3.43)
$$\begin{aligned} S^{(2)}_B&=-\frac{4}{3 \epsilon ^2}{-}\frac{20}{9 \epsilon }{+}\frac{4 \pi ^2}{9}-\frac{112}{27}{+}\epsilon \left( \frac{80 \zeta (3)}{3}{-}\frac{80}{81}{-}\frac{28 \pi ^2}{9}\right) \nonumber \\&\quad + \epsilon ^2 \left( -\frac{352 \zeta (3)}{3}+\frac{2144}{243}+\frac{160 \pi ^2}{81}+\frac{52 \pi ^4}{45} \right) \nonumber \\&\quad + \epsilon ^3 \left( \frac{3488 \zeta (3)}{27}-\frac{320 \pi ^2 \zeta (3)}{9}+\frac{2272 \zeta (5)}{3}\right. \nonumber \\&\quad \left. \, +\frac{34672}{729}-\frac{1000 \pi ^2}{81}-\frac{208 \pi ^4}{45}\right) , \end{aligned}$$
(3.44)
$$\begin{aligned} S^{(2)}_C&=\frac{11}{3 \epsilon ^2}+\frac{1}{\epsilon }\left( \frac{67}{9}-\frac{\pi ^2}{3} \right) -14 \zeta (3)+\frac{404}{27}-\frac{11 \pi ^2}{9}\nonumber \\&\quad +\epsilon \left( -\frac{220 \zeta (3)}{3}+\frac{2140}{81}+\frac{67 \pi ^2}{9}-\frac{49 \pi ^4}{90}\right) \nonumber \\&\quad +\epsilon ^2 \left( 268 \zeta (3)+\frac{8 \pi ^2 \zeta (3)}{3}-170 \zeta (5)\right. \nonumber \\&\quad \,\left. +\,\frac{12416}{243}-\frac{368 \pi ^2}{81}-\frac{143 \pi ^4}{45}\right) \nonumber \\&\quad +\epsilon ^3 \Biggl ({-}\frac{7864 \zeta (3)}{27}{+}\frac{880 \pi ^2 \zeta (3)}{9}{-}126 \zeta (3)^2{-}\frac{6248 \zeta (5)}{3}\nonumber \\&\quad +\frac{67528}{729}+\frac{2416 \pi ^2}{81}+\frac{469 \pi ^4}{45}-\frac{10 \pi ^6}{63} \Biggr ). \end{aligned}$$
(3.45)

We set \(C_a=C_F\), compare the result Eqs. (3.42)–(3.45) against the \({\mathcal {O}}{(\epsilon ^0)}\) results in Refs. [4, 5] and find full agreement. A computer-readable expression for the bare soft function Eq. (3.42) is contained in the ancillary file provided with this submission.

4 Conclusion

We computed all NNLO zero-jettiness beam functions and the soft function expanded through \({{\mathcal {O}}}(\epsilon ^2)\) using soft and collinear limits of QCD amplitudes, reverse unitarity and IBP relations. Our results provide one of the building blocks for calculating the \(\hbox {N}^3\hbox {LO}\) soft function and beam function matching coefficients; some results for the beam functions described here have already been used in Ref. [26].

While the \(\hbox {N}^3\hbox {LO}\) QCD computations of beam functions [26,27,28] are the first steps towards implementing zero-jettiness slicing to describe color-singlet production in hadron collisions, a significant amount of work remains to be done. Indeed, in addition to going beyond the large-\(N_c\) approximation other matching coefficients \(I_{q_i,g}\), \(I_{q_i,{\bar{q}}_j}\), \(I_{g,g}\) and \(I_{g,q_i}\) have to be calculated. Furthermore, the \(\hbox {N}^3\hbox {LO}\) zero-jettiness soft function is currently unknown. Since the computation of the soft function is complicated by step functions in the phase-space measure, it is important to understand how to connect it to modern computational methods that involve IBP reductions and differential equations. The method discussed in this paper is a first step in that direction.