Two-Loop Massive Quark Jet Functions in SCET

We calculate the $\mathcal O(\alpha_s^2)$ corrections to the primary massive quark jet functions in Soft-Collinear Effective Theory (SCET). They are an important ingredient in factorized predictions for inclusive jet mass cross sections initiated by massive quarks emerging from a hard interaction with smooth quark mass dependence. Due to the effects coming from the secondary production of massive quark-antiquark pairs there are two options to define the SCET jet function, which we call universal and mass mode jet functions. They are related to whether or not a soft mass mode (zero) bin subtraction is applied for the secondary massive quark contributions and differ in particular concerning the infrared behavior for vanishing quark mass. We advocate that a useful alternative to the common zero-bin subtraction concept is to define the SCET jet functions through subtractions related to collinear-soft matrix elements. This avoids the need to impose additional power counting arguments as required for zero-bin subtractions. We demonstrate how the two SCET jet function definitions may be used in the context of two recently developed factorization approaches to treat secondary massive quark effects. We clarify the relation between these approaches and in which way they are equivalent. Our two-loop calculation involves interesting technical subtleties related to spurious rapidity divergences and infrared regularization in the presence of massive quarks.


Introduction
Gaining higher precision in theoretical predictions for the production of massive quarks in hard particle collisions represents an important field of research in the context of the LHC as well as future colliders (see e.g. refs. [1][2][3]). Factorized predictions are of special relevance since they provide a separation of physical effects from different momentum scales for cases where the scale hierarchies are large, such as for kinematic edges or endpoint regions or when there are hierarchies between particle masses and dynamical scales. Once factorization is established for a given observable, it can be written as a product or a convolution of functions encoding the dynamics of particular phase space regions. The resulting factorization formulae (or theorems) provide an approximation in the limit where one can expand in the ratios of the hierarchical scales. This allows to sum large logarithms related to these scales and in addition may provide the basis for a field theoretic treatment of low-energy hadronization effects for processes dominated by the strong interaction. As such, factorization theorems provide important pieces of information that are not accessible directly in corresponding calculations obtained in fixed-order perturbation theory within full QCD. Factorization also entails that the various functions occurring in the factorization theorems frequently have a universal character and can be applied for different processes.
For the description of the dynamics related to energetic radiation that is emitted collinearly to a quark produced at high energy, the so-called quark jet function is an essential ingredient in factorization theorems for a variety of processes where the inclusive invariant mass of all the collinear radiation (including the energetic quark) enters. The quark jet function was first introduced in the context of the factorization framework of the Soft-Collinear Effective Theory (SCET) [4][5][6] for the theoretical description of inclusive semileptonic or radiative B meson decays in the kinematic regions where the produced hadrons form a jet. For the case of massless quarks the jet function is defined as a non-local correlation function of two SCET massless quark jet fields. It was calculated at O(α s ) and O(α 2 s ) in refs. [7] and [8], respectively, and recently also the O(α 3 s ) corrections became available in ref. [9]. These results are applicable for the treatment of light quarks but can also be applied for massive quarks as long as the jet invariant mass p 2 is much larger than the quark mass m, i.e. p 2 m 2 , and the associated mass corrections are negligible. When quark mass effects are considered, it is useful to distinguish two types of mass effects. One is related to the quark produced by the hard interaction and which initiates the jet, called primary, and the other is related to quark-antiquark vacuum polarization effects, called secondary. Interestingly, primary as well as secondary quark mass effects introduce new kinds of subtleties.
For an inclusive jet initiated by a primary heavy quark and with invariant mass p 2 , two kinematic regions where quark mass effects are important emerge: p 2 ∼ p 2 − m 2 ∼ m 2 and p 2 − m 2 m 2 ≈ p 2 . The region p 2 ∼ p 2 − m 2 ∼ m 2 , called SCET region, is relevant for processes where the jet invariant mass is close to the primary quark mass m but is also allowed to fluctuate at the same level. The corresponding jet function(s) can be formulated with SCET massive collinear quark jet fields and require that the massless quark SCET formalism is extended to account for mass effects modifying the propagation and interactions of collinear quarks [10][11][12]. Jet functions of this kind are therefore called SCET jet functions. In the context of bottom and charm quark production in hard collisions the SCET regime p 2 ∼ p 2 − m 2 ∼ m 2 is essentially the only one that can ever arise in practical applications where quark mass effects are important due to the sizable momentum smearing coming from non-perturbative effects [13]. The region p 2 − m 2 m 2 ≈ p 2 , also called bHQET limit or heavy quark limit, is relevant for processes where the jet invariant mass is very close to the primary quark mass m and only allowed to fluctuate at a scale much smaller than m. Here, the SCET description does not provide a full separation of all dynamical effects becausê s ≡ (p 2 −m 2 )/m m ≈ p 2 emerges as a new relevant scale. This separation is achieved in the context of boosted Heavy Quark Effective Theory (bHQET) where the corresponding collinear SCET sector is matched on a theory containing a super-heavy quark with its small offshell field component being integrated out [12,14]. Jet functions of this kind are therefore called bHQET jet functions. In practice, the bHQET limit p 2 − m 2 m 2 ≈ p 2 can only arise in the context of top quark production due to the large size of the top quark mass. Here, scales below the top quark mass may be resolved and not smeared out by hadronization effects [13,15]. 1 The bHQET regime is particularly important for the theoretical understanding of top quark mass determinations from observables tied to kinematic regions with top invariant masses close to the reconstructed top quark resonance [16,19,20]. The O(α s ) primary massive quark SCET and the bHQET jet functions were calculated in ref. [14]. The O(α 2 s ) corrections to the bHQET jet function were computed in ref. [21].
Secondary massive quark effects in a jet function occur at O(α 2 s ) (NNLO) in the fixedorder expansion and thus only become relevant in high precision predictions. Their treatment in a factorization approach that separates collinear and soft quantum fluctuations, however, inevitably leads to SCET II -type rapidity singularities and associated large logarithms in factorization theorems for physical cross sections [22]. These large logarithms contribute at the next-to leading logarithmic (NLL) order. They arise from modes of equal virtuality (i.e. invariant mass k 2 ∼ k + k − ∼ m 2 ) but widely separated rapidity (i.e. the size of the ratio k + /k − ), see e.g. ref. [23]. The treatment of these rapidity singularities in the context of jet functions is tied to the definition of jet functions being infrared finite (matching) functions describing collinear fluctuations with virtuality of order p 2 . Traditionally the required infrared (IR) subtractions are associated to so-called zero-bin subtractions [24] (that can be understood from the point of view of the SCET label formalism [6], where the collinear label momentum zero is removed as it may not be power-counted as containing collinear modes) or are simply ignored [8] (since frequently they are related to scaleless integrals that vanish identically in dimensional regularization). However, when secondary massive quark effects (or, conceptually equivalent, the exchange of massive gauge bosons [22]) are considered, these subtractions are associated to non-vanishing contributions that need to be computed and specified in a well-defined and systematic fashion. Here, the concept of a zero-bin subtraction gets tied up with the concept of a soft mass mode bin subtraction [22,25,26]. The O(α 2 s ) secondary massive quark corrections for the SCET jet function for primary massless quarks with imposing zero-bin as well as soft mass mode bin subtractions were calculated in ref. [26]. However, the difference between both types of subtractions makes the treatment of secondary quark mass effects subtle since the mass mode subtractions may or may not be associated to lower virtuality modes that are, depending on the application, located in separated phase space regions (i.e. having different power counting).
We propose that an alternative and in fact more transparent view is to associate the subtractions needed to define the jet functions to so-called collinear-soft matrix elements [27,28], an idea that was already explored in different contexts in refs. [29,30]. This leads to jet function results that agree with the results based on the zero-bin and mass mode bin subtraction concepts, but avoids the need to impose power counting arguments to determine whether a bin subtraction for a given diagram is relevant. Interestingly, there are two alternative ways to define the subtractions which entail two options to define jet functions, both of which differ analytically once secondary quark mass effects at O(α 2 s ) are accounted for. Both options differ in whether or not the collinear-soft matrix element used for subtractions accounts for secondary massive quark corrections. The former option leads to what we call "universal" jet functions which merge into the well known massless quark jet functions in the limit m → 0 and which were already introduced in refs. [26,31]. The latter option leads to what we call "mass mode" jet functions, which are divergent in the limit m → 0 and contain (universal) rapidity singularities. The mass mode jet functions are analogous to a corresponding definition for invariant mass dependent beam functions introduced in ref. [32]. Both types of jet functions are useful to gain a transparent view on the treatment of secondary massive quark effects and can be employed in practical applications. They are also useful to better understand the relation between the secondary massive quark factorization approaches provided in refs. [22,26,31] and in ref. [32] which lead to equivalent results. We stress that the concepts of the "universal" and the "mass mode" jet functions also applies to the analogous situation when the effects of massive (e.g. electroweak) gauge bosons are accounted for. This is because the structure of the relevant dynamical modes is equivalent [22]. For the exchange of massive gauge bosons, however, the mass effects arise already at O(α em ), α em being the electromagnetic coupling, which will be explored elsewhere. Furthermore, the same concepts can also be applied for invariant mass dependent beam functions [33].
The main aim of this paper is to present the O(α 2 s ) results (and some details of their computation) for the primary massive quark SCET jet functions. They represent important ingredients in factorization theorems for massive quark production within an inclusive jet where the massive quark is produced by the hard interaction and where the jet masses are similar in size to the mass of the quark. To illustrate the application of the universal and the mass mode jet functions we also discuss their role in the equivalent factorization approaches of refs. [22,26] and [32] using as an example the double differential hemisphere mass distribution in e + e − annihilation (for the hard production of a boosted massive quarkantiquark pair). This discussion also clarifies the relation between both approaches and furthermore emphasizes that a smooth dependence on the value of the quark mass m (in the sense that assumptions on the hierarchy of m with respect to the other physical scales are not mandatory) can be achieved with them. The latter issue was already fully accounted for in refs. [22,26,31] but not explored in ref. [32]. On the other hand, in ref. [32] a more systematic representation of the building blocks to sum virtuality and rapidity logarithms on an equal footing was provided.
The content of the paper is organized as follows. In section 2 we set up our notation and provide the definition of the universal and the mass mode SCET jet functions in the context of subtractions based on collinear-soft matrix elements. In section 3 we present our results for both SCET jet functions for massive primary quarks at O(α 2 s ) and show that (and in which way) the results are consistent with respect to available O(α 2 s ) results in the limit of massless quarks [8] and the bHQET limit [21]. The practical use of the jet functions in the context of the factorization approaches of refs. [22,26,31] and of ref. [32] is discussed in section 4 for the example of the double differential hemisphere mass distribution in e + e − annihilation. The discussion should be sufficient to illustrate how the jet functions can be used for other processes in the context of QCD as well as the electroweak theory. Here, we also show how both approaches, considered together, are useful to gain a clearer view on the summation of virtuality and rapidity logarithms, the structure of collinear and soft mass mode corrections and on how a smooth dependence on the quark mass m can be achieved in practical applications. Section 5 contains details of the calculations for the O(α 2 s ) corrections to the massive primary quark SCET jet functions. This section is self-contained and focuses on computational details because the calculations are involved and require specific methods for different types of diagrams that may be useful for similar future work. The readers not interested in these technical details may skip this section except for section 5.1 which summarizes the results for the jet-function and collinear-soft matrix elements with different infrared regulators. In section 6 we provide a brief numerical analysis of the universal primary massive quark SCET jet function at O(α 2 s ) in comparison to the corresponding known result in the massless quark and the bHQET limits. Finally, in section 7 we conclude. The paper also contains a number of appendices. In appendix A we provide the expressions for the universal and the mass mode jet functions at O(α 2 s ) for massless primary quarks for the sake of future use. The latter can be extracted from ref. [26] but was not given there. The massless limit of the non-distributional corrections of the primary massive SCET jet function is provided in appendix B, and a number of virtuality and rapidity anomalous dimensions used in the discussion of section 4 are collected in appendix C. Finally, in appendix D we provide the results for the two-loop master integrals needed for our calculations.

Jet Function Definitions and Notation
Quark jet functions in SCET are based on the vacuum correlator of two SCET jet fields, encoding the inclusive collinear dynamics of quark fields coherently accounting for the collinear gluon radiation from all other color sources of a process. We work in QCD with n massless quark flavors and one quark flavor Q with mass m. The SCET jet-function matrix element (ME) for a jet initiated by the primary quark f in light-like direction n µ ( n 2 = 1) is given by [5,12] We decompose four-vectors in lightcone components according to p µ = p − n µ /2 + p +nµ /2 + p µ ⊥ with n 2 =n 2 = 0,n·n = 2, and n·p ⊥ =n·p ⊥ = 0. The SCET label momentum operators P n and P n⊥ yield the sum of the large minus and perpendicular light-cone momentum labels of the fields on their right, respectively [6], whilep + is the momentum operator of the small plus momentum. The trace is over color (N c = 3) and spinor indices. The SCET jet fields where ξ n f (x) is the SCET primary quark field and the n-collinear Wilson line can be written as 3) The Wilson lines in eq. (2.1) encode the universal coherent dynamics of collinear gluons coming from other color sources, which are boosted in direction n = − n with respect to the direction of motion of the primary quark. They entail that the jet-function ME is gauge-invariant with respect to collinear gauge transformations [4]. After BPS field redefinition the collinear sectors of the (leading-order) SCET Lagrangian are equivalent to boosted versions of the QCD Lagrangian [4,5]. We can thus express the n-collinear jet-function ME also in terms of QCD quark fields as [8] with the corresponding QCD definition for the n-collinear Wilson line In eq. (2.4) we have reexpressed the jet-function ME as the imaginary part of a jet field correlator. Taking the imaginary part is equivalent to half the discontinuity w.r.t. s = p 2 − m 2 > 0. In practice, for the computation of the two-loop corrections it is more convenient to work with eq. (2.4) rather than with the corresponding SCET expression of eq. (2.1), because the QCD Feynman rules are simpler than the SCET Feynman rules and lead to less diagrams. In eqs. (2.1) and (2.4) the quark flavor index f stands for the flavor of the incoming primary quark and can either be one of the n massless quarks, generically referred to as q, or the massive quark Q. The argument m represents the dependence on the mass of quark Q and arises either from secondary Q effects (due to gluon splitting) if the primary quark is a massless flavor q or from primary and secondary Q effects. The superscript (n + 1) in eqs. (2.1) and (2.4) (and for ME definitions and factorization functions used throughout this paper) indicates that we consider the MEs in the context of QCD with n massless quarks and the massive quark Q. We stress, however, that here and throughout this work the superscript (n + 1) (or n ) on MEs or factorization functions does not automatically imply that also the corresponding flavor scheme for the MS strong coupling is used. The latter can in principle be chosen independently, particularly for renormalization scales µ close to the quark mass m. We therefore specify explicitly the flavor scheme of α s when we quote results parametrized by either α It is well known [12,14] that the jet-function ME J (n +1) f (p 2 , m 2 ) defined in eqs. (2.1) and (2.4) is per se not infrared-finite and commonly said to implicitly require as part of its definition zero-bin subtractions [24] to avoid double counting concerning the collinear overlap with softer or lower virtuality regions described by other functions in factorization theorems where the jet function appears. Alternatively, one can consider the jet function as an IR-finite matching function that describes fluctuations with virtualities p 2 − m 2 ∼ p 2 m 2 and that is defined by the jet-function ME J (n +1) f (p 2 , m 2 ) with additional (i.e. independent) ME subtractions related to (soft and possibly collinear) modes at smaller virtualities. So far in the literature the required subtractions, when they contributed nonvanishing terms, were implemented mostly via the zero-bin [12,14] or soft mass mode bin [22,26,34] prescriptions that are imposed by hand. However, from the point of view of being matching functions, the jet functions can also be defined in a conceptually more systematic way by explicitly dividing out fluctuations with momenta n·k = k + ∼ p 2 /Q and virtualities k 2 p 2 − m 2 in terms of a so-called collinear-soft ME. This also has the advantage that no additional power counting arguments are mandatory to identify which contributions have to be accounted for (and which not), as it is necessary when implementing a bin subtraction.
In case that all (n + 1) quarks are massless this results in the jet function definition Here S (n +1) ( , m) is the collinear-soft ME of our (n + 1) flavor theory (with n massless quarks q and one quark Q with mass m) and defined as 3 with the collinear-soft Wilson lines [27,28] X n (x) = perms exp −g n · P ν η/2 |n · P| η/2 n · A cs (x) , including the symmetric analytic rapidity regularization of ref. [23]. The inverse of the collinear-soft ME is defined by the convolution and we use the analogue relations for defining the inverse of all (factorization) functions depending on dynamical variables. The combination of MEs in eq. (2.6) yields the well known IR finite massless quark jet function at one [7], two [8] and three loops [9]. The analogous definition (with the appropriate color representation for the Wilson lines) can be applied also for the gluon jet function [35][36][37]. For (n + 1) massless quarks the subtraction of the low virtuality modes is from the purely computational point of view, however, not strictly mandatory for computations of the jet function when dimensional regularization for UV and IR divergences is used because then S (n +1) ( , 0) yields vanishing scaleless integrals beyond tree-level. On the other hand, when considering the quark Q having a finite mass m, S (n +1) ( , m) is not anymore scaleless and yields non-vanishing O(α 2 s C F T F ) contributions in dimensional regularization due to mass mode fluctuations with virtualities k 2 ∼ m 2 . We note that the mass mode contributions in the collinear-soft ME S (n +1) ( , m) are only related to secondary effects of the massive quark Q due to closed Q loops, so that it is the same for the jet functions for a massless and a massive primary quark.
Interestingly, secondary massive quark effects do not lead to IR divergences (as long as one does not take the massless limit) that must always be subtracted. It is therefore not mandatory to use the massive quark analogue of eq. (2.6) to define the jet function. This is also related to the emergence of rapidity singularities, which one may not associate to be of either UV or IR type and leads to two options to define the SCET jet function in the context of QCD with n massless flavors and one quark Q with mass m.
The first option is just the analogue of eq. (2.6) but with the (n + 1)st quark Q having mass m, is IR divergent for m → 0 and furthermore has rapidity singularities that are treated by rapidity renormalization. So upon renormalization, J mf,(n +1) f depends on the (virtuality) renormalization scale µ and in addition on the (rapidity) renormalization scale ν. Following the philosophy of the SCET jet function being a matching function describing the fluctuations with virtuality p 2 − m 2 ∼ p 2 , the jet function of eq. (2.11) is the natural option for the case where m 2 ∼ p 2 ∼ p 2 − m 2 , when the mass is not an IR scale. It has also been advocated for this scale hierarchy in ref. [32] (originally developed for the massless primary quark and invariant mass dependent beam function [38]). In the factorization approach of ref. [32] separate factorization theorems are formulated for each possible hierarchy of the mass scale m with respect to the other kinematic scales. The approach is not designed to provide smooth dependence on m, but is more economical (in the sense of being minimalistic) concerning the appearance of collinear and soft mass mode contributions so that no cancellations arise between them in the context of a factorization theorem. Furthermore, the collinear and soft mass mode contributions adopt the status of genuine factorization functions. The resulting structure of factorization theorems makes the structure of ν-evolution to sum rapidity logarithms particularly transparent as it appears at the same level as the virtuality µ-evolution. We call this the "mass mode factorization" approach and therefore give the jet function definition in eq. (2.11) the superscript "mf". In the following we call it the "mass mode jet function".
The difference between both MS-renormalized massive quark jet function definitions yields 4 S c ( , m, µ, ν) =n · p dp 2 J mf,(n +1) f ((n · p) − p 2 , m 2 , µ,n · p/ν) J uf,(n +1) f 12) and is called the "collinear-soft function" in ref. [32]. It is IR-finite for finite m and has a dependence on the virtuality and the rapidity renormalization scales µ and ν, respectively. In section 4 we illustrate the practical use of both types of jet functions and the two factorization approaches of refs. [22,26] and [32] exemplarily for the double differential hemisphere mass distribution in e + e − collisions for the hierarchies m 2 ∼ p 2 ∼ p 2 − m 2 and m 2 p 2 . We also stress that the form of the collinear-soft ME of eq. (2.7) and the two options of using either eq. (2.10) or eq. (2.11) for IR finite jet functions in the presence of massive quarks can also be applied in a fully equivalent way for invariant mass dependent beam functions [38] and the bHQET jet function [12,14]. 5 The approach also applies in an analogous way for the treatment of massive gauge bosons which is conceptually related to the issues of secondary quark mass effects as was discussed in [22].

Analytic Results: Primary Massive Quark SCET Jet Functions
In this section we present the analytic results for the O(α 2 s ) primary quark SCET jet functions. Details on the computation of the O(α 2 s ) corrections, which are all new, are given in section 5. We use the abbreviations for the strong coupling in the n f -flavor scheme and the squared jet function invariant mass p 2 , respectively, as well as for plus-distributions for a variable x having mass dimension λ, where µ is the common MS renormalization scale. They are defined such that The inverse jet function is defined in analogy to eq. (2.9). 5 In the context of bHQET [12,14] we refer to the situation that some of the n light flavors have finite masses smaller than the mass m of the primary HQET quark, but larger than the hadronization scale ΛQCD. The equivalence of the collinear-soft MEs (or the zero-bin subtractions) for SCET and bHQET is a consequence of a rescaling property of the bHQET and SCET soft gluon eikonal couplings that can e.g. be trivially seen from the structure of the zero-bin diagrams in both effective theories.
In the physical kinematic region we have 0 ≤ y,ȳ ≤ 1. Note that we also use the notation Q ≡ (n · p) = p − , (3.5) and that we carry out all computations in d = 4 − 2ε dimensions.

Mass Mode Jet Function
The result for the renormalized primary massive mass mode jet function J mf,(n +1) Q , defined in eq. (2.11), in the pole mass scheme at O(α 2 s ) can be written in the form J mf,(n +1) Q where we adopt the n flavor scheme for the strong coupling. This can be considered the natural scheme choice for the mass mode jet function since it matches directly to the bHQET jet function, see section 3.3. It is of course straightforward to switch to the (n + 1) flavor scheme using eq. (3.30). At O(α 2 s ) we distinguish between the corrections from diagrams containing only one single quark Q line (J (2) Q ) and those from diagrams containing the QQ vacuum polarization correction (J (2) Q,sec ). The mass mode jet function contains rapidity singularities from the QQ vacuum polarization diagrams which are renormalized following the approach of [23,39] and which lead to the dependence on the rapidity renormalization scale ν. For the prototypical application of the mass mode jet function within factorization theorems where all logarithms are resummed by explicit renormalization group evolution factors the natural choice for the rapidity renormalization scale is ν ∼ Q. This is indicated by the argument Q/ν. Throughout this paper we adopt this convention for the rapidity scale ν in an analogous way. In case the natural choice for ν is process (or factorization theorem) dependent, only ν appears as the argument.
The O(α s ) contribution accounting for terms up to O(ε 2 ) in order to maintain all information mandatory for O(α 2 s ) calculations reads Here, all distributional contributions are displayed explicitly and the non-distributional contributions are contained in the functions These functions do not contribute to the singular behavior in the bHQET limit s = p 2 − m 2 m 2 and thus represent power corrections in this kinematic region. They constitute the so-called O(α s ) bHQET non-singular corrections that are important for physical factorization predictions in the region s m 2 to achieve a smooth transition between bHQET and SCET factorization theorems [12,13]. For completeness we also quoted the s → 0 limit of the G 1 -functions. The ε → 0 limit of eq. (3.7) was already given in ref. [14], and we refer to this reference for pictures of the Feynman diagrams and details of the calculation. The determination of the O(ε) and O(ε 2 ) contributions is straightforward.
The O(α 2 s ) contributions arising from Feynman diagrams containing only one single quark Q line (see all diagrams in figure 1 with the diagrams (o)-(r) containing only massless quark bubbles) read The distributional contributions are again displayed explicitly. There are two sets of nondistributional contributions. One set (∝ Θ(p 2 − m 2 )) is related to terms that are nonvanishing above the one-particle cut and the other (∝ Θ(p 2 − (3m) 2 )) is related to terms that are non-vanishing above the three particle QQQ cut. Even though the term J 54ȳ Li 2 (−ȳ/y) − 3π 2ȳ + y 3y(5y + 18) + 107 − 212 The non-distributional contributions ∝ Θ(p 2 − m 2 ) coming from diagrams (b) and (c) in figure 1 could only be computed numerically for general values of p 2 and m 2 , and are parametrized by the fit function G fit which has the convenient form 6 With the values of the fitting parameters c ij quoted in eq. (3.17) the fit function G fit approximates the corresponding numerical results obtained in section 5.2.2 with a relative precision of better than 0.5%. Also accounting for the intrinsic uncertainty of the numerical results we reach an accuracy of at least 1% for G fit . Besides that we note that the contributions parametrized in the fit function account for less then 0.5% of the O(α 2 s ) corrections for all physical values of y = m 2 /p 2 . So for all practical purposes the uncertainties associated to G fit are negligible, and we did not quote uncertainties in eq. (3.17).
The O(α 2 s ) contributions arising from Feynman diagrams containing the QQ vacuum polarization subdiagrams (see diagrams (o)-(r) in figure 1 with only massive quark bubbles) read where again the distributional contributions are displayed explicitly. The dependence on the rapidity renormalization scale ν is displayed explicitly in terms of the logarithm log(Q/ν).
In the (n + 1) flavor scheme for the strong coupling the coefficient J (2),mf Q,sec is the only one that is modified: J The non-distributional contributions arise entirely from the three particle QQQ cut and its result reads s − 8 252y 9/2 + 570y 7/2 + 822y 5/2 + 118y 3/2 + 45y 5 + 357y 4 + 720y 3 + 524y 2 The non-distributional three particle QQQ cut contributions in J Q and J Q,sec involve the elliptic functions 22) and the integral functions which can be readily evaluated numerically. For related discussions see e.g. ref. [40]. In practical applications it is, however, useful to have an approximate representation of G (3Q) and G (3Q) sec involving only elementary functions. Such approximate representations are provided by + 9y log(9y) 9y They both approximate the exact expressions to better than 0.5% over the physical kinematic range and provide exact analytic results in the limit p 2 → 9m 2 and m → 0. We also quoted a fully numerical version of the expressions useful for practical applications.
In analogy to the non-distributional terms at O(α s ) the non-distributional G-functions at O(α 2 s ) do not contribute to the singular contributions in the bHQET limit s = p 2 −m 2 m 2 . They represent power corrections in this kinematic region and constitute the O(α 2 s ) bHQET non-singular corrections. For completeness we also quoted the respective results in the limit p 2 → m 2 (eqs. (3.12) -(3.14)) and in the limit p 2 → 9m 2 (eqs. (3.15) and (3.19)).
For completeness we also provide the result for the renormalized mass mode jet function J mf,(n +1) q (p 2 , m 2 , µ, Q/ν) for massless primary quarks in eq. (A.1), which can be extracted from the calculations in ref. [26], but was not given in the literature before. The µ (virtuality) and ν (rapidity) anomalous dimensions of the mass mode jet functions for massive and massless primary quarks agree identically.

Universal Jet Function
The result for the renormalized primary massive universal jet function J uf,(n +1) Q , defined in eq. (2.10), in the pole mass scheme at O(α 2 s ) can be written in the form where we adopt the (n + 1) flavor scheme for the strong coupling, which is the natural scheme choice for the universal jet function. The universal jet function does not contain rapidity divergences and thus only depends on the UV renormalization scale µ coming from Q and the O(α 2 s ) contribution from diagrams containing only one single quark Q line J (2) Q (see all diagrams in figure 1 with the diagrams (o)-(r) containing only massless quark bubbles) are identical to the mass mode jet function and given in eqs. (3.7) and (3.11), respectively.
The O(α 2 s ) contributions arising from Feynman diagrams containing the QQ vacuum polarization subdiagrams (see diagrams (o)-(r) in figure 1 containing only massive quark bubbles) read where again the distributional contributions are displayed explicitly. The non-distributional contributions come from the single heavy quark Q cut and from the three particle QQQ cut. The Q cut term is given in eq. (3.8) and arises from using the (n + 1) flavor scheme for the strong coupling. The QQQ cut term G (3Q) sec is given in eq. (3.19). The non-distributional G-functions represent power corrections in the bHQET limit s = p 2 −m 2 m 2 and represent O(α 2 s ) bHQET non-singular corrections. For completeness we also quoted the respective results in the limit p 2 → m 2 (eqs. (3.12) -(3.14)) and in the limit p 2 → 9m 2 (eqs. (3.15) and (3.19)).
For completeness we also quote the result for the renormalized universal jet function J uf,(n +1) q (p 2 , m 2 , µ) for primary massless quarks in eq. (A.6), which was computed in ref. [26]. The renormalization Z-factor as well as the µ (virtuality) anomalous dimension of of the universal jet functions (to all orders as well as for primary massive and massless quarks) agree with those of the well known massless quark jet functions [8].

Consistency Checks and Kinematic Limits
There are a number of essential consistency properties the O(α 2 s ) primary massive quark jet functions have to satisfy and which provide important consistency checks. These concern the relation between the mass mode and universal jet functions, the limit of massless quarks and the bHQET limit of a supermassive quark. We discuss them in the following.
As explained in section 2, the difference between the mass mode and the universal jet functions is related to the collinear-soft function S c [32] via eq. (2.12). Using the results of eqs. (3.6) and (3.27) and accounting for the result for the renormalized collinear-soft function determined in ref. [32], which in our notation has the form it is straightforward to check the validity of eq. (2.12). Here one has to account for the decoupling relation for (n + 1) massless quarks, see eq. (2.6), which at O(α 2 s ) was computed in ref. [8]. In the limit m → 0, the non-distributional Gfunctions also yield distributions and the corresponding limiting expressions are given in appendix B. Accounting for these results our expression for universal jet function correctly approaches the massless quark two-loop jet function for m → 0.
Finally, we discuss the bHQET limit s = p 2 − m 2 m 2 , the jet mass threshold region. Taking the double differential hemisphere jet mass distribution in e + e − annihilation (w.r.t. the thrust axis) as an example, one can consider the kinematic region where both jet masses are close to threshold. The corresponding factorization theorem for boosted top quarks (Q m) has the form [12,41] where M Q,Q stand for the hemisphere masses, σ 0 denotes the tree level cross section for is the hard function related to the matching of the QCD QQ current to the SCET massive quark dijet current at the scale Q and the term H m is the mass threshold hard function related to the matching of the SCET dijet current to the bHQET current at the scale m. The terms J (n ) B and S (n ) denote the bHQET jet function [12,21] and dijet soft function, respectively. The soft function S (n ) describes ultrasoft cross talk between the two jets at the scale s Q /Q. The bHQET jet function J (n ) B [12,21] describes the effects of the ultra-collinear radiation inside the jets (i.e. soft radiation in the rest frame of the massive quarks) at the scales s Q,Q /m and contain all the dynamical (ultra) collinear effects for s Q,Q m 2 . The mass threshold hard function H m (m, Q/m, µ) consists of n-collinear,n-collinear and soft mass mode contributions which can be written in factorized form as [41] Each of the collinear (n,n) and soft (s) mass mode factors depends on the rapidity renormalization scale ν. The natural scaling for the collinear factors is ν ∼ Q and for the soft factor it is ν ∼ m. They were calculated at O(α 2 s ) in ref. [41] (see eqs. (5.7) and (5.8) in ref. [41] and note that H m,n = H m,n for the symmetric regulator of ref. [23], see eq. (2.8)).
Up to power-suppressed (for s Q,Q m 2 ) and non-distributional contributions the factorization theorem in eq. (3.31) is also valid in the kinematic region s Q, Interestingly, in ref. [32] it was pointed out in the context of invariant mass dependent beam functions for exclusive Drell-Yan gauge boson production, that for this kinematic region the collinear-soft function S c describes dynamical fluctuations located in the same phase space region as those contained in the jet function. The most economical formulation (w.r.t. the number of factorization functions containing the dynamical effects of the collinear and soft mass mode contributions) for s Q,Q = p 2 Q,Q − m 2 ∼ m 2 ∼ p 2 is therefore the one where the contributions of the collinear-soft function are included in the definition of the (invariant mass dependent) beam function, which corresponds to the mass mode definition of eq. (2.11). For the double differential hemisphere jet function this implies that for s Q,Q = p 2 Q,Q − m 2 ∼ m 2 ∼ p 2 Q,Q one can formulate a factorization theorem of the form This in turn implies the relation between the primary massive quark mass mode jet function and the bHQET jet function up to non-singular terms integrable in p 2 at the threshold m 2 . Using the O(α 2 s ) results for the bHQET jet function (naturally given in the n -flavor scheme for α s ) in ref. [21] (see eq. (39)), the collinear mass mode hard functions H m,n in ref. [41] (see eq. (5.7)) and our result for the mass mode jet function in eq. (2.11), accounting for the fact that all G-functions are powersuppressed in the bHQET limit, it is straightforward to see that the relation in eq. (3.34) is indeed satisfied. As discussed in more detail in section 5.2.2, our calculations of the O(α 2 s ) corrections for the mass mode jet function provide a high precision semi-analytic check of eq. (3.34) as some loop integrals could only be determined by numerical methods. The relation (3.34) was then used as an input to analytically parametrize the jet functions result of eqs. (2.11) and (2.10).

Alternative Factorization Approaches and Practical Use
The non-trivial conceptual aspect of the O(α 2 s ) primary massive quark SCET jet function concerns the mass mode contribution due to secondary radiation. Since these are tied to corrections arising from collinear as well as soft phase space sectors with invariant masses of order the quark mass m, their treatment entails rapidity singularities (and the resummation of associated logarithms) within a SCET II type approach regardless of whether the observable is SCET I or SCET II . As already pointed out in section 2, in the literature two alternative factorization formulations to account for mass mode corrections have been advocated which are (or can be rendered) conceptually and phenomenologically equivalent due to consistency relations. We emphasize that none of these approaches may be considered superior to the respective other and, by emphasizing different and complementary aspects of the mass mode effects, together provide a thorough and comprehensive treatment and understanding from the conceptual as well as practical point of view.
In this section we discuss the relation between the approaches employing the mass mode and the universal jet functions for primary massive quarks and using the double differential hemisphere mass distribution already introduced in section 3.3 as an example. To keep the discussion brief we also restrict the discussion to the kinematic regions s 2 /Q 2 m 2 s ∼ p 2 Q 2 and s = p 2 − m 2 ∼ p 2 ∼ m 2 where the quark mass effects calculated in this paper are most relevant. We emphasize, however, that the discussion can be extended in a straightforward way to all kinematic situations and also to other types of factorization theorems where mass mode effects shall be treated (and where factorization functions other than jet functions arise).
The universal factorization approach of refs. [22,26,31,34] was devised with the motivation to obtain universal hard, jet and soft functions defined such that they can smoothly cover all possible choices for the quark mass m in the context of the strict hierarchy s 2 /Q 2 s Q 2 . The resulting factorization theorems therefore contain power corrections w.r.t. mass mode contributions in at least some of the factors in any kinematic region, which, in case they are known, may be expanded away accordingly if a smooth description of mass effects is not wanted. The approach was also constructed to allow for the formulation of universal and simple rules to implement the summation of logarithms through flavor number dependent renormalization evolution factors of the hard, jet and soft function for arbitrary choices of the global renormalization scale µ. The approach also entails that only the hard, jet and soft functions and, depending on the choice of µ, their respective threshold matching factors appear in the factorization theorems (in case they are evolved through the massive quark flavor threshold). By construction in the universal factorization approach, all rapidity logarithms (and their summations) are fully contained within these individual quark mass threshold matching factors at the scale µ m ∼ m.
Let us consider the situation s 2 /Q 2 m 2 s ∼ p 2 Q 2 . The corresponding leading power factorization theorem in the universal factorization function approach for s 2 /Q 2 < µ 2 < m 2 (when the SCET current and the jet functions are evolved below m) has the form where H m and M J Q are the quark mass threshold matching factors for the SCET current and the universal jet function J uf Q respectively. For m 2 < µ 2 < s (where the soft function is evolved above m) the same factorization theorem has the form where M S is the mass threshold matching factor for the soft function S. It is straightforward to consider other choices of µ as well.
For a strong hierarchy m 2 s one may replace the universal primary massive quark jet function J uf,(n +1) Q by the jet function J s and m 2 ∼ s. The resummation of virtuality logarithms (with respect to µ) is achieved by the flavor number dependent µ-anomalous dimensions of the hard currents and jet functions known from SCET (with (n + 1) flavors) and bHQET (with n flavors) and of the soft function (with (n + 1) flavors for scales above m and n flavors for scales below m). Furthermore one has to account for the natural scales of the hard, jet and soft function being µ Q ∼ Q, µ J ∼ s 1/2 and µ S ∼ s/Q, respectively. In eq. (4.1) the mass threshold matching functions H m and M J account for the change between (n + 1)-flavor SCET evolution (above the mass threshold) and n -flavor bHQET evolution (below the mass threshold) for the hard current (see ref. [41]) and universal jet function, respectively, at the mass threshold scale µ m ∼ m. For the universal jet function for a massive primary quark this matching relation reads (The analogous relation for the massless primary quark case has been given in eq. (119) of ref. [26].) In eq. (4.2) the mass threshold matching function M S accounts for the corresponding change between the corresponding n -and (n + 1)-flavor evolution of the soft function (see eqs. (136) and (139)   The mass mode factorization approach of ref. [32] was devised with the motivation to formulate distinct and unique factorization theorems for the different possible scale hierarchies of the mass m with respect to Q, s 1/2 and s/Q, where the physically relevant nandn-collinear and soft mass mode effects appear explicitly within three distinct factors to achieve a transparent and economic representation of their contributions. In contrast to the universal factorization approach, the mass mode factorization approach does not result in two options to formulate the same factorization theorem, such as eqs. (4.1) and (4.2), which are equivalent due to consistency relations such as eq. (4.4). The factorization theorems in the mass mode approach contain functions that have explicit µ and ν dependence, and the summation of virtuality and rapidity logarithms is carried out on equal footing. The summation of the associated logarithms, on the other hand (and in contrast to the universal factorization approach), does explicitly involve consistency relations among the anomalous dimensions to allow for a transparent treatment of renormalization group evolution with either n or (n + 1) dynamical flavors with respect to the mass threshold scale m. In addition, in the formulation of the mass mode factorization approach of ref. [32] the resulting factorization theorems have been free of any power corrections in the quark mass m and did not provide a smooth dependence on the quark mass m. The latter is mandatory for smooth predictions of differential cross sections when the quark mass threshold is crossed.
Let us consider the situation s 2 /Q 2 m 2 s ∼ p 2 Q 2 . The corresponding factorization theorem in the mass mode factorization approach has the form where H m,s is the soft mass mode contribution of the mass threshold hard function H m quoted in eq. (3.32), S c is the collinear-soft function of eqs. (2.12) and (3.29), and J (n +1) q is the jet function for (n + 1) massless quarks which coincides with the universal jet function for vanishing quark mass, i.e. J uf,(n +1) Q (p 2 , 0, µ). Since the factorization theorems (4.5) and (4.1) as well as (4.2) provide identical descriptions for the situations s 2 /Q 2 m 2 s ∼ p 2 Q 2 (up to suppressed quark mass power corrections), they imply the following consistency relations for the mass threshold matching factors M J Q for the universal function where H m,n and H m,s are the collinear and soft mass mode contributions of the mass threshold hard function H m , see eq. (3.32), which appears in the universal factorization theorem eq. (4.1).
In the situation s 2 /Q 2 m 2 ∼ s ∼ p 2 Q 2 the mass mode factorization approach states the factorization theorem Using the consistency relations (4.6) and (4.7) as well as the relation between the mass mode jet function J mf Q , the universal jet function J uf Q and the collinear-soft function of eq. (2.12), it is easy to see that eq. (4.8) and the universal factorization theorems (4.1) and (4.2) provide identical descriptions for s 2 /Q 2 m 2 ∼ s ∼ p 2 Q 2 . The relations and the analogous equivalence for eq. (4.5) show that the factorization theorem (4.5) -upon replacing the massless quark jet function J (n +1) q by the universal jet function J uf,(n +1) Q -fully accounts for the content of the factorization theorem (4.8) for s 2 /Q 2 m 2 s ∼ p 2 Q 2 . Thus in this modified form, (4.5) is applicable for the entire region s 2 /Q 2 m 2 s ∼ p 2 Q 2 and exactly equivalent to the universal factorization theorems (4.1) and (4.2).
Thus from a practical application point of view the mass mode factorization theorems (4.5) and (4.8) can be considered as special cases of the universal factorization theorems (4.1) and (4.2). On the other hand, the mass mode factorization approach for the case s 2 /Q 2 m 2 s ∼ p 2 Q 2 makes explicit use of the collinear-soft function S c and provides a representation of the quark mass threshold matching factors for the jet and soft functions that disentangle the relevant process-independent collinear and soft mass mode contributions. So, eqs. Interestingly, by simply replacing the collinear mass mode factors H m,n and H m,n valid for primary massive quarks by the corresponding mass mode factors for primary massless quarks (see eqs. (4.10) and (4.12) in ref. [32] for analytic expressions) the analogous versions of eqs. (3.32), (4.6) and (4.7) are also valid for the corresponding factorization theorems for primary massless quarks. In fact, upon making these modifications and replacing the primary massive quark jet functions J mf,(n +1) Q and J uf,(n +1) Q by the corresponding jet functions for primary massless quarks, eq. (4.1), (4.2) (and (4.5), (4.8)) agree identically with the results given in ref. [26]. This demonstrates the universal structure of the mass mode corrections and illustrates how to obtain them in an economic way in factorization theorems for other applications.
Our final comment concerns the summation of logarithms. Combining the information from the universal factorization and the mass mode factorization approaches provides a modular and transparent method to resum virtuality as well as rapidity logarithms (where we acknowledge, however, that complete treatments of correctly summing both types of logarithms is available in both approaches, see [32] and [31]).
From the point of view of summing virtuality logarithms, the universal factorization theorems (4.1) and (4.2) may be seen as more transparent and practical because all anomalous dimensions coincide with those known from factorization theorems where secondary massive quark effects (which entail rapidity singularities) are absent: one only has to keep track of the dependence on the number of dynamical flavors n f being either equal to n , when the evolution is below the quark mass m or (n + 1) when it is above. If we write the virtuality µ-anomalous dimensions of the SCET and bHQET quark-antiquark production currents (J SCET and J bHQET , respectively [12,14]), the hard factor, the universal and bHQET jet function, and the soft function in the form (ŝ = s/m) the µ-anomalous dimensions of the corresponding mass threshold matching factors appearing in the factorization theorems (4.5) and (4.8) read Their form expresses the fact that the mass threshold matching functions H m , M J and M S simply account for the appropriate change between (n + 1) and n flavor µ-evolution.
In this context one just has to take into account that for primary massive quarks the nflavor evolution for the jet and the hard functions is carried out in bHQET. For sake of completeness we have displayed all µ-anomalous dimensions up to O(α 2 s ) in appendix C. From the point of view of summing rapidity logarithms the structure provided by the mass mode factorization theorems (4.5) and (4.8) may be seen as most transparent because the universal structure of the ν-anomalous dimensions of the collinear and soft mass mode factors is fully determined by quoting the results Interestingly, owing to the consistency relations are proportional to a δ-function. The convolution in their anomalous dimension therefore reduces to a simple multiplication which we have already accounted for in the formulae above. The universal ν-anomalous dimension up to O(α 2 s ) reads To resum virtuality as well as rapidity logarithms in the universal factorization approach, one evaluates the factorization theorems of eqs. (4.1) or (4.2) and uses the µanomalous dimensions in eq. (4.9) to sum all virtuality logarithms by evolving the hard (H

Comment on the Calculations and Summary of Matrix Element Results
In this section we provide details on the calculation of the SCET primary massive quark jet functions at O(α 2 s ). The universal and mass modes SCET jet functions differ concerning the O(α 2 s C F T F ) corrections coming from diagrams with secondary massive quarks (which for the jet functions refers to diagrams with a closed massive quark-antiquark loop subdiagram). These corrections involve a number of conceptual and technical subtleties, and we briefly address these in the following before presenting details of the computations in the subsequent sections. We also summarize the individual results for the jet-function ME (calculated in the subsequent sections) and the two collinear-soft MEs (extracted from [32]) which are needed to determine the universal and mass mode SCET jet functions. We believe that this makes the conceptual subtleties of the calculations explicit.
The conceptual starting point is the calculation of the jet-function ME J f (p 2 , m 2 ), defined in eq. (2.1), which is infrared divergent and defined in the (n + 1) flavor theory. The infrared finite universal jet function J uf,(n +1) f (p 2 , m 2 ) and the mass mode jet function J mf,(n +1) f (p 2 , m 2 ) are then given via subtractions related to the likewise infrared divergent collinear-soft MEs S (n +1) ( , m) and S (n ) ( , m), respectively, defined in the (n +1) flavor theory (i.e. containing n massless quarks and one quark Q with mass m, see eq. (2.7)) and in the n flavor theory (i.e. containing only n massless quarks), respectively. The corresponding definitions are given in eq. (2.10) and eq. (2.11), respectively. We stress that the concept of zero-bin subtractions [24] does not play any role in our calculation, and we also believe that our approach can be generalized to other calculations in the context of SCET factorization theorems. As already explained in section 1, the universal jet function J uf,(n +1) f (p 2 , m 2 ) by construction approaches the well-known massless quark jet function [8] in the limit m → 0. It can therefore be thought of as the mandatory jet function definition for m 2 q 2 that involves subtractions related to the mass singularity coming from the secondary quark mass effects in this limit. On the other hand, the mass mode jet function J mf,(n +1) f (p 2 , m 2 ) does not involve subtractions related to the secondary quark mass effects and can be thought of as the jet function definition suitable for m 2 ∼ q 2 , where the quark mass m does not represent an infrared scale. It is useful for the computations to keep these conceptual aspects of the two jet functions in mind, even though we emphasize that both jet functions can be applied in a broader kinematic context and are related through the collinear-soft function S c ( , m) via eq. (2.12) (see the discussion in section 4). 8 On the technical level an additional subtlety arises because it turns out that -at least at this time -the only feasible way to determine the full set of O(α 2 s ) corrections is to use two completely separate calculational schemes: one for the purely gluonic and the massless quark corrections at O(α 2 s C 2 F , α 2 s C F C A , α 2 s C F T F n ) and another one for the secondary massive quark corrections at O(α 2 s C F T F ). This separation arises because the O(α 2 s C F T F ) secondary massive quark corrections involve rapidity singularities. To quantify them ana-lytically it is mandatory to introduce an explicit dimensionful infrared regulator (for which we adopt a gluon mass Λ), such that UV and rapidity divergences can be disentangled and identified unambiguously. The treatment of subdivergences at O(α 2 s C F T F ) then also requires a calculation of the O(α s ) corrections with a finite gluon mass for consistency. These calculations have to be carried out for the jet-function MEJ f (p 2 , m 2 ) and the collinear-soft MEs S (n +1) ( , m) and S (n ) ( , m) which also entails infrared gluon mass dependent MS renormalization Z-factors for each of them. For the renormalized universal and mass mode jet functions as well as for their virtuality and rapidity renormalization group equations contributing at O(α 2 s C F T F ) it can then be explicitly checked that the dependence on the infrared gluon mass cancels. In contrast, the purely gluonic as well as the massless quark corrections at O(α 2 s C 2 F , α 2 s C F C A , α 2 s C F T F n ) (as well as the O(α s ) corrections) do not involve rapidity singularities and just using dimensional regularization without an additional infrared regulator is in principle sufficient. In fact using this simpler regularization is the only feasible way to compute the gluonic O(α 2 s ) corrections due to their complexity. For these corrections then all diagrams contributing to the collinear-soft MEs S (n +1) ( , m) and S (n ) ( , m) lead to vanishing scaleless integrals which just turn all 1/ε n IR singularities in the infrared divergent jet-function MEJ f (p 2 , m 2 ) into 1/ε n UV singularities of the infrared finite jet functions J uf,(n +1) f (p 2 , m 2 ) and J mf,(n +1) f (p 2 , m 2 ). Both jet functions thus agree concerning their O(α s ) and O(α 2 corrections. This justifies that for the O(α 2 s ) corrections involving only diagrams with massless partons (in addition to the primary massive quark line), at least at the computational level, the subtractions associated to collinear-soft MEs or zero-bins can be ignored. The treatment of subdivergences in this calculation also requires the calculations of the O(α s ) corrections, which differ from the corresponding results with a gluon mass regulator. The lack of having an infrared regularization scheme that allows the computation of all O(α 2 s ) corrections in a uniform and manageable way entails that -at least at the present time -the computation of the O(α 3 s ) corrections to the SCET jet functions in the presence of massive quarks would represent an extremely challenging task.
We present the calculations of the purely gluonic and massless quark corrections at O(α 2 s C 2 F , α 2 s C F C A , α 2 s C F T F n ) for the jet-function MEJ f (p 2 , m 2 ) in section 5.2, and those of the secondary massive quark corrections at O(α 2 s C F T F ) in section 5.3. The reader not interested in the computational technical details may skip these two subsections. In the following we summarize the analytic results for jet-function ME and the two collinearsoft MEs within the two calculational schemes. Results needed for the calculation of the O(α 2 s C 2 F , α 2 s C F C A , α 2 s C F T F n ) corrections to the jet function are computed in the massless gluon computational scheme (where the O(α 2 s C F T F ) corrections cannot be given) and are quoted with the subscript " C F T F ". In contrast all results needed for the calculation of the O(α 2 s C F T F ) terms from secondary mass effects are computed in the massive gluon computational scheme (where the O(α 2 s C 2 F , α 2 s C F C A , α 2 s C F T F n ) corrections cannot be given) and are quoted with the subscript "C F T F ". Note that we use this labeling also for the corresponding one-loop results that contribute (through the treatment of subdivergences) to the determination of the respective renormalized two-loop jet functions and their anomalous dimensions. 9 In the computational scheme with a massless gluon the renormalized jet-function ME can be written in the form J (n +1) Q (p 2 , m 2 , Λ 2 = 0, µ, Q/ν) Q (p 2 , m 2 , µ) agrees with the well-known one-loop SCET primary massive quark jet function result from ref. [14] and is given up to O(ε 2 ) in eq. (3.7). The two-loop coefficient J corrections is given in eq. (3.11). Both are free of rapidity divergences and therefore do not carry an argument with respect to the rapidity renormalization scale ν. For convenience, we also provide the corresponding renormalized result for the massless primary quark jet-function ME J (n +1) q (p 2 , m 2 , Λ 2 = 0, µ, Q/ν) The divergent Z-factor of the jet-function ME reads By definition it contains all 1/ε-divergent terms and quantifies the difference between the renormalized and bare jet-function MEs, In the context of our jet-function ME computation it includes UV and IR divergent 1/ε terms. We stress that, upon (literally) replacing the color factor C F T F n by C F T F (n + 1) in eq. (5.2), one obtains the full O(α 2 s ) MS Z-factor for the universal SCET jet functions J uf,(n +1) f (for massless or massive primary quarks) as well as for the SCET jet function for (n + 1) massless quark flavors, where all 1/ε divergent terms are UV divergences. 10 This relation is required by consistency and can be used as a cross check for calculations.
In the massless gluon computational scheme the loop corrections to the bare collinearsoft ME S (n ) are given by scaleless integrals and thus vanish to all orders in perturbation theory S (n ),bare ( , m, Λ = 0) = δ( ) . (5.4) The corresponding bare collinear-soft ME S (n +1) , on the other hand, corresponds to scaleless integrals only at O(α s ) and O(α 2 S (n +1),bare ( , m, Λ = 0) In the computational scheme with an infinitesimal gluon mass Λ the terms of the renormalized jet-function ME relevant for the calculation of the O(α 2 s C F T F ) secondary quark mass effects read sec is given in eq. (3.19). For convenience, we also provide the analogous results for the renormalized massless primary quark jet-function ME J (n +1) q (p 2 , m 2 , Λ 2 , µ, Q/ν) C F T F 10 Note that that the Z-factor for the mass mode jet function J mf,(n +1) f can be obtained from the results for the bare and renormalized jet-function ME J (n +1) Q and collinear-soft ME S (n ) . Because both are defined in theories with different number of quark flavors, the Z-factor for the mass mode jet function cannot be quoted in the MS scheme and in general has finite contributions.
in appendix A. The MS renormalization Z-factor associated with the jet-function ME contributions in eq. (5.6) (which is identical for massive and massless primary quarks) accounts for UV and rapidity divergences and reads The corresponding results for the two different renormalized collinear-soft MEs are and S (n +1) ( , m, Λ, µ, ν) Their respective MS renormalization Z-factors accounting for UV and rapidity divergences read and Z (n +1) S ( , m, Λ, µ, ν) These results can be extracted from ref. [32], and we have explicitly cross checked their results. 11 From the results quoted above it is straightforward to obtain the results for the universal (see eqs. (2.10) and (3.27)) and the mass mode SCET jet functions (see eqs. (2.11) and (3.6)). The virtuality and rapidity anomalous dimensions for the universal and mass mode SCET jet functions (and the collinear-soft function) (see eqs. (4.9) and (4.11) and appendix C) are related to the corresponding anomalous dimensions for the jet-function and the collinearsoft MEs (see appendix C as well).

Gluonic and Massless Quark Corrections
In figure 1 all two-loop Feynman diagrams relevant for the calculation of the two-loop jetfunction ME in eq. (2.4) using QCD Feynman rules and Feynman gauge are displayed. In this section we discuss the computation of the O(α 2 s C 2 F , α 2 s C F C A , α 2 s C F T F n ) corrections using the computational scheme with a massless gluon, as explained in the previous subsection.
After evaluating the Dirac trace in eq. (2.4) the contribution of each diagram for the jet function forward scattering ME can be expressed as a linear combination of dimensionally regularized (d = 4 − 2ε) scalar integrals of the generic form where all propagator denominators have the usual −i0 term and the prescription s → s + i0 for the jet virtuality s = p 2 − m 2 ≥ 0 is understood. In the second line we pulled out the conventional factor of iπ d/2 per loop integral. We also pulled out the factor (n · p) −c 1 −c 2 as this dependence is fixed by the behavior of the integral under the rescaling ofn or Lorentz covariance. The power of (−s) is then determined by choosing I to be dimensionless. This factor encodes the full s dependence in the massless limit (s → p 2 ), where I becomes a function of ε only.
The set of propagator denominators in eq. (5.12) does not represent a linearly independent basis. Either a 3 or b 3 can be rendered zero by partial fraction decomposition. We therefore can arrange all integrals into two integral families: family A, where b 3 = 0, and family B, where a 3 = 0. Integrals where a 3 = b 3 = 0 are for convenience assigned to family A. Some family B integrals with only two massive propagators can be mapped by loop momentum shifts to family A. Diagrams (g) and (c) contain the top sector integrals of family A and B, respectively (i.e. where all propagator powers are positive). We distinguish two types of diagrams: the "planar" diagrams (e)-(q), which contain the leading color contributions, and the "nonplanar" diagrams (a)-(d) which are proportional to C 2 F − C F C A /2 and therefore color-suppressed. The planar diagrams only involve family A integrals, while the "nonplanar" diagrams contain integrals of family A and B. Diagrams (r) are scaleless and vanish.
The classification in family A and B integrals is useful for two reasons. The first is that they are closed under integration by parts (IBP) reductions and require different sets of IBP identities. The second is related to the different mathematical properties of family A and B integrals. Family A integrals have at most two massive propagators and involve at most harmonic polylogarithms in the ε expanded results. In contrast, family B integrals can contain elliptic functions in the ε expanded expressions, which makes their evaluation more complicated. This is connected to the fact that they admit a triple massiveparticle cut. Moreover, we observed that some family B integrals (including cases with only two massive propagators) are ill-defined in pure dimensional regularization due to rapidity singularities even though the Feynman diagrams are individually rapidity finite. Further, using IBP reductions on rapidity finite family B integrals can lead to rapidity singular integrals. Therefore, the computations of family B integrals in general require a rapidity regulator.
Let us briefly illustrate this issue for the following rapidity-finite family B integral y; 0, 1, 0, 1, 1, 1, 1 + η, 0) , (5.13) where we introduced an analytic rapidity regulator η for the k-integration, see e.g. refs. [23,39,42]. Applying the IBP relation where the bold letters represent operators that increase (+) or decrease (−) the corresponding propagator powers in I, we obtain The first three integrals on the right hand side turn out to be individually rapidity divergent, i.e. they have 1/η poles as can e.g. be checked numerically with the sector decomposition program pySecDec [43]. These 1/η poles cancel in the sum. Without a rapidity regulator, i.e. naively setting η = 0 in eq. (5.15) literally, however, gives an incorrect relation because the term η I(−y; 0, 1, 0, 1, 1, 1, 2 + η, 0) leads to finite contributions which are missed when the rapidity regularization is introduced after using the IBP relation. An analogous issue also arises when using a dimensionful rapidity regulator such as the ∆ regulator proposed in ref. [25]. We stress that the IBP reduction with a rapidity regulator (no matter of what kind) in general leads to a substantially increased number of master integrals. Moreover, these are typically more complicated to compute than comparable integrals where this kind of problem does not arise and an additional rapidity regularization is not necessary. Interestingly, the IBP reduction of family A integrals does not give rise to spurious rapidity divergences and works consistently without any rapidity regulator in the standard way. This is (currently) an empirical observation as we are lacking a simple systematic criterion that would allow us to identify when the problem of spurious rapidity divergences arises and to possibly avoid or treat them in an automatized way. We therefore explicitly verified all family A integral reductions used in our computations numerically in order to dispel any doubt about their validity. In this context the known (or easily computed) massless primary quark limit of each individual diagram provides a valuable cross check of our calculations. The calculation of the planar diagrams (e)-(q) can thus be performed with standard modern multi-loop technology as explained in section 5.2.1. For the nonplanar diagrams (a)-(d), the issue of the spurious rapidity divergences and the elliptic nature of certain family B integrals forced us to use different and less uniform methods as explained in section 5.2.2. As a general strategy, we analytically compute the two-loop master integrals for the jet field correlator to the required order in ε first, insert them into the different diagrams, and finally take the imaginary part of the total contribution to the jet field correlator according to eq. (2.4) for each color factor. The only exceptions are diagrams (b) and (c), for which we take a different semi-numerical approach, as explained in section 5.2.2. We renormalize the resulting jet-function MEs J (n +1) Q C F T F according to eq. (5.3), i.e. we absorb all divergent terms into the Z-factor, and we use the pole mass scheme for the quark mass. The necessary counterterms for the pole mass m (and the MS coupling α (n +1) s ) can e.g. be found in ref. [44]. We note that in the pole mass scheme derivatives of the distributions δ(s) and L n (s) do not arise in the final result.

Planar Diagrams
The calculation of the planar diagrams (e)-(q) (including only massless partonic loops in the gluon self-energy) is rather straightforward. They involve O(100) family A integrals. We reduced this set of integrals to the seven master integrals depicted in figure 2 using the IBP program FIRE5 [45].
The master integrals M 1 -M 5 can be computed using Feynman parameters for arbitrary ε in terms of hypergeometric functions. They can be expanded in terms of harmonic polylogarithms (HPLs) [46,47] with the help of the Mathematica package HypExp [48]. We also used the Mathematica package HPL [49] to exploit relations among the HPLs for the simplification of expressions or to make their singular behavior for s → 0 explicit, see below.
For M 6 , M 7 we used the method of differential equations [50][51][52]. To this end we take their derivatives with respect to y = m 2 /p 2 . The result can be expressed via IBP reduction in terms of M 1 -M 7 . The coupled system of seven homogeneous first-order differential equations can also be rewritten in terms of a coupled system of two first-order differential equations for M 6 , M 7 with linear combinations of M 1 -M 5 as (known) inhomogeneous terms: These can be decoupled into two separate second-order inhomogeneous differential equations for M 6 and M 7 . Upon expansion in ε these can be iteratively rewritten in second-order inhomogeneous differential equations where only derivatives of expansion coefficients of M 6 or M 7 arise. These differential equations happen to have a particularly simple form because these derivatives appear in a combination, such that upon integration the resulting differential equations only involve first derivatives of the expansion coefficients. Another integration w.r.t. y then yields the result depending on two integration constants (boundary values) that can be fixed by taking the (massless) limit y → 0, where the integrals are known [8]. We give the explicit solutions for M 1 -M 7 in appendix D. We checked all of them numerically to the required order in ε using the Sector Decomposition codes FIESTA4 [53] and pySecDec [43]. In order to take the imaginary part of the planar contributions we proceed as follows. Defining f (s) as the contribution of the planar diagrams at the correlator level we want to determine The result involves the distributions δ(s) and L n (s) and their derivatives prior to pole mass renormalization. (These derivatives only arise from diagrams that contain quark selfenergy subdiagrams.) In practice we compute eq. (5.18) for s > 0 first. We write the HPLs from the solutions of the master integrals with the help of the HPL package in a form, where the branch cuts are made explicit as log n (−s/µ 2 ) terms. We can now easily take the imaginary part of these terms according to eq. (5.18). The remaining terms are regular in s and thus do not contribute. In the next step we promote the terms log n (s/µ 2 )/s and [n log n−1 (s/µ 2 ) − log n (s/µ 2 )]/s 2 for s > 0 to the corresponding plus distributions L n (s) and their derivatives, respectively. We fix the coefficient of the δ(s) term by evaluating the imaginary part of the integral of f (s + i0) over a small region around s = 0: The result is independent of Λ 1 , as the imaginary part of f (s+i0) does not have support for s < 0. For Λ 2 → 0 the result involves a constant and terms log k (Λ 2 )/Λ m 2 which match the structure of the distributions L n (s) and their derivatives. The constant term determines the coefficient of δ(s) in Im[f (s + i0)]. The coefficients of first and second derivatives of δ(s) are determined in an analogous way considering eq. (5.19) with additional weight functions s and s 2 , respectively. Upon imposing pole mass renormalization all derivatives of δ(s) and L n (s) consistently cancel, which provides an important cross check.

Nonplanar Diagrams
For the calculation of the nonplanar diagrams (a) and (d) we proceed in the same way as described for the planar diagrams in the previous subsection. Regarding the IBP reductions, no rapidity regulator is required for diagram (a), because it does not involve any Wilson line propagators. In the reduction of diagram (d) issues related to spurious rapidity divergences may in principle arise. However, we were able to exclude by hand IBP relations such as eq. (5.14), which generate (possibly ill-defined) rapidity divergent integrals at intermediate steps. Interestingly, diagram (d) then happens to reduce to already known family A master integrals. We explicitly checked the IBP reduction numerically using pySecDec [43] together with our analytical results for the master integrals.
For diagram (a) family B master integrals cannot be avoided and a suitable basis for them is depicted in figure 3. It contains so-called sunrise and kite integrals for which generic results can be found in the literature. All three master integrals admit a triple massive particle cut, which is reflected by the Θ(p 2 − (3m) 2 ) = Θ(1 − 9y) terms in their imaginary part, and evaluate to (integrals of) elliptic functions. The master integrals contribute to the jet field correlator with prefactors proportional to (−s − i0) −2ε and upon ε-expansion in practice we only need the imaginary part of the combination (−s − i0) −2ε M i when s > 0.
To determine the coefficients of the δ(s) and its derivatives we additionally need the first few terms in the expansion of the master integrals in s = p 2ȳ = p 2 (1 − y). All these results are given in appendix D. They are straightforwardly determined or directly taken from refs. [54][55][56].
To compute diagrams (b) and (c) we are forced to take a different approach. The reason is that diagram (b) and (c) already involve rapidity divergent family B integrals before any reduction. These rapidity divergences cancel in the sum for each diagram. An IBP reduction method without additional regulator, as used for diagram (d) therefore seems impractical. Using a rapidity regulator, on the other hand, results in new types of master integrals which involve three massive propagators, several massless propagators, as well as regularized Wilson line propagators. Such integrals appear too difficult to be solved with the tools at hand. We therefore decided to refrain from using IBP reductions and compute them directly using numerical methods and exploiting consistency conditions on their analytical structure as explained in the following.

Numerical calculation of the contributions from diagrams (b) and (c)
In a first step we use the sector decomposition code pySecDec [43] to obtain numerical results for the real and imaginary parts of the contributions of diagrams (b) and (c) to the jet field correlator expanded in ε up to O(ε 0 ). To this end we set µ 2 = s, separately write the integrands of the two diagrams in Feynman parameter representation and solve as many integrals analytically as possible. For both diagrams four integrations over rational functions of the parameters are remaining and are carried out with pySecDec. We furthermore multiply the integrands by p 2 (1 − y) 2 = s 2 /p 2 to render them dimensionless and to damp the singular behavior in the (bHQET) limit y → 1. We then obtained numerical results at 100 points in the physical region 0 ≤ y < 1. From these numerical data points we verified that the coefficients of the 1/ε poles together with the divergences of the already computed diagrams correctly reproduce within numerical uncertainties (which are typically at the sub-percent level) the divergence structure related to the renormalization Z-factor in eq. (5.2). This provides an important cross check for our approach, in particular confirms the correctness concerning the µ dependence.
Due to the multiplication of the factor p 2 (1 − y) 2 = s 2 /p 2 we do not have direct numerical access to the coefficient of the δ(s) term. We will come back to this point at the end of this subsection. However, analytic information on the contribution of diagrams (b) and (c) to the jet-function ME is known in various kinematic limits. Using IBP reduction 12 and the master integrals given in [8], it is straightforward to compute the diagrams in the massless limit. Upon taking the imaginary part the result, including mirror diagrams, reads  (c) to the jet-function ME finite part multiplied with the singularity-damping factor p 2 (1−y) 2 as a function of y ≡ m 2 /p 2 for µ 2 = s. The numerical data from pySecDec is shown as the solid blue line. The associated numerical uncertainty is too small to be visible in the plot. The corresponding heavy quark (bHQET) limit, according to eq. (5.21), is shown as dashed green line. The dotted orange line represents the value of the jet-function ME times damping factor in the massless limit (y = 0), i.e. to the L 0 (p 2 ) term in eq. (5.20). Right: Difference between numerical data points and analytic bHQET limit, normalized to the massless limit, for µ 2 = s. The error bars indicate the uncertainty of the numerical integration using pySecDec.
where the 1/ε divergences have been subtracted. We can also extract the corresponding expression in the bHQET limit (y → 1) from eq. (3.34). Combining the results for the two-loop bHQET jet function J (n ) B [21] and the collinear mass mode matching coefficient H m,n [41] with our results for the other diagrams, we find Note that this expression contains all distributional terms in J b+c (p 2 , m 2 ).
In the left panel of figure 4 we plot our (interpolated) numerical result for p 2 (1 − y) 2 J b+c fin (solid blue line) and the corresponding analytical expression for s m 2 according to eq. (5.21) (dashed green line) for µ 2 = s in the range 0 < y < 1. Note that for s > 0 and µ 2 = s only the L 0 (s) term in eq. (5.21) survives. With the factor p 2 (1 − y) 2 and for µ 2 = s → p 2 > 0 the massless result in eq. (5.20) collapses to a single value, namely the coefficient of the L 0 (p 2 ) distribution. This is indicated by the dotted orange line which agrees with the numerical data point at y = 0 within numerical uncertainty. We also observe that in the limit y → 1 the numerical data and the bHQET curve correctly approach each other nicely. To better illustrate this we show in the right panel of figure 4 the difference between numerical data points and bHQET result normalized to the y = 0 value (dotted orange line in the left panel) in the range 0.95 < y < 1 including the numerical uncertainties as quoted by pySecDec. We clearly see that for y 0.996 the difference is zero within the numerical uncertainties. This represents a strong cross check of our combined numerical and analytical evaluation.
In order to obtain a practical fit function that parametrizes our numerical results respecting at the same time the analytic constraints from the bHQET and massless limits we proceed as follows. We start with an ansatz for J b+c fin (p 2 , m 2 , µ 2 = s) valid for s > 0 of the form It is straightforward to generalize the ansatz function to arbitrary values of µ 2 = s using the renormalization Z-factor in eq. (5.2) and our results from the other diagrams. The full distributional ansatz J b+c fin,ansatz (p 2 , m 2 , µ 2 ) for arbitrary µ and s ≥ 0 is then obtained by promoting the log n (s/µ 2 )/s terms to L n (s) distributions and adding the δ(s) term of eq. (5.21). To also include the nontrivial analytic information from the δ(p 2 ) term in the massless quark result of eq. (5.20), we integrate the full distributional ansatz over a finite interval around s = 0, take the limit m → 0 and compare to the corresponding integral of eq. (5.20). In this way we find the additional constraint With these values the ansatz approximates our numerical data points to a precision better than 0.5%, while the uncertainty of the points themselves is at most 1%.
To check consistency of our numerical computation with the coefficient of δ(s) term given in eq. (5.21), we performed the same fit as described above, but without including the additional constraint of eq. (5.25). We find that the fitted value for c 20 satisfies eq. (5.25) within the numerical uncertainties. Since the massless limit for diagrams (b) and (c) was explicitly computed, this consistency check reliably verifies the analytic input for the δ(s) term in eq. (5.21).
Finally, we separate the analytical part in eq. (5.22) from the purely numerical part given by the terms associated with the coefficients in eqs. (5.27) and (5.28), which we call G fit , see eq. (3.16). We plot the fit function G fit (y) together with the associated numerical 14 Analogously, one could argue that there is no c23 term. Unlike the c13 term it is however regular for y → 1 and we will use it to model other regular terms in our fit. results in figure 5. Since the relative contribution of G fit (y) to the entire O(α 2 s ) corrections of the jet-function ME is smaller then 0.5% in the whole physical range, we do not bother to quote uncertainties in eqs. (5.27) and (5.28).

Secondary Massive Quark Corrections
In this section we compute the O(α 2 s C F T F ) secondary massive quark corrections to the jet-function ME J f (p 2 , m 2 ). The relevant Feynman graphs are diagrams (o), (p), (q) and (r) in figure 1, where the vacuum polarization subdiagram is a massive quark Q bubble. We adopt the approach of refs. [22,26] where the corrections are calculated starting from the O(α s ) graphs describing radiation of a gluon with mass M . The corresponding oneloop diagrams are shown in figure 6. In a second step a dispersion relation to account for the gluon splitting into a pair of a quark and antiquark with mass m is applied. Using the dispersion relation the gluon propagator with the insertion of the bare massive quark vacuum polarization function in Feynman gauge and including the (infinitesimal) gluon mass regulator Λ can be written as Here Π(p 2 , m 2 ) is the gluon vacuum polarization function arising from a massive quark bubble defined by with the vector current J A µ ≡ igQT A γ µ Q. The imaginary part of the one-loop coefficient Note that the Heaviside Θ-function restricts the gluon mass integration in the dispersion relation to M > 2m. We could therefore safely set Λ = 0 in the first term of eq. (5.29). Using eq. (5.29) for the gluon propagator with a heavy quark loop insertion in figure 1 (o), (p), (q) and (r) we see that we effectively need to compute the O(α s ) jet-function ME J (1) f with finite gluon mass M , i.e. the corresponding diagrams in figure 6. This is needed for the contribution from the first term on the RHS of eq. (5.29) (before integration over M 2 ). To include the contribution from the second term we also need the result expanded for M → Λ M, p 2 . The p µ p ν terms on the RHS of eq. (5.29) can be dropped in our computation due to gauge invariance of quantum electrodynamics with a massive photon field [57,58] and (o ) (p ) (q ) (r ) Figure 6. One-loop Feynman diagrams with massive gluons required for the calculation of the secondary mass effects, i.e. the O(α 2 s C F T F ) terms, in the jet-function ME using the dispersion relation in eq. (5.29). They are associated with the diagrams (o), (p), (q) and (r) in figure 1 with a massive quark Q bubble. Left-right mirror graphs are understood.
the fact that the secondary O(α 2 s C F T F ) massive quark corrections are up to color factors identical in an Abelian gauge theory. Dropping the p µ p ν terms in eq. (5.29) we immediately see that diagrams (q ) and (r ) are proportional ton ·n = 0 and thus vanish.
The contribution of diagram (o ) to eq. (2.4) before taking the imaginary part reads where the integration variable u represents a Feynman parameter. This expression is wellbehaved in the large M limit. It is convenient to separate the leading term for M → ∞ in d = 4 − 2ε dimensions, In the remaining contribution, which vanishes for M 2 → ∞, we can safely set d = 4: We now take the imaginary part according to eq.
Note that the δ (s) terms from diagram (o ) and the contribution due to the quark pole mass counterterm δm M (where the subscript indicates the nontrivial dependence on the gauge boson mass M ) cancel in the sum.
Diagram (p ) is rapidity divergent. With the symmetric η regulator [23,39] we have To compute the integral we use the same approach as for diagram (o ). The M → ∞ piece is given by 37) and the remainder term reads At this point the rapidity regularization has done its job and is in particular not needed anymore for the dispersion integration. One may therefore expand in η keeping only the divergent and finite terms. To take the imaginary part we proceed in the same way as for diagram (o ).
Accounting for the equivalent contribution from the mirror diagram of (p ) the complete result for the bare primary massive quark jet-function ME with gluon mass M to O(α s ) reads J bare Q (p 2 , m 2 , M 2 ) = δ(s) where m is the quark pole mass and H n denotes the n-th harmonic number. For the expression shown here we have kept the exact dependence on d = 4 − 2ε for the terms that need regularization in the M 2 → ∞ limit of the dispersion integration. Otherwise the expansions in ε and η are carried out.
From eq. (5.39) we can determine the O(α s ) bare primary massive quark jet-function ME with the infinitesimal gluon mass regulator Λ, We stress once again that a dimensionful regularization parameter such as the gluon mass is mandatory to fully separate the rapidity and IR singularities such that all remaining 1/ε terms are UV.
Using the dispersion identity eq. (5.29) the unrenormalized secondary massive quark O(α 2 s C F T F ) correction to the jet-function ME J Q (p 2 , m 2 ) with an infinitesimal gluon mass regulator reads J bare,(2) Q (p 2 , m 2 , Λ 2 ) J (s, m 2 , Λ 2 , µ, Q/ν) The 4T F /(3ε) term in the second line of eq. (5.41) is associated with the counterterm coming from the heavy quark loop and is required to implement the MS strong coupling in the (n +1) flavor scheme. The dispersion integral in the first line of eq. (5.41) can be solved analytically in terms of elementary functions and standard complete elliptic integrals using Mathematica with appropriate changes of integration variables, except for the logarithmic real radiation term shown in the second line of eq. (5.39). The latter can be integrated numerically very efficiently. It contributes to the corrections related to the three-particle QQQ-cut and corresponds to eq. (3.24). The final result for the finite (renormalized) contribution J is displayed in eq. (5.6) and the divergent terms Z

Numerical Analysis
In this section we provide a brief numerical study concerning the structure and importance of the O(α 2 s ) corrections to the primary massive quark SCET jet function. To be definite we use the universal jet function J uf(n +1) Q (p 2 , m 2 , µ) of eq. (3.27) for the analysis since in practice it is sufficient to formulate factorization theorems for all possible scale hierarchies, see the discussion in section 4. We remind the reader that the universal SCET jet function agrees with the massless quark SCET jet function in the limit m → 0, called "massless limit" in the following. However, its relation to the bHQET jet function in the limit s = p 2 −m 2 → 0 involves the collinear-soft function S c that is singular by itself in this kinematic regime, see eqs. (2.11), (3.29) and (3.34). Since the bHQET factorization theorem (3.31) and the factorization theorem for p 2 − m 2 ∼ p 2 m 2 (4.1) (which is identical to (4.2)) can be smoothly connected, a comparison of the universal function J uf(n +1) Q with its leading singular limit for s = p 2 − m 2 → 0, called "heavy quark limit" in the following, correctly visualizes the size of the mass corrections that are not captured by the leading power bHQET factorization theorem in the region 0 < s = p 2 − m 2 m 2 .
In the left panel of figure 7 the size of the contributions of the two-loop coefficient J whole kinematic regime. 15 The total coefficient is displayed in black. We see that the C 2 F , C F C A and C F T F n terms, not unexpectedly, provide the bulk of the O(α 2 s ) corrections, and that the secondary heavy quark corrections are typically more than one order of magnitude smaller. Interestingly, due to the behavior of the C 2 F and C F C A terms, the O(α 2 s ) correction changes sign at p 2 ≈ 1.1m which is well within the bHQET regime.
In the left panel of figure 7 we also show the total contribution of the fit function G fit (purple dashed) which is part of the non-distributional terms G (1Q) C F and G (1Q) C A contained in the C 2 F and C F C A corrections, see eqs. (3.12) and (3.13) respectively. Typically, it makes up for less than 1% of the total O(α 2 s ) correction, except close to the zero at p 2 ≈ 1.1m. This is also shown in more detail in the right (double logarithmic) panel of figure 7 where the modulus of the full O(α 2 s ) corrections (black) and the corresponding contribution coming from the function G fit (purple) are displayed. Since the O(α s ) corrections to the jet function do not have a zero (see below), the overall contribution of G fit to the entire jet function never exceeds the per mille level. In the right panel of figure 7 we have also shown the sum of all distributional O(α 2 s ) corrections (brown) and the non-distributional ones (light blue) which are constituted by the sum of all G-functions quoted in section 3. We see that the non-distributional contributions are strongly suppressed compared to the distributional terms in the bHQET region and still at least an order of magnitude smaller as long as s 10m 2 . In the high energy limit, however, there are strong cancellations between them because the non-distributional corrections develop distributional terms in the limit m → 0, see appendix B. So the contributions of the non-distributional corrections are particularly important for s/m 2 10 where they are not at all negligible.
We also would like to show the numerical impact of the genuine SCET massive primary 15 This convention is also adopted for figure 8. For all numerical discussions we adopt the renormalization scale µ = √ s + 5 GeV and m = mt = 173 GeV.  But we see that, while at O(α s ) they also improve the approximation to s/m 2 ≈ 1, the same is not true at O(α 2 s ).

Conclusions
In this work we have calculated the O(α 2 s ) corrections to the SCET jet functions for primary massive quarks which are relevant for the inclusive description of jets initiated by massive quarks produced by hard interactions with high energy. The result provides important information for the intermediate region p 2 ∼ p 2 − m 2 = s ∼ m 2 , where the previously known O(α 2 s ) jet function results in the massless limit m 2 /p 2 → 0 and in the bHQET limit s → 0 do not provide accurate approximations. Thus they represent the essential input to achieve a coherent description that smoothly interpolates these two extreme limits.
The interesting conceptual feature of the primary massive quark SCET jet function is that it can be defined in two different ways depending on whether -in addition to the zero-bin subtractions -one imposes soft mass mode bin subtractions or not for diagrams containing secondary massive quark effects, i.e. a massive quark-antiquark vacuum polarization subdiagram. In the context of the view that jet functions require so-called zero-bin subtractions [24] to constitute infrared finite factorization functions, the relevance of the soft mass mode bin subtraction [22,25] depends on the assumed power counting of the quark mass w.r.t. the jet invariant mass. An alternative view, that leads to equivalent results, but does not rely on a zero-bin expansion supplemented by power counting arguments, is to define the jet function with a subtraction defined from a collinear-soft matrix element [27,28] where the effects of secondary massive quarks can be optionally included or not. The collinear-soft matrix elements provide unambiguous prescriptions of the subtractions eliminating the need to impose an additional power counting. The definitions and the results for the collinear-soft matrix elements are identical for massless and massive primary quarks and even apply for bHQET jet functions (to deal with corrections arising from secondary massive quarks that are lighter than the super-heavy primary quark).
If the secondary massive quark is included in the collinear-soft matrix element the resulting jet function is called universal jet function. The universal jet function reduces to the massless quark jet function in the limit of zero quark mass and also has the same virtuality (µ) anomalous dimension. It can be used for the kinematic region ranging from m 2 ∼ p 2 ∼ p 2 −m 2 down to the massless limit p 2 m 2 , where p 2 is the squared jet function invariant mass and m the mass of the primary quark. If the secondary massive quarks are not included in the collinear-soft matrix element the jet function is called mass mode jet function. It is infrared divergent for m → 0 and has a virtuality and a rapidity anomalous dimension. It can be used for the kinematic region m 2 ∼ p 2 ∼ p 2 −m 2 . The two types of jet functions are related via the so-called collinear-soft function [32], and we have provided the O(α 2 s ) results for both. We have also demonstrated how both jet functions are used in the factorization approaches of refs. [22,26,41] and ref. [32] which were developed to deal with the effects of secondary massive quarks in the context of factorization. While the approach of ref. [32] provides a more transparent view on the modular structure of the collinear, soft and collinear-soft mass modes, the approach of refs. [22,26,41] provides a method with a smooth quark mass dependence that allows to treat the cases p 2 − m 2 m 2 ∼ p 2 and p 2 − m 2 ∼ m 2 ∼ p 2 in a single factorization theorem. Taking a jet mass factorization theorem with the primary massive quark SCET jet function as an example we have shown how both approaches are related and in which way they are or can be rendered equivalent. We emphasize that, considered together, both approaches provide a thorough view on the field theoretic treatment of secondary massive quark effects within factorization approaches that separate soft and collinear quantum effects.
Regarding the calculation, we have treated the two-loop secondary mass corrections due to heavy quark loops separately from the corrections due to massless quark and gluon loops. In fact, the correct treatment of the secondary mass corrections requires to carefully disentangle UV, IR and rapidity divergences present in this case. This is achieved by employing a dimensionful IR regulator (in our case a small gluon mass). The loop integrations are than carried out using the dispersive method of refs. [22,26,41].
The remaining O(α 2 s ) corrections (related to diagrams without a closed quark-antiquark loop) have been carried out in pure dimensional regularization. We distinguished two types of relevant diagrams: planar and nonplanar. While the contributions from the planar diagrams can be obtained using standard modern multi-loop techniques, we faced interesting technical issues in the calculation of the nonplanar diagrams. In particular, for two nonplanar diagrams we have not been able to employ (standard automated) IBP reductions without generating spurious rapidity divergences that require an additional rapidity regulator. The latter made the solution of the corresponding master integrals unfeasible. We therefore treated these two diagrams in a semi-numerical approach exploiting analytic information from the massless and bHQET limits. The corresponding numerical results are very accurate and only represent a very small contribution to the full O(α 2 s ) corrections to the jet functions. We have also provided precise numerical approximations of our analytic results (involving elliptic functions) for practical implementations.
The universal jet function for massless primary quarks at O(α 2 s ) has the form [26] J uf,(n +1) q (p 2 , m 2 , µ) = δ(p 2 ) + a (n +1) Both jet functions satisfy eq. (2.12) in the same way as the corresponding primary massive jet functions. The renormalized primary massless jet-function ME including contributions related to 1-loop corrections and secondary massive quark production at 2-loop in the computational scheme with an infinitesimal gluon mass Λ is given by The O(α s ) and O(α 2 s C 2 F , α 2 s C F C A , α 2 s C F T F n ) corrections in the computational scheme with a massless gluon in dimensional regularization analytically agree with those of the massless quark SCET jet function, see [8,26].
B G-Functions in the Limit m → 0 In the limit that the massive primary quark Q becomes massless the singular limits of the non-distributional G-functions have the form The O(α 2 s C 2 F , α 2 s C A C F , α 2 s C F T F n ) contributions to the µ-and ν-anomalous dimensions of the jet-function and collinear-soft MEs are unknown. We therefore only displayed the O(α 2 s C F T F ) corrections coming from the massive quark Q, which is indicated by subscript "C F T F ".
The virtuality µ-anomalous dimensions for the collinear-soft function S c and the mass mode jet function J γ J mf (p 2 , m 2 , µ, Q/ν) C F T F = a (n +1) s C F −8L 0 (p 2 ) + 6δ(p 2 ) + a (n +1) where the remaining color factor contributions to γ J mf at O(α 2