# ColorMath—a package for color summed calculations in SU(*N* _{ c })

- 675 Downloads
- 17 Citations

## Abstract

A Mathematica package for color summed calculations in QCD (SU(*N* _{ c })) is presented. Color contractions of any color amplitude appearing in QCD may be performed, and the package uses a syntax which is very similar to how color structure is written on paper. It also supports the definition of color vectors and bases, and special functions such as scalar products are defined for such color tensors.

## Keywords

Color Space Structure Constant Color Structure Gluon Exchange Gluon Vertex## 1 Introduction

With the LHC follows an increased demand of exact calculations in QCD involving many color charged partons. Due to the non-abelian nature of QCD this poses a nontrivial computational problem.

This is the issue the Mathematica^{®} package ColorMath is set out to tackle. The main feature of ColorMath is thus the ability to automatically perform color summed calculations starting from a QCD color structure which is expressed using a syntax very similar to how the color structure would have been written on paper.

*N*

_{ c }) tool, rather than a high energy physics general purpose tool, such as [2, 3]. ColorMath works for an arbitrary

*N*

_{ c }≥2, and for arbitrary trace convention of the squared SU(

*N*

_{ c }) generators,

*T*

_{ R }. It may be used by just giving the color structure in the appropriate form and afterwards running

**CSimplify**to contract all repeated indices. For example, consider \(q_{1}\, \overline{q} _{2} \to q_{3}\, \overline{q} _{4}\) via gluon exchange in the s- and t- channels. Writing down the amplitude as

**S**and

**T**represent some s- and t-channel kinematics, and

**t**

^{{g}q1}

_{ q2}the SU(

*N*

_{ c }) generator in the fundamental representation, otherwise typically denoted (

*t*

^{ g })

^{ q1}

_{ q2}, we may calculate the squared amplitude (defined as in the scalar product Eq. (12)) using immediately giving the answer

Each squared amplitude can in principle can be calculated like this. However, ColorMath also facilitates the usage of color vectors and bases and has special functions for the calculations of scalar products and gluon exchanges.

This paper, which is intended to be the main reference, is organized as follows: First a general introduction to the basic color building blocks is given in Sect. 2. In Sect. 3 the computational strategy is presented, whereas basic examples are given in Sect. 4, and the usage of vectors and their functions are presented in Sect. 5. In Sect. 6 some remarks concerning validation and scalability are made and in Sect. 7 conclusions are drawn.

## 2 QCD building blocks

Due to confinement, we never observe individual colors and it therefore suffices to calculate color summed/averaged quantities for making predictions in quantum chromodynamics. We may thus constrain ourselves to treat QCD amplitudes carrying a set of external indices with values that need never be specified, as they are always summed over in the end.

*N*

_{ c }) generators, along with a delta function for indicating a quark and an anti-quark color singlet,

*δ*

^{ q1}

_{ q2}, constitute a minimal set of objects for treating the color structure in QCD.

^{1}For convenience, and for performance reasons, it is, however, useful to define a larger set of objects. The complete set of basic building blocks for carrying color structure used by the ColorMath package is given in Table 1.

Along with the number of colors, **Nc**, and the trace of an SU(*N* _{ c }) generator squared, **TR**, the basic building blocks are as below. Note that **o** ^{{g1,g2,…,gk}} represents a trace over gluons with indices *g*1…*gk*, \(\operatorname {tr} [t^{g1}t^{g2}\cdots t^{gk}]\), and that **t** ^{{g1,g2,…,gk}q1} _{ q2} represent the *q*1,*q*2-component in a trace over generators that has been cut open, (*t* ^{ g1} *t* ^{ g2}⋯*t* ^{ gk })^{ q1} _{ q2}. For convenience, also the totally symmetric “structure constants” **d** ^{{g1,g2,g3}} are defined. Note the Mathematica **FullForm**. ColorMath is built on pattern matching, and it is therefore essential that the expressions have the correct **FullForm**. In particular, **Power** may not be used instead of **Superscript**. To get the right **FullForm** it is recommended to use the function form, which is just a function returning the corresponding ColorMath object

Pictorial representation | ColorMath | Function form | Mathematica |
---|---|---|---|

| | | |

| | | |

| | | |

| | | |

| | | |

| | |

*δ*

^{ q1}

_{ q2}, a delta function in gluon indices, denoted by

**Δ**

^{{g1,g2}}, is also defined. Note the Mathematica

**List**brackets in {

*g*1,

*g*2}. The gluon delta function can alternatively be expressed using where

*T*

_{ R }(

**TR**) comes from the normalization of the SU(

*N*

_{ c }) generators, and is typically taken to be 1/2 (the Gell-Mann normalization) or 1. A rescaling of the normalization of the SU(

*N*

_{ c }) generators can always be absorbed into a normalization of the strong coupling constant. To allow for arbitrary normalization

*T*

_{ R }is kept as a free parameter, denoted by

**TR**, and may be defined by the user. Also the number of colors, denoted

**Nc**in ColorMath, may be set by the user; by default both

**Nc**and

**TR**are kept as free parameters. Note the ColorMath notation for a trace over two gluons

**o**

^{{g1,g2}}in Eq. (6). Similarly, a general trace over

*k*gluons

*g*1,

*g*2,…,

*gk*is denoted

**o**

^{{g1,g2,…,gk}}, and may be thought of as a closed quark-line with

*k*gluons attached.

*i*—define the triple gluon vertices, are denoted

**f**

^{{g1,g2,g3}}. Similarly, the totally symmetric “structure constants” are defined as

**d**

^{{g1,g2,g3}}. Recall that, starting from the commutation (anticommutation) relations the structure constants can be rewritten in terms of traces over SU(

*N*

_{ c }) generators, In ColorMath notation

**t**is used to denote an open quark-line, and the above expression is written similarly, Pictorially this represents where

*i*is included in the triple gluon vertex. The rationale for putting the gluon index in the SU(

*N*

_{ c }) generators

**t**

^{{g2}q1}

_{ q2}inside a Mathematica

**List**in Eq. (9) is to allow for the natural extension of having many gluons attached to an open quark-line, thus The left hand side has several advantages compared to the right hand side. An open quark-line with an arbitrary number of gluon indices can be written in a compact form with no dummy indices. This is not only more human readable, but also superior from a computational point of view, as it avoids the contraction of unnecessary dummy indices. A third advantage with the above notation is its direct correspondence to the trace type bases [4, 5, 6, 7, 8, 9, 10, 11, 12]. A basis (or spanning set) for the color space for a fixed set of external quarks, anti-quarks and gluons can always be taken to be a sum of products of open and closed quark-lines.

In this context we also remark that the color tensors defined in Table 1 are color scalars, i.e., they are invariant under SU(*N* _{ c }) transformations. This imposes no restriction for our purposes as, for any QCD amplitude, the overall color structure, including *both* incoming and outgoing particles, always is a color singlet. As the basic building blocks are invariant, each tensor built out of these objects, i.e., each tensor needed for color summed calculations in perturbative QCD is a actually a color scalar.

*a*

_{ i }=1,…,

*N*

_{ c }if parton

*i*is a quark or anti-quark and \(a_{i}=1,\ldots, N_{c} ^{2}-1\) if parton

*i*is a gluon. As long as the color structures in Table 1 are multiplied by real coefficients the scalar product is actually real, which is easy to prove using the computational rules in the next section.

## 3 Basic computational strategy

Having defined all the color carrying objects, we turn to describing the basic strategy for carrying out calculations.

- (i)
Rewrite the triple gluon vertices using Eq. (8). This results in a color structure which is a sum of products of open and closed quark-lines, connected to each other via repeated gluon indices.

- (ii)Contract all internal gluon indices using the Fierz or completeness relation
- (iii)If present, remove Kronecker deltas (for quarks and gluons), and internal quark indices using
- (iv)Use the tracelessness of the SU(
*N*_{ c }) generators, and contract quark and gluon delta functions with repeated indices

*T*

_{ R }and

*N*

_{ c }, whereas a general amplitude is represented as a sum of products of closed and open quark-lines, i.e., as sums of products of

**t**

^{{g1,g2,…,gk}q1}

_{ q2}, including

**t**

^{{}q1}

_{ q2}=

*δ*

^{ q1}

_{ q2}, and

**o**

^{{g1,g2,…,gk}}, which for two gluons may be rewritten as

**o**

^{{g1,g2}}=

**TR**

**Δ**

^{{g1,g2}}.

By applying these rules, *any* amplitude square and any interference term appearing in QCD can be calculated [6, 11]. To successfully square an arbitrary QCD amplitude using the above set of rules we see that steps (i)–(ii) have to be performed while keeping the relative order, i.e., by first applying rule (i) and then rule (ii). We also note that these rules increase the number of terms, whereas the rules (iii)–(iv) decrease the number of terms or keep it fixed. In order not to unnecessarily inflate an expression it may therefore be useful to apply the latter rules at any time during the computation. ColorMath utilizes this and tries to contract indices using (iii)–(iv) at any time, while rules (i)–(ii) are used only when needed, i.e., when the non-expanding rules fail.

- (v)Two neighboring gluons attached to the same (closed or open) quark-line are contracted. In this case the result is simply \(c_{F} = T_{R} ( N_{c} ^{2}-1)/ N_{c} \) times the color structure where the two involved gluons have been contracted,
- (vi)Similarly, it is easy to show, using the Fierz identity, Eq. (13), that the contraction of two next to neighboring gluons results in only one term

*f*

^{ g1 g2 g3}and

*d*

^{ g1 g2 g3}. Therefore rule (i) is

*not*always automatically used for simplifying expressions. Instead, in addition to the above set of rules, a limited set of rules for contraction of repeated gluon indices occurring in the standard and the symmetric structure constants are implemented. More specifically, all rules for contracting two gluons in products of two symmetric or antisymmetric structure constants, for example, and all rules for contracting three gluons in products of three symmetric or antisymmetric structure constants, such as are implemented. For more intricate gluon contractions involving structure constants ColorMath can contract indices by first applying rule (i).

## 4 Basic calculations

The color contractions corresponding to the basic manipulations from Sect. 3 are carried out using Mathematica **Rules**, i.e., a set of replacement rules based on pattern matching. As always, the rules may be applied using “**Expr/.TheRules**”, and may be applied repeatedly using “**Expr//.TheRules**”.

**SimpleRules**, as they keep the expression at least as simple (in a term counting sense) as it initially was. Applying these to an expression thus tend to simplify it, for example results in

**TR**(

**Δ**

^{{g1,g2}})

^{2}.

**Nc**

^{2})

**TR**.

The rules defined in (v)–(vi), acting on **t** and **o**, are similarly contained in **OTSimpleRules**, and the union of **SimpleRules** and **OTSimpleRules** and a few rules for rewriting closed quark-lines with zero to two gluons, are contained in **AllSimpleRules**.

The special rules for gluon index contraction in structure constants, exemplified in Eqs. (18)–(19) are defined in **FDRules**. The complete set of rules are stated in Table 2.

Rather than thinking about how individual rules have to be applied, it is convenient to have a standard procedure for contracting color indices. This is embodied in the function **CSimplify**, which does what its name suggests; simplifies the color structure as far as possible. For color structures which do not contain structure constants this always implies contracting all repeated indices.

For color structure involving the structure constants **CSimplify** first attempts simplification using the **FDRules**. If, after this, the expression still contains structure constants, the structure constants are by default rewritten in terms of traces using Eq. (9), and the indices are fully contracted, resulting in a sum of products of open and closed quark-lines. Sometimes it may, however, be desirable *not* to rewrite the structure constants, as expressions may be more compact if they are kept. This can be achieved by using the option **RemoveFD**→**False**.

The most useful set of functions are given in Table 3. Apart from **CSimplify** we especially note the function **ReplaceDummyIndices** for replacing all repeated indices in a color structure with a new unique set of color indices.

**Δ**

^{{g1,g2}},

**f**

^{{g1,g2,g3}}and

**d**

^{{g1,g2,g3}}are real. This is implemented in ColorMath via redefinition of the Mathematica’s built in function

**Conjugate**. With this in mind, we are ready to perform calculations of the type in Eq. (2).

**Δ**

^{{g1,g2}}≠

**Δ**

^{{g2,g1}}, and similarly,

**o**

^{{g2,g3,g4,g1}}≠

**o**

^{{g1,g2,g3,g4}}etc. For this reason a function

**SortIndices**, which writes indices in Mathematica default order is defined, s.t. for example This function is used by

**CSimplify**, and by some of the rules in Table 2.

Sometimes more detailed control over the calculation may be desired. For this purpose, and for internal usage, functions manipulating indices and probing the color structure are given in Table 4, in the Appendix.

While each squared amplitude in principle can be calculated as outlined above, ColorMath also offers more efficient tools for dealing with vectors in color space.

## 5 Defining and using vectors

For the purpose of studying color space it is often convenient to define a basis for the color space, and sometimes also projection operators. Both of these are examples of color (singlet) tensors, and ColorMath has a set of tools for working directly with such tensors.

^{2}A basis for the color space may be written as [13] where the basis vectors are labeled using first the overall multiplet of \(q_{1} \overline{q} _{2}\), then the overall multiplet of \(q_{3} \overline{q} _{4}\), and finally the overall multiplet of \(q_{3} \overline{q} _{4} g_{5}\), which—due to color conservation—must equal the multiplet of \(q_{1} \overline{q} _{2}\), (implying that the notation is somewhat redundant).

From a Mathematica perspective we note a few things. First, on the left hand side, we see that the indices inside the **List** in the **Subscript** are followed by underscore to indicate pattern matching. This is standard in Mathematica and makes it possible to use any symbol to denote the indices in later calculations. Then we note that the last two tensors in Eq. (25) are defined using **Module**. This is to ensure that each time the tensor is used, it comes with a fresh set of dummy indices. This is also the reason why set delayed “:=” is used.

**Vector181**squared we could enter but it is yet much easier to use the tensor functions for calculating scalar products. Instead we could simply write resulting in Nc(−1+Nc

^{2})TR. Having a basis we naturally want to calculate all norms (square). ColorMath has special functions for this as well. If we define we may calculate the squares of the basis vectors using This results in a

**List**containing the scalar products between each basis vector and itself

**CDotMatrix**may be used. This returns a

**List**of

**List**s, i.e. a matrix, where the

*ij*th element is the scalar product between the

*i*th and

*j*th vector in the list of (basis) vectors. For larger vector spaces with complicated scalar products, it may be desirable to get progress information on the calculations. This can be obtained by setting the option

**Verbose**→

**True**for

**CDotMatrix**,

**Nc**. This can be done by using the option

**NcMin**. The scalar product functions, along with their options, are listed in Table 5.

*j*, what is the effect on the basis vector of exchanging a gluon between parton1 and parton2. This is useful both for soft gluon resummation and for one-loop corrections via gluon exchange. The result can be expressed in terms of a matrix whose element

*ij*is the

*i*th component resulting after such an exchange in the initial vector

*j*. This is calculated by the function

**Basis**is a

**List**of basis vectors, defined using the syntax in Eq. (25) and parton1 and parton2 are the numbers of the partons in the basis vectors, i.e., in this case numbers between 1 and 5. The sign conventions are such that quark–gluon vertex always comes without additional signs, and the triple-gluon vertex have the indices appearing in the order: external index, internal dummy index and index of the exchanged gluon.

^{3}For example, we may calculate the effect of gluon exchange between parton 1 and 3 in the above basis using Here we have supplied optional information about the basis type, that the basis is orthogonal, to speed up the calculations. By default

**CGamma**does a few consistency checks. It checks that the vector resulting after gluon exchange, when squared, has the same value as the basis decomposed version. For orthonormal bases (

**BasisType**→

**OrthonormalBasis**) it is also checked that the resulting matrix is symmetric [14]. These checks may, however be turned off (

**MakeChecks**→

**False**). The set of options, with default values are listed in Table 5.

## 6 Validation and scalability

The computational rules and functions in this package have been used for calculating the three gluon projection operators presented in [15]. This imposes highly nontrivial consistency checks, as it is verified that every projector square equals itself, which at intermediate steps often involve several ten thousand terms. Additional consistency checks on the color contraction rules have been made by using the **CGamma** function which checks that vectors square and basis decomposed vectors square agree, and by changing the order in which the color structure contraction rules are applied. The scalar product matrices have also been compared to the ColorFull code [16] for tree level trace bases with up to six partons out of which one parton is a quark and one an anti-quark. Selected results have been compared against [13], and the package has been tested both in Mathematica 7, 8 and 9.

The computational effort needed for exact treatment of the color space grows very quickly with the number of partons. The dimension of the vector space grows roughly as a factorial in the number of gluons plus \(q\overline{q} \)-pairs [15] (strictly speaking an exponential for finite *N* _{ c } in a multiplet basis). The computational effort for ColorMath, or any program operating by direct manipulation of quark-lines, tend to grow roughly as the square of this, as the quark-lines are non-orthogonal. ColorMath (in its current form) is thus rather intended to be an easy to use package for calculations of low and intermediate complexity than a competitive tool for processes with very many colored partons.

## 7 Conclusion

In this paper a Mathematica package ColorMath for performing color summed calculations in QCD is presented. This package allows for simple evaluation of QCD color amplitudes which are expressed in a format which very much resembles how the color structure would have been written on paper, see Table 1. The idea is that the user—for simple cases—just should give the expression, and then run **CSimplify**[**Expr**] rather than **Simplify**[**Expr**]. The package is based on advanced pattern matching rules, and a list of rules is given in Table 2, whereas functions acting on color structures are given in Table 3.

For calculations of intermediate or high complexity it is often beneficial to use a basis for performing color space calculations. ColorMath allows for definition of color tensors of form **C1** _{{i1_,i2_,…,ik_}}:=…, carrying an arbitrary set of quark, anti-quark and gluon indices. Special functions for calculating scalar products, and investigating the effect of gluon exchange, are given in Table 5. ColorMath is, however, *not* intended for high speed calculations involving many colored partons. For this purpose a separate C++ package is written [16].

## Footnotes

- 1.
To enhance the similarity with usage inside Mathematica, we here use the somewhat unorthodox notation

*q*1 etc. for single quark and gluon indices. - 2.
In this user guide indices representing incoming quarks and outgoing anti-quarks are placed upstairs, whereas outgoing quarks and incoming anti-quarks are placed downstairs. Note, however, that we could as well have used the opposite convention.

- 3.
The sign conventions thus differ from the typical eikonal choice.

## Notes

### Acknowledgements

Terrance Figy, Johan Grönqvist, Simon Plätzer, Stefan Prestel, Johan Rathsman and Konrad Tywoniuk are thanked for useful comments on the ColorMath code and/or paper. This work was supported by a Marie Curie Experienced Researcher fellowship of the MCnet Research Training network, contract MRTN-CT-2006-035606, by the Helmholtz Alliance “Physics at the Terascale” and by the Swedish Research Council, contract number 621-2010-3326.

### Open Access

This article is distributed under the terms of the Creative Commons Attribution License which permits any use, distribution, and reproduction in any medium, provided the original author(s) and the source are credited.

## References

- 1.J. Hakkinen, H. Kharraziha, COLOR: a computer program for QCD color factor calculations. Comput. Phys. Commun.
**100**, 311–321 (1997). hep-ph/9603229 ADSCrossRefGoogle Scholar - 2.J. Alwall, M. Herquet, F. Maltoni, O. Mattelaer, T. Stelzer, MadGraph 5: going beyond. J. High Energy Phys.
**1106**, 128 (2011). arXiv:1106.0522 ADSCrossRefGoogle Scholar - 3.J. Kuipers, T. Ueda, J. Vermaseren, J. Vollinga, FORM version 4.0. arXiv:1203.6543
- 4.J.E. Paton, H.-M. Chan, Generalized Veneziano model with isospin. Nucl. Phys. B
**10**, 516–520 (1969) ADSCrossRefGoogle Scholar - 5.P. Dittner, Invariant tensors in SU(3). II. Commun. Math. Phys.
**27**, 44–52 (1972) MathSciNetADSMATHCrossRefGoogle Scholar - 6.P. Cvitanović, Group theory for Feynman diagrams in non-Abelian gauge theories. Phys. Rev. D
**14**, 1536–1553 (1976) MathSciNetADSGoogle Scholar - 7.P. Cvitanović, P. Lauwers, P. Scharbach, Gauge invariance structure of quantum chromodynamics. Nucl. Phys. B
**186**, 165–186 (1981) ADSCrossRefGoogle Scholar - 8.M.L. Mangano, S.J. Parke, Z. Xu, Duality and multi-gluon scattering. Nucl. Phys. B
**298**, 653 (1988) ADSCrossRefGoogle Scholar - 9.M.L. Mangano, The color structure of gluon emission. Nucl. Phys. B
**309**, 461 (1988) ADSCrossRefGoogle Scholar - 10.Z. Nagy, D.E. Soper, Parton showers with quantum interference. J. High Energy Phys.
**09**, 114 (2007). arXiv:0706.0017 ADSCrossRefGoogle Scholar - 11.M. Sjodahl, Color structure for soft gluon resummation—a general recipe. J. High Energy Phys.
**0909**, 087 (2009). arXiv:0906.1121 ADSCrossRefGoogle Scholar - 12.S. Platzer, M. Sjodahl, Subleading
*N*_{c}improved parton showers. J. High Energy Phys.**1207**, 042 (2012). arXiv:1201.0260 ADSCrossRefGoogle Scholar - 13.M. Sjodahl, Color evolution of 2→3 processes. J. High Energy Phys.
**12**, 083 (2008). arXiv:0807.0555 ADSCrossRefGoogle Scholar - 14.M.H. Seymour, M. Sjodahl, Symmetry of anomalous dimension matrices explained. J. High Energy Phys.
**12**, 066 (2008). arXiv:0810.5756 ADSCrossRefGoogle Scholar - 15.S. Keppeler, M. Sjodahl, Orthogonal multiplet bases in SU(Nc) color space. J. High Energy Phys.
**1209**, 124 (2012). arXiv:1207.0609 ADSCrossRefGoogle Scholar - 16.M. Sjodahl, ColorFull—a C++ package for color space calculations (2013, in preparation) Google Scholar