Generating QCD amplitudes in the color-flow basis with MadGraph

We propose to make use of the off-shell recursive relations with the color-flow decomposition in the calculation of QCD amplitudes on MadGraph. We introduce colored quarks and their interactions with nine gluons in the color-flow basis plus an Abelian gluon on MadGraph, such that it generates helicity amplitudes in the color-flow basis with off-shell recursive formulae for multi-gluon sub-amplitudes. We demonstrate calculations of up to 5-jet processes such as $gg\rightarrow 5g$, $u\bar{u}\rightarrow 5g$ and $uu\rightarrow uuggg$. Although our demonstration is limited, it paves the way to evaluate amplitudes with more quark lines and gluons with Madgraph.


Introduction
The Large Hadron Collider (LHC) has been steadily running at 7 TeV since the end of March/2010. Since LHC is a hadron collider, understanding of QCD radiation processes is essential for the success of the experiments. To evaluate new physics signals and Standard Model (SM) backgrounds, we should resort to simulation programs which generate events with many hadrons and investigate observable distributions. In each simulation, one calculates matrix elements of hard processes with quarks and gluons, and this task is usually done by an automatic amplitude calculator.
MadGraph [1] is one of those programs. Although it is highly developed and has ample user-friendly utilities such as event generation with new physics signals matched to Parton Shower [2], it cannot evaluate matrix elements with more than five jets in the final state 1 [3]. This is a serious drawback since exact evaluation of multi-jet matrix elements is often required to study substructure of broad jets in identifying new physics signatures over QCD background. It is also disappointing because MadGraph generated HELAS amplitudes [4] can be computed very fast on GPU (Graphic Processing Unit) [5,3].
Some of other simulation packages such as HELAC and Alpgen [6,7] employ QCD off-shell recursive relations to produce multi-parton scattering amplitudes efficiently. Successful computation of recursively evaluated QCD amplitudes on GPU has been reported [8]. It is therefore interesting to examine the possibility of implementing rea email:kaoru.hagiwara@kek.jp b email:takaesu@post.kek.jp 1 In the case of purely gluonic processes, even gg → 5g process cannot be evaluated on MadGraph [3].
cursive relations for gluon currents in MadGraph without sacrificing its benefits. In this paper, we examine the use of the recursive amplitudes in the color-flow basis, since corresponding HELAS amplitude package has been developed in ref. [9]. The main purpose of this paper is to show that this approach can be accommodated in MadGraph with explicit examples.
The outline of this paper is as follows. In section 2, we briefly review the color-flow decomposition and offshell recursive relations. We then discuss the implementation of those techniques in MadGraph, using its "user mode" option [2] in section 3. In section 4 and 5, we explain how we evaluate the color-summed amplitude squared and show the numerical results of n-jet production cross section. Section 6 is devoted to conclusions.

The color-flow basis and off-shell recursive relations
In this section we review the color-flow decomposition [9] of QCD scattering amplitudes and the off-shell recursive relation [10] of gluonic currents in the color flow basis.

The color-flow decomposition
First, we briefly review the color-flow decomposition. The Lagrangian of QCD can be expressed as where Upper and lower indices are those of 3 and 3 representations, respectively. Note that the gluon fields, (A µ ) i j (i, j = 1, 2, 3), are renormalized by a factor of √ 2, and hence the coupling g is divided by √ 2. At this stage, not all the nine gluon fields are independent because of the traceslessness of the SU (3) generators, Here we introduce the "Abelian gluon", This is essentially the gauge boson , B µ , of U (1) subgroup of U (3), combined with its generator, δ i j / √ 2N , which is normalized to 1/2. We then rewrite eq. (1) by adding and subtracting the Abelian gluon, such that the QCD Lagrangian is expressed as with Here all the nine gluons, (G µ ) i j , are now independent while the covariant tensors keep the same form In this basis, these nine gluons have one-to-one correspondence to a set of indices of 3 and 3 representations of U (3), (j, i) ⇐⇒ (G µ ) i j , and we address them and this basis as U (3) gluons and the color-flow basis, respectively, in the following discussions. Although the definition of the covariant tensor (10) contains self-coupling terms for U (3) gluons, the Abelian gluon contribution actually drops out in the sum. Accordingly, the Feynman rules for U (3) gluons give directly the SU (3) (QCD) amplitudes for purely gluonic processes [9].
We list the Feynman rules derived from the Lagrangian (8) in Fig. 1. It should be noted that both the propagator and the quark vertex of the Abelian gluon have an extra −1/N factor because of the color-singlet projector, δ i j / √ N . The negative sign of this factor directly comes from the sign of the Abelian gluon kinetic term in the Lagrangian. We can evaluate QCD amplitudes by using these Feynman rules.
For a n-gluon scattering process, it is written as obtained from the corresponding n U (3) gluon scattering process. A σ σ(1), σ(2), · · · , σ(n) are gauge-invariant partial amplitudes, which depend only on particle momenta and helicities represented simply by the gluon indices, 1, · · · , n, and the summation is taken over all (n−1)! non-cyclic permutations of gluons. A set of n Kronecker delta's in each term gives the "color flow" of the corresponding partial amplitudes. As an example, we list in Fig. 2 all six color flows indicated by Kronecker delta's for the gg → gg process, G i1 j1 G i2 j2 → G i3 j3 G i4 j4 . On the other hand, if a scattering process involves quarks, contributions from the Abelian gluon do not decouple. Therefore, we have to add all its contributions to the total amplitude. For processes with one quark line, such contributions come from Abelian gluon emitting diagrams. The total amplitude for qq → ng process becomes where A k σ q, σ(1), · · · , σ(n − k), q; σ(n − k + 1), · · · , σ(n) is the partial amplitude with k Abelian gluons, and q and q denote the momenta and the helicities of the quark and the anti-quark, respectively. The summation is taken over all the n! permutations of n gluons. The first term in the r.h.s. of eq. (13) gives contributions from n U (3) gluons, and the other terms give contributions from (n − k) U (3) gluons and k Abelian gluons, summed over k = 1 to n, where (−1/N ) k comes from the −1/N factor in the Abelian gluon vertex as depicted in Fig. 1. Corresponding color flows of those partial amplitudes are shown in Fig. 3.
A 0 σ q 1 , σ(1), · · · , σ(r), q 2 | q 2 , σ(r+1), · · · , σ(n), q 1 (or B 0 σ ) denotes a partial amplitude with n U (3) gluons, where two sets of arguments divided by "|" belong to two different color-flow chains; one starts from q 1 (q 1 in the initial state) and ends with q 2 (q 2 in the final state), and the other starts from q 2 and ends with q 1 , which are given explicitly by two sets of delta's before the partial amplitude. The difference between A 0 σ and B 0 σ is that the former consists of U (3)-gluon-exchange diagrams while the latter consists of Abelian-gluon-exchange ones. Here we write down explicitly the partial amplitudes with external U (3) gluons, A 0 and B 0 , whereas those with external Abelian gluons should be added as in the previous one-quark-line case. For illustration, some typical diagrams for the q 1 q 2 → q 1 q 2 gg process are shown in Fig. 4.

Implementation in MadGraph
In this section, we discuss how we implement off-shell recursive relations in MadGraph in the color-flow basis and how we generate helicity amplitudes of QCD processes.

Subroutines for off-shell recursive formulae
First, we introduce new HELAS [4] subroutines in Mad-Graph which make n-point gluon off-shell currents and n-gluon amplitudes in the color-flow basis, according to eq. (16) and eq. (20), respectively. Although the expression eq. (16) gives the off-shell gluon current made from n on-shell gluons, in HELAS amplitudes any input onshell gluon wave functions can be replaced by arbitrary off-shell gluon currents with the same color quantum numbers. Shown in Fig. 6 is an example of such diagrams that are calculated by the HELAS subroutine for the 4-point off-shell gluon current. Thanks to this property of the HELAS amplitudes, we need to introduce only two types of subroutines: one which computes helicity amplitudes of n-gluon processes via eq. (20) and the other which computes off-shell gluon currents from n-point gluon vertices via eq. (16). We name the first type of subroutines as gluon# and the second type as jgluo#, where # denotes the number of external on-shell and off-shell gluons. The number of new subroutines we should add to Mad-Graph depends on the number of external partons (quarks and gluons) in QCD processes. Processes with n-partons can be classified as those with n gluons, those with (n − 2) gluons and one quark line, those with (n − 4) gluons and two quark lines, and so on.
In the color-flow basis, the first class of processes with n external gluons are calculated by just one amplitude subroutine, gluon n.
For the second class of processes with (n − 2) gluons and one quark line, we need up to (n − 1)-point off-shell current subroutines, jgluo# with # = 4 to n − 1. This gluon# #-gluon amplitude in the color-flow basis jgluo# off-shell gluon current from (#−1) external gluons in the color-flow basis ggggcf 4-gluon amplitude from the contact 4-gluon vertex in the color-flow basis jgggcf off-shell gluon current from the contact 4-gluon vertex in the color-flow basis jioaxx off-shell Abelian gluon current from a quark pair in the color-flow basis Table 1. New HELAS subroutines added into MadGraph. gluon# and jgluo# compute the #-gluon amplitude and the off-shell gluon current from the #-gluon vertex, respectively, by using the off-shell recursive formulae in the color-flow basis. We use gluon# with # = 4 to 7 and jgluo# with # = 4 to 6 in this study. Two subroutines for the contact 4-gluon vertex (ggggcf and jgggcf) are introduced to sum over the two channels (s and t or s and u) for a given color flow, according to the Feynman rule in Fig. 1. We also add the off-shell Abelian gluon current subroutine from a quark pair (jioaxx).
is because the largest off-shell gluon current appears in the computation of diagrams where (n − 2) on-shell gluons are connected to the quark line through one off-shell gluon, which can be computed by the (n − 1)-point offshell current and the qqg amplitude subroutine, iovxxx. Note that the same diagram can be computed by the offshell gluon current subroutine made by the quark pair, jioxxx, and the (n−1)-point gluon amplitude subroutine, gluon (n-1). This type of redundancy in the computation of each Feynman diagram is inherent in the HELAS amplitudes, which is often useful in testing the codes. For n-parton processes with (n − 4) gluons and two quark lines, we need up to (n − 2)-point off-shell current subroutines. By also introducing multiple gluon amplitude subroutines up to (n − 2)-point vertex, the maximum redundancy of HELAS amplitudes is achieved. Likewise, for n-parton processes with m quark lines, we need up to (n − m)-point off-shell current or amplitude subroutines.
We list in Table 1 the new HELAS subroutines we introduce in this study. The subroutine gluon# evaluates a #-gluon amplitude in the color-flow basis, and jgluo# computes an off-shell current from (#−1) external gluons. Since we consider up to seven parton processes, gg → 5g, uu → 5g and uu → uu3g, in this study, we use gluon4 to gluon7 and jgluo4 to jgluo6.
In addition to these subroutines that computes amplitudes and currents recursively, we also introduce three subroutines: ggggcf, jgggcf and jioaxx. Two of them, ggggcf and jgggcf, evaluate an amplitude and an offshell current from the contact 4-gluon vertex, following the Feynman rule of Fig. 1. Although the amplitude subroutine and the off-shell current subroutine for the 4-gluon vertex already exist in MadGraph, ggggxx and jgggxx, we should introduce the new ones which evaluate the sum of sand t-type or s-and u-type vertices for a given color flow, since the default subroutines compute only one type at a time. jioaxx computes an off-shell Abelian gluon current made by a quark pair and is essentially the same as the off-shell gluon current subroutine, jioxxx, in the HELAS library [4] except for an extra −N factor: Note that introducing this −N (= −1/N × N 2 ) factor is equivalent to summing up contributions from all Abelian gluon propagators, as we discussed in section 2. We show the codes of ggggcf, jgggcf, gluon5 and jgluo5 in Appendix.

Introduction of a new Model: CFQCD
Next, we define a new Model with which MadGraph generates HELAS amplitudes in the color-flow basis since the present MadGraph computes them in the color-ordered basis [11]. A Model is a set of definitions of particles, their interactions and couplings; there are about twenty preset Models in the present MadGraph package [2] such as the Standard Model and the Minimal SUSY Standard Model [12]. There is also a template for further extension by users, User Mode (usrmod). Using this template, we can add new particles and their interactions to MadGraph. We make use of this utility and introduce a model which we call the CFQCD Model.
In the CFQCD Model, we introduce gluons and quarks as new particles labeled by indices that dictate the color flow, such that the diagrams for partial amplitudes are generated according to the Feynman rules of Fig. 1. We need one index for quarks and two indices for gluons, such as u k , u k and g ji . The Abelian gluon, g 0 , does not have an index. The index labels all possible color flows, and it runs from 1 to m, where m = the number of gluons + the number of quark lines.
(22) This number m is the number of Kronecker's delta symbols which dictate the color flow. As an example, let us consider the purely gluonic process g(1) g(2) → g(3)g(4)g(5)g(6)g (7), for which we need seven delta's to specify the color flow: Here the numbers in parentheses label gluons whereas the numbers in the sub-indices of Kronecker's delta's count the color-flow lines, 1 to m = 7 as depicted in Fig. 7. In CFQCD, we label gluons according to their flowing-out, 3, and flowing-in, 3, color-flow-line numbers, such that the partial amplitude with the color flow (24) is generated as the amplitude for the process g 32 (2) g 21 (1) → g 17 (7) g 76 (6) g 65 (5) g 54 (4) g 43 (3). (25) This is the description of the process (23) in our CFQCD Model, and we let MadGraph generate the corresponding partial amplitudes, such as A(1, · · · , n) in eq. (20), as the  helicity amplitudes for the process (25). This index number assignment has one-to-one correspondence with the color flow (24). For instance, g 32 (2) in the process (25) denotes the contribution of the to the partial amplitude where its3 index i(2) terminates the color-flow line 2, and the 3 index j(2) starts the new color-flow line 3. It should also be noted that we number the color-flow lines in the ascending order along the color flow, starting from the color-flow line 1 and ending with the color-flow line m. This numbering scheme plays an important role in defining the interactions among CFQCD gluons and quarks. Let us now examine the case for one quark line. For the 5-jet production process the color-flow index should run from 1 to 6 according to the rule (22). Indeed the color flow corresponds to the process We show in Fig. 8 the color-flow diagram for this process. This is just that of the 6-gluon process cut at the g 16 gluon, where g 16 gluon is replaced by the quark pair, u 1 and u 6 . Shown in Fig. 9 are a few representative Feynman diagrams contributing to the process (28). Both the external and internal quarks and gluons in the CFQCD model are shown explicitly along the external and propagator lines. Following the MadGraph convention, we use flowingout quantum numbers for gluons while the quantum numbers are along the fermion number flow for quarks. Gluon  In CFQCD, not only U (3) gluons but also the Abelian gluon contributes to the processes with quark lines. For the uu → 5g process (26), 1 to 5 gluons can be Abelian gluons, g 0 . If the number of Abelian gluons is k, the color flow reads When k = 5, all the five gluons are Abelian, and the first (the right-most) color flow should be (δ 1 ) iu ju , just as in uu → 5 photons. In Fig. 10, we show the color-flow diagram for the process (26) with the color flow (29) for k = 3 as an example.
For the process with two quark lines, the color-flow index should run from 1 to 5. All the possible color flows are obtained from the comb-like diagram for the one-quark-line process shown in Fig. 8, by cutting one of the gluons into a quark pair, such as g k+1,k to d k+1 and d k . Then the first color flow starting from u 1 ends at d k , and the new color flow starts with d k+1 which ends at u m . An example of such color flow for k = 4 and m = 5 reads The CFQCD model computes the partial amplitude for the above color flow as the helicity amplitude for the process The other possible color-flow processes without Abelian gluons are for k = 3, 2, 1, respectively. As in the single quark line case, all the external gluons can also be Abelian gluons, and we should sum over contributions from external Abelian gluons. For instance, if the gluon g(3) in the process (33) is Abelian, the color flow becomes and the corresponding partial amplitude is calculated for the process in CFQCD. When there are more than one quark line, the Abelian gluon can be exchanged between two quark lines, and the color flow along each quark line is disconnected. For instance, the color flow is obtained when the Abelian gluon is exchanged between the u-quark and d-quark lines. The corresponding partial amplitude is obtained for the CFQCD process Note that in the process (39) each flow starts from and ends with a quark pair which belongs to the same fermion line.
We have shown so far that we can generate diagrams with definite color flow by assigning integer labels to quarks, q k , and gluons, g kl , such that the labels k and l count the color-flow lines whose maximum number m is the sum of the number of external gluons and the numbers of quark lines (quark pairs), see eq. (22).

New particles and their interactions in the CFQCD Model
In Table 2, we list all the new particles in the CFQCD model for m = 6 in eq. (22). The list is shown in the format of particles.dat in the usrmod of MadGraph [2]. As explained above, the U (3) gluons have two color-flow indices, g kl , while the Abelian gluon, g 0 , has no color-flow index. They are vector bosons (type=V), and we use curly lines (line = C) for U (3) gluons while wavy lines (line = W) for the Abelian gluon. The 'color' column of the list is used  by MadGraph to perform color summation by using the color-ordered basis. Since we sum over the color degrees of freedom by summing the 3 and 3 indices (j's and i's) over all possible color flows explicitly, we declare all our new particles as singlets (color = S) 2 . The last column gives the PDG code for the particles, and all our gluons, including the Abelian gluon, are given the number 21. All gluons, not only the Abelian gluon but also U (3) gluons, are declared as Majorana particles (particle and anti-particle are the same) in CFQCD. We adopt this assignment in order to avoid generating gluon propagators between multi-gluon vertices. Such a propagator is made from a particle coming from one of the vertices and its anti-particle from the other. Since we define the antiparticle of a U (3) gluon as the gluon itself, the color flow of the propagator should be flipped as shown in Fig. ??, according to the gluon naming scheme explained in the previous subsection. Therefore, CFQCD does not give diagrams with gluon propagator in "color-flow conserving" amplitudes. For example, to form a g 13 gluon propagator between two multi-gluon vertices, we need a g 13 gluon coming out from one of the vertices and a g 31 gluon from the other, according to the gluon naming scheme explained in the previous subsection. However, because a g 31 gluon is not an anti-particle of g 13 but a different particle in our 2 If we declare all CFQCD gluons as octet and quarks as triplets, MadGraph generates color-factor matrices in the color-ordered basis for each process, which is not only useless in CFQCD but also consumes memory space. particle difinition, Table 2 , g 13 gluon propagator can not be formed. U (3) gluon propagators attached to quark lines are allowed by introducing the color-flow non-conserving qqg couplings that effectively recover a color-flow connection. See discussions on qqg vertices at the end of this section.
In Table 2, we list u-quarks, u k , and its anti-particles, u k , with the color-flow index k = 1 to 6. They are all femions (type = F) for which we use solid lines (line = S) in the diagram. Their colors are declared as singlets (color = S) as explained above. The list should be extended to the other five quarks, such as d k and d k for down and anti-down quarks.
Before closing the explanation of new particles in CFQCD, let us note that the number of U (3) gluons needed for mgluon processes is m(m − 2). This follows from our colorflow-line numbering scheme, which counts the successive color-flow lines in the ascending order along the color flow as depicted in Fig. 7. This is necessary to avoid double counting of the same color flow. According to this rule, the only gluonic vertex possible for m = 3 is the one among g 13 , g 32 and g 21 . Although g 31 can appear for processes with m ≥ 4, g 12 and g 23 can never appear. Generalizing this rule, we find that g kl 's with l = k + 1 mod(m) as well as l = k cannot appear and hence we need only m(m − 2) gluons in CFQCD.
In this paper, we report results up to 5-jet production processes. Purely gluonic gg → 5g process has seven external gluons, and m = 7 is necessary only for this process. According to the above rule, there is only one interaction for this process, which is the one among g 17 , g 76 , g 65 , g 54 , g 43 , g 32 and g 21 . Therefore, we should add g 17 and g 76 to Table 2 in order to compute gg → 5g amplitudes.
Next, we list all the interactions among CFQCD particles. Once the interactions among particles of a user defined model are given, MadGraph generates Feynman diagrams for an arbitrary process and the corresponding HELAS amplitude code. In CFQCD, we introduce n-point gluon interactions and let MadGraph generate a code which calls just one HELAS subroutine (either gluon# or jgluo# with # = n, which makes use of the recursion relations of eqs. (20) or (16), respectively) for each n-point vertex. In addition, we have quark-quarkgluon vertices. We list the interactions in the descending order of the number of participating particles in Table 3 to 7.
First, we show the 7-point interaction in Table 3 in the format of interactions.dat of usrmod in MadGraph [2]. As discussed above, it is needed only for generating gg → 5g amplitudes. The vertex is proportional to g 5 s , the fifth power of the strong coupling constant, and we give the five couplings, cpl1 to cpl5, as according to the Feynman rules of Fig. 1 3 , whose types, type1 to type5, are all QCD. The 6-point interactions appear in gg → 4g and also in qq → 5g process in this study. Again, only one interaction is possible among the six gluons, g kl , with k = 1 to 6 and l = k − 1, as shown in Table 4. The coupling order is g 4 s and the four couplings, cpl1 to cpl4, are G2 all with the type QCD.
with the sixth color-flow line can contribute to the 5-point gluon vertex. Because of the ascending color-flow numbering scheme, only one additional combination appears as shown in the second row of Table 5. These vertices have g 3 s order and we have cplk = G2 and typek = QCD for k = 1, 2, 3. The 4-point gluon vertices appear in gg → gg (m = 4), qq → (m − 1)g with m = 4 to 6, and in qq → qq + (m − 2)g with m = 4 and 5 in this study. As above, we have only one 4 -point gluon vertex for processes with m = 4, which is shown in the first row of Table 6. For the process qq → 4g (m = 5), one additional vertex appears as shown in the second row. In case of qq → 5g (m = 6), the ordering 3 → 4 → 5 → 6 also appears, and it is given in the third row.
So far, we obtain multiple gluon vertices from the colorflow lines of consecutive numbers, corresponding to the color flows such as y + 1 → y + 2 → · · · → y + n,  for n-point gluon vertices. When there are two or more quark lines in the process, we can also have color flows which skips color-flow-line numbers, such as y + 1 → · · · → y + n → · · · → y + n + d, for n-point gluon vertices, where d counts the number of skips. Because gluon propagators do not attach to gluon vertices in CFQCD, this skip can appear only when two or more gluons from the same vertex are connected to quark lines. For example, in the fourth row of Table 6, the gluon g 15 couples to the quark line, u 5 → u 1 , and then the gluon g 53 couples to the other quark line, d 3 → d 5 , in the process ud → ud gg. Likewise, g 42 and g 31 in the fifth and the sixth row, respectively, couple to the second quark line, d → d, of the process. As for the 3-gluon vertices, ten vertices listed in Table 7 appear in our study. The first four vertices with successive color-flow numbers appear in processes with one quark line, qq → (m − 1)g with m = 3 to 6, and those with two quark lines, qq → qq (m − 2)g with m = 4 to 5. The fifth and the sixth vertices starting with g14 appears for qq → qq (m − 2)g with m = 4, for which only one unit of skip (d = 1) appears, and also with m = 5. The last four vertices appear only in the m = 5 process with two quark lines, for which d = 2 is possible. In fact, the two vertices starting with g15 contain g52 or g41 with d = 2 skips in the color-flow number. This completes all the gluon selfinteractions in CFQCD up to 5-jet production processes.
There are two types of qqg vertices in CFQCD: the couplings of U (3) gluons, g kl , and those of the Abelian gluon, g 0 . All the qqg couplings for the u-quark, u 1 to u 6 , are listed in Table 7. In the HELAS convention, the fermionfermion-boson couplings are two dimensional complex arrays, where the first and the second components are the couplings of the left-and the right-hand chirality of the flowing-in fermion. According to the Feynman rules of Fig.1, the couplings are for the Abelian gluon; Note the −1/N factor for the Abelian gluon coupling. U (3) gluons have interactions as where the fermion number flows from u l to u k by emitting the out-going g kl gluon. All the diagrams with on-shell U (3) gluons attached to a quark line are obtained from the vertices (45). Likewise, the Abelian gluon couples to quarks as In CFQCD, we generate an U (3) gluon propagator between a quark line and a gluon vertex and between two quark lines by introducing color-flow flipping vertices u k u l g kl (47) as we discussed above. Here, the gluon g kl is emitted from the quark line u k → u l , such that U (3) gluons can propagate between a quark line and a gluonic vertex and also between two quark lines when the other side of the qqg vertex is the color-flow conserving one, (45). In order to exchange gluons between an arbitrary gluonic vertex and a quark line, these color-flow-flipped qqg vertices should exist for all U (3) gluons. However, since all U (3) gluons have the color-flow conserving vertices (45) as well, we find double counting of amplitudes where an U (3) gluon is exchanged between two quark lines. This double counting can be avoided simply by discarding color-flow conserving qqg vertices (45) for k < l as shown in Table 7. Now we exhaust all the interactions needed in the calculation of partial amplitudes and ready to generate diagrams and evaluate total amplitudes in the color-flow basis.

Total amplitudes and the color summation
In this section, we discuss how we evaluate the total amplitudes, eqs. (12), (13) and (14), with the CFQCD model and how we perform the color summation of the total amplitude squared.

gg → ng processes
We consider pure gluon processes first. As discussed in section 2, the total amplitude of a n-gluon process is expressed as eq. (12), and it is the sum of several partial amplitudes. Because color factors, Kronecker's delta's, for partial amplitudes is either 1 or 0, the total amplitude for a given color configuration (a color assignment for each external gluons) consists of a subset of all the partial amplitudes in eq. (12). Therefore, in order to evaluate the total amplitude for a given color configuration, we should find all possible color flows for the configuration, compute their partial amplitudes and simply sum them up.
Here the subscripts of each index pair label the gluon g(k), k = 1 to 5, with the momentum p k and the helicity λ k . For instance, let us examine a color configuration One of the possible color flows that gives the above color configuration is whose associated amplitude can be calculated as the amplitude for the CFQCD process g 32 (2) g 21 (1) → g 15 (5) g 54 (4) g 43 (3).
There is also another color flow for the color configuration (50). The corresponding partial amplitude can be obtained by one of the (n − 1)! permutations of (n − 1) gluon momenta and helicities: where ǫ µ (i) denotes the wave function of the external gluon g(i). When all the partial amplitudes for each color flow are evaluated, we sum them up and obtain the colorfixed total amplitude, eq. (12), for this color configuration. Therefore, for pure gluon process, we generate the HELAS amplitude once for all to evaluate the color-fixed total amplitude. The total amplitude is then squared and the summation over all color configurations is done by the Monte-Carlo method.

qq → ng processes
Next, we discuss the processes with one quark line, qq → ng. The procedure to compute the color-summed amplitude squared is the same, but we should take into account the Abelian gluon contributions for processes with quarks. As shown in Fig. 3, the Abelian gluons appear as an isolated color index pair which have the same number. Therefore, we can take into account its contribution by regarding the independent gluon index pair as the Abelian gluon.
As an example, let us consider the process uu → g(1)g(2)g(3)g(4) with the color configuration: where the parenthesis with the subscript 'u' gives the color charges of the u-quark pair; (j u , i u ) u denotes the annihilation of the u-quark with the 3 charge, j u , and the u-quark with the 3 charge, i u . Although this color configuration is essentially the same as (50), and hence has the color flows like (51) and (53), we have an additional color flow for this process: Here the index pair of the first gluon, (1, 1) (1) in (56), forms an independent color flow, (δ 5 ) i(1) j(1) , which corresponds to the Abelian gluon, g 0 (1). The CFQCD process for this color flow reads u 1 u 4 → g 43 (4) g 32 (3) g 21 (2) g 0 (1).
Summing up, there are three color flows for the color configuration (56): The partial amplitude A b for the color flow (b) is obtained from that of the color flow (a), A a , by a permutation of gluon wave functions as in the case of gg → 3g amplitudes for the color configuration (50). The partial amplitude for the color flow (c) is calculated with the Feynman rules of Fig. 1, and the total amplitude M is obtained as where the −1/N factor comes from the Abelian gluon as shown in eq. (13). When more than one gluon have the same color indices, j k = i k in (j k , i k ) (k) , more Abelian gluons can contribute to the amplitude, and the factor (−1/N ) m appears for the partial amplitude with m Abelian gluons. In the CFQCD model introduced in section 3, those factors are automatically taken into account in the HELAS code generated by MadGraph.

qq → qq (n − 2)g processes
Finally, let us discuss the processes with two quark lines. As shown in Fig. 4, there are two independent color flows because there are two sets of quark color indices, (j q1 , i q1 ) and (j q2 , i q2 ). Nevertheless, we can show color configurations and find possible color flows in the same way as in the qq → ng cases. Let us consider the process ud → ud g(1)g(2)g (3) (60) with the color configuration for illustration. Color charges of u-quarks are in the parenthesis (j u , i u ) u , and those of d-quarks are in (j d , i d ) d as in the qq → ng processes. All the possible color flows are We show in Fig. 12 one representative Feynman diagram for each color flow, (a) to (d). The amplitudes for each color flow, A a to A d , are calculated as amplitudes for the corresponding CFQCD processes: For the CFQCD processes (c) and (d), the color flow lines starting with the u-and d-quarks terminate at the same quarks. Such amplitudes are generated by an exchange of the Abelian gluon, as shown by the representative diagrams in Fig. 12. The total amplitude is now obtained as according to eq. (14). The color summation of the squared amplitudes |M| 2 is performed by the MC method just as in the pure gluon case.

Sample results
In this section, we present numerical results for several multi-jet production processes as a demonstration of our CFQCD model on MadGraph. We compute n-jet production cross sections from gg → ng, uu → ng and uu → uu + (n − 2)g subprocesses up to n = 5 in the pp collision at √ s = 14 TeV. We define the final state cuts, the QCD coupling constant and the parton distribution function exactly as the same as those of ref. [3], so that we can compare our results against those presented in ref. [3], which have been tested by a few independent calculations. Specifically, we select jets (partons) that satisfy where η j and p T (j) are the pseudo-rapidity and the transverse momentum of the parton-j, and p T jk is the smaller of the relative transverse momentum between parton-j and parton-k. We use CTEQ6L1 parton distribution functions [13] at the factorization scale Q = 20 GeV and the QCD coupling α s (Q = 20 GeV) MS = 0.171. Phase space integration and summation over color and helicity are performed by an adaptive Monte Carlo (MC) integration program BASES [14]. Results are shown in Table 8 and Fig.13. In Table 8, the first row for each n-jet process gives the exact result for the n-jet production cross section, while the second row shows the cross section when we ignore all the Abelian gluon contributions. The third row shows the results where we include up to one Abelian gluon contributions: one Abelian gluon emission amplitudes without an Abelian gluon exchange for uu → ng and uu → uu + (n − 2)g processes, and Abelian gluon exchange amplitudes without an Abelian gluon emission for uu → uu + (n− 2)g processes. All the numerical results for the exact cross sections in Table 8 agree with those presented in ref. [3] within the accuracy of MC integration. In Fig. 13, the multi-jet production cross sections are shown for n = 2, 3, 4, and 5 jets in units of fb. The upper line gives the results for the subprocess gg → ng. The middle lines show those for the subprocess uu → uu + (n − 2)g; their amplitudes are obtained from those of the subprocess ud → ud + (n − 2)g outlined in this study, simply by antisymmetrizing the amplitudes with respect to the two external quark wave functions. The solid line gives the exact results, while the dashed line gives the results when all the Abelian gluon contributions are ignored. The dotted line shows the results which include up to one Abelian gluon contributions, although it is hard to distinguish from the solid line in the figure. Despite their order 1/N c suppression, contributions of Abelian gluons can be significant; more than 30% for n = 2, about 13% for n = 3, while about 10% for n =4 and 5.
The bottom lines show results for the subprocess uu → ng. As above, the solid line gives the exact cross sections, while the dashed line and the dotted line give the results when contributions from Abelian gluons are ignored and one Abelian gluon contributions are included, respectively. Unlike the case for uu → uu + (n − 2)g subprocesses, the Abelian gluon contributions remain at 30% level even for n = 5.
Before closing this section, we would like to give two technical remarks on our implementation of CFQCD on MadGraph. First, since the present MadGraph [2] does not allow vertices among more than 4 particles, we add HELAS codes for 5, 6, and 7 gluon vertices by hand to complete the MadGraph generated codes. This restriction will disappear once the new version of MadGraph, MG5 5 , is available, since MG5 accepts vertices with arbitrary number of particles. Second, we do not expect difficulty in running CFQCD codes on GPU, since all the codes we developed (see Appendix) follow the standard HELAS subroutine rules.

Conclusions
In this paper, we have implemented off-shell recursive formulae for gluon currents in the color-flow basis in Mad-Graph and have shown that it is possible to generate QCD amplitudes in the color-flow basis by introducing a new model, CFQCD, in which quarks and gluons are labeled by color-flow numbers. We have -introduced new subroutines for off-shell recursive formulae for gluon currents, the contact 3-and 4-point gluon vertices in the color flow basis and the off-shell Abelian gluon current, -defined new MadGraph model: the CFQCD Model, -generated HELAS amplitudes for given color flows and calculated the color-summed total amplitude squared, and -showed the numerical results for n-jet production cross sections (n ≤ 5).
Although we have studied only up to 5-jet production processes in this paper, it is straightforward to extend the method to higher n-jet production processes.

Appendix: Sample codes for off-shell currents and amplitudes
In this Appendix, we list HELAS codes for the contact 4-point gluon vertex subroutines, ggggcf and jgggcf, which sums over contributions with definite color-flow. In addition, we list HELAS codes for the 5-gluon amplitude subroutine, gluon5, and the 5-point off-shell gluon current subroutine, jgluo5, as examples of the recursive multigluon vertices introduced in section 3.