Gluon fragmentation into quarkonium at next-to-leading order using FKS subtraction

We present the calculation at next-to-leading order (NLO) in alpha_s of the fragmentation function of a gluon into heavy quarkonium in the color-octet spin-singlet S-wave channel. To calculate the real NLO corrections, we adapt a subtraction scheme introduced by Frixione, Kunszt, and Signer. Ultraviolet and infrared divergences in the real NLO corrections are calculated analytically by evaluating the phase-space integrals of the subtraction terms using dimensional regularization. The subtracted phase-space integrals are then evaluated in 4 space-time dimensions. The divergences in the virtual NLO corrections are also calculated analytically. After renormalization, all the divergences cancel. The NLO corrections significantly increase the fragmentation probability for a gluon into the spin-singlet quarkonium states eta_c and eta_b.


I. INTRODUCTION
The production of a hadron with large transverse momentum p T can be simplified by using a factorization theorem for inclusive hadron production at large p T [1]. It states that the leading power in the expansion of the inclusive cross section in powers of 1/p T can be expressed as a sum of perturbative QCD (pQCD) cross sections for producing a parton convolved with fragmentation functions: The sum extends over the types of partons i (gluons, quarks, and antiquarks). The symbol "⊗" in Eq. (1) represents a convolution integral over the longitudinal momentum fraction z of the hadron H relative to the parton. The pQCD cross section dσ for producing the parton i can be expanded in powers of α s (p T ), and it includes convolutions with parton distributions if the colliding particles are hadrons. The nonperturbative factor D i→H (z) is a fragmentation function that gives the probability distribution for z. We refer to Eq. (1) as the leading-power (LP) factorization formula. It was derived by Collins and Soper in 1981 for the case of a light hadron H at a transverse momentum satisfying p T Λ QCD [1].
The LP factorization formula in Eq. (1) applies equally well to heavy quarkonium at a transverse momentum satisfying p T m, where m is the mass of the heavy quark.
A proof of this factorization theorem that deals with issues specific to heavy quarkonium production was first sketched by Nayak, Qiu, and Sterman in 2005 [2]. The LP factorization formula gives the leading power in the expansion in powers of m/p T . In the case of cross sections summed over quarkonium spins, the corrections are suppressed by m 2 /p 2 T . The LP factorization formula has limited predictive power, because the nonperturbative factors D i→H (z) are functions of z that must be determined from experiment.
In 1994, Bodwin, Braaten, and Lepage proposed the NRQCD factorization formula for cross sections for heavy quarkonium production [3]. It uses an effective field theory called nonrelativistic QCD to separate momentum scales of order m and larger from momentum scales of order mv and smaller, where v is the typical relative velocity of the Q orQ in the quarkonium. The theoretical status of the NRQCD factorization conjecture is discussed in Ref. [4]. The predictive power of the LP factorization formula for heavy quarkonium in Eq. (1) can be increased by applying the NRQCD factorization formula to the fragmentation functions, reducing these nonperturbative functions of z to multiplicative constants. The fragmentation function for the parton i to produce the quarkonium H is expressed as a sum of pQCD fragmentation functions multiplied by NRQCD matrix elements: The sum extends over the color and angular-momentum channels n of a nonrelativistic The factorization theorem for inclusive production of heavy quarkonium at large p T has been extended to the next-to-leading power (NLP) of m 2 /p 2 T . The NLP factorization theorem was proven diagrammatically by Kang, Qiu, and Sterman [5][6][7], and it was derived using soft collinear effective theory by Fleming, Leibovich, Mehen, and Rothstein [8,9]. In addition to corrections to the terms in the LP factorization formula, the NLP factorization formula has additional terms suppressed by m 2 /p 2 T that are expressed as a sum of pQCD cross sections for producing a pair of collinear partons convolved with double-parton fragmentation functions. In the case of cross sections summed over quarkonium spins, the corrections to the NLP fragmentation formula are suppressed by a power of m 4 /p 4 T . The predictive power of the NLP fragmentation formula can be dramatically increased by applying the NRQCD factorization formula to the double-parton fragmentation functions, reducing these nonperturbative functions to multiplicative constants.
The NLP/NRQCD factorization formula opens the door to dramatic improvements in the accuracy of theoretical predictions for quarkonium production at large p T . The factorization formula can be expressed as a triple expansion in powers of α s , v, and m/p T . NLP factorization incorporates subleading powers of m/p T . The NRQCD expansion includes subleading powers of v. Accurate predictions also require calculating all the pQCD factors to next-to-leading order (NLO) in α s . The pQCD factors are the cross sections for producing single partons, the cross sections for producing collinear parton pairs, the single-parton fragmentation functions for producing QQ pairs, the double-parton fragmentation functions for producing QQ pairs, and the evolution kernels for both sets of fragmentation functions.
The first fragmentation function for quarkonium production to be calculated to nextto-leading order (NLO) in α s was for gluon fragmentation into QQ in the color-octet 3 S 1 channel [10,11]. This calculation is particularly simple, because the LO fragmentation function is proportional to δ(1 − z). The first NLO calculation of a fragmentation function that at LO is a nontrivial function of z was that for gluon fragmentation into QQ in the color-singlet 1 S 0 channel [12]. It would be useful to have all the phenomenologically relevant fragmentation functions calculated to NLO in α s .
In NLO QCD calculations, the most challenging step is often the calculation of the phase-space integrals from real-gluon emission. A strategy that is often effective is to design subtractions that cancel the infrared divergences in the phase-space integrals, calculate the integrals of the subtraction terms analytically, and then calculate the subtracted phase-space integrals numerically. In the case of fragmentation functions, the phase-space integrals also have ultraviolet divergences. It is therefore necessary to design subtractions that also cancel these ultraviolet divergences. The NLO calculation of Ref. [12] was carried out using a subtraction procedure for fragmentation functions that was adapted from the dipole subtraction procedure for parton cross sections introduced by Catani and Seymour [13]. An alternative subtraction scheme for parton cross sections that has some advantages was introduced by Frixione, Kunszt, and Signer (FKS) [14]. The FKS subtraction method has been used in the automation of next-to-leading order computations of parton cross sections in QCD [15].
In this paper, we adapt the FKS subtraction method to the NLO calculation of fragmentation functions. We illustrate the method by applying it to gluon fragmentation into a QQ pair in the color-octet 1 S 0 channel. This fragmentation function is of phenomenological importance for the production of J P C = 0 −+ quarkonium states, such as the η b or η c . The color-singlet 1 S 0 channel is leading order in v. The color-octet 1 S 0 channel is one of three color-octet channels suppressed by only v 4 . In the case of production of the η c at large p T at the Large Hadron Collider, the color-octet 1 S 0 channel is numerically the most important of the three [16,17].
The outline of our paper is as follows. In Section II, we present the LO fragmentation function for gluon fragmentation into QQ in the color-octet 1 S 0 channel and define some quantities that are useful in the NLO calculation. In Section III, we introduce the FKS subtraction terms that cancel all the ultraviolet and infrared divergences in the real NLO corrections. The subtracted phase-space integrals are calculated in 4 dimensions, and their insensitivity to the cut parameters in the FKS subtractions is verified. In Section IV, we present analytic results for the ultraviolet and infrared divergences from loop integrals in the virtual NLO corrections. In Section V, we verify that all the divergences from phasespace integrals and from loop integrals are canceled by renormalization of the parameters of QCD and by renormalization of the operator whose matrix element defines the fragmentation function. Some numerical illustrations of our results are presented in Section VI. Our results are summarized in Section VII. In Appendix A, we derive parametrizations of massless two-parton phase-space integrals that are used to integrate the subtractions terms for the real NLO corrections. In Appendix B, we calculate the pole terms in the dimensionally regularized phase-space integrals of the subtraction terms analytically. In Appendix C, we show how MadGraph5 [18] can be used to generate helicity amplitudes for cut diagrams with a heavy-quark pair and two light partons in the final state.

II. LEADING-ORDER FRAGMENTATION FUNCTION
In this section, we present the perturbative fragmentation function for g → QQ, with the QQ pair in a color-octet 1 S 0 state, at leading order in α s . We also introduce some related expressions that are useful in the calculation of the real radiative corrections at next-to-leading order in α s .

A. Feynman rules
Gluon fragmentation functions can be calculated using Feynman rules derived by Collins and Soper in 1981 [1]. The fragmentation function is expressed as the sum of all possible cut diagrams with an eikonal line that extends from a gluon-field-strength operator on the left side of the cut to a gluon-field-strength operator on the right side. Single virtual gluon lines are attached to the operators on the left side and on the right side. The two virtual gluon lines from the operators are connected to each other by gluon and quark lines produced by QCD interactions, with possibly additional gluon lines attached to the eikonal line. The cut passes through the eikonal line, the line for the particle into which the gluon is fragmenting, and possibly additional gluon and quark lines. An example of a cut diagram with the cut passing through the lines of a heavy quark and antiquark and an additional gluon is shown in Figure 1.
The Feynman rules for the cut diagrams are relatively simple [1]: they are summarized in Ref. [12]. The 4-momentum K of the gluon that is fragmenting enters the diagram through the operator vertex on the left side of the eikonal line and it exits through the operator on the right side. Some of that momentum flows through the single gluon line attached to the operator and the remainder flows through the eikonal line. The particle into which the gluon is fragmenting has a specified 4-momentum. In the case of fragmentation of a gluon into a QQ pair with zero relative momentum, it is convenient to express the 4-momentum of the QQ pair as 2p. The longitudinal momentum fraction z of the QQ pair is: The operator at the left end of the eikonal line is labelled by a Lorentz index µ and a color index a. The Feynman rule for the operator vertex is where q, λ and c are the 4-momentum, Lorentz index, and color index of the gluon line attached to the vertex. The operator at the right end of the eikonal line is labelled by a Lorentz index ν and a color index b. The fragmentation function is the sum of all cut diagrams contracted with −g µν and δ ab and multiplied by the Collins-Soper prefactor [1]: where N c = 3 is the number of colors of a quark and D = 4 − 2 is the space-time dimension.
The color-singlet NRQCD matrix element O 1 ( 1 S 0 ) η Q is leading order in v, and it can be expressed in terms of the wavefunction at the origin for the η Q . The matrix element O 8 ( 1 S 0 ) η Q is one of three color-octet matrix elements that are suppressed by only v 4 . It is related by heavy-quark spin symmetry to the NRQCD matrix element O 8 ( 3 S 1 ) ψ Q for a 1 −− quarkonium state ψ Q , which can be determined phenomenologically by fitting cross sections for production of ψ Q . In Eq. (6), the PQCD fragmentation functions multiplying The color-singlet 1 S 0 fragmentation function was calculated at leading order (LO) in α s by Braaten and Yuan in 1993 [19]: The NLO term D NLO (z) in this fragmentation function was calculated in Ref. [12]. Our goal is to calculate the color-octet 1 S 0 fragmentation function to NLO.
The pQCD fragmentation functions in Eq. (6) can be determined from perturbative QCD calculations of the fragmentation function for producing a QQ pair. Fragmentation functions for producing QQ in a 1 S 0 state can be determined most easily by taking the QQ pair to be in a spin-singlet state with zero relative momentum. To determine the color-singlet fragmentation function, the Q andQ are projected onto the color-singlet state QQ 1 by contracting their color indices i and j with δ ij / √ N c . To determine the color-octet fragmentation function, the Q andQ are projected onto the color-octet state QQ 8 with color index a by contracting their color indices i and j with √ 2 T a ij . Given the normalizations of the NRQCD operators defined in Ref. [3], the perturbative approximations to the NRQCD matrix elements are where N c = 3. On the left side of Eq. (8b), there is an implied sum over the N 2 c − 1 colors of QQ 8 . If dimensional regularization is used to regularize ultraviolet and infrared divergences, these matrix elements have no NLO corrections. By dividing the perturbatively calculated fragmentation function D g→QQ 8 (z) by the perturbative matrix element in Eq. (8b), we obtain the fragmentation function multiplying O 8 ( 1 S 0 ) η Q in Eq. (6).

C. Born fragmentation function
The fragmentation function for g → QQ can be calculated perturbatively from the cut diagrams in which the cut lines include Q andQ. At leading order in α s , the cut diagrams are the diagram in Figure 1 and three other diagrams obtained by interchanging the two gluon vertices on the left side of the cut and interchanging the two gluon vertices on the right side of the cut. The final-state Q andQ are on-shell with equal momenta p and total longitudinal momentum fraction z. The final-state gluon is on-shell with a momentum q whose phase space must be integrated over. The cut through the eikonal line gives a factor of 2πδ(K.n − (2p + q).n).
The amplitude corresponding to the sum of the two diagrams on the left side of the cut in Figure 1 is given in Eq. (2.10) of Ref. [12]. The QQ pair is projected onto the color-singlet state QQ 1 in Eq. (2.11) of Ref. [12]. If the amplitude is instead projected onto the color-octet state QQ 8 with color index b, the net effect is the replacement where a is the color index of the gluon-field-strength operator and c is the color index of the final-state gluon. After squaring the amplitudes, contracting the color indices for the operators, and summing over the colors of the gluon and the QQ pair, the net effect is the substitution This procedure projects the QQ pair onto the color-octet states QQ 8 . Thus the LO fragmentation function D g→QQ 8 (z) differs from the LO fragmentation function D g→QQ 1 (z) just by the multiplicative color factor (N 2 c − 4)/2. The LO fragmentation function D In the calculation of the NLO fragmentation function for g → QQ 8 , it is useful to have the LO fragmentation function for g → QQ 8 expressed as an integral over the gluon phase space in D = 4 − 2 dimensions: where N CS is the Collins-Soper prefactor in Eq. (5). The Born phase-space measure dφ Born is the product of the differential phase space for the final-state gluon of momentum q and a factor 2πδ(K.n − (2p + q).n) from the cut through the eikonal line. It can be reduced to a single differential in the invariant mass s of the QQg system: where s and z expressed as functions of p and q are z = (2p).n (2p + q).n .
There is an implied Heavyside theta function that imposes the constraint s > 4m 2 /z. The Born squared amplitude A Born is obtained by multiplying the right side of Eq. (2.15) in Ref. [12] by the color factor (N 2 c − 4)/2: where z and s are expressed as functions of p and q in Eqs. (14). The factors of K.n = (2p + q).n cancel between N CS , dφ Born , and A Born in Eqs. (5), (13), and (15).
The LO fragmentation function for g → QQ 8 in D dimensions is obtained by inserting the three factors in Eqs. (5), (13), and (15) into Eq. (12). Setting = 0 and integrating over s, we obtain the final result for the LO fragmentation function for g → QQ 8 in 4 dimensions: Dividing by the perturbative NRQCD matrix element in Eq. (8b), we obtain the LO fragmentation function D

D. Born tensors
To facilitate the calculation of the real NLO corrections to the fragmentation function, it is convenient to generalize the integration measure dφ Born (p, q) for the LO fragmentation function in Eq. (13) by allowing q to be a more general light-like 4-vector. It could be the momentum q 1 or q 2 of a massless final-state parton, or it could be another light-like 4-vector constructed from q 1 and q 2 . The variables s = (2p + q) 2 and z = (2p.n)/(2p + q).n defined in Eqs. (14) can be regarded as functions of this more general light-like 4-vector q. The longitudinal momentum of the fragmenting gluon is (2p + q 1 + q 2 ).n. The Collins-Soper prefactor in Eq. (5) can be generalized to a function of p and q: The Born phase-space measure in Eq. (13), with the factor of 1/(2p + q).n replaced by 1/(2p + q 1 + q 2 ).n and with its coefficient expressed as a function of s and z, will be denoted by dφ Born (s, z): Similarly, the Born squared amplitude A Born (p, q) in Eq. (15), with the factor of [(2p + q).n] 2 replaced by [(2p + q 1 + q 2 ).n] 2 and with its coefficient expressed as a function of s and z, will be denoted by A Born (s, z): The product of N Born , dφ Born , and A Born in Eqs. (17), (18), and (19) depends only on s and z. We introduce a more concise notation for this product: If this measure is multiplied by a function of s and integrated over s from 4m 2 /z to ∞, it defines a function of z. If the weight function is simply 1, the integral is the LO fragmentation function for g → QQ 8 in D dimensions defined in Eq. (12): In the calculation of the real NLO corrections to the fragmentation function, it is convenient to have expressions for the Born squared amplitude with a pair of uncontracted Lorentz indices. They will be used to construct subtraction terms that cancel the ultraviolet and The Born tensor with Lorentz indices associated with the eikonal line is obtained by multiplying the right side of Eq. (2.24) in Ref. [12] by the color factor (N 2 c − 4)/2: where l µ and T µν are The tensor A µν eikonal is orthogonal to n µ and n ν . Its contraction with −g µν is where A Born is given in Eq. (19).
The Born tensor with Lorentz indices associated with the final-state gluon is obtained by multiplying the right side of Eq. (2.27) in Ref. [12] by the color factor (N 2 c − 4)/2: where the tensors are Their coefficients are where z is the momentum fraction in Eq. (14b). The tensor A µν gluon is orthogonal to q µ and q ν . Its contraction with −g µν is where A Born is given in Eq. (19).

III. REAL NLO CORRECTIONS
The real NLO corrections to the perturbative fragmentation function for g → QQ, with the QQ pair in a color-octet 1 S 0 state, come from cut diagrams with two real partons in the final state. The two partons can be two gluons (gg) or a light quark-antiquark pair (qq).
Cut diagrams with two real gluons can be obtained from the four LO cut diagrams with a single real gluon, such as the diagram in Figure 1, by adding a gluon line that crosses the cut and runs from any of the 6 colored lines on the left side of the cut to any of the 6 colored lines on the right side of the cut. The additional gluon line can also be attached to the operator vertex, in which case the fragmenting gluon is attached to the eikonal line.
The cut diagrams with a light qq pair can be obtained from the four LO cut diagrams by replacing the real gluon line that crosses the cut by a virtual gluon that produces a qq pair that crosses the cut.
Each of the cut diagrams involves an integral over the phase space of the two real partons in the final state. We denote the equal momenta of the Q andQ by p and the momenta of the final-state partons (which can be two gluons or a light quark and antiquark) by q 1 and q 2 . The real NLO contribution to the fragmentation function can be expressed as where N CS is the Collins-Soper prefactor in Eq. (5) and dφ real is the product of the differential phase space for final-state partons with momenta q 1 and q 2 and the factor 2πδ(K.n − (2p + q 1 + q 2 ).n) from the cut through the eikonal line. The longitudinal momentum fraction of the QQ pair is In the integrand of Eq. (29), A real is the squared amplitude from cut diagrams with two gluons crossing the cut, and A (qq) real is the squared amplitude from cut diagrams with a light quark and antiquark crossing the cut. The factor 1 2 multiplying A (gg) real in Eq. (29) compensates for overcounting the states by integrating over the entire phase space of the two identical gluons.

A. Anatomy of the poles
The phase-space integrals in Eq. (29) diverge in several regions, yielding poles in = (4 − D)/2 of both infrared (IR) and ultraviolet (UV) nature. The nature of the IR poles can be soft or collinear.

Soft infrared limits
Soft singularities only show up in the squared amplitude A (gg) real from final-state gluons since a soft (anti)quark does not yield any pole. First let us consider the limit q 2 → 0 (soft limit for the gluon 2). The tree-level amplitude is proportional to the color factor d acb in Eq. (9), where a, b, and c are the color indices of the eikonal line, the QQ pair, and the final-state gluon, respectively. In the eikonal approximation associated with the soft limit q 2 → 0, the amplitude for the emission of the soft-gluon is obtained from the tree amplitude by replacing d acb with where µ and d are the Lorentz index and color index of the gluon with soft momentum q 2 .
Squaring the amplitude and summing over color and Lorentz indices, one readily obtains the following approximation for the squared amplitude in the soft limit q 2 → 0 : where A Born is the Born squared amplitude defined in Eq. (15). The analogous result in the

Collinear infrared limits
Collinear singularities show up in both the squared amplitudes A real from the kinematic region in which the light partons crossing the cut are collinear. In order to describe the collinear limit, it is convenient to define the light-like four-vector which satisfiesq 2 = 0 andq.n = (q 1 + q 2 ).n. In the collinear limit, the four-vectorq coincides with q 1 + q 2 , and the expression for the squared amplitude factorizes over the Born amplitude up to spin correlations. In order to account for these spin correlation effects in collinear splittings, it is convenient to define a 4-vectorq by This 4-vector is orthogonal toq:q.q = 0. The 4-momenta of the two partons can be expressed as In the case of A (gg) real , the factorisation formula when the momenta of the two gluons crossing the cut are nearly collinear reads where the Born tensor A µν gluon is defined in Eq. (25). The tensor P In the case of A (qq) real , the factorisation formula when the momenta of the light quark and antiquark crossing the cut are nearly collinear reads The tensor P where T F = 1 2 is the trace of the square of a generator for the fundamental representation and n f is the number of light flavours.
In the squared amplitude A (gg) real , additional collinear singularities arise from kinematic regions in which one gluon crossing the cut is collinear to the eikonal line. When the gluon momentum q i is collinear to the four-vector n, one has where Q = 2p + q 1 + q 2 is the sum of the momenta of the particles crossing the cut.

Ultraviolet limits
Ultraviolet singularities in the squared amplitude A (gg) real arise from the kinemetic region in which the invariant mass s = (2p + q 1 + q 2 ) 2 of all the final-state particles goes to ∞. The factorisation formula in each of the two UV limits s (2p + q j ) 2 for j = 1, 2 also holds up to spin correlations. In order to account for these spin correlation effects, it is convenient to introduce the 4-vectors l j defined by These 4-vectors are orthogonal to n: l j .n = 0. The 4-vector l µ 1 is the component of q µ 2 orthogonal to n. It is also convenient to define the longitudinal momentum fraction y j of the system consisting of the QQ pair and the parton of momentum q j : The factorisation formula includes a factor of A µν eikonal (p, q j ), where A µν eikonal is the Born tensor defined in Eq. (22) whose Lorentz indices µ and ν are associated with the eikonal line. The factor A µν eikonal can be interpreted as arising from the fragmentation of a gluon with longitudinal momentum y j K.n into a QQ pair with longitudinal momentum zK.n via the radiation of a gluon of momentum q j . In the limit s (2p + q j ) 2 , one has The tensor P eik µν is defined by

B. Subtraction scheme and kinematics
In order to extract the poles resulting from phase-space integrals in the singular regions outlined in the previous section, we adopt in this work a subtraction scheme that is inspired by the formalism introduced by Frixione, Kunszt, and Signer (FKS) [14]. In the FKS formalism for parton cross sections [14], the phase space is partitioned into kinematic regions real by a partition of unity with four terms: where the weight functions S i,j are scalar functions of p, q 1 , q 2 , and n. Each S i,j acts as a damping factor for some singular phase-space regions. The second index j is associated with the parton of momentum q j . For the (qq) term in Eq. (29), no partition of unity is required since there is only one kinematic region yielding a pole, namely the singular limit of a collinear qq pair. Our strategy to extract the poles in the expression in Eq. (29) where the dependence on the momenta p, q 1 , q 2 is implicit in each function in the integrands.
The subtraction terms T Unlike the construction in the FKS formalism, Lorentz invariance is explicitly manifest in our construction of the subtraction terms, i.e. we do not specify any specific frame. Singular regions are characterised by Lorentz-invariant quantities. We define a dimensionless variable λ that vanishes at the boundary that gives IR singularities associated with two collinear partons and/or one soft parton: [eb,pa] We define a dimensionless variable u 1 (u 2 ) that vanishes at the boundary that gives IR singularities when gluon 2 (gluon 1) is soft and/or collinear to the eikonal line: They satisfy u 1 + u 2 = 1. (The mismatch between the indices of the variable u j that approaches 0 and the momentum q 3−j that becomes soft or collinear simplifies the expressions for subtraction terms.) The total invariant mass s of the final-state particles and the invariant mass s j of the heavy-quark pair and the gluon j are We define dimensionless variables ζ j that vanish at the boundaries that give UV singularities when s is much larger than s j : where the momentum fraction y j is defined by Eq. (43). The boundaries of the singular regions are represented in Figure 2.
The subtraction terms T (gg) i,j and T (qq) introduced in Eq. (47) will be defined using cutoff variables, so that the subtraction is applied only in the vicinity of the singular phase-space boundaries. The variables on which these cutoffs apply are selected in such a way to make the integration of the poles in in the subtraction integrals tractable.
C. Subtraction terms

Partition of unity
To define the weight functions S i,j in the partition of unity in Eq. (46), we first introduce functions w i,j : . (52b) The sum of these four functions is The weight functions in the partition of unity are defined by At the singular boundaries of phase space, one or two of the variables λ, u 1 , u 2 , ζ 1 , and ζ 2 vanishes. In the singular limits, some of the weight functions S i,j vanish and the others simplify. In the collinear IR limit λ → 0, only S 2,1 and S 2,2 are nonzero (and they add up (55) In the soft IR limit u j → 0, only S 1,j and S 2,j are nonzero (and they add up to 1): In the UV limit ζ j → 0, only S 1,j is nonzero: In the construction of the subtraction terms T in Eq. (47), we use Heavyside theta functions in the variables λ, u j , and ζ j associated with the singular boundaries: In the construction of the subtraction terms T (gg) 2,j in Eq. (47), we also use Heavyside theta functions in variables δ and δ j defined by The theta functions are In the construction of the subtraction terms T (qq) in Eq. (47), we use the Heavyside theta function θ (λ) in the variable λ.

Subtraction terms for T
The phase-space boundaries that give singularities in the integral of 1 2 A (gg) real S 1,j are u j = 0 and ζ j = 0. The singular piece can be expressed as The remainder obtained by subtracting T real S 1,j can be integrated numerically in D = 4 dimensions, because the θ (u j ) term subtracts the singularity when u j → 0, the θ (ζ j ) term subtracts the singularity when ζ j → 0, and the θ (ζ j ) θ (u j ) term adds back the double singularity that is over-subtracted by the other two terms.
The weight function S (u j ) 1,j in the first subtraction term in Eq. (61) is where λ j is defined by In the soft limit q 3−j → 0, this weight function approaches S 1,j , whose limiting behavior is given in Eq. (56a). The subtraction term D (u j ) 1 is constructed using the Born squared amplitude A Born in Eq. (15) with s replaced by s j /y j : The integral of the sum of S The subtraction term D (ζ j ) in Eq. (61) is constructed using the Born tensor A µν eikonal in Eq. (22) with Lorentz indices associated with the eikonal line: The tensor V The over-subtraction term D (ζ j ,u j ) in Eq. (61) is constructed using the Born squared amplitude A Born (s j /y j , z): The poles in the integral of D (ζ j ) are evaluated analytically in Sec. B 2 of Appendix B. The over-subtraction integral summed over j is given in Eqs. (B11) and (B12).

Subtraction terms for T
The phase-space boundaries that give singularities in the integral of 1 2 A (gg) real S 2,j are u j = 0 and λ = 0. The singular piece can be expressed as The remainder obtained by subtracting T (gg) 2,j from 1 2 A (gg) real S 2,j can be integrated numerically in D = 4 dimensions, because the θ (u j ) term subtracts the singularity when u j → 0, the θ (λ) term subtracts the singularity when λ → 0, the θ (u j ) θ (δ j ) term subtracts additional singularities when both u j → 0 and δ j → 0, and the last two terms add back singularities that are over-subtracted by the other terms.
The weight function S (u j ) 2,j in the first subtraction term in Eq. (68) is wheres = (2p +q) 2 . In the soft limit q 3−j → 0, this weight function approaches S 2,j , whose limiting behavior is given in Eq. (56b). The subtraction term D (u j ) 2 is constructed using the Born squared amplitude A Born in Eq. (15) with s replaced bys = (2p +q) 2 : The integral of the sum of S Since u 1 + u 2 = 1, they satisfy In the collinear IR limit λ → 0, this weight function approaches S 2,j , whose limiting behavior is given in Eq. (55). The subtraction term D (λ) is constructed from the Born tensor A µν gluon in Eq. (25) with Lorentz indices associated with the final-state gluon: where the tensor P The subtraction term D (u j ,δ j ) is constructed using the Born squared amplitude A Born (s j , z), where the variables j is defined by with s j = (2p + q j ) 2 and u j defined in Eq. (49). The subtraction term is where w j is defined by The poles in the integral of D (u j ,δ j ) are evaluated analytically in Sec. B 4 of Appendix B.
The subtraction integral summed over j is given in Eqs. (B19) and (B20).
The over-subtraction terms D (u j ,δ) and D (λ,u j ) in Eq. (68) are the same. They are constructed using the Born squared amplitude A Born (s, z): The poles in the integral of D (u j ,δ) are evaluated analytically in Sec. B 3 of Appendix B.
The over-subtraction integral summed over j is given in Eqs.

Subtraction term for T (qq)
The only phase-space boundary that gives singularities in the integral of A (qq) real is λ = 0. The singular piece can be expressed as The remainder obtained by subtracting T (qq) from A (qq) real can be integrated numerically in D = 4 dimensions, because the the θ (λ) term subtracts the singularity when λ → 0.
The subtraction term D (qq) is constructed from the Born tensor A µν gluon in Eq. (25) with Lorentz indices associated with the final-state gluon: The tensor P

D. Insensitivity to cut parameters
The finite parts of the real NLO corrections to the fragmentation function for g → QQ 8 can be obtained by adding two contributions: • the subtracted real NLO corrections, which are given by the first two integrals on the right side of Eq. (47). The integrals over the phase space of the two final-state partons in 4 dimensions are evaluated numerically.

IV. VIRTUAL NLO CORRECTIONS
The virtual NLO corrections to the perturbative fragmentation function for g → QQ 8 , where the QQ pair is in a color-octet 1 S 0 state, come from cut diagrams with one loop on either the right side or the left side of the cut. Loop diagrams on one side of the cut can be obtained from the LO diagrams, like the one in Figure.
where N CS is the Collins-Soper prefactor in Eq. (5)  propagator are given in Appendix B of Ref. [12]. The poles and the finite parts of the virtual NLO correction can be readily obtained from the calculation of the fragmentation function for g → QQ 1 in Ref. [12] by changing the coefficients of the master integrals.
In all the poles in from the loop integral in Eq. (81), the Born squared amplitude A Born (p, q) in Eq. (15) appears as a multiplicative factor. The virtual NLO corrections to the fragmentation function can therefore be expressed as where f pole (p, q) has only poles in and A finite (p, q) is a finite function of s = (2p + q) 2 and z.
The terms in f pole (p, q) can be organized to make their cancellation against the poles from other contributions of the NLO correction more transparent: f pole (p, q) = U g + U Q (s) + 2U gQQ + U eikonal + M(s) + S 1 + S 2 (s, z).
There are four terms in Eq. (83) with only UV poles: where C F = (N 2 c − 1)/(2N c ) is the Casimir for the fundamental representation. In Feynman gauge, the terms U g , U Q (s), U gQQ , and U eikonal arise from virtual-gluon propagator corrections, virtual-quark propagator corrections, quark-gluon vertex corrections, and eikonal line corrections, respectively. There is one term in Eq. (83) with mixed UV and IR poles: In Feynman gauge, this term comes from loop correction to the operator vertex. There are two terms in Eq. (83) with only IR poles: The infrared poles originate from loop-momentum configurations with partons that can be soft and/or collinear. The term S 1 is a soft pole that in Feynman gauge comes from oneloop diagrams obtained from the four LO cut diagrams by exchanging a gluon between the on-shell heavy quarks. All other infrared poles are included in the term S 2 (s, z).

The virtual NLO corrections in Eq. (82) can be expressed as
where D 1 (z) is the LO fragmentation function in 4−2 dimensions in Eq. (21) and N dφA Born is the LO differential fragmentation function in Eq. (20).

V. RENORMALIZATION
The calculation of the fragmentation function is performed in terms of the renormalized fields Ψ r and A r , the renormalized coupling constant g, and the physical mass m of the heavy quark. Their relations with the corresponding bare quantities involve renormalization constants δ 2 , δ 3 , δ g , and δ m : The renormalization of the coupling constant is performed in the MS scheme, whereas the renormalization of the heavy-quark mass is performed in the on-shell mass scheme. In the resulting expressions for the renormalization constants δ 2 , δ 3 , δ g , and δ m , it is convenient to pull out a common factor: The rescaled renormalization constantsδ i in the schemes specified above read is the coefficient of −α 2 s /π in the beta function (µd/dµ)α s (µ). In the counterterm for g in Eq. (90c), we have allowed for the renormalization scale µ R of α s to be different from the scale µ introduced through dimensional regularization.
The contributions to the NLO fragmentation function from inserting propagator counterterms and vertex counterterms into the LO cut diagrams are D (counter) The terms with the coefficients C g , C Q (s), C gQQ , and C eikonal are associated with the virtualgluon propagator, the virtual-quark propagator, the quark-gluon vertices, and the eikonalgluon vertex in the LO cut diagrams, respectively. The expressions for these coefficients in terms of the rescaled renormalization constantsδ i 's are The counterterm contributions to the NLO fragmentation function can be reduced to The field renormalization constantsδ 2 andδ 3 have single IR poles that must cancel the single IR poles that remain after adding the real NLO corrections and the virtual NLO corrections. The linear combination 2δ 2 +δ 3 in Eq. (93) has infrared poles proportional to C F , n f T F , and N c . The IR pole proportional to C F inδ 2 cancels the C F term in the IR pole in S 1 in Eq. (86a). The IR pole proportional to n f T F inδ 3 cancels the IR pole in Eq. (B39).
The IR pole proportional to N c inδ 3 cancels single IR poles in S 1 and S 2 (s, z) and single IR where P gg (y) is the Altarelli-Parisi splitting function: We have allowed for the factorization scale µ F to be different from the scale µ introduced through dimensional regularization.

VI. NUMERICAL RESULTS
Beyond leading order in α s , the fragmentation function D g→η Q (z) depends on a factorization scale µ F and on a renormalization scale µ R . If we make those scales explicit, the expression for the color-octet 1 S 0 term in the NLO fragmentation function for g → η Q in Eq. (6) is The scales µ F and µ R were introduced through renormalization. The Altarelli-Parisi evo- It is worthwhile to make those singularities explicit. Our final result for the NLO term in the fragmentation function has the form where D finite (z) is a function with a smooth limit as z → 1, and D (8) sing (z) is a function with logarithmic singularities in that limit: The coefficients c  The uncertainties are the estimated standard deviations of the parameter estimators, assuming that the errors in the regression model are independent and normally distributed.
We found no numerical evidence for a log 2 (1 − z) contribution proportional to n f . In the The resulting curves are shown in Fig. 4, both as a function of z with a linear scale (left panel) and as a function of 1 − z with a logarithmic scale (right panel). By construction, the curves for D (8) finite (z) with n f = 0 and for the contribution to D finite (z) from one additional light-quark flavor approach plateaus when 1 − z gets very close to 1.
The NLO fragmentation function is compared with the LO fragmentation function in Figure 5 for the case of bottomonium. The LO fragmentation function is proportional LO is given in Eq. (11). The NLO fragmentation function is proportional to the sum of α 2 s (µ R )D LO (z) increases monotonically from 0 to 5α 2 s /(96m 3 b ) as z increases from 0 to 1. The NLO term α 3 s D NLO (z) increases from −∞ as z → 0 to a maximum at z ≈ 0.8, and then decreases to −∞ as z → 1. For µ R = µ F = 2m b , its maximum is 1.1 × 10 −3 /m 3 b at z = 0.80. At z = 0.5, the NLO fragmentation function is larger than the LO fragmentation function by a factor of 2.67. The NLO term is large and negative in the z → 1 region because of the log 2 (1 − z) term. To determine the fragmentation function accurately as a function of z in this region, it would be necessary to sum the leading logarithms of 1−z to all orders. This is not essential because the logarithmic singularities as z → 1 are integrable. The NLO term is also large and negative in the z → 0 region. This may arise from a singular term of the form log z. The large NLO corrections in this region may not be a problem, because kinematics generally excludes contributions from the small-z region of the fragmentation function.
The sensitivity of the LO and NLO fragmentation functions to the renormalization scale µ R and to the factorization scale µ F is also illustrated in Figure 5. The bands are obtained by varying µ R or µ F up or down by a factor of 2 around the central value 2m b (with the other scale held fixed). The left panel of Figure 5 shows the NLO band from varying µ R (with µ F = 2m b ). The NLO band is significantly wider than the LO band in the central region of z. One might have expected the sensitivity to µ R to be decreased by adding NLO corrections, but this is not the case simply because the NLO term in the fragmentation function is larger than the LO term in the central region of z. The right panel of Figure 5 shows the band from varying µ F (with µ R = 2m b ). In the central region of z, the width of the band from varying µ F is much narrower than that from varying µ R , partly because the function multiplying log(µ 2 F /4m 2 ) in Eq. (97) vanishes near z ≈ 0.75. The width of the band increases at larger z and near the z → 0 endpoint.

VII. SUMMARY
In this paper, we have presented the calculation of the NLO QCD corrections to the fragmentation function for a gluon into a color-octet 1 S 0 QQ pair at leading order in v. To calculate the real NLO correction, we developed a generalization of the FKS subtraction scheme that can be applied to fragmentation functions. The UV and IR poles in the real NLO corrections arise from boundaries in the phase space for the final-state partons. We constructed subtraction terms for the integrand of the real NLO correction that cancel the singular contributions from each of these boundaries and for which the poles in the subtraction integrals can be calculated analytically. Our development of an FKS subtraction scheme for fragmentation functions paves the way toward the automated calculation of the NLO fragmentation functions in other NRQCD channels.
We found that the NLO QCD corrections have a dramatic effect on the fragmentation function. Instead of increasing monotonically with z as at LO, the NLO fragmentation function has a maximum in the central region of z. For µ F = µ R = 2m, the NLO fragmentation function is larger than the LO fragmentation function by about a factor of 3. As a consequence, the NLO fragmentation function displays strong sensitivity to the renormalization scale. These results suggest that QCD corrections to the color-octet 1 S 0 fragmentation function could have a significant impact on the production of the spin-singlet quarkonium states The real NLO corrections to the fragmentation function involve integrals over the phase space for two massless partons whose longitudinal momenta are constrained to add up to (K − 2p).n. The dimensionally regularized phase-space measure is where the single-particle phase-space measure in D dimensions is Explicit parametrizations of this phase-space measure are required in order to extract the poles in in the integrals of the subtraction terms for the real NLO corrections.
In Appendix A of Ref. [12], two parametrizations of the two-parton phase-space measure To obtain an expression for the phase-space measure in Eq. (A1) that is differential in w j and u j , we begin with the expression for the phase-space measure in Eq. (A.6) of Ref. [12], which depends on two light-like 4-vectors k 1 and k 2 that define polar axes for the parton momenta q 1 and q 2 : where the scalar variables ρ j are defined by The first light-like 4-vector k 1 should be a linear combination of p µ and n µ with coefficients that are scalar functions of p and n. The second light-like 4-vector k 2 should be a linear combination of p µ , n µ , and the first parton momentum q µ j with coefficients that are scalar functions of p, n, and q j . The transverse angular measure dΩ 2⊥ is that for the second parton momentum.
The appropriate choices for the two light-like 4-vectors in this case are The first scalar variable ρ j can be expressed as By using the identity q 3−j = (q 1 + q 2 ) − q j , the second scalar variable ρ 3−j can be expressed as After changing variables from ρ j and ρ 3−j tos j and w j , we obtain our final result for the two-parton phase-space measure: where dφ Born is the Born phase-space measure defined in Eq. (18) and dφ (u j ,δ j ) 2 is the partonemission measure The range of w j is from (1 − z)u j /z to ∞. The range of u j is from 0 to 1.

Phase-space measure for D (λ)
After averaging over transverse angles, the subtraction term D (λ) in Eq. (73) can be expressed as the product of the Born squared amplitude A Born (s, z), wheres = (2p +q) 2 andq is the 4-vector defined in Eq. (34), and the sum of two functions of dimensionless variables. In the second function, the two dimensionless variables are .
To obtain an expression for the phase-space measure in Eq. (A1) that is differential in λ and v, we begin by expressing the phase-space measure in an iterated form involving the product of the phase-space measure for Q = q 1 + q 2 and the differential phase space for the decay of a particle with 4-momentum Q into particles with 4-momenta q 1 and q 2 : where the differential 2-particle phase space is The product of the phase-space measure for Q and the delta function in Eq. (A12) is most easily simplified in the rest frame of P . The phase-space measure for Q is where θ is the angle between Q and n in that frame. The energy Q 0 and the magnitude |Q| of the 3-momentum can be expressed in terms of Lorentz invariants: where λ(a, b, c) = a 2 + b 2 + c 2 − 2(ab + bc + ca). After dividing each term by 2p.n, the constraint provided by the delta function in Eq. (A12) can be expressed as The delta function can be used to integrate over cos θ. It is convenient to change variables from s = (2p + Q) 2 tos = (2p +q) 2 :s The resulting expression for the product of the phase-space measure and the delta function The differential 2-body phase-space measure dΦ(Q, q 1 , q 2 ) is most easily simplified in the rest frame of Q. It can be reduced to where θ is the angle between P and q 2 in that frame and dΩ ⊥ is the transverse angular measure. The dimensionless variable v defined in Eq. (A11) can be expressed in terms of cos θ and Lorentz invariants: The differential phase space then reduces to Inserting Eqs. (A18) and (A21) into Eq. (A12), we obtain our final result for the twoparton phase-space measure: dφ real (p, q 1 , q 2 ) = dφ Born (s, z) dφ where dφ Born is the Born phase-space measure defined in Eq. (18) and dφ 2 is the parton- The variables v + and v − depend on λ ands: wherer = (s − 4m 2 )/4m 2 . The range of λ is from 0 to ∞. The range of v is from v − to v + .

Appendix B: Subtraction Integrals
Explicit expressions for the poles in the integrals of the subtraction terms can be obtained by carrying out the integration over a (3 − 2 )-dimensional slice of phase-space. The choice of this slice depends on the subtraction term under consideration, which is labelled by a superscript (A) that indicates the variables that vanish in the singular region. The general decomposition of the phase-space measure reads The Collins-Soper prefactor N CS is defined in Eq. (5). The Born phase-space measure dφ Born , which is differential in s (A) , is defined in Eq. (18). The parton-emission measure dφ (A) can be reduced to a differential in two variables multiplied by a transverse angular measure dΩ ⊥ , whose integral is and (3.8) of Ref. [12]. The factor N (p, q j ) is N CS y −2+2 j , where y j is the momentum fraction defined in Eq. (43). The factor dφ Born (p, q j ) can be expressed in terms of the measure defined in Eq. (18) as (1/y j )dφ Born (s j , z/y j ), where s j = (2p + q j ) 2 . In the decomposition of the phase-space measure in Eq. (B1), the Born phase-space measure is dφ Born (s j , z/y j ) and the parton-emission measure is The extraction of the poles follows the same approach as in Section 3.3 of Ref. [12].
The only difference is that the phase-space boundary s > s j /y j is replaced by the cut can be averaged over transverse angles using results in Section 3.3 of Ref. [12]. The angular average of D (ζ j ) is The integral over s gives a UV pole. Up to terms of relative order 3 , it can be expressed as (B5) The integral over y j gives an IR pole. After renaming the differential variable in dφ Born as s j → s, the subtraction integral is the same for j = 1 and j = 2. Their sum is The functions I where P (real) gg (y) is the real-gluon contribution to the Altarelli-Parisi splitting function for g → g: The function D 1 is defined in Eq. (21). The functions D log and D log 2 are defined by where the measure N dφA Born (s, z) is given in Eq. (20). Note that D log (z, A cut ) depends on A cut through the term log(A cut )D 1 (z).
2. Over-subtraction term proportional to θ (ζ j ) θ (u j ) In the over-subtraction term proportional to θ (ζ j ) θ (u j ) in T 1,j , the function D (ζ j ,u j ) is given in Eq. (67). To extract the poles in the integral of the over-subtraction term, we use the decomposition of the phase-space measure in Eq. (B1) with the Born phase-space measure dφ Born (s j /y j , z), where s j = (2p + q j ) 2 and y j is defined in Eq. (43), and with the parton-emission measure where u j is defined in Eq. (49). This parton-emission measure can be derived from dφ (ζ j ) in Eq. (B3) by changing variables from y j to u j = (1 − y j )/(1 − z).
The integral over s gives a UV pole. The integral over u j gives an IR pole. After renaming the differential variable in dφ Born as s j /y j →s, the over-subtraction integral is the same for j = 1 and j = 2. Their sum is The functions I The function D 1 is defined in Eq. (21), and the functions D log and D log 2 are defined in Eqs. (B9).
3. Over-subtraction term proportional to θ (u j ) θ (δ) In the over-subtraction term proportional to θ (u j ) θ (δ) in T (gg) 2,j , the function D (u j ,δ) is given in Eq. (77a). To extract the poles in the integral of the subtraction term, we use the decomposition of the phase-space measure in Eqs. (3.26) and (3.27) of Ref. [12]. The factor N Born (p,q) coincides with N CS . The factor dφ Born (p,q) can be expressed in terms of the measure defined in Eq. (18) as dφ Born (s, z), wheres = (2p +q) 2 . In the decomposition of the phase-space measure in Eq. (B1), the Born phase-space measure is dφ Born (s, z) and the parton-emission measure is variables w j and u j given in Eqs. (A3) as well as in the transverse angles. The cut variable δ j defined in Eqs. (59b) and Eq. (59c) can be expressed as The cut δ j < δ cut can therefore be expressed as a cut on w j − (1 − z)u j /z that depends on s j and is proportional to δ cut /(1 − δ cut ).
The integrals over w j and u j give a double infrared pole. After relabelling the differential variable in dφ Born bys j → s, we obtain the same subtraction integral for j = 1 and j = 2.
Their sum is The functions I The function D 1 is defined in Eq. (21), the functions D log and D log 2 are defined in Eqs. (B17), and the function F (u,δ) is given by where r = (s − 4m 2 )/4m 2 .

Subtraction term proportional to θ (λ)
In the subtraction term proportional to θ (λ) in T The sum over j of the subtraction terms can be simplified by using the identity in Eq. (72): The tensor P (gg) µν in Eq. (38) can be averaged over the transverse angles using results in Section 3.5 of Ref. [12]. The angular average of D (λ) is The functions V where v is defined in Eq. (A11). To extract the poles in the integrals of the subtraction terms, the V The functions I The function D 1 is defined in Eq. (21), the functions D log and D log 2 are defined in Eqs. (B9), and the function F (λ) is where r = (s − 4m 2 )/4m 2 and v − is Its limiting behavior as λ → 0 is v − → λ/r 2 .
6. Subtraction terms proportional to θ (u j ) In the subtraction term proportional to θ (u j ) in T subtraction terms would be equal. This will be shown below by considering appropriate choices for s (A) and dφ (A) for each subtraction term. It is therefore convenient to consider these two subtraction terms together.
To extract the poles in the integral of the D (u j ) 1 subtraction term given in Eq. (64), we use the decomposition of the phase-space measure in Eq. (B1) with the Born phase-space measure dφ Born (s j /y j , z), where s j = (2p + q j ) 2 and y j is defined in Eq. (43), and with the parton-emission measure dφ (u j ) where u j is defined in Eq. (49) and λ j is defined in Eq. (63). The parton-emission measure the integral over λ is 0, but it can be expressed as the difference between a UV pole and an IR pole. The integral over u j gives an IR pole. The sum of the two subtraction integrals is the same for j = 1 and j = 2. The sum over j of the subtraction integrals is where the constant V (u) is This constant vanishes if UV = IR .
7. Over-subtraction term proportional to θ (λ) θ (u j ) In the over-subtraction term proportional to θ (λ) θ (u j ) in T (gg) 2,j , the function D (λ,u j ) is given in Eq. (77b). To extract the poles in the integral of the over-subtraction term, we use the same decomposition of the phase-space measure as in Section (B 3), with the Born phasespace measure dφ Born (s, z) and the parton-emission measure dφ (λ,u j ) = dφ (u j ,δ) in Eq. (B13).
The integrals over λ and over u j give IR poles. The over-subtraction integral is the same for j = 1 and j = 2. Their sum is where the constant V (λ,u) is (λ cut u cut ) − IR 1 + −Li 2 (u cut ) − π 2 6 2 IR .
Particles: the new states have the following properties: • the state eik is a zero-mass, scalar, color-octet state; • the state source is a zero-mass, vector, color-singlet state; • the state co is a duplicate of a heavy-quark pair state (either charm or bottom) that is projected onto a color-octet state.
Interactions: the new interactions specify the Lorentz structure of the coupling of the gluon field with the source and/or the eikonal lines. Two vertices must be defined: • the source-eik-g vertex, • the eik-g-eik vextex.
The additional Feynman rules for fragmentation functions include a delta function for the cut through the eikonal line. That delta function is included in the phase-space measure, so it does not appear in the UFO model.
The relabelling of the heavy-quark+antiquark state co simply acts as a trigger to force the heavy quark and antiquark in the final state into a color-octet configuration, a projection that is applied by means of an ad-hoc modification of the color treatment in MadGraph5.
Given that we are only interested in a final-state heavy-quark pair projected onto a scalar state in this work, we also add a filter to remove diagrams where a single gluon is attached to the co fermion line.
With the above UFO model at hand, MadGraph5 can be used to generate (i) the diagrams associated with a fragmentation process and (ii) a Fortran code for the numerical evaluation of the amplitude associated with the cut diagrams. The left-hand side of the cut of each generated diagram for gluon fragmentation with two gluons crossing the cut in addition to the 1 S 0 QQ 8 state is displayed in figure 6.
The projection of the heavy-quark pair onto a spin-singlet state has not yet been applied.
Moreover, with the above extension of the UFO model for SM processes, MadGraph5 has treated the eik and source states as if they were regular particles. This calls for several modifications in the default Fortran code generated by MadGraph5: • The projection onto a spin-singlet state can be easily achieved by combining amplitudes with different heavy-quark helicities in the appropriate configurations.
• MadGraph5 automatically decomposes the calculation of helicity amplitudes into generic building blocks, and writes the routines associated with these blocks using a module called Aloha [22]. In the two routines associated with the two vertices involving the eikonal line, MadGraph5 identifies the four-vector n µ associated with the eikonal line with the momentum flowing along the eikonal line. Thus the two routines must be modified so that the four-vector n µ is properly set to the (fixed) eikonal four-vector.
• A cut diagram with Lorentz index µ at the operator on the left side of the cut and Lorentz index ν at the operator on the right side of the cut must be contracted with −g µν . Instead, MadGraph5 contracts each index with the polarization vector µ (λ) [or * ν (λ)] built upon the helicity state λ of the source. Summing over the helicity states of the source will not yield the correct result in general, unless we define the momentum K associated with the source with some care. For a fixed value of K.n, we define light-like four-vectors K + and K − whose spacial components are equal and opposite and such that K + .n = K.n and K µ − is proportional to the eikonal four-vector n µ . The tensor that is used by MadGraph5 to contract indices µ and ν at the sources on both sides of the cut can be decomposed as follows: λ µ (λ) * ν (λ) = −g µν + K µ However by gauge invariance, any amplitude associated with the sum of cut diagrams with Lorentz index µ and ν at the sources on both sides of the cut vanishes if it is contracted with either the eikonal four-vector n µ or the eikonal four-vector n ν .
Since K ν − is porportional to n µ , the second term in Eq. (C1) will not contribute after contraction of the Lorentz indices.
After implementing the above modifications, the code generated by MadGraph5 can be used to evaluate the matrix element of processes involving gluon fragmentation into an S-wave color-octet heavy-quark pair plus other light partons. Gauge invariance and Lorentz invariance have been checked numerically. We also checked that the above procedure adapted to the case of fragmentation into a color-singlet heavy-quark pair reproduces numerically