Simplifying QCD event generation with chirality flow, reference vectors and spin directions

The chirality-flow formalism, combined with good choices of gauge reference vectors, simplifies tree-level calculations to the extent that it is often possible to write down amplitudes corresponding to Feynman diagrams immediately. It has also proven to give a very sizable speedup in a proof of concept implementation of massless tree-level QED in MadGraph5_aMC@NLO. In the present paper we extend this analysis to QCD, including massive quarks. We define helicity-dependent versions of the gluon vertices, derive constraints on the spinor structure of propagating gluons, and explore the Schouten identity to simplify the four-gluon vertex further. For massive quarks, the chirality-flow formalism sheds light on how to exploit the freedom to measure spin along any direction to shorten the calculations. Overall, this results in a clear speedup for treating the Lorentz structure at high multiplicities.

In a few recent papers [27][28][29] the Lorentz structure analogue of the color-flow picture was developed, by also "flowing" the spin and momentum structure of amplitudes.Similar to the color-flow Feynman rules, a complete set of chirality-flow Feynman rules were developed for the standard model in [28,29].These chirality-flow rules, where the Fierz identity has been built in (like the color Fierz identity for color flow), is easily seen to significantly simplify tree-level calculations by hand [27,28].Recently it has also proven to give a sizable speedgain for a numerical tree-level massless QED implementation within MadGraph5_aMC@NLO [2], where the computation time is reduced by more than a factor 10 for e + e − going to seven photons [30].
This improvement is in part attributed to the simpler Lorentz structure for the (massless) QED vertex, and in part due the choice of gauge reference vector for external photons.While polarization vectors typically are taken to be orthogonal to the momentum p and a four-vector with the sign of the spatial part swapped, one may perfectly well describe polarization vectors as being orthogonal to some other (lightlike) reference momentum r, aside from p [31,32].
In this paper we address QCD and explore the simplifications and speedgains achieved by clever choices of reference and spin vectors, combined with simplified versions of the chiral three-and four-gluon vertices.In particular, this makes it possible to retain information about the spinor structure of internal gluons.In this context we also exploit the Schouten identity.
Although most strongly interacting particles effectively are massless, the top quark requires a mass.We therefore address the complications brought about by adding fermion masses; while massless fermions naturally lend themselves to a description in terms of single Weyl spinors, massive fermions necessarily come with both a left-and a right-chiral component, which unavoidably complicates the calculations.However, also in this case, a clever choice of the reference vector -which now has acquired a physical interpretation, being related to the direction in which spin is measured -can be explored to reduce the computational complexity.Effectively, we thereby take advantage of the freedom to measure spin in any direction in order to simplify calculations.
To set the stage of our implementation, we introduce the chirality-flow formalism in the following section.After that, we describe the context within which the chirality-flow version of QCD is implemented in section 3, where we outline the HELAS algorithm [12] and its implementation within MadGraph5_aMC@NLO.The algebraic simplifications from gauge dependent Feynman rules are explored in section 4, and the resulting speedgains in section 5. Finally, we conclude and discuss future perspectives in section 6. two-component spinor spaces.In chirality flow, we further incorporate the Fierz identity for the Pauli matrices, σ µ, αβ σµ,α β = 2δ αβ δ β α , (2.0.1) directly into our Feynman rules, analogous to how gluons are split into color and anticolor lines in QCD [20][21][22].This gives rise to a flow-description of chiral representations of Feynman rules and diagrams, dubbed the chirality-flow formalism [27][28][29].Below we go through the essence of chirality-flow Feynman rules.Our conventions are extensively detailed in ref. [27].

A graphical representation of fermions and gauge bosons
The fundamental building blocks for calculations in the spinor helicity formalism in general are the left-and right-chiral Weyl spinors, which we graphically represent as where ⟨i| = ⟨p i | etc.We define the direction of chirality flow such that following the arrow direction is equivalent to reading from left to right in an equation.Thus the Lorentz invariant spinor inner products are given by with (antisymmetric) ⟨ij⟩ ∼ [ij] ∼ 2p i • p j , up to a phase factor.While there is a simple relationship between massless fermions and Weyl spinors, e.g.
we also need to describe vector bosons and massive fermions.In order to treat massive momenta p, we decompose them in terms of two lightlike momenta p ♭ and q by Note that eq.(2.1.4)does not determine the decomposition p = p ♭ + αq uniquely.This is related to the freedom to measure spin along any axis [14,44], Measuring spin along the direction of motion (corresponding to q [28]) reproduces the helicity basis, but we will instead keep the spin direction arbitrary here, such that we can use it to reduce the complexity of the computations, a topic we discuss further in section 4.3.2.With this decomposition, e.g. an incoming fermion with positive spin is given by which reduces to a right-chiral Weyl spinor in the massless limit m → 0, p ♭ → p. Spinors for the other external fermions are given in appendix A.
Vector bosons necessitate both a left-and a right-chiral spinor, and can be represented by [31-34, 40-42, 48], with ϵ L corresponding to an incoming left helicity state or outgoing right helicity state, and ϵ R corresponding to an incoming right helicity state or outgoing left helicity state.Note that the "chirality" (L/R) of a gauge boson is given by the spinor carrying its physical momentum p i , and that r is a gauge reference momentum, with p i • r ̸ = 0 and r 2 = 0.The chirality-flow directions (arrows above) can be chosen arbitrarily, as long as the two arrows making up the polarization vector are opposing each other, and are consistent with the rest of the diagram, the details of which we leave for section 2.4.The unphysical reference vector r is typically set to r = (p 0 , −⃗ p) both in MadGraph5_aMC@NLO and in standard QFT literature (such as for example [49]).We will instead use this as a freedom to significantly speed up calculations, by making diagrams vanish.
In principle these simplifications are not new to chirality flow [32], but the flow picture makes it obvious how to use the simplification even far inside Feynman diagrams.To the authors' knowledge, the freedoms of choosing gauge reference vectors as well as spin directions are unexploited in major event generators.We discuss this subject further in section 2.3, and explore the benefits in section 4.

Propagators and vertices
In the previous section, we detailed the necessary structures to describe free particles within the chirality-flow formalism.To evaluate scattering amplitudes we also need to represent propagators and vertices.
As there are two non-scalar particle types within the standard model, two types of propagators are needed.We first treat the gauge boson, which in the Feynman gauge has the structure of the Minkowski metric, translating to two opposing chirality-flow lines with directions to be matched with the rest of the Feynman diagram.
The fermion propagator has a more complicated structure, with a slashed momentum in the numerator.In the flow picture, this can be represented using the momentum-dot notation introduced in [27], where we work in the chiral (Weyl) basis and use normalized versions of the Pauli matrices, √ 2τ µ = σ µ and √ 2τ µ = σµ , to avoid factors of 2 in the Fierz identity.The arrow direction aligned with the rest of the diagram must be chosen, as elaborated on in section 2.4.For future purposes, we recall that these momentum-dots can be rewritten in terms of outer products of Weyl spinors, for p 2 i = 0 such that p = i p i .The fermion propagator is then Finally, external particles and propagators are combined in QCD vertices.The simplest vertex is the fermion-vector vertex, represented by just a flow, with g s being the strong coupling constant and where the √ 2 in the denominator comes from the normalization of our SU(3) generators t a i j , which as our matrices τ , are normalized to one, Tr(t a t b ) = δ ab , Tr(τ i τ j ) = δ ij .
The four-gluon vertex has a simple form in chirality flow, being represented by Kronecker deltas that can be connected in three different ways, where Z(2, 3, 4) denotes the set of cyclic permutations of the integers 2, 3, and 4, f abc are the SU(3) structure constants, and where arrow directions which give flows aligned with the rest of the diagram are chosen, as elaborated on in section 2.4, Finally, we address the triple-gluon vertex, which comes with the highest complexity from the chirality-flow perspective as it involves a momentum-dot.Chirality can flow between any two of the gluons (connected with the metric), while the third gluon is contracted with a momentum-dot, where the implicit arrows again should be chosen to give a continuous flow.

Gauge based diagram removal and chirality-flow diagram removal
In a recent paper we explored the benefits of gauge based diagram removal [30], i.e, the freedom to choose reference momenta for external massless gauge bosons in such a way as to make a maximal number of Feynman diagrams vanish.There we worked with QED, and set the reference momenta r R of all right-chiral photons to be the physical momentum of a left-chiral lepton, and similarly for left-chiral photons with a right-chiral lepton.As a simple example, before moving on to QCD, we consider the chiral structure of the process e − L e + R → nγ, using the chirality-flow part of the vertex in eq.(2.2.5), the massless fermion propagator from eq. (2.2.4), and massless external fermions and bosons.The corresponding diagram can then be immediately written down as In passing, we note that the chirality-flow arrows are chosen to align along the fermion line, but to oppose each other for the photons, and that we could equally well have chosen to swap all arrows since, employing eq.(2.2.3), we have an even number of spinor inner products.As there is only one fermion line, each Feynman diagram can be described by the ordering of the photons.However, by setting the reference momentum of right-chiral photons to the momentum of the left-chiral fermion (and opposite), In principle this simplification is present in the spinor-helicity formalism itself, but the chirality-flow formalism makes it completely transparent.
As we consider non-abelian gauge theories, we encounter structures with several contributing chirality flows from the gauge boson vertices.Similarly massive fermion propagators give rise to more than one chirality flow.Here the choice of reference momenta or spin axes may not remove the full Feynman diagram despite removing some of the corresponding chirality-flow diagrams.Consider e.g. the chiral structure of the Feynman diagram (now counting all momenta as outgoing) which contributes to the process q 1,R q5,L → g 2,R g 3,L g 4,L for massless quarks.Here we note that setting the gauge reference vectors of the left-chiral gluons, to the same momentum r 3 = r 4 = r L , the first chirality-flow diagram vanishes for any r L .
Despite not having removed the total contribution from this Feynman diagram, we have reduced the complexity of the Lorentz structures, by removing some chirality-flow diagrams.Therefore, we shall refer to this simplification as gauge based chirality-flow diagram removal, rather than gauge based Feynman diagram removal.
Further, if we let r 3 = r 4 = r L = p 1 , the gluons g 3 and g 4 cannot attach to q 1 , implying that all such Feynman diagrams vanish.Similarly, letting r 2 = r R = p 5 gluon 2 cannot attach to q5 .This type of simplification is in direct analogy with the gauge based Feynman diagram removal for QED as in eq.(2.3.1).However, the simplification that arises from the contraction between external gauge bosons is new for QCD.This is elaborated upon in section 4, where gauge specific Feynman rules are introduced.Additionally, by considering sums over measurements on general spin axes, rather than helicity sums, there will at times be gauge based chirality-flow diagram removal in the fermion-vector vertex, where only one of the chiral components of a massive fermion contributes to the scattering amplitude.

Chirality-flow direction
In the previous sections, we have largely neglected the question of chirality-flow direction, simply stating that it has to be made consistent.With the examples in eq.(2.3.1) and eq.(2.3.3) at hand, we are now in a good position to comment on this.To this end, we remind the reader that momentum-dots can be written as sums of massless spinor outer products (cf.eq.(2.2.3)).
Each single chirality-flow line maps to a spinor inner product, and considering massless fermions, we note that the momentum-dot in the fermion propagator ensures that every massless fermion line will have an even number of chirality-flow lines.Additionally, all vector bosons have two chirality-flow lines with opposing flow direction.In massless QCD and QED, there is thus always an even number of flow lines, making it impossible to flip an odd number of spinor inner products as long as flow continuity and the opposing arrow convention for gauge bosons are respected.By the antisymmetry of the inner product, all consistent choices of flow directions then give the same amplitude.As an example, we may choose the arrow assignment for the second term in eq.(2.3.3).The massive fermion propagator, however, gives rise to terms with an odd number of flows.It is then necessary to keep track of the relative sign of the mass terms and the momentum terms.

Flowing HELAS
MadGraph5_aMC@NLO evaluates helicity amplitudes using ALOHA-generated [50] code based on a recursive algorithm as for HELAS [12].The key principle of this HELASlike code is the recursive construction of propagating off-shell particles (wavefunctions), as described in figure 1.
Every intermediate state (constructed in a vertex combining two or three existing, onor off-shell, particles) is numerically evaluated as an off-shell wavefunction which feeds into the rest of the calculation.Eventually three or four (on-or off-shell) particles may join in a vertex, to create the amplitude corresponding to the Feynman diagram in question.We will refer to this algorithm as the HELAS algorithm.
In line with previous work [30] this structure is maintained in the current chirality-flow implementation, immediately enabling the same level of (off-shell) wavefunction recycling as in standalone MadGraph5_aMC@NLO, as well as a transparent speed comparison, where it is ensured that any speedgain comes either from the simplified Lorentz structures Figure 1: Example of the HELAS algorithm.Helicity amplitudes are calculated by iteratively combining particles to off-shell particles/wavefunctions.In the above case, particle 1 and 2 would be combined to a new off-shell fermion in vertex (1), and gluon 3 and 4 would be combined to one new particle in vertex (2).These two off-shell particles would merge with particle 5 in the last vertex (3).
or from the use of reference and spin vectors.Consequently, there are only two major changes made in our implementation: (i) Rather than exporting ALOHA-generated (HELAS-like) code, subroutines are called from a rewritten flow-based version of the HELAS library, which makes use of the simplified chirality-flow Lorentz structures in the numerical evaluation of propagators and amplitudes.
(ii) The diagram generation routine is modified to account for particles with definite chiral (or spin) states.In particular, chiral massless fermions are introduced, and external gauge bosons are supplied with a reference vector (cf.eq.(2.1.7)),allowing for gauge based Feynman and chirality-flow diagram removal already at code generation time.
Compared to the default MadGraph5_aMC@NLO implementation this implies simplifications which in essence appear at two different levels: (i) Simplified Lorentz structures: Chirality flow makes subroutines smaller than the corresponding routines in e.g.HELAS.This applies in particular to vertices with chiral fermions, but even massive fermion vertices are less computationally demanding.
(ii) Gauge based Feynman or chirality-flow diagram removal: The numerical evaluation is simplified further by the choice of reference momenta and spin axes, as contributions may be known to vanish already at code generation time.This reduces the computation length, either directly at the Feynman diagram generation level (as some vertices and thereby Feynman diagrams may vanish), or at the level of chiralityflow diagrams (since chirality-flow diagrams which are known to evaluate to 0 can be ignored).For example, the kinematic factor multiplying one of the color structures in the four-gluon vertex may vanish.These simplifications are further described in section 4, and they provide acceleration primarily to the gluon-only vertices and the massless fermion-vector vertex.

Arrow direction for the HELAS algorithm
As discussed in section 2.4, the choice of flow direction is simple for pen and paper calculations.For automated algorithms, however, it is necessary to ensure that a consistent choice of chirality flow can be set not just for a single chirality-flow diagram, but for all possible chirality-flow diagrams, while working at the level of single vertices.Hence, a convention which can be translated to a simple algorithmic choice must be used.Instead of assigning chirality-flow direction for each diagram individually, we therefore use the convention that all left-chiral spinors are treated as having inflowing chirality (i.e. they are given by a left-chiral bra [|) whereas right-chiral spinors are considered outflowing (i.e. they are given by a right-chiral ket |⟩).The same convention is applied to gauge bosons, but we note that while external gauge bosons can be treated as direct products of left-and right-chiral spinors (cf.eq.(2.1.7)),internal propagators require a description in terms of a matrix (∼ M α β ) due to the presence of the triple-gluon vertex and contributions from more than one term.For simplicity, we therefore represent all gluons in this form.
With these conventions, spinor inner products are always constructed from spinors of the same form (i.e. a bra with a bra and a ket with a ket).As an example, the second chirality-flow diagram in eq.(2.3.3) is mapped to the arrow assignment in our HELAS algorithm (figure 1).Contractions then have to include systematic multiplication with the Levi-Civita tensor to align the flows, i.e., always contract an upper spinor index with a lower.Since the ALOHA code is written in component form, this implies no speed loss.
4 Gauge specific Feynman rules and simplifications from spin-direction In this section we explore how knowledge of chirality and spin can be used to define gauge dependent Feynman rules, and how these can be exploited in the context of the HELAS algorithm.Although, clearly, the gluon reference vectors can be chosen independently for each external gauge boson (for example, for a gluon with momentum (p 0 , ⃗ p), the custom choice is (p 0 , −⃗ p)), there are advantages with choosing them similarly for all left-and rightchiral gluons respectively, as this gives rise to the vanishing of more contractions.We therefore limit our study to gauge choices where all external gluons of the same chirality have the same reference vector, which we further take to equal some other spinor occurring in the process.
For internal gluons, the flow representation will make it transparent how to deduce information about their spinor structure.For example, the off-shell gluon arising in vertex 2 in figure 1 will necessarily come with the reference vector r L in its right-chiral spinor, as seen from eq. (2.3.3).This means that we need to distinguish four different types of gluons, left-chiral g L , right-chiral g R , general g (i.e.no specific knowledge of spinor structure), and gluons which are used for setting the reference momentum of opposite-chirality gluons, g LR (or internal gluons which inherit this spinor structure).These gluons behave both as leftand right-chiral gluons in the contractions.
A left-chiral gluon thus comes with a spinor structure |r L ⟩[p g | in the code (generally alternatively |p g ]⟨r L |), and a right-chiral gluon comes with |p g ⟩[r R | in the code (or generally |r R ]⟨p g |), whereas g LR -gluons come with Here we note that p g is the momentum of the gluon for an external gluon, but is an "inherited" momentum entering as a spinor argument for an internal gluon.The inherited spinor structure can be exploited for subsequent simplifications "further in" in the Feynman diagram, and we will refer to gluons carrying the spinors |r L ⟩ and [r R | as effectively chiral.
If we consider a process with only gluons, it is clear that picking the reference momentum r L of the left-chiral gluons to equal the momentum of a right-chiral gluon, additional spinor contractions vanish, implying additional simplifications.For processes with both quarks and gluons it is less obvious if the most advantageous choice is to set the reference vector after a right-chiral gluon or after a right-chiral quark, something we discuss further in section 4.3.1.
For massive particles, the corresponding degree of freedom becomes physical, and is related to the direction in which spin is measured, but we can still use the freedom to measure spin in any direction to shorten the calculations.We discuss this further in section 4.3.2.Beyond simplifications obvious from the chirality flow, we explore how the Schouten identity can be used to further simplify the four-gluon vertex.
For the purpose of the HELAS algorithm, as discussed in section 3, we need to distinguish between vertices resulting in off-shell particles (wavefunctions) and vertices resulting in amplitudes.At the first steps of the HELAS algorithm we have external gluons with manifest helicities.However, we will see that the internal (off-shell) gauge bosons often end up being effectively chiral.

The triple-gluon vertex
We first consider the chiral structure of the three-gluon vertex, assuming that all left-chiral gluons have the same reference momentum, and similarly for all right-chiral gluons.It is then immediately obvious that a vertex between three gluons with equal chirality vanishes as the directly connected double line gives [r R |r R ] or ⟨r L |r L ⟩ for all three terms, for example Similarly, if two of the gluons share a known chirality, say left, the term where the two left-chiral gluons are contracted vanishes and only two terms remain.Now consider vertices with g LR .This effectively left-right gluon will induce all of the simplifications for left and right gluons above, for example in the g L g R g LR vertex, where with g 1 = g L , g 2 = g R , and g 3 = g LR two out of three chiral structures are removed, Similarly a vertex between the left and right reference gluon will always vanish since if say g 1 = g L , g 2 = g R and r R = p 1 , r L = p 2 , the first term vanishes immediately, whereas, for external g 1 and g 2 , the second and third term vanishes by contractions with the momentumdot using momentum conservation, Therefore the external reference gluons can never couple directly to each other.For the g g L g R -vertex, g L and g R contract to each other as if they were unpolarized, implying that there is no gain to be found in this case (unless one of them is a reference gluon, g LR ).Similarly there is no simplification for vertices with no or only one gluon with known chirality.A systematic treatment of all versions of the triple-gluon vertex is given in appendix B.

Vertices resulting in off-shell wavefunctions
In the context of the HELAS algorithm, we note that the above treatment, with three gluons of (potentially) known chirality, is only applicable to the last step, where three gluons result in an amplitude.For the other steps, the created off-shell gluon will a priori be of unknown chirality, and we rather want to derive information about its chiral structure.Thus we need to consider two (on-or off-shell) gluons, g 1 and g 2 of (potentially) known chirality, coming into a vertex which results in a third off-shell gluon with derived chiral structure.
If both g 1 and g 2 are left-chiral, we have where the first term disappears due to the contraction between the (right-chiral) reference spinors for left-chiral gluons.From the above spinor structure, we also deduce that the off-shell gluon will effectively be left-chiral, i.e., when two gluons of the same chirality enter a three-gluon vertex, the resulting propagator will also act as having a well-defined chiral structure, which may continue to lead to further simplifications further inside the Feynman diagram.For example, the off-shell internal gluon resulting in vertex (2) in figure 1 will be effectively left-chiral.
Next, assume that g 1 and g 2 have opposite chirality, say g 1 left and g 2 right.Then, generally, none of the terms in eq.(4.1.1)disappear, and the resulting off-shell gluon can neither be treated as left nor right.However, if we set e.g. the right-chiral reference momentum to be the momentum of g 1 (which thus must be an external gluon), r R = p 1 , and thereby make g 1 act as "doubly chiral" g LR , we find where, for external g 2 , the third term disappears due to contractions in the momentumdot.Regardless of whether g 2 is external or not, the resulting gluon will effectively act as right-chiral in further vertices.
If r R ̸ = p 1 , but r L = p 2 in eq.(4.1.6),s.t.g 2 = g LR , the propagating gluon would instead act as left-chiral.Additionally, if g 1 = g LR and g 2 = g LR , all three terms vanish by momentum conservation for external gluons.A systematic treatment of all versions of the vertex is given in appendix B.

The four-gluon vertex
Next, we turn to the four-gluon vertex, which comes with three chiral structures multiplying three different color structures where we remark that the gluons which are contracted in color are not contracted in the chiral structure.
We first note that this vertex vanishes fully whenever three (or four) gluons share the same chirality.By considering eq.(4.2.1), but taking two gluons to be general, while keeping two gluons left (same chirality), we immediately see that one of the three spinor contractions vanishes.For three or four general gluons, or for two gluons of opposite chirality, no simplifications arise, whereas four-gluon vertices with g LR may result in many vanishing terms since these gluons can neither be contracted with g L nor g R .For example the vertex g LR g L g R g only has one surviving spinor contraction since g LR must be contracted with g for a non-vanishing result.
Additionally, we note that further simplifications can be obtained by exploiting the Schouten identity, which in the flow picture can be represented as and similarly for left-chiral spinors.Applying this to the four-gluon vertex yields simplifications beyond those immediately apparent from the flow.As an example, consider the g L g L g R g R -vertex (again with the particle positions from eq. (4.2.1)), and apply the Schouten identity Thus two of the chiral structures in eq.(4.2.1) are equal and need only be evaluated once.We therefore see that the chiral structures multiplying the first color structure cancel by the Schouten identity.On top of that, the chirality flow with vertical lines immediately vanishes, implying that the two remaining color factors in eq.(4.2.1) multiply the same kinematic amplitude.

Vertices resulting in off-shell wavefunctions
We now consider vertices resulting in an off-shell gluon, assuming that g 4 will be the returned off-shell particle.Assume first that g 1 and g 2 have the same chirality, e.g g 1 and g 2 are both left-chiral whereas g 3 is right-chiral.Then (keeping the same gluon positions as above) we have i.e. the propagator resulting from a vertex with two gluons of the same (effective) chirality will also have a definite effective chirality.Since external particles have a well-defined chirality, ambiguity in the internal chiral states of gauge bosons arises only from quarkgluon and three-gluon vertices.
We leave out the details here, but for vertices with only one chiral gluon or with two gluons of opposite chirality, no simplifications arise, whereas further simplifications arise for the g LR gluons.In total, identifying chiralities of internal gluons and applying Schouten identities allows for extensive gauge based (chirality-flow) diagram removal.Again we leave out further details here, but provide the number of remaining kinematic terms for the different chiral configurations (g LR , g L , g R and g) in appendix B.
We also remark that the three spinor contractions multiplying different color structures, have to be treated independently for further steps in the HELAS algorithm.

The fermion-gluon vertex
The final vertex we treat is the fermion-gauge boson vertex, for which we consider the case of a massless and a massive fermion separately.For massless quarks, we always have a well-defined chiral state, while for massive fermions we can explore the freedom to choose spin direction in such a way that at least some chirality-flow diagrams vanish.

The massless fermion-gluon vertex
The (massless) fermion-gluon vertex has the structure of from which it is immediately clear that if one of the spinors of the gluon matches one of the spinors of the quark, the vertex will vanish.This will happen for example if the gluon is right-chiral and has the quark momentum p 1 as reference momentum, [p 1 |g L = r R = p 1 ] = 0.This is in direct analogy to QED in eq.(2.3.1),where right-chiral photons can not attach to the left-chiral reference fermion.While we could alternatively set the gluon reference momenta according to the momenta of other gluons, setting them to the momenta of quarks turns out to give the best speedgain for high multiplicities, as some verticesand thereby Feynman diagrams -can be fully removed, rather than (typically) just be simplified, as in the gluon-only case.
Vertices resulting in off-shell wavefunctions.As for the gluon vertices, we need to distinguish vertices resulting in off-shell wavefunctions from vertices resulting in amplitudes for the purpose of the HELAS algorithm.If the vertex results in an off-shell fermion we have one of the situations where we also display the momentum-dot coming from the massless fermion propagator.We note that if the gluon and the external quark share a spinor, the contraction vanishes.Again this will only happen if the gluon has the quark momentum as reference spinor.If the diagram does not vanish, the fermion continues in to a fermion propagator containing a momentum-dot.The end of that propagator will then again have an explicit chirality (the same chirality as the original incoming quark), while entering the next vertex (gray blob above).The quark thus remains chiral.Technically this momentum-dot is included in the vertex implementation.
If instead, the fermions give an off-shell gluon, we note that the gluon can be effectively chiral if one of the fermion momenta is used for the gluon reference momentum.

Massive fermions with general spin direction
As discussed in section 2.1 we may explore the freedom of choosing the spin axis s µ to our benefit, such that some chirality-flow diagrams vanish.We recall that the spin operator is defined as1 (see e.g.[51]), where P ν is the momentum operator (P ν = i∂/∂x ν ), ϵ µνλω (ϵ 0123 ≡ 1 ⇒ ϵ 0123 = −1) is the four-dimensional Levi-Civita tensor, and σ µν (giving the Lorentz generators for the (1/2, 1/2)-representation) is defined as The spin projected onto s µ is then given by the operator such that the spin direction, in this sense, is actually only defined up to a four-momentum proportional to the particle's momentum p. Adding any linear combination of p to s = (1/m) (p − 2αq) (eq.(2.1.5))will result in the same O s2 .Therefore, we could equally well have used s ′ = −2αq/m = −mq/(p • q) for the spin direction. 3Thus q plays the role of defining the other four-vector (aside from p) which determines the operator O s , and thereby what we mean with positive and negative spin.
This we will use to our advantage.While the direction s = (1/m) (p − 2αq) clearly depends on the particle's momentum, the momentum q can be taken to be the same for all particles.For further simplifications, we may choose it to be the same as the momentum for some other spinor in the process, such as for example the reference vector of left-chiral gluons.

The massive fermion-gluon vertex
The structure of the massive fermion vertex (itself) contains the flows As in eq.(4.3.1),we may thus remove vertices with for example [p L = q = r R |g L = r R ] if p L is set to equal the reference spinor of the right-chiral gluons.This momentum (r R ) may in turn be taken to equal the physical momentum of a left-chiral gluon.
Alternatively the reference vector r R of all right-chiral gluons may be put to equal the p ♭ vector of some quark.For a low number of gluons this will lead to many vanishing chiralityflow diagrams, since the reference quark can not couple to one of the gluons.However the number of terms that can be removed in this way scales badly with the number of gluons.Overall, we have rather found it advantageous to let the physical momentum of an oppositechirality gluon dictate the vector q for the quarks, with q = r L /r R = p some right/left gluon .
With this choice, the full vertex will never vanish, but for processes with many gluons, it turns out to give the best overall speedup, due to the simplifications in the gluon vertices.We remark that this is contrary to the situation with massless quarks, where the best highmultiplicity speedup is found by setting the reference momenta to be the momentum of a quark (with opposite chirality).From this, it is clear that (for example) if the left gluon spinor equals |p L ] the first part of the vertex disappears, but the second term remains.
Vertices resulting in off-shell wavefunctions.In general, for a vertex resulting in an off-shell fermion wavefunction, we have terms of the form where, like in the massless case, we choose to include the chiral structure of the propagator, to get the spinor structure entering the next vertex.
In general all four such terms may survive, but again, if the gluon spinor contracted with the incoming quark is given by the same momentum p L or p R , two of the terms above will vanish, which is used to build faster versions of the code.However, due to the massive propagator, the simple structure of one outgoing helicity is nevertheless lost for the fermion entering the next vertex.In spite of this, our representation of the fermion-gauge boson vertices are less computationally demanding.
Finally, we note that the vertex may alternatively result in an off-shell gluon, which then is of general type g.

Results
In this section, we present time measurements for amplitude evaluations in the chirality-flow implementation, and comparisons to the standalone version of MadGraph5_aMC@NLO.Since we use the same diagram generation and code generation routines as the native MadGraph5_aMC@NLO framework, and only (i) speed up numerical subroutines using a flow-based library, and (ii) remove (chirality-flow) diagrams known not to contribute, we are confident that any improvement in performance can be attributed entirely to chirality flow.Since we only address the Lorentz structure, the squaring of the color structure has been turned off for both versions of the code, to assess the speedup of the Lorentz structure.This would otherwise be a bottleneck for high multiplicities.
We first explore the speedup in the pure Yang-Mills case.Then, bearing in mind that almost all fermions are effectively massless at LHC energies, we consider massless up quarks.Finally we explore gluon induced t t production in association with up to three additional gluons.In all cases we find an increasing speedgain with increasing multiplicity.Time measurements were made on a MacBook Pro laptop with an Intel Core i7-4980HQ CPU and runtime measurements are taken over 100 000 randomly generated phase space points.At present, our code generates each chirality/spin configuration as a different runtime process, and phase space points are hence generated with RAMBO [52] separately for each spin configuration for chirality flow, whereas this is done outside the spin sum for Mad-Graph5_aMC@NLO.For high multiplicities, the runtime for RAMBO is negligible, but for small multiplicities this overhead slows down our implementation.Even so, we find for all processes that the chirality-flow implementation outperforms MadGraph5_aMC@NLO already for five external particles.Runtime ratio for 100 000 events for process gg ng Graph5_aMC@NLO and for the chirality-flow branch of the code.The squaring of the color structure has been turned off to compare only the Lorentz structure treatment.In the current chirality-flow implementation, the RAMBO momentum sampling is done separately for each spin configuration, and this overhead has a runtime impact for low multiplicities.
The amplitude evaluations themselves are consistently faster for chirality flow, but this code artifact outweighs the acceleration at multiplicity four.For high multiplicities, the phase space sampling takes a negligible fraction of the total runtime.
It should be noted that our results are from the standalone version.For helicity sampling, we expect them to carry over to the full version, but it should be noted that since recently MadGraph5_aMC@NLO comes with helicity recycling, where parts of Feynman diagrams are recycled between processes with different helicities [53].This can be applied to our version as well.However some adjustment would be needed, since to fully exploit helicity recycling, one needs to use the same reference vectors (r L and r R ) for all helicity configurations, whereas we have chosen them differently.Picking different r L /r R for different helicities will result in some speed loss, although the bulk of the improvement will remain.

Gluon processes
We here explore the benefits of chirality flow in the pure gluon case, gg → ng, n = 2 . . . 5. Our reference vectors are set as discussed in section 4, i.e., left-chiral gluons with a reference vector for the right spinor are treated as |r L ⟩[p g |, where the reference vector r L is taken to be the same for all left gluons.Further, it is taken to equal the momentum of a rightchiral gluon (the right-chiral gluon with lowest number in MadGraph5_aMC@NLO).Reference vectors for right-chiral gluons are set similarly.
Runtime comparisons are shown in figure 2. We note that there is an increased speedup Runtime ratio for 100 000 events for process uu ng for high multiplicity.This speedgain can be attributed to a high number of vanishing chirality-flow diagrams when the vanishing of , but also the Schouten identity, is used.As detailed in appendix B, this leads to many vanishing chirality-flow terms.However, as opposed to the case of the (massless) fermion-gauge boson vertex (cf.ref. [30] and section 5.2 below), there is no speedup in the vertex subroutines themselves, which are comparable in number of instructions to the native MadGraph5_aMC@NLO implementation (as measured using Valgrind [54,55]).

Processes with massless quarks
We next address amplitudes with one q q pair.As discussed in section 4.3.1,we have found it advantageous (for high multiplicities) to set reference momenta according to the quarks, since this allows for the removal of all diagrams where any left-chiral gluon is attached to the right-chiral reference quark, and similarly for right-chiral gluons attached to the left-chiral reference quark.
In figure 3 we display our results for uū → ng (again with the squaring of color turned off, although here this effect is only sizable for the five-gluon case).As for the pure Yang-Mills case, we find an increased speedgain for high multiplicities, but as opposed to the gluon case, this is not only due to the gauge based (chirality-flow) diagram removal, but also due to the compact nature of the fermion-gauge boson vertex, as in ref. [30].Runtime ratio for 100 000 events for process gg tt + ng

Processes with massive quarks
As described in section 4 we here have two kinds of vectors to choose: The unphysical reference vectors of the gluons (which may in principle be picked differently for processes with different fermion spins) and the physical vector q, related to the spin direction as described in section 4.3.2.
The reference vector of a gluon can thus be set according to the momentum of another gluon (as in the gluon-only case) or according to one of the two spinors describing a massive quark.In the latter case, we note that -as opposed to for massless quarks -this will not remove the entire vertex (and thereby Feynman diagram), but will only remove one chiralityflow configuration.In the massive fermion case we have therefore found it advantageous to set the reference momenta of the gluons according to the momentum of a gluon with opposite chirality (as for the pure Yang-Mills case).The physical reference vector for the quarks (q) is then set to equal the most frequently occurring gluon reference vector.
The exception to this is when all gluons have the same chirality.In this case, the momentum q for the quarks is set to equal one gluon momentum, and the gluon reference momenta (all r L or r R ) are set to equal the p ♭ of the same quark.
A runtime comparison between the standalone version of MadGraph5_aMC@NLO and its chirality-flow branch is shown in figure 4. Despite that this represents the worst possible case from the chirality-flow perspective, as the fermions are not chiral, and the vertices with gluons are naively not faster than their native MadGraph5_aMC@NLO versions, there is an increasing speedgain.This is both due to vanishing chirality-flow contributions and the simplified massive fermion-gluon vertex.

Validation
In order to ensure the accuracy of the chirality-flow implementation, validations were performed by comparing the squared amplitudes for several classes of processes to those obtained using default MadGraph5_aMC@NLO.For each process, a randomly generated phase space point was evaluated by both implementations for pure QCD.The spin summed squares of the amplitudes were found to be equal within numerical precision.The processes included in the validation were: (i) Pure gluon: gg → ng, 2 ≤ n ≤ 5. (

Conclusion and outlook
The chirality-flow formalism represents a recast of the treatment of the Lorentz structure giving reformulated chirality-flow Feynman rules.This parallels the construction of colorflow Feynman rules [21,22], with the difference that there are two types of flows, left-and right-chiral, instead of just one color flow.Furthermore, the chirality-flow lines necessarily end in well-defined spinors for the external particles, rather than unobserved color states which may be summed/averaged over.This can be exploited to make many diagrams/terms vanish by setting the gauge reference vectors for external gluons to be the same for all left-and right-chiral gluons respectively, and by further equating them to some other massless spinors in the amplitude.In this way, simplified gauge-specific versions of the gluon vertices can be defined, and many Feynman diagrams or contributions to Feynman diagrams vanish as a spinor is contracted with itself.Superficial simplifications from good choices of reference vectors are present in the spinor-helicity formalism itself, but the flow representation makes it obvious how to identify vanishing terms arbitrarily deep inside Feynman diagrams.The flow nature of chirality flow also lends itself to the application of the Schouten identity already at the level of the four-gluon vertex, allowing for further simplified versions of it.
For massive quarks, we remark that the choice of reference vector carries physical meaning, as it gives the direction in which spin is measured.Thus, we here explore the freedom to measure spin in arbitrary directions, rather than in the direction of motion for each particle separately.Again, we find the flow description ideally suited to shed light on this largely unexploited degree of freedom.
We have investigated the numerical speedup of scattering amplitude evaluations achieved in a MadGraph5_aMC@NLO standalone implementation of chirality flow for QCD, including massive quarks.In short, we find an increasing speedgain for high multiplicities.For the highest multiplicities, we find the Lorentz structure treatment to be approximately a factor three faster, a bit more for massless QCD, and a bit less for processes with a t t-pair.Largely the acceleration is due to the vanishing of either entire Feynman diagrams -22 -or contributing chirality-flow diagrams.These contributions are removed before compile time, and tailored vertex subroutines, already encoding the simplifications, are used at runtime.When applying helicity-recycling [53] a similar setup can be used, with the exception that the same reference vectors would have to be used across processes of different helicity structure, which would somewhat reduce the speedgain.
There is also some speedup due to the smaller Lorentz structure of the quark-fermion vertex -especially in the massless case.However, as gluon vertices (which carry a similar number of instructions as the ALOHA-generated versions) tend to dominate for high multiplicities, this effect is not as pronounced as in the massless QED implementation [30].
In the present paper, we have addressed QCD, but it is worth remarking that the weak interaction is in principle even better suited for chirality flow, due to the chiral nature of the W -coupling.Addressing the weak interaction is therefore a next natural step, along with treating processes beyond tree level.

3-gluon vertex
No. structures 3-gluon vertex No. structures Table 1: Gauge specific Feynman rules for the gluon vertices, with the first and third columns detailing the (explicitly chiral) particle configurations, and the second and fourth columns enumerating non-vanishing Lorentz structures for the corresponding configuration.
Missing vertex configurations are obtained by applying a chirality flip, L ↔ R.

B Simplifications in three-and four-gluon vertices
In this appendix we list the simplifications in the three-and four-gluon vertices.We first, in table 1, address the gauge dependent Feynman rules in the case when all gluons have a known chirality status (g LR , g L , g R or g).In the context of the HELAS algorithm, this is applicable to the last step of the evaluation.We then, in table 2, address the case when two or three gluons give rise to an off-shell wavefunction, used in the first steps in the Feynman diagram evaluation. - Table 2: Gauge specific Feynman for use in the HELAS algorithm described in section 3, with the first and fourth columns detailing the (explicitly chiral) particle configurations, the second and fifth columns showing the resulting propagator, and the third and sixth columns enumerating non-vanishing Lorentz structures for the corresponding configuration.Missing vertex configurations are obtained by L ↔ R. Note that vertices with explicitly chiral particles as arguments return explicitly chiral propagators, with the sole exception of the g R g L g-vertex.
p e − L for right-chiral and i R = r L = p e + R for left-chiral, (2.3.2) any diagram where a right-chiral photon is contracted with the left-chiral fermion will include a factor [p e − L |p e − L ] = 0 and vanish, and similarly for left-chiral photons.It is therefore not possible to attach a right-chiral photon next to e − L or a left-chiral photon next to e + R .

Figure 4 :
Figure 4: Runtime (left) and ratio (right) for the Lorentz structure of gg → t t + ng, for standalone MadGraph5_aMC@NLO and for the chirality-flow version of it, cf.figure 2.
g g 3 g LR g g 3 4-gluon vertex No. structures 4-gluon vertex No. structures g LR g LR g LR g LR