1 Introduction

According to our current understanding of collisions of heavy nuclei at collider energies the high density in the final state of these collisions leads to strong final state re-scattering that rapidly drives the system towards local thermal equilibrium [1, 2]. At (proper) time \(\mathcal {O}(1\mathrm{fm/c})\), the systems enters an extended phase of hydrodynamic evolution, during which it undergoes continued strong longitudinal and moderate transverse expansion. During this phase, it is well described by viscous hydrodynamics [3,4,5] with a low shear viscosity to entropy density ratio \(\eta /s\) and equation of state of a deconfined quark-gluon medium [6]. At the pseudo-critical temperature \(T_\text {c} \simeq 160\) MeV [7] the partonic medium freezes out into hadrons that continue to interact until the kinetic freeze-out around 150 MeV. Correlations due the collective expansion of the system are imprinted onto the hadronic final state and give rise to an azimuthal anisotropy (quantified by the flow coefficients \(v_n\)), a near-side long-range correlation in rapidity known as the ridge, and a hardening of transverse momentum spectra with \(\langle p_\perp \rangle \) increasing with hadron mass. The comparatively high temperature at chemical freeze-out also leads to enhanced strangeness production [8,9,10,11,12,13].

The interpretation of these observations as signals of final state collectivity is, however, challenged by the observation of these signatures in proton-nucleus and high-multiplicity proton-proton collisions. Naively, these systems are too small and too dilute to develop a sizeable thermalized medium. Still, the question has to be asked to what extent there is final state re-scattering also in these small systems and whether this could lead to a partial equilibration that is visible in hadron distributions (see [14, 15] for reviews).

In the case of heavy-ion collisions, the rapid equilibration to an extent that viscous hydrodynamics becomes applicable can be understood both in terms of strong-coupling dynamics [16,17,18,19], as well as in terms of weak-coupling dynamics [20,21,22]. In the latter case it can be studied using the effective kinetic theory of QCD by Arnold, Moore and Yaffe (AMY) [23,24,25], describing the dynamics of quarks of gluons. Kinetic theory is a natural candidate for the description of small collision systems [26,27,28,29], since it is valid in- and out-of-equilibrium.

Progress in understanding similarities and differences between small and large collision systems will depend critically on detailed apples-to-apples comparisons between theory and experimental data. This is particularly important for the small systems, where the interpretation of data is complicated by biases and auto-correlations. Monte Carlo (MC) event generators are tools that can bridge the gap between theory and experiments and are indispensable for a thorough understanding of collider data in all areas. Compared to the perturbative regime of proton-proton physics, where sophisticated event generators built on the Standard Model (and beyond) are available, event generators for soft physics and heavy-ion physics are far less advanced. It is our aim to fill in this gap by developing a MC event generator representation of the AMY effective kinetic theory that is applicable to small and large collision systems with a focus on soft particle production. Alpaca (AMY Lorentz invariant PArton CAscade) is implemented as a module in the Sherpa [30] event generator. The main difference to existing parton cascade codes [31,32,33,34,35,36,37,38,39,40] is that it reproduces exactly the AMY kernels for all elastic scattering, splitting and merging processes. Furthermore, it is implemented in a way that is Lorentz-invariant by construction. This avoids problems with residual causality violation [41] and altered correlations and fluctuations due to particle subdivision [42]. In this paper we focus on the implementation of the effective kinetic theory in a parton cascade code and show that it reproduces AMY in thermal equilibrium. A major challenge in this is to extract the screening masses and effective temperature \(T_*\), which are non-local in phase-space, from the parton ensemble. For the validation of the thermal equilibrium we initialise the system in thermal equilibrium and convince ourselves that the distribution function does not change. This will only be the case when detailed balance is respected. In particular, splitting and merging rates have to be the same, which requires a non-trivial interplay between elastic and inelastic processes. The scattering rates depend on the screening masses and the splitting and merging rates on the effective temperature, detailed balance is therefore a critical test of our dynamical extraction of these quantities. Running the simulation for a long time in thermal equilibrium is an important validation exercise showing that the dynamics are correctly encoded. The next step is then to study how a system that is initialised out of equilibrium approaches equilibrium. Since this is a different question we will discuss it in a separate publication.

The paper is organised as follows: in Sect. 2 we briefly review the method used to make the parton cascade Lorentz invariant and Sect. 3 gives a summary of the AMY effective kinetic theory. Details on the implementation in Alpaca are given in Sect. 4, with an introduction to the framework in Sect. 4.1, a discussion of the set-up used for the thermal equilibrium simulations in Sect. 4.2, details on elastic scattering in Sect. 4.3, splitting and merging in Sect. 4.4 and lastly the results of a long run with all the different components included is shown in Sect. 4.5. We conclude the discussion in Sect. 5 and give further technical details in the appendices.

2 A Lorentz invariant parton cascade

The no-interaction theorem [43] states that N particles moving in a 6N dimensional phase space cannot interact if Lorentz invariance (instead of Galilei invariance) is required. This theorem can, however, be circumvented by regarding the particles as moving in a 8N dimensional phase space [44], i.e. formulating the theory in terms of four-positions and four-momenta of the particles. With a physical choice of the quasi-potential describing the interactions the particles are classically off-shell (i.e. \(p_i^2 \ne m_i^2\)) when they are within the range of the quasi-potential and on-shell otherwise. The four-vectors can be parameterised by an evolution parameter \(\tau \), that is a Lorentz scalar. The equations of motion are then given by

$$\begin{aligned} \frac{d}{d \tau } p_{i\mu }(\tau )&= \{H,p_{i\mu }\} = - \frac{\partial H}{\partial x_i^\mu }, \end{aligned}$$
(1)
$$\begin{aligned} \frac{d}{d \tau } x_{i\mu }(\tau )&= \{H,x_{i\mu }\} = + \frac{\partial H}{\partial p_i^\mu }, \end{aligned}$$
(2)

where H is the classical Hamiltonian.

We here follow the approach of [37] and use a simplified Hamiltonian, in which there are only binary interactions of particles taking place at discrete points in \(\tau \).Footnote 1 The interactions thus lead to instantaneous (in \(\tau \)) changes of the momenta and between interactions the particles travel on free trajectories. We thus require only the free Hamiltonian, which for a system of N particles is the sum of N single particle free Hamiltonians. In Alpaca we neglect the (parametrically small) effective masses and treat all partons as massless. The Hamiltonian is then given by

$$\begin{aligned} H = \sum _{i=1}^N \lambda p_i^2 , \end{aligned}$$
(3)

where \(\lambda \) is an arbitrary Lagrange multiplier [46]. The equations of motion are easily solved to yield

$$\begin{aligned} p_{i\mu }(\tau )&= \text {const}, \end{aligned}$$
(4)
$$\begin{aligned} x_{i\mu }(\tau )&= 2 \lambda p_{i\mu } (\tau - \tau _{0i}) + x_{i\mu }(\tau _{0i}). \end{aligned}$$
(5)

The parameter \(\tau \) does not have a physical interpretation. One can, however, chose an arbitrary but fixed reference frame and calculate the particles’ momentum and position in this frame. Using \(x_{i\mu } = (ct, \textbf{r}_i)\) and \(p_{i\mu } = (\omega _i/c, \textbf{k}_i)\) with \(|\textbf{k}_i| = \omega _i/c\) one finds

$$\begin{aligned} \frac{\text {d}\textbf{r}_i}{\text {d}t} = \frac{\text {d}\textbf{r}_i}{\text {d}\tau } \frac{\text {d}\tau }{\text {d}t} = 2 \lambda \textbf{k}_i \frac{c^2}{2 \lambda \omega _i} = \frac{c^2 \textbf{k}_i}{\omega _i} , \end{aligned}$$
(6)

where

$$\begin{aligned} \tau = \frac{c^2 (t - t(\tau _{0i}))}{2 \lambda \omega _i} + \tau _{0i} \end{aligned}$$
(7)

was used. This is, of course, the expected result (and independent of \(\lambda \)).

In order to find the \(\{\tau _{0i}\}\) at which the initial conditions \(\{x_i(\tau _{0i})\}\) are specified, the parameter \(\tau \) has to be related to some observer time. This can be done by generalising the procedure introduced in [44] for a 2-particle system to N particles.Footnote 2 The position of the centre-of-momentum \(X_\mu \) in the centre-of-momentum frame satisfies

$$\begin{aligned} X_\mu ^\text {c.m.}(\tau ) = \lambda P_\mu ^\text {c.m.} \tau \qquad \text {with} \qquad P_\mu = \sum _{i=1}^N p_{i\mu } , \end{aligned}$$
(8)

from which it follows

$$\begin{aligned} t^\text {c.m.}(\tau ) = \lambda E^\text {c.m.} \tau , \end{aligned}$$
(9)

where, without loss of generality, \(\tau _0 = t^\text {c.m.}(\tau _0)=0\) was set.

In order to decide whether a given pair of particles interacts, one needs to measure their distance. Following [37], the Lorentz invariant distance squared between two particles is defined as

$$\begin{aligned} d_{ij}^2&= - \left( x_\mu - \frac{x_\nu p^\nu }{p^2}p_\mu \right) \left( x^\mu - \frac{x_\nu p^\nu }{p^2}p^\mu \right) \nonumber \\&= - \left( x^2 - \frac{(x_\mu p^\mu )^2}{p^2} \right) , \end{aligned}$$
(10)

where \(x = x_i-x_j\) is the relative four-distance between the particles, and \(p = p_i+p_j\) is the total four-momentum of the pair. In the centre-of-momentum frame of the pair, this reduces to the squared three-distance. When the distance becomes smaller than \(\sqrt{\sigma _\text {scat}/\pi }\), where \(\sigma _\text {scat}\) is the scattering cross section, an interaction occurs.Footnote 3 The interactions are ordered in \(\tau \) in a frame-independent way. This avoids the problem of causality violation in parton cascades that appears when ordering interactions in observer time, in which case the ordering is frame dependent.

In general, when a pair of particles interacts, the condition \(d_{ij} < \sqrt{\sigma _\text {scat}/\pi }\) is satisfied during a finite \(\tau \) interval and one has to make a choice at which point in \(\tau \) the interaction takes place. We here choose the point of closest approach between the particles, i.e. the \(\tau \) corresponding to \(\min (d_{ij}(\tau ))\). The value of \(\tau \) for which the closest approach is reached can be calculated from Eq. (10) and is given by

$$\begin{aligned} {\bar{\tau }} = \frac{1}{2} \left( \tau _{0i} + \tau _{0j} \right) + \frac{[x_i(\tau _{0i}) - x_j(\tau _{0j})]_\mu [p_i - p_j]^\mu }{4 \lambda p_{i\mu } p_j^\mu } . \end{aligned}$$
(11)

The parton cascade proceeds by moving from one scattering to the next. The \(1 \rightarrow 2\) splitting processes are easily included by translating the splitting rate in terms of an observer time into a splitting rate in \(\tau \) using Eq. (7) (see Sect. 4.4.1).

3 The AMY effective kinetic theory

In [23], P. Arnold, G. Moore, and L. Yaffe derived an effective kinetic theory of QCD at high temperatures. At sufficiently high T, where the QCD coupling g(T) is small, the temperature T sets a hard scale, while gT is a softer scale. It is a starting assumption of the effective-theory setup that these parametrically separated scales are also quantitatively well-separated. Under this assumption the QCD plasma consists of quarks and gluons as well-defined quasi-particles with typical momenta of order T. These hard partons propagate as nearly free and nearly massless particles, since thermal masses are \(\mathcal {O}(gT)\) and the small-angle scattering rate is \(\mathcal {O}(g^2T)\). The rate of large-angle scattering is \(\mathcal {O}(g^4T)\).

In addition to elastic \(2\leftrightarrow 2\) scattering, \(1 \leftrightarrow 2\) splitting and merging processes have to be taken into account. In vacuum, these are kinematically allowed only when all three momenta are exactly collinear. In plasma, this restriction disappears when a soft scattering is involved. The process is then nearly collinear with a rate \(\mathcal {O}(g^4T)\), i.e.,  comparable to the large-angle elastic-scattering rate. The process is not instantaneous, as it involves an off-shell propagator. The formation time of splitting/merging processes turns out to be \(\mathcal {O}(1/g^2T)\), i.e.,  the same as the small-angle-scattering mean free path. Consequently, additional soft collisions occur during the formation time making it an \(N+1 \leftrightarrow N+2\) process. The additional soft collisions are not resolved individually by the radiation and cannot be treated as classically independent. Instead, they act coherently giving rise to the QCD analogue of the Landau-Pomeranchuk-Migdal (LPM) effect [47, 48]. The splitting/merging processes involving N coherent soft scatterings are denoted as “\(1 \leftrightarrow 2\)” processes.

The effective kinetic theory is formulated as a set of Boltzmann equations

$$\begin{aligned} \left( \partial _t + \frac{\textbf{p}}{p_0} \cdot \nabla _\textbf{x} \right) f_s(\textbf{x},\textbf{p},t) = - C_s^{2\leftrightarrow 2}[f] - C_s^{``1\leftrightarrow 2\text {''}}[f]\nonumber \\ \end{aligned}$$
(12)

for the phase space densities \(f_s(\textbf{x},\textbf{p},t)\) of partons of species s at position \(\textbf{x}\) with momentum \(\textbf{p}\) at time t. The collision kernels \(C_s^{2\leftrightarrow 2}\) and \(C_s^{``1\leftrightarrow 2\text {''}}\) encode the effect of elastic scattering and splitting/merging, respectively.

The elastic scattering kernel includes all \(2\leftrightarrow 2\) processes, because all of them have parametrically the same hard scattering rate. It has the usual form

$$\begin{aligned} C_a^{2\leftrightarrow 2}[f]&= \frac{1}{4|\textbf{p}|} \sum _{bcd} \int _{\textbf{k}\mathbf {p'}\mathbf {k'}} \delta ^{(4)}(P+K-P'-K') \nonumber \\&\quad \times \nu _b |\mathcal {M}^{ab}_{cd} |^2 (2\pi )^4\big \{ f_a(\textbf{p})f_b(\textbf{k})\nonumber \\ {}&\quad \times [1\pm f_c(\mathbf {p'})][1\pm f_d(\mathbf {k'})] \nonumber \\&\quad - f_c(\mathbf {p'})f_d(\mathbf {k'})[1\pm f_a(\textbf{p})][1\pm f_b(\textbf{k})] \big \}, \end{aligned}$$
(13)

where the dependence of the phase space densities \(f_s\) on position and time has not been written out. Capital letters denote four-vectors and the particles are taken as massless. The factor \(\nu _s\) is the number of spin and colour states (i.e. \(\nu _q = 6\) for quarks and anti-quarks and \(\nu _g = 16\) for gluons). The effective in-medium matrix elements squared \(|\mathcal {M}^{ab}_{cd} |^2\) are taken as summed over the final state and averaged over the initial state.Footnote 4 It should be noted that due to screening in the plasma the matrix elements depend on the phase space densities. The short hand notation

$$\begin{aligned} \int _\textbf{p}\dots = \int \frac{\text {d}^3 p}{2|\textbf{p}| (2\pi )^3} \dots \end{aligned}$$
(14)

for the Lorentz-invariant momentum integration has been used, and the factor in front of the integral contains a factor of 1/2 for symmetry. The factors \((1 \pm f)\), where the upper sign is for gluons and the lower is for (anti)quarks, encode Bose enhancement or Pauli blocking, depending on the species. The first term in Eq. (13) is a gain term accounting for partons arriving at momentum \(\textbf{p}\) due to elastic scattering, while the second is the loss term accounting for partons leaving momentum \(\textbf{p}\).

The kernels for the effective splitting/merging processes can be written as

$$\begin{aligned} C_a^{``1\leftrightarrow 2\text {''}}[f]&= \frac{(2\pi )^3}{2|\textbf{p}|^2\nu _a}\sum _{b,c}\int _0^\infty \text {d}p'\,\text {d}k'\delta (p-p'-k') \nonumber \\&\quad \times \gamma ^a_{bc}(\textbf{p};p'\hat{\textbf{p}},k'\hat{\textbf{p}})\Big \{f_a(\textbf{p})[1\pm f_b(p'\hat{\textbf{p}})]\nonumber \\ {}&\quad \times [1\pm f_c(k'\hat{\textbf{p}})] - f_b(p'\hat{\textbf{p}})f_c(k'\hat{\textbf{p}})[1\pm f_a(\textbf{p})] \Big \} \nonumber \\&\quad + \frac{(2\pi )^3}{|\textbf{p}|^2\nu _a}\sum _{b,c}\int _0^\infty \text {d}k\,\text {d}p'\delta (p+k-p') \nonumber \\&\quad \times \gamma ^a_{bc}(p'\hat{\textbf{p}};\textbf{p},k\hat{\textbf{p}}) \Big \{f_a(\textbf{p})f_b(k\hat{\textbf{p}})[1\pm f_c(p'\hat{\textbf{p}})] \nonumber \\&\quad - f_c(p'\hat{\textbf{p}})[1\pm f_a(\textbf{p})][1\pm f_b(k\hat{\textbf{p}})] \Big \}, \end{aligned}$$
(15)

where the (small) transverse momenta associated with the splitting or merging have been integrated out neglecting the deviations from exact collinearity in the phase space densities. The functions \(\gamma ^a_{bc}\) are the differential splitting/merging rates for the \(a \leftrightarrow b+c\) processes and contain the effect of multiple soft scattering during the formation time. As in the elastic scattering case, they depend implicitly on the phase space densities. The rates \(\gamma ^a_{bc}\) should be understood as summed (not averaged) over all external partons.

The effective kinetic theory is leading-order accurate in the coupling \(\lambda = g^2 N_c = 4 \pi \alpha _s N_c\) for hard partons.

In order for any kinetic theory to be applicable the duration of scattering events must be small compared to the mean free path. In the case of the AMY effective kinetic theory in equilibrium this in ensured by the assumption that the temperature is sufficiently high for the theory to be weakly coupled. Out of equilibrium, the question of applicability of the theory requires a more careful discussion, which is provided in [23]. The most important requirements are that the phase space densities support a separation of scales as outlined at the beginning of this section. This means that all relevant excitations should have momenta that are large compared to the screening masses. The effective masses, in turn, have to be much larger than all other mass scales (\(\Lambda _\text {QCD}\) and quark masses). Furthermore, the phase space densities have to be sufficiently slowly varying, in particular they should not vary significantly over the length/time of the formation time of near the collinear splitting/merging processes. Lastly, the formulation of the AMY kinetic theory is technically leading-order accurate only for isotropic distributions due to certain plasma instabilities. However, numerical evidence points that the effect of the unstable modes may be quantitatively small [49].

4 The Alpaca framework

4.1 General remarks

Alpaca (AMY Lorentz invariant PArton CAscade) is a parton cascade which solves the Boltzmann equation of the AMY effective kinetic theory indirectly by, in a Lorentz invariant way, evolving a parton ensemble according to the AMY collision kernels. To fully capture the dynamics of these kernels, three types of processes are considered: elastic scattering, quasi-collinear merging and quasi-collinear splitting.

In addition to being able to evolve finite-sized systems, Alpaca also contains an implementation of infinitely sized ensembles in thermal equilibrium, used to verify simulations in a simpler setting with analytically known results. The infinite-sized system is implemented through a box with periodic boundary conditions, something that introduces further complications to the Lorentz invariant framework, which is discussed in detail in Sect. 4.2.

The evolution of the particle ensemble takes place in \(\tau \) as defined in Sect. 2. Each event starts at \(\tau =0\) and is set to end at some \(\tau _{\textrm{max}}\). Since \(\tau \) does not have a physical meaning it is convenient to also define an observer time \(t_\text {max}\) that the system should reach. To ensure that all particles are evolved to \(t_\text {max}\) the simulation will keep running until all particles have \(t\ge t_{\textrm{max}}\) even when this requires going to \(\tau > \tau _\text {max}\). There is no need for \(t_\text {max}\) and \(\tau _\text {max}\) to be the same, but we here choose \(t_\text {max} = \tau _\text {max}\). After the initialization of an event, the next possible processes of the three described above are found and ordered in \(\tau \). Between any processes taking place partons are treated classically as point particles and are considered free streaming, according to Eq. (5).

The possible interactions of particles implemented in Alpaca to fully capture the dynamics given by AMY are elastic scattering and inelastic splitting/merging. However, due to the LPM effect present in the inelastic processes as well as the restriction of collinearity, the inelastic and elastic processes are treated differently. For the elastic case, an effective cross section extracted from the elastic collision kernel is used. In the current implementation we use a black disk approximation for the cross section, i.e., an interaction between a pair of particles occurs if their invariant distance at closest approach satisfies \(d_{ij} < \sqrt{\sigma /\pi }\). If several processes are allowed, \(\sigma \) is the sum of the cross sections of the individual processes. It is then decided in a second step which processes is going to take place according to the relative contributions to the total cross section.

In the Lorentz invariant framework a problem arises in a box with periodic boundary conditions. As discussed in Sect. 4.2 the algorithm for finding the closest approaches between pairs of particles requires the cross section as input. The cross section however, depends on the local quantities \(m_{g/q}(\textbf{x},\textbf{p})\) and \(f(\textbf{x},\textbf{p})\) which are not known a priori. The solution is to find an overestimate of the cross sections that is independent of local quantities and then reject interactions with a probability that is given by the true cross section (evaluated at the point of the potential interaction) divided by the overestimate.Footnote 5 The cross sections and overestimates for the different processes are given in Sects. 4.3.1, 4.4.2 and Appendix C.1.

For the inelastic processes, the effect of multiple coherent scattering during the formation time (LPM effect) is already included in the splitting/merging rates \(\gamma ^a_{bc}\). We therefore don’t explicitly simulate them, but treat the inelastic processes as effective \(1\leftrightarrow 2\) processes. However, since we are dealing with an ensemble of discrete particles, a pair of particles will never be exactly collinear. We therefore have to allow for a small relative transverse momentum \(k_\perp \) for the merging processes, and consequently also for splitting (the two types of processes have to cover the same phase space in order to preserve detailed balance). The \(k_\perp \) is absorbed by a nearby parton, which we call the ‘recoil parton’. This recoil parton thus effectively acts as the (possibly multiple) parton(s) with which the soft coherent scattering occurs during the formation time of the splitting/merging. Since merging processes initially consists of a pair they can be treated similarly to elastic scattering, where we extract an effective cross section from the inelastic collision kernels and then evaluate this using a black disk approach.

For collinear splittings, an implementation of the Veto algorithm is utilized, see Sect. 4.4.1 for details. Since the splitting and merging rate is infra-red divergent we have to introduce a small cut-off in x. We do this by introducing a minimum momentum for all particles, \(p_{\textrm{min}}\), so that no particle is initialized with \(p < p_\text {min}\) or allowed to scatter/split/merge into a momentum lower than this. This does not compromise the theory’s accuracy.

Currently, Alpaca is only utilizing the general event handling framework in Sherpa, due to the focus on testing the model in thermal equilibrium. We plan to integrate Alpaca in the event generation in Sherpa in the future to allow for hadronisation and inclusion of hard processes like jet production.

4.2 Simulating a system in equilibrium

In numerical studies of systems of particles in thermal equilibrium, one usually considers the system in a box with periodic boundary conditions. The position of a particle leaving the box at one end is then shifted such that the particle re-enters the box at the other end (the momentum remains unchanged). The justification for this procedure is that a system in thermal equilibrium is homogeneous and therefore, if one imagines the space to be divided into equally sized cells, all cells look the same on average. The periodic boundary condition makes all cells look exactly the same.

To simulate the evolution of a system of particles, one has to consider the interactions of each particle with all other particles. Since all cells are identical, it is enough to consider all interactions inside one cell. One therefore has to identify all pairs of particles that interact inside the box within a pre-defined time interval. In a parton cascade considering only binary interactions, one thus has to compute the time and distance of closest approach for each pair of particles. The distance of closest approach decides whether the pair will scatter, and the time at which this happens decides whether the scattering will take place inside the box (or whether one or both particles will have left the box before the encounter). To correctly account for all possible interaction inside the box, one has to consider scattering of a particle inside the box with particles coming from neighbouring cells. Both the time and distance of closest approach depend only on the relative distance between the two particles. One thus captures all possible encounters of particles 1 and 2 and all their copies in other cells by considering the copy of particle 1 located in the box and all copies of particle 2 on other cells.

When the system with periodic boundary conditions evolves in an observer time, e.g. the time in the rest frame of the box, a particle in the box can only collide inside the box with a particle coming from inside the box or one of the neighbouring 26 cells,Footnote 6 which are copies of the original cell, surrounding the box. If the second particle comes from farther away, the closest approach of the pair will always happen outside the box. Such an evolution is, however, not Lorentz invariant, but frame dependent. As discussed in Sect. 2 the evolution of a multi-particle system can be simulated in a frame independent way by ordering scattering events not in an observer time t, but in a generalised time \(\tau \), which is a Lorentz scalar. In this way the evolution of the system becomes Lorentz invariant, but now a particle in the box can scatter inside the box with a copy of another particle coming from any cell. One therefore has to consider a countably infinite number of encounters for this pair. Of these we are only interested in those that bring the particles close enough for a scattering. And of those that lead to a scattering we need to find the first one, i.e. the one with the smallest \(\tau \) starting from the current \(\tau \) of the evolution.

We have developed an algorithm that finds the earliest closest approach for a given pair of particles that is close enough for an interaction to occur. It systematically checks closest approaches between the first particle in the box with copies of the second particle coming from other cells ordered in increasing invariant time \(\tau \). This algorithm needs the scattering cross section as input, because when a closest approach is not close enough for a scattering to occur it has to continue checking other copies of the second particles. The algorithm is specified in full detail in Appendix A.

4.3 Elastic scattering

4.3.1 General considerations

As mentioned in Sect. 4.1, to determine if a parton pair scatters elastically, and if so which type of elastic scattering occurs, multichannel accept/reject Monte Carlo sampling is used. The scattering matrix elements are related to the elastic cross section through

$$\begin{aligned} \sigma ^{ab}_{2\rightarrow 2}&= \frac{1}{2}\sum _{cd}\int \frac{d\sigma ^{ab}_{cd}}{d\Phi _{\mathbf {p'},\mathbf {k'}}}d\Phi _{\mathbf {p'},\mathbf {k'}} \nonumber \\&= \frac{1}{s^2} \sum _{cd} \int d^3\mathbf {p'}d^3\mathbf {k'}\left[ \frac{s}{2|\mathbf {p'}||\mathbf {k'}|}\right] \frac{|\mathcal {M}^{ab}_{cd}|^2}{16(2\pi )^6}(2\pi )^4 \nonumber \\&\quad \times \delta ^{(4)}(P+K-P'-K')[1\pm f(\mathbf {p'})][1\pm f(\mathbf {k'})], \end{aligned}$$
(16)

where

$$\begin{aligned} d\Phi _{\mathbf {p'},\mathbf {k'}}&= \frac{d^4P'}{(2\pi )^3}\frac{d^4K'}{(2\pi )^3} \delta (P'^2)\theta (P_0')\delta (K'^2)\theta (K_0') \nonumber \\&\quad \times (2\pi )^4 \delta ^{(4)}(P+K-P'-K') \end{aligned}$$
(17)

is the phase-space measure of the outgoing particles. Note that we pick up a factor of 1/2 in the first equality due to either gluons being indistinguishable or from double counting of fermionic processes. The factor within the bracket can be expressed using the relative angle \(\theta _{\Delta \textbf{p}\textbf{k}}\) between \(\textbf{p}\) and \(\textbf{k}\) as \(s/2|\textbf{p}||\textbf{k}| = 1-\cos (\theta _{\Delta \textbf{p}\textbf{k}})\) and enforces a vanishing contribution for particles moving collinearly. In an isotropic system this expression integrates to unity.

For hard scattering screening effects are negligible and the standard vacuum matrix elements can be used. For soft scattering (small t or u), however, the matrix elements receive large corrections from in-medium physics. Following the strategy of [50, 51] we replace the infra-red divergent \(1/t^2\) terms in the matrix elements by

$$\begin{aligned} \frac{1}{t^2} \rightarrow \frac{1}{(t - \zeta _s m^2_s)^2} , \end{aligned}$$
(18)

where \(m_s\) is the effective mass of the parton in the propagator and the prefactors \(\zeta _g = e^{5/3}/4\) and \(\zeta _q = e^2/4\) contain the conversion factor between (asymptotic) effective mass and screening mass and a scaling factor that ensures that the modified matrix elements reproduce to leading order the HTL results for drag and momentum broadening [50, 52]. Strictly speaking, the factors \(\zeta _s\) should be re-calculated for our choice of making the replacement, which differs from [50, 51]. We leave this for the future. We list the matrix elements used in Alpaca in Appendix C.1.

In addition to the scattering matrix elements the collision kernels contain factors of \((1\pm f)\) for the outgoing partons, which encode Bose enhancement and Pauli blocking. Thus the integral over the outgoing momenta of the matrix elements does not give the standard cross sections, but effective cross sections containing the Bose enhancement/Pauli blocking factors. The effective cross sections can be used for simulating the scatterings in the standard way. However, also the Bose enhancement/Pauli blocking factors depend on the position of the scattering and are not known beforehand. We therefore include them in the rejection step by including an overestimate of these factors when integrating the effective cross sections and later rejecting the scattering with the ratio of the true Bose enhancement/Pauli blocking factor and the overestimate.

In practice, if the closest approach occurs at some \(\bar{\tau }\) and the distance is smaller than \(\sqrt{{\tilde{\sigma }}/\pi }\) where \({\tilde{\sigma }}\) is the overestimated effective cross section, \(m_s^2(\textbf{x},\textbf{p})\) and \(f_s(\textbf{x},\textbf{p})\) are extracted as described in Sect. 4.3.2. In combination with the matrix element, as given in Appendix C, the full cross section is found and the process is accepted or rejected based on the ratio \(\sigma ^{ab}_{2\rightarrow 2}/\tilde{\sigma }^{ab}_{2\rightarrow 2}\).

If the process is accepted, t is sampled from the differential cross section (using accept/reject Monte Carlo with the overestimates of the matrix elements given in Appendix C) and the particles’ momenta are updated.

4.3.2 The effective masses and phase space densities

The screening mass \(m_s\) for a particle of species s, represents the medium screening effects and contributes in a highly non-trivial way to the evolution of the parton ensemble. It is responsible for regulating the otherwise divergent matrix elements in a local way and is in turn essential to capture interesting dynamics in the non-equilibrium case. The (position averaged) definition of the effective mass for a gluon is

$$\begin{aligned} m_g^2 = \sum _{s} 2\nu _s \frac{g^2 C_s}{d_A} \int _V \frac{d^3\textbf{x}}{V} \int \frac{d^3\textbf{p}}{2|\textbf{p}|(2\pi )^3}f_s(\textbf{p},\textbf{x}) \end{aligned}$$
(19)

and for a fermion of species s

$$\begin{aligned} m^2_{q(s)/\bar{q}(s)}&= 2g^2C_F \int _V \frac{d^3\textbf{x}}{V} \int \frac{d^3\textbf{p}}{2|\textbf{p}|(2\pi )^3} \nonumber \\&\quad \times \left[ 2f_g(\textbf{p},\textbf{x})+f_s(\textbf{p},\textbf{x})+f_{\bar{s}}(\textbf{p},\textbf{x})\right] , \end{aligned}$$
(20)

where the average is over a spatial volume V. Since \(d^3\textbf{p}/|\textbf{p}|\) and \(d^3\textbf{x}/V\) are Lorentz invariant measures, and \(f(\textbf{p},\textbf{x})\) is a Lorentz invariant scalar [53, 54], it follows that the screening masses are Lorentz invariant quantities.

The screening masses have to be calculated for each scattering and at fixed observer time by integrating/summing over nearby partons. In any reference frame the two colliding partons will in general experience the scattering at different observer times. We choose to calculate the screening mass at the average of these times, which we denote by \(t_\text {D}\). A more serious complication is that when evolving the system in \(\tau \) (rather than observer time) the partons’ positions and momenta are known at fixed \(\tau \), which corresponds to a different observer time for every parton. Partons that are known at observer times later than \(t_\text {D}\) for some scattering can be propagated back in time, but for partons with times earlier than \(t_\text {D}\) this is not possible. We therefore choose to let the earlier partons free-stream to \(t_\text {D}\). This violates causality, as we are ignoring potential scatterings during that time which would change the partons’ positions and momenta. This can be mitigated by solving the time evolution iteratively, as discussed in Sect. 4.5.

To extract \(m^2_{s}\) in a local way we have the following prescription. For any particle pair with their closest approach at some \(\bar{\tau }\), we define \(t_\text {D}\) to be the average observer time of the particle pair at \(\bar{\tau }\). We then identify the \(N_{\textrm{inc}}\) closest (in terms of Euclidean spatial distance in the local rest frame) particles, w.r.t. to the midpoint of the original particle pair at \(t_\text {D}\). This gives a volume \(V = 4\pi r_{\textrm{max}}^3/3\), where \(r_{\textrm{max}}\) is the Euclidian distance to the particle furthest away. Due to the semi-classical approach of Alpaca the partons are treated as pointlike and hence the density of particles can be expressed as

$$\begin{aligned} \frac{dN_a}{d^3\textbf{x}d^3\textbf{p}}=\frac{\nu _a}{(2\pi )^3}f_a(\textbf{x},\textbf{p}) = \sum _i \delta ^3(\textbf{x}_i-\textbf{x})\delta ^3(\textbf{p}_i-\textbf{p}),\nonumber \\ \end{aligned}$$
(21)

which gives an expression for \(f(\textbf{x},\textbf{p})\). For a gluon propagator, following Eq. (19), each of the \(N_{\textrm{inc}}\) included particles then adds a factor of

$$\begin{aligned} \frac{\alpha _s C_s \pi }{2V|\textbf{p}|} \end{aligned}$$
(22)

to \(m_{g}^2\) depending on the species s of the included particle. Similarly, following Eq. (20) for a quark propagator, each surrounding particle adds a factor

$$\begin{aligned} \frac{32\pi }{3V} \frac{\alpha _s}{\nu _g|\textbf{p}|} \quad \textrm{or} \quad \frac{16\pi }{3V} \frac{\alpha _s}{\nu _{q/\bar{q}}|\textbf{p}|} \end{aligned}$$
(23)

to \(m_{q/\bar{q}}^2\) depending on whether the included particle is a gluon or quark (of the same species as the virtual quark).

In order to evaluate the Bose enhancement and Pauli blocking factors, \(1\pm f_a(\textbf{x},\textbf{p})\), that appear in the AMY collision kernels, we also need explicit approximations of \(f_a(\textbf{x},\textbf{p})\). Consequently, we approximate the phase space density by once again treating the particles as pointlike and looking at the phase space volume \(V = V_\textbf{x}V_\textbf{p}\) where we have a spherical spatial volume around \(\textbf{x}\), the point of interest, and a spherical shell around the origin containing the (absolute) momentum p in momentum space, i.e.

$$\begin{aligned} V_\textbf{x}= \frac{4\pi r^3}{3} \quad \textrm{ and } \quad V_\textbf{p}= \frac{\pi \Delta p}{3}(12p^2 + (\Delta p)^2). \end{aligned}$$
(24)

Here, r is the spatial distance between the included particle and \(\textbf{x}\) and is set to some fixed value, while \(\Delta p\) is the allowed differences in absolute momentum p between the original and included particles, also set to some fixed value. We then simply count the \(N_{\textrm{inc}}\) particles that exist within V and the extracted phase space density follows through the relation given in Eq. (21),

$$\begin{aligned} f_a(\textbf{x},\textbf{p}) = \frac{(2\pi )^3}{\nu _a} \frac{N_{\textrm{inc}}}{V}. \end{aligned}$$
(25)

We also set an upper bound for the extracted phase space density, \(f_a(p) = \min (f_a(p), T_*/p)\), since the underlying theory is not valid for \(f(p)>T_*/p\).

Note that the implementation above is set up for an isotropic distribution, which our test case of thermal equilibrium described later will be. For anisotropic distributions the method is easily generalized by restricting the volume in momentum space to a sphere around \(\textbf{p}\).

The phase space density also has to be extracted at fixed observer time and the same free-streaming procedure as for the effective masses is used (with the same caveat concerning causality violation applying, although less severely since f is local in momentum space and therefore the spread in times is much smaller, cf. Eq. (9)).

4.3.3 The thermal equilibrium case

In order to verify that Alpaca reproduces the dynamics of AMY we put our particles in a box with periodic boundary conditions and sample our initial distributions in two different scenarios. First, the Boltzmann distribution

$$\begin{aligned} f_{g/q/\bar{q}\textrm{,initial}}(p) = f_{\textrm{C}}(p) = e^{-p/T} \end{aligned}$$
(26)

which has the benefit of providing us with a simple setup that allows for many quantities to be found analytically and compared to, e.g. the scattering rate. This distribution does not give us the full picture though, since it does not factor in quantum effects like Bose enhancement and Pauli blocking. For some cases these effects are not of importance in our verification of Alpaca, and we can just exclude them in the simulations. For splitting and merging however, this is not possibleFootnote 7. Hence, we will also study the scenario of Bose–Einstein and Fermi–Dirac distributions,

$$\begin{aligned} f_{g\textrm{,initial}}(p) = f_{\textrm{BE}}(p) = \frac{1}{e^{p/T}-1}, \end{aligned}$$
(27)

and

$$\begin{aligned} f_{q/\bar{q}\textrm{,initial}}(p) = f_{\textrm{FD}}(p) = \frac{1}{e^{p/T}+1} . \end{aligned}$$
(28)

To tackle the divergence for vanishing momentum in \(f_{\textrm{BE}}\) (and later also divergent splitting/merging rates for low energy x) we introduce a cutoff in momentum, \(p_{\textrm{min}}\), so that no particle is initialized with momentum lower than this, and no particle is allowed to scatter/split/merge into a state with lower absolute momentum than this.

Both of the infinite thermalized systems above provide simplified scenarios where one can find analytical (and simpler numerical) results to compare against. To validate our implementation we show the following:

  1. (i)

    The elastic scattering rate \(dN_{\mathrm {coll.}}/dt\) in the case of thermal equilibrium with no Bose enhancement and Pauli blocking, and with a fixed \(\sigma ^{2\leftrightarrow 2}\), is consistent with the expected results, both for the classical and Bose–Einstein and Fermi–Dirac case.

  2. (ii)

    The elastic scattering rate \(dN_{\mathrm {coll.}}/dt\) with a non-constant \(\sigma ^{2\leftrightarrow 2}\) (implemented as described in Sect. 4.3.1) produces the correct rate w.r.t. the elastic collision kernel in AMY EKT. This is also checked both for the classical and Bose–Einstein and Fermi–Dirac case.

  3. (iii)

    The screening masses \(m_s^2\) and phase space densities \(f_s\) are extracted correctly, i.e., they match the analytical values, both for the classical and Bose–Einstein and Fermi–Dirac case.

Fig. 1
figure 1

Scaling behaviour in thermal gluonic systems of the elastic scattering rate, \(dN_{\textrm{coll}}/dt\) (without Bose enhancement included) w.r.t. different fixed cross sections \(\sigma ^{gg}_{gg}\) (varying between \(0.5-3\) \(\textrm{GeV}^{-2}\)) and temperature (varying between \(0.35-0.5\) \(\textrm{GeV}\)) and \(\tau _{\textrm{max}} = 1\) \(\textrm{GeV}^{-1}\). Left: \(f_{\textrm{C}}\), box volume \(V_x = 10.1^3\) \(\textrm{GeV}^{-3}\). Right: \(f_{\mathrm {BE/FD}}\), box volume \(V_x = 7.6^3\) \(\textrm{GeV}^{-3}\)

(i) The number of particles of species s, \(dN_s\), contained in an infinitesimal phase-space volume \(d^6\xi = d^3\textbf{x}d^3\textbf{p}\) around \(\textbf{x}\) and \(\textbf{p}\) can be related to the phase-space density \(f_s(\textbf{x},\textbf{p})\) through

$$\begin{aligned} dN_s = \frac{\nu _s}{(2\pi )^3}d^6\xi f_s(\textbf{x},\textbf{p}). \end{aligned}$$
(29)

The collision kernels \(C_s[f]\) are related to the rate of change of the number of particles \(dN_s\) in \(d^6\xi \) between t and \(t+dt\), i.e.

$$\begin{aligned} \frac{d}{dt}dN_s&= \frac{dN_s(t+dt)-dN_s(t)}{dt} \nonumber \\&= -\frac{\nu _s}{(2\pi )^3}d^6\xi [\partial _t+{\textbf {v}}\cdot \nabla ]f_s \nonumber \\&=\frac{\nu _s}{(2\pi )^3}d^6\xi C_s[f] \end{aligned}$$
(30)

since \(d^6\xi (t+dt) = d^6\xi (t)\) due to the absence of external forces. Separating this into a gain, \(dN_s^+\), and loss, \(dN_s^-\), term we get that

$$\begin{aligned} \frac{d}{dt}dN_s&= \frac{d}{dt}(dN_s^+-dN_s^-) \nonumber \\&= \frac{\nu _s}{(2\pi )^3}d^6\xi (C_s^+[f] - C_s^-[f]) \end{aligned}$$
(31)

with \(C_s[f]^+\) and \(C_s[f]^-\) corresponding to the gain and loss terms in the collision kernel. The gain (or loss) term of the collision kernel can now be related to the rate of total number of scatterings as

$$\begin{aligned} \frac{dN_{\mathrm {coll.}}}{dt}&= \frac{1}{2} \sum _{s}\frac{d}{dt}\int d(dN_s^\pm ) \nonumber \\&= \frac{1}{2}\sum _s\int d^6\xi \frac{\nu _s}{(2\pi )^3} C_s^\pm [f] \nonumber \\&= \sum _s \nu _s \int d^3\textbf{x}I^\pm _s \end{aligned}$$
(32)

where we pick up a factor of 1/2 due to either integrating over both incoming momentum of indistinguishable particles when s is a gluon, or double counting processes in the sum when s is a quark or antiquark. Here we also define the momentum integrated gain term of the collision kernel for a species s as \(I^\pm _s\) (with \(+\) and − for the gain and loss part of the collision kernel respectively), which are quantities of interest when evaluating (ii). Considering the case of a purely gluonic system without any Bose-enhancement we can extract a simple scaling behaviour for the rate of total number of collisions,

$$\begin{aligned} \frac{dN_{\mathrm {coll.}}}{dt}&= \frac{1}{4} \int d^3\textbf{x}\int _{\textbf{p}\textbf{k}\mathbf {p'}\mathbf {k'}} \nu _g^2 |\mathcal {M}^{gg}_{gg}|_{\mathrm {avg.}}^2(2\pi )^4 \nonumber \\&\quad \times \delta ^{(4)}(P+K-P'-K')f_g(\textbf{p}) f_g(\textbf{k}) \nonumber \\&= \frac{1}{2}\int d^3\textbf{x}\int d^3\textbf{p}d^3\textbf{k}\frac{\nu _g^2}{(2\pi )^6}\left[ \frac{s}{2E_\textbf{p}E_\textbf{k}}\right] \nonumber \\&\quad \times \sigma ^{gg}_{gg} f_g(\textbf{p}) f_g(\textbf{k}) \end{aligned}$$
(33)

where we have used the definition of the total cross section given in Eq. (16). The expression within the brackets integrates to unity in isotropic systems, as explained in Sect. 4.3.1, and so for the thermal case with a constant cross section we have the scaling behaviour

$$\begin{aligned} \frac{dN_{\mathrm {coll.}}}{dt} = \frac{1}{2} N_gn_g\sigma ^{gg}_{gg}, \end{aligned}$$
(34)

with \(N_g\) being the total number of gluons in the system, and \(n_g\) the gluon density. From the equations above we also note that

$$\begin{aligned} \int \frac{d^3\textbf{p}}{2(2\pi )^3} C_g^+[f] = \frac{n_g^2 \sigma ^{gg}_{gg}}{2\nu _g}. \end{aligned}$$
(35)

The scaling behaviour shown above has been examined in Alpaca through scanning the parameter space, and exhibits the correct scaling behaviour, as shown in Fig. 1.

(ii) Including quarks and/or Bose enhancement/Pauli blocking is straight-forward but the collision rate does then not exhibit the same simple scaling behaviour. However, due to the (approximate) time independence of \(f(\textbf{x},\textbf{p})\) in thermal equilibrium we can integrate \(C_g^{2\rightarrow 2}[f]+C_{q/\bar{q}}^{2\rightarrow 2}[f]\) numerically, using Monte Carlo methods with stratified sampling, and compare to the results of Alpaca through the relation found in Eq. (29). This numerical integration has been crosschecked against the code used in e.g. [28]. The results of the comparison of the full numerical integration are shown in Tables 1 and 2 for Boltzmann and Bose–Einstein/Fermi–Dirac distributions, respectively. A comparison of the rates of each sub-process (for the loss-terms) are shown in Tables 3 and 4, again for the different distributions. The explicit expression of the integrated collision kernels are shown in Appendix C.2. As can be seen in the tables, the rates coincides well for \(f_{\textrm{C}}\), while for \(f_{\mathrm {BE/FD}}\) they are within \(\sim 10\%\) of the numerical results. This can be attributed to the cutoff \(p_{\textrm{min}}\) which effectively changes the value of \(m_{g/q}^2\) that we extract in Alpaca, while this shift in screening mass is not included in the numerical results.

Table 1 The full integrals of the elastic collision kernels \(C_g^{\pm ,2\rightarrow 2}[f_{\textrm{C}}]\) (\(I_g^\pm \)) and \(C_{q/\bar{q}}^{\pm ,2\rightarrow 2}[f_{\textrm{C}}]\) (\(I_q^\pm \)), see Eqs. (123)–(126), are compared between their values produced by Alpaca (through the collision rate, see Eq. (32)) and by numerically integrating the collision kernels using Monte Carlo methods. The comparison is preformed in the thermal case with \(T=0.4\) GeV, \(\alpha _s = 0.3\), \(\tau _{\textrm{max}} = 1\) \(\textrm{GeV}^{-1}\) and box volume \(V_x = 10.1^3\) \(\textrm{GeV}^{-3}\). The errors of the numerical results are negligible compared to the results from Alpaca, and hence not presented
Table 2 The full integrals of the elastic collision kernels \(C_g^{\pm ,2\rightarrow 2}[f_{\mathrm {BE/FD}}]\) (\(I_g^\pm \)) and \(C_{q/\bar{q}}^{\pm ,2\rightarrow 2}[f_{\mathrm {BE/FD}}]\) (\(I_q^\pm \)), see Eqs. (123)–(126), are compared between their values produced by Alpaca (through the collision rate, see Eq. (32)) and by numerically integrating the collision kernels using Monte Carlo methods. The comparison is preformed in the thermal case, including quantum corrections in the initial distribution, with \(T=0.4\) GeV, \(p_{\textrm{min}}=0.1\) GeV, \(\alpha _s = 0.04\), \(\tau _{\textrm{max}} = 1\) \(\textrm{GeV}^{-1}\) and box volume \(V_x = 7.6^3\) \(\textrm{GeV}^{-3}\). The errors of the numerical results are negligible compared to the results from Alpaca, and hence not presented
Table 3 The full integrals of the different subprocesses in the loss terms of the elastic collision kernels \(C_g^{-,2\rightarrow 2}[f_{\textrm{C}}]\) (\(I_g^-\)) and \(C_{q/\bar{q}}^{-,2\rightarrow 2}[f_{\textrm{C}}]\) (\(I_q^-\)), see Eqs. (123) and (125), are compared between their values produced by Alpaca (through the collision rate of each subprocess, see Eq. (32)) and by numerically integrating the collision kernels using Monte Carlo methods. The comparison is preformed in the thermal case with \(T=0.4\) GeV, \(\alpha _s = 0.3\), \(\tau _{\textrm{max}} = 1\) \(\textrm{GeV}^{-1}\) and box volume \(V_x = 10.1^3\) \(\textrm{GeV}^{-3}\). The errors of the numerical results are negligible compared to the results from Alpaca, and hence not presented
Table 4 The full integrals of the different subprocesses in the loss terms of the elastic collision kernels \(C_g^{-,2\rightarrow 2}[f_{\mathrm {BE/FD}}]\) (\(I_g^-\)) and \(C_{q/\bar{q}}^{-,2\rightarrow 2}[f_{\mathrm {BE/FD}}]\) (\(I_q^-\)), see Eqs. (123) and (125), are compared between their values produced by Alpaca (through the collision rate of each subprocess, see Eq. (32)) and by numerically integrating the collision kernels using Monte Carlo methods. The comparison is preformed in the thermal, including quantum corrections in the initial distribution, with \(T=0.4\) GeV, \(p_{\textrm{min}}=0.1\) GeV, \(\alpha _s = 0.04\), \(\tau _{\textrm{max}} = 1\) \(\textrm{GeV}^{-1}\) and box volume \(V_x = 7.6^3\) \(\textrm{GeV}^{-3}\). The errors of the numerical results are negligible compared to the results from Alpaca, and hence not presented

(iii) Lastly, we compare the implementation of \(m_s^2(\textbf{x},\textbf{p})\), described in Sect. 4.3.2 to the analytical expectations for thermal equilibrium, which for a system with both quarks and gluons are

$$\begin{aligned} m^2_{g}[f_{\textrm{C}}] = \frac{24\alpha _s}{\pi }T^2, \quad m^2_{q/\bar{q}}[f_{\textrm{C}}] = \frac{32\alpha _s}{3\pi }T^2 \end{aligned}$$
(36)

and

$$\begin{aligned} m^2_{g}[f_{\mathrm {BE/FD}}] = 3\pi \alpha _s T^2, \quad m^2_{q/\bar{q}}[f_{\mathrm {BE/FD}}] = \frac{4\pi \alpha _s}{3} T^2. \end{aligned}$$
(37)

These comparisons are shown in Figs. 2 and 3. The numerical values are extracted directly after initialisation when the partons all have the same observer time and the complication due to causality violation mentioned above is absent. As shown in Fig. 3, the mean value converges to the analytical expectation for both quarks and gluons, however, it requires a rather large number of particles to be included in the calculation. Approximating partons using Gaussian distributions (see Sect. 4.4.3) instead of Dirac delta functions might improve on this convergence rate. In Fig. 4 the scaling behaviour of the extracted \(m_s^2\) against different temperatures can be seen.

Fig. 2
figure 2

Probability distribution of extracted \(m_{g/q}^2\) in thermal equilibrium, for \(T=0.4\) GeV, and 30 included particles. The errors presented for the mean values correspond to the error of the mean of the distribution (in contrast, the width of the distribution is caused by including a finite number of particles in the extraction and does not translate into an uncertainty on the mean). Left: \(f_{\textrm{C}}\). Right: \(f_{\mathrm {BE/FD}}\)

Fig. 3
figure 3

Extracted \(m_{g/q}^2\) in thermal equilibrium, as a function of number of included particles, \(N_{\textrm{inc}}\). Left: \(f_{\textrm{C}}\). Right: \(f_{\mathrm {BE/FD}}\)

Fig. 4
figure 4

Scaling behaviour of the mean value of extracted \(m_{g/q}^2\) in thermal systems, w.r.t different temperatures of the system. Number of included particles in each calculation is fixed to 30. Left: \(f_{\textrm{C}}\). Right: \(f_{\mathrm {BE/FD}}\)

Finally, a comparison of \(f(\textbf{x},\textbf{p})\) can be seen in Fig. 5, which is shown to converge well to the analytical expectation.

Fig. 5
figure 5

Extracted phase space density, \(f(\textbf{x},\textbf{p})\), for thermal systems with temperature \(T=0.4\) GeV. The values are extracted at initial t. Left: \(f_{\textrm{C}}\). Right: \(f_{\mathrm {BE/FD}}\)

All runs in this section are initialized in a box with volume \(V_x=7.6^3\) \(\textrm{GeV}^{-3}\) and \(\alpha _s = 0.04\).

4.4 Quasi-collinear splitting and merging processes

The effective “\(1\leftrightarrow 2\)” splitting/merging rates have been obtained to leading order in [55] in terms of solutions to a linear integral equation. An explicit analytical solution has been found in [56] for very energetic partons, where the LPM effect dominates the dynamics. In the incoherent Bethe–Heitler limit it is also possible to find an analytical solution. Between these two limiting cases no analytical solution is known. We here use an interpolation that reproduces the analytical results in the Bethe–Heitler and LPM regimes and agrees well with numerical solutions between them. Details are given in Appendix B.

As mentioned in Sect. 3, the splitting/merging rates describe the splitting (merging) of a (two) parton(s) in conjunction with an arbitrary number of coherent soft scatterings. They thus depend on the density of partons generating soft fluctuations of the background gauge field. It turns out that the phase space densities enter via a single parameter \(T_*\), which is the temperature of a system in thermal equilibrium that has the same infra-red behaviour as the system under consideration. In thermal equilibrium it thus reduces to the temperature. The extraction of \(T_*\) in Alpaca is discussed in Sect. 4.4.3.

4.4.1 Splitting

Soft scatterings within the medium can bring partons slightly off-shell which kinematically allows for them to split nearly collinearly into two new partons. The average formation time of this process coincides with the mean free time for soft elastic collisions within the medium and so all soft scatterings occurring during the formation time of the splitting have to be considered coherently. Destructive interference leads to a suppression of the splitting rate compared to the incoherent case, which is known as the LPM effect in QCD.

We here assume that subsequent splittings are independent and the time evolution of a parton undergoing repeated splitting can be formulated as a Markov chain.Footnote 8 This is a well studied problem in event generators, and a common approach to sample the occurrence of particle branchings is the Veto Algorithm.

This algorithm can be employed when the splitting probability is of the form

$$\begin{aligned} P_a(t,x) = -\frac{dN_a}{dt} = h_a(t,x)N_a(t) \end{aligned}$$
(38)

for a particle of species a, where x (and \(1-x\)) correspond to the fractions of energy going to the two new particles. Here, \(P_a(t,x)\) is the probability for the particle to split at time t with energy fraction x, \(N_a(t)\) is the probability that a particle of species a has not split yet at t, also known as the Sudakov factor, and \(h_a(t,x)\) is the instantaneous splitting probability (density) at t and x. We solve the splittings in Alpaca by using an overestimate version of the Veto Algorithm. This means the following: We find an overestimate \(\tilde{h}_a(t,x)\ge h_a(t,x)\) of the instantaneous splitting probability and then use \(\tilde{h}_a(t) = \int \tilde{h}_a(t,x)dx\) to sample \(t_{\textrm{split}}\). The energy fraction x is then sampled uniformly between \(x_\textrm{min}\) and \(x_\textrm{max}\). The draw is accepted or rejected based on the ratio \(h_a(t,x)/\tilde{h}_a(t,x)\). If the splitting is rejected we do not reset in time, but set the previously sampled \(t_{\textrm{split}}\) to be our new initial time, and redo the sampling of splitting time and energy fraction until we find a splitting that is accepted. When multiple decay channels are available, \(t_\textrm{split}\) is sampled from the sum of the corresponding splitting probabilities, and the correct decay channel is selected based on the ratio of the splitting probabilities, once the splitting has been accepted.

To implement this algorithm, two quantities are needed: \(h_a(t,x)\) and an overestimate \(\tilde{h}_a(t,x)\ge h_a(t,x)\). We have previously defined the number of particles of species a in a phase space volume \(d^6\xi \) at time dt in Eq. (29), and the number of particles of species a leaving \(d^6\xi \) during dt in Eq. (31). Hence, the (total) instantaneous splitting probability for a particle in \(d^6\xi \) of species a during time dt is

$$\begin{aligned} h_a = \frac{\frac{d(dN_a^-)}{dt}}{dN} = \frac{C_a^{-, ``1\rightarrow 2\text {''}}[f(\textbf{x},\textbf{p})]}{f(\textbf{x},\textbf{p})}. \end{aligned}$$
(39)

The term in the splitting/merging kernel, Eq. (15), which corresponds to a particle of species a with momentum \(\textbf{p}\) splitting to two particles with momentum \(\mathbf {p'}\) and \(\mathbf {k'}\) in terms of the quasi-collinear branching rate \(\gamma ^a_{bc}\) is

$$\begin{aligned} C_a^{-,``1\leftrightarrow 2\text {''}}&= \frac{(2\pi )^3}{2|\textbf{p}|^2\nu _a}\sum _{b,c}\int _0^\infty dp'dk'\delta (p-p'-k')\nonumber \\&\quad \times \gamma ^a_{bc}(\textbf{p};p'\hat{\textbf{p}},k'\hat{\textbf{p}}) f_a(\textbf{p})[1\pm f_b(p'\hat{\textbf{p}})]\nonumber \\ {}&\quad \times [1\pm f_c(k'\hat{\textbf{p}})] \end{aligned}$$
(40)

and so

$$\begin{aligned} h_a&= \int _0^1 dx\frac{(2\pi )^3}{2|\textbf{p}|\nu _a}\sum _{b,c} \gamma ^a_{bc}(\textbf{p};xp\hat{\textbf{p}},(1-x)p\hat{\textbf{p}}) \nonumber \\&\quad \times [1\pm f_b(xp\hat{\textbf{p}})][1\pm f_c((1-x)p\hat{\textbf{p}})]. \end{aligned}$$
(41)

The instantaneous splitting probability as a function of x is then extracted from Eq. (41) as

$$\begin{aligned} h_a(x)&= \frac{(2\pi )^3}{2|\textbf{p}|\nu _a}\sum _{b,c} \gamma ^a_{bc}(\textbf{p};xp\hat{\textbf{p}},(1-x)p\hat{\textbf{p}}) \nonumber \\&\quad \times [1\pm f_b(xp\hat{\textbf{p}})][1\pm f_c((1-x)p\hat{\textbf{p}})]. \end{aligned}$$
(42)

In Appendix B a detailed account of how to calculate \(\gamma ^a_{bc}\) is given, and an overestimate of the instantaneous splitting probability given above can be found in Appendix C.3. Note that the overestimates of \(h_a(x)\) depend on \(T_*\), which we assume does not change significantly over our relevant timescales. Hence, for the overestimates we sample \(T_*\) at current \(\tau \) (again taking the system to constant observer time using the same procedure as for the effective masses) and multiply with some fixed numerical factor \(c>1\) such that our overestimate effective temperature is \(cT_*\). The effective temperature is then re-calculated at \(\tau _{\textrm{split}}\) when evaluating \(h_a(x)\).

The quantities \(h_a(x)\) and \(\tilde{h}_a(x)\) are used in the Veto Algorithm to sample x and \(t_{\textrm{split}}\), as described in the beginning of this section, and this gives us a corresponding \(\tau _{\textrm{split}}\). Once a \(\tau _{\textrm{split}}\) is found, a formation time \(t_{\textrm{form}}\) is calculated according to the corresponding expression given in [23],

$$\begin{aligned} t_{\textrm{form}} = \frac{p}{m_g^2}\left[ 1+\frac{g^4T_*p}{m_g^2} \right] ^{-\frac{1}{2}}. \end{aligned}$$
(43)

A \(\Delta \tau \) interval of length \(\tau _{\textrm{form}}\) corresponding to \(t_{\textrm{form}}\) is placed around \(\tau _{\textrm{split}}\) such that \(\tau _{\textrm{split}}\) is distributed uniformly in the interval. During this formation time the particle cannot scatter elastically or quasi-collinearly merge because elastic scattering during the formation time is re-summed in the splitting kernel and hard elastic scattering and merging are parametrically rare so that neglecting them does not affect the theory’s accuracy. When the parton later splits at \(\tau _{\textrm{split}}\) two new partons are created with kinematics following the massless case of final-state emitter and final-state spectator of Sherpa’s Catani–Seymour shower described in [58], and they are assigned the remaining formation time of the original particle. The splitting probabilities \(h_a(x)\) does not factor in any relative transverse momentum \(k_\perp \) for the new parton pair, since they are derived from the AMY collision kernel which assumes a nearly exactly collinear process. Deviating slightly from this assumption, we allow for a small \(k_\perp \) for the new parton pair sampled from the soft gluon spectrum \(dk_\perp ^2/(k_\perp ^2+k_{\perp , \textrm{reg}}^2)\) for some fixed \(k_{\perp , \textrm{reg}}^2 \ll 1\). The recoil is absorbed by an additional parton such that all partons remain on-shell. This recoil parton is chosen as the (spatially) closest located parton to the parton splitting (which in addition allows the outgoing partons to all have a momentum larger than our cutoff \(p_{\textrm{min}}\)).

4.4.2 Merging

In the case of evaluating if two particles merge our initial state is a pair, and so we cannot utilize the same methods as we have for particles splitting. Instead, we derive an effective cross section from the merging rate and follow the same approach that we use for elastic scatterings, i.e. to evaluate if two particles merge we consider their Lorentz invariant distance \(d_ {ij}^2\) at their closest approach, and if it falls within the effective cross section of merging. In Appendix C.4 it is shown that the quasi-collinear splitting rate, \(\gamma ^a_{bc}\), is related to the effective matrix element \(|\mathcal {M}^a_{bc}|^2\) through

$$\begin{aligned} \gamma _{ab}^c = \frac{\nu _a\nu _b}{8(2\pi )^4}|\mathcal {M}_{ab}^c|^2. \end{aligned}$$
(44)

It follows, by definition, that for two particles of momentum \(\textbf{p}\) and \(\textbf{k}\) merging into a particle \(\mathbf {p'}\) the differential cross section can be expressed as

$$\begin{aligned} \frac{d\sigma ^{2\rightarrow 1}_{ab}}{d\Phi _\mathbf {p'}} = \frac{|\mathcal {M}_{ab}^c|^2}{2s}[1\pm f(\mathbf {p'})] = \frac{4(2\pi )^4}{\nu _a\nu _b}\frac{\gamma ^c_{ab}}{s}[1\pm f(\mathbf {p'})]\nonumber \\ \end{aligned}$$
(45)

with

$$\begin{aligned} d\Phi _\mathbf {p'}= \frac{d^4P'}{(2\pi )^3} \delta (P'^2)\theta (P_0') (2\pi )^4 \delta ^{(4)}(P'-P-K) \end{aligned}$$
(46)

being the phase space measure for the outgoing particle. The resulting cross section is then

$$\begin{aligned} \sigma ^{2\rightarrow 1}&= \int \frac{d\sigma ^{2\rightarrow 1}}{d\Phi _\mathbf {p'}}d\Phi _\mathbf {p'}\nonumber \\&= \frac{4(2\pi )^5}{\nu _a\nu _b} \frac{\delta (s)}{s}\gamma ^c_{ab}(t,x,p,k)[1\pm f(\mathbf {p'})] \nonumber \\&= \frac{4(2\pi )^5}{\nu _a\nu _b} \frac{1}{s} \frac{\delta (k_\perp ^2)\gamma ^c_{ab}(t,x,p,k)}{\left( \frac{E_\textbf{p}}{E_\textbf{k}} + \frac{E_\textbf{k}}{E_\textbf{p}} + 2\right) }[1\pm f(\mathbf {p'})] \end{aligned}$$
(47)

where \(k_\perp ^2\) is the relative transverse momentum between \(\textbf{p}\) and \(\textbf{k}\). The Dirac delta present in the cross section enforces the exact collinearity of the merging processes, which would be the only kinematically allowed merging in vacuum. As with the splitting however, we circumvent this condition by introducing a recoil parton to absorb the transverse momentum. Hence, our merging process will allow partons with a non-zero \(k_\perp \) to merge. We relate the Dirac-delta to the \(k_\perp ^2\)-distribution used for sampling splittings as \(\delta (k_\perp ^2) \rightarrow f(k_\perp ^2)/2\) where

$$\begin{aligned} f(k_\perp ^2 )= \left[ (k_\perp ^2 + k_{\perp , \textrm{reg}}^2)\log \left( \frac{k_{\perp \textrm{max}}^2+k_{\perp , \textrm{reg}}^2}{k_{\perp , \textrm{reg}}^2}\right) \right] ^{-1} \end{aligned}$$
(48)

is the \(k_\perp ^2\)-distribution normalised to unity and we pick up a factor of 1/2 since \(\delta (k_\perp ^2)\) is not defined for \(k_\perp ^2 < 0\) and so only integrates to 1/2. This gives us our final expression of the merging cross section,

$$\begin{aligned} \sigma ^{2\rightarrow 1}&= \frac{2(2\pi )^5}{\nu _a\nu _b} \left[ s \left( \frac{E_\textbf{p}}{E_\textbf{k}} + \frac{E_\textbf{k}}{E_\textbf{p}} + 2\right) (k_\perp ^2 + k_{\perp , \textrm{reg}}^2) \right. \nonumber \\&\quad \left. \times \log \left( \frac{k_{\perp \textrm{max}}^2+k_{\perp , \textrm{reg}}^2}{k_{\perp , \textrm{reg}}^2}\right) \right] ^{-1} \gamma ^c_{ab}(t,x,p,k)\nonumber \\ {}&\quad \times [1\pm f(\mathbf {p'})]. \end{aligned}$$
(49)

As in the case of elastic scattering the merging rates \(\gamma \) depend on the local quantity \(T_*\) and the kernels also contain Bose enhancement/Pauli blocking factors, which we deal with in the same way as before: when integrating the effective cross section we overestimate the merging rate and the Bose enhancement/Pauli blocking factors and later reject mergings with the ratio of the true to and the overestimated effective cross section.

To calculate the cross section at the closest approach for a parton pair the energy fraction x is also needed, for which we use the Lorentz-invariant definition

$$\begin{aligned} x = \frac{P_\mu R^\mu }{P_\mu R^\mu + K_\mu R^\mu } \end{aligned}$$
(50)

where \(P^\mu \) and \(K^\mu \) are the 4-momenta of the incoming partons, and \(R^\mu \) is the 4-momentum of the recoiler, as in [58].

As mentioned earlier, since the splitting rate is infra-red divergent we have to introduce a small cut-off in x. For consistency we apply the same cut-off to the merging rate. This does not compromise the theory’s accuracy.Footnote 9

Once a closest approach which falls within the cross section of the merging is found, a formation time is assigned to the particle pair in the same manner as for a splitting parton, see Sect. 4.4.1. If the merging is accepted in the rejection step to correct to the true cross section, the momenta are updated following (inversely) the massless case of final-state emitter and final-state spectator in [58], where the final-state spectator, or recoil parton, is chosen to be the parton with the closest spatial distance to the merging pair (that also allow for kinematics where no parton ends up with \(p<p_{\textrm{min}}\)). The remainder of the formation time of the original pair is also assigned to the new parton.

4.4.3 The effective temperature \(T_*\)

In the quasi-collinear splitting/merging rate \(\gamma \) the quantity \(T_*\) appears as a local variable (see Appendix B), this is the effective temperature at which an equilibrium system would have the same soft elastic scattering rate as the system under consideration. The definition of \(T_*\) averaged over a spatial volume V is given by

$$\begin{aligned} T_*&= \frac{\frac{1}{2}g^2 \sum _s\frac{\nu _s C_s}{d_A}\frac{1}{V}\int d^3\textbf{x}\int \frac{d^3\textbf{p}}{(2\pi )^3}f_s(p)[1+f_s(p)]}{g^2\sum _s\frac{ \nu _s C_s}{d_A}\frac{1}{V}\int d^3\textbf{x}\int \frac{d^3\textbf{p}}{(2\pi )^3}f_s(p)/p} \end{aligned}$$
(51)

where we note that the denominator is equal to \(m_g^2\), and the integrals again have to be calculated at fixed observed time and in the local rest frame. Our prescription to extract \(T_*\) locally follows along the lines of the method used to find \(m_{g/q}^2\), see Sect. 4.3.2, though with a key difference. In our treatment of \(m_{g/q}^2\) we considered all particles to be point-like, an assumption that for \(T_*\) introduces problems with squared Dirac delta terms of the same variables. To remedy this we instead consider partons as Gaussian distributions with width \(\sigma _\textbf{p}\) and \(\sigma _\textbf{x}\) in the phase space density, i.e.

$$\begin{aligned} f_a(\textbf{x},\textbf{p}) = \frac{(2\pi )^3}{\nu _a} \sum _i \frac{e^{-\frac{(\textbf{x}_{i}-\textbf{x})^2}{2\sigma _{i,\textbf{x}}^2}} e^{-\frac{(\textbf{p}_{i}-\textbf{p})^2}{2\sigma _{i,\textbf{p}}^2}}}{(2\pi \sigma _{i,\textbf{x}}\sigma _{i,\textbf{p}})^3} \end{aligned}$$
(52)

where the sum is over all partons i of species a. Assuming \(\sigma _{i,\textbf{x}}=\sigma _\textbf{x}\) and \(\sigma _{i,\textbf{p}}=\sigma _\textbf{p}\) for all partons i, we have for \(m_g^2T_*\) that

$$\begin{aligned} m_g^2T_*&= \frac{\pi \alpha _s}{4V} \sum _{s} C_s \sum _{i(s)} \Bigg [1 + \frac{1}{\nu _{s}(2\sigma _{\textbf{x}}\sigma _{\textbf{p}})^3} \nonumber \\&\quad + \sum _{j(s) > i(s)} \frac{1}{\nu _{s}4(2\sigma _\textbf{x}\sigma _\textbf{p})^3} e^{-\frac{(\textbf{x}_i-\textbf{x}_j)^2}{4\sigma _\textbf{x}^2}}e^{-\frac{(\textbf{p}_i-\textbf{p}_j)^2}{4\sigma _\textbf{p}^2}} \Bigg ] \end{aligned}$$
(53)

with \(\sigma _{\textbf{x}}\sigma _{\textbf{p}}\ge 1/2\) due to the uncertainty principle. With \(T_*\) expressed as above we can proceed to extract it locally in the same manner as in Sect. 4.3.2. We include the \(N_{\textrm{inc}}\) closest particles, where each particle i contributes with a term

$$\begin{aligned} \frac{\pi \alpha _sC_s}{4V}\left[ 1 + \frac{1}{\nu _{s(i)}(2\sigma _{\textbf{x}}\sigma _{\textbf{p}})^3} \right] \end{aligned}$$
(54)

and each particle pair i, j of the same species s adds a term

$$\begin{aligned} \frac{\pi \alpha _sC_s}{16V\nu _{s(i)}(\sigma _\textbf{x}\sigma _\textbf{p})^3} e^{-\frac{(\textbf{x}_i-\textbf{x}_j)^2}{4\sigma _\textbf{x}^2}}e^{-\frac{(\textbf{p}_i-\textbf{p}_j)^2}{4\sigma _\textbf{p}^2}}. \end{aligned}$$
(55)

4.4.4 The thermal equilibrium case

To verify the implementation of the splitting/merging kernel in Alpaca we once again utilize the simplicity of an infinite thermalized system. Since the splitting and merging rates are controlled by \(T_*\), which only equals T for \(f_{BE/FD}\), we will mainly focus our analysis to this initial distribution in the rest of this section, with the exception of looking at fixed \(\gamma \). We will verify the following:

  1. (i)

    The total splitting and merging rates \(dN_{\textrm{split}}/dt\) and \(dN_{\textrm{merge}}/dt\) are equal, and correspond to independently extracted numerical values.

  2. (ii)

    The effective temperature \(T_*\) is extracted so that it matches the analytical expected value.

The effects of formation time are not of interest for these verifications, since we do not run inelastic and elastic processes simultaneously here, and so formation time for both splitting and merging have been set to zero.

(i) It follows from Eq. (31) that for an isotropic system the splitting rate can be related to the collision kernel as

$$\begin{aligned} \frac{dN_{\textrm{split}}}{dt}&= \sum _s \frac{d}{dt}\int d(dN_s^-) \nonumber \\&= \sum _s \int d^6 \xi \frac{\nu _s}{(2\pi )^3} C_s^{-, ``1\rightarrow 2\text {''}}[f] \nonumber \\&= 2\pi V \sum _{sbc} \int _0^\infty dpdp'dk'\delta (p-p'-k')\gamma _{bc}^s \nonumber \\&\quad \times f_s(\textbf{p})[1\pm f_b(p'\hat{\textbf{p}})][1\pm f_c(k'\hat{\textbf{p}})]. \end{aligned}$$
(56)

For the case of a purely gluonic system with constant \(\gamma ^g_{gg}\) and no Bose enhancement it follows that the splitting and merging rates will not be the same for \(f_{\mathrm {BE/FD}}\). Hence, we instead consider the same scenario for \(f=f_{\textrm{C}}\), where it follows that

$$\begin{aligned} \frac{dN_{\textrm{split}}}{dt}&= 2\pi V\gamma T^2. \end{aligned}$$
(57)

The thermal equilibrium splitting and merging rates have been examined in Alpaca for fixed \(\gamma \) in a gluonic system with no Bose-terms through a scan of the parameter space and the results are shown in Fig. 6. As can be seen, the rates deviate from the analytical value given above. This follows from the fact that the system relaxes to a different distribution when no Bose enhancement is included. The new distribution that the system relaxes into is extracted at the end of the run and used in Eq. (56) to find the corresponding expected splitting/merging rate, which our results fall within errors of.

Fig. 6
figure 6

Scaling behaviour of the splitting and merging rates in a gluonic system with fixed \(\gamma \) and no Bose enhancement factors are included. The system relaxes to a different phase space distribution, which is extracted at the end of the run. The resulting splitting/merging rate using the extracted distribution in Eq. (56) is shown as a purple line, with error bands in blue. The run parameters vary T between \(0.3-0.4\) GeV and \(\gamma \) between \(0.001-0.005\) \(\textrm{GeV}^2\). Fixed run parameters are \(p_{\textrm{min}}=0.01\) GeV, \(\Delta t=250\) \(\textrm{GeV}^{-1}\) and box volume \(V_x = 10.1^3\) \(\textrm{GeV}^{-3}\)

We have also looked at the case of a dynamic \(\gamma \), extracted as described in Appendix B for a purely gluonic system with \(f=f_{\textrm{BE}}\). The result of this is found in Fig. 7 and shown to correspond well with the (independently) numerically extracted rate.

Fig. 7
figure 7

The splitting and merging rate for a gluonic thermal system with \(\gamma \) calculated as described in Appendix B. The figure shows results from 125 runs with different initial configurations sampled from a thermal distribution with \(\tau _{\textrm{max}} = 2500\) \(\textrm{GeV}^{-1}\), \(\alpha _s = 0.04\) and box volume \(V_x = 10.1^3\) \(\textrm{GeV}^{-3}\)

(ii) The thermal equilibrium provides us with a simple analytical solution to \(T_*\) for \(f_{\mathrm {BE/FD}}\), which is

$$\begin{aligned} T_*&= T. \end{aligned}$$
(58)

The convergence of the extracted \(T_*\) towards the analytical expectation w.r.t. the number of included particles is shown in Fig. 8. Note that it converges slower than \(m_s^2\). This is due to the different implementation for extracting the numerator of \(T_*\) compared to the denominator \(m_g^2\). The probability distribution of the extracted \(T_*\), including a fixed number of particles, is shown in Fig. 9. The width of the distribution is due to the discrete sampling of \(f_{\mathrm {BE/FD}}\), and will not decrease by increasing number of events. Lastly, a scan over different temperatures has been done to ensure that the effective temperature exhibits the correct scaling behaviour, as it is shown to do in Fig. 10. All values for \(T_*\) shown in this section are extracted at initial \(\tau \) in systems with box volume \(V_x = 7.6^3\) \(\textrm{GeV}^{-3}\).

Fig. 8
figure 8

Scaling behaviour of \(T_*\) and \(m_g^2T_*\) (see Eq. (51)) as a function of number of particles included, \(N_{\textrm{inc}}\)

Fig. 9
figure 9

Distribution of extracted \(T_*\) in a thermalized system with temperature \(T=0.4\) GeV and \(N_{\textrm{inc}} = 30\)

Fig. 10
figure 10

Scaling behaviour of \(T_*\) as a function of different initialization temperatures T for \(f_{\mathrm {BE/FD}}\)

4.5 Putting everything together

Having verified all relevant parts of our implementation separately, we now proceed to the final verification, which is to combine all the pieces and let it run over longer timescales to ensure the dynamics of the system are correct, allowing it to remain in a thermal equilibrium.

There are two caveats to this long run though. Firstly, we have introduced a global cutoff in momentum, \(p_{\textrm{min}}\), which no particle is initialized below, and each process which produces outgoing momenta \(k<p_{\textrm{min}}\) is resampled until \(k \ge p_{\textrm{min}}\). This means that the we cannot expect our system to relax exactly into \(f_{\mathrm {BE/FD}}\). Hence, we initialize our system using a shifted initial distribution,

$$\begin{aligned} p^2f_{\mathrm {BE/FD}}&\rightarrow \frac{(p-p_{\textrm{min}})^2}{e^{(p-p_{\textrm{min}})/T}\pm 1} \nonumber \\&= (p-p_{\textrm{min}})^2 f_{\mathrm {BE/FD, shift}}. \end{aligned}$$
(59)

This causes the analytical values of \(m_{g/q}^2\) and \(T_*\) to shift compared to the regular Bose–Einstein and Fermi–Dirac case as well, and we extract them separately numerically to compare to our results in Alpaca.

Secondly, as mentioned in Sect. 4.3.2, during the evolution the state of the system is known at fixed \(\tau \), which means that all particles have different times. But the effective masses \(m_{g/q}^2\) and temperature \(T_*\) have to be calculated at fixed time. The evolution of particles with later times than the required time can be backtraced. Since the future of particles with times earlier than the required time is still unknown, we let these particles free stream to the required time. This does, however, introduce a bias since splittings tend to take place at earlier \(\tau \) than merging.Footnote 10

The problem outlined above can be solved in an iterative fashion, by first running an event with \(m_{g/q}^2\), \(T_*\) and f(p) extracted with the currently available particles at any given \(\tau \). When the times \(t_i\) for all particles i have passed some \(t_{\textrm{max}}\), the run ends, and the history of position, momenta and flavour for each particle over all t is saved. The system is then restarted and initialized with the same initial distribution that was sampled during the first event. During the course of the second event, \(m_{g/q}^2\), \(T_*\) and f(p) at any given t is then extracted at fixed time t using the history of the particles from the previous run. The increase/decrease of the dynamic quantities in the first run will affect the dynamics of the evolution, and so the values extracted in the second run will not be exactly correct, though it will iteratively converge toward the correct values by repeating the same procedure, always extracting the dynamic values from the previous run. However, though this procedure should converge in an equilibrium setting there is no guarantee that it will for a system initialized out of equilibrium. A possible solution to remedy this for non-equilibrium systems could instead be to utilize the Lorentz invariant parton cascade setup presented in [45], which is a modified version of what is described in Sect. 2. The study of non-equilibrium distributions is however left for future publications.

In this chapter we present the results side by side from a run without iteration and a run with one iteration step. We define these cases as \(N_{\textrm{iter}}=0\) and \(N_{\textrm{iter}}=1\) respectively.

For the full run presented in this chapter the following is set/included.

  • Initialized with both gluons and quarks using \(f_{\mathrm {BE/FD, shift}}\), \(T = 0.4\) GeV, \(p_{\textrm{min}}=0.1\) GeV, \(\alpha _s = 0.04\), box volume \(V_x = 7.6^3\) \(\textrm{GeV}^{-3}\), \(t_{\textrm{min}} = 0\) \(\textrm{GeV}^{-1}\) and \(t_{\textrm{max}} = 1000\) \(\textrm{GeV}^{-1}\), for 100 separate runs with different initial configurations.

  • All channels in \(2\rightarrow 2\) elastic scattering are allowed and evaluated including Bose/Pauli factors.

  • All channels in \(1\rightarrow 2\) inelastic splitting/merging are allowed and evaluated including Bose/Pauli factors.

  • The quantities \(m_{g/q}^2\), \(T_*\) and f(p) are extracted dynamically from the parton ensemble in each run. In the run where \(N_{\textrm{iter}}=1\), the quantities are extracted using the parton position and momentum history from a previous run.

  • Formation times are included for splitting and merging.

The resulting distributions that the system relaxes into for gluons and quarks is shown in Fig. 11. As can be seen there, for gluons there is no significant difference in distribution at the end compared to the start, apart from a small drop in amplitude which can be attributed to the number of particles oscillating around the initial value, see Fig. 12. For quarks the distribution is shifted slightly to larger energies, as can also be observed Fig. 13, but is still within error bars of the original distribution.

In Table 5 we see the mean splitting/merging rate over time. The total rates for inelastic splitting and merging are consistent with each other, for both the non-iterative and iterative runs, with a slight decrease in the rate for the latter (which can be attributed to a shift in \(T_*\), see below). We also see that detailed balance is preserved as the average splitting and merging rates for each channel overlap within errors. The total scattering rates for the two different runs can be found in Table 6, and we see an increase for \(N_{\textrm{iter}}=1\) as expected, since too large \(m_{g/q}^2\) (see below) will suppress the scattering rate.

Fig. 11
figure 11

Distribution of the system extracted after the run is finished, averaged over the last \(\Delta t = 200\) \(\textrm{GeV}^{-1}\). The blue error bands correspond to mean of the fluctuations within each event over time, while the green error bands correspond to the standard deviation between events. Left: \(N_{\textrm{iter}}=0\). Right: \(N_{\textrm{iter}}=1\). Top: \(f_g(p)\). Bottom: \(f_q(p)\)

Fig. 12
figure 12

Mean number of particles in the system as a function of t. The error bands correspond to the standard deviation between events. Left: \(N_{\textrm{iter}}=0\). Right: \(N_{\textrm{iter}}=1\)

Fig. 13
figure 13

Mean between events of average energy per particle as a function of t. Left: \(N_{\textrm{iter}}=0\). Right: \(N_{\textrm{iter}}=1\)

The rates are also visualized in Fig. 14 as number of scatterings, splittings and mergings as functions of time. No significant variation over time is observed, with the exception of a moderate increase of the scattering rate at early times, which could be due to the system settling into its actual equilibrium configuration (something similar can be seen in \(T_*\), cf. Fig. 16). The corresponding mean free time per particle for elastic scattering is \(t_{\textrm{free, scatter}} = 38(3)\) \(\textrm{GeV}^{-1}\) and \(t_{\mathrm {free, split/merge}} = 53 (4)\) \(\textrm{GeV}^{-1}\) for the non-iterative case, and \(t_{\textrm{free, scatter}} = 28 (2)\) \(\textrm{GeV}^{-1}\) and \(t_{\mathrm {free, split/merge}} = 57 (4)\) \(\textrm{GeV}^{-1}\) for the case of one iteration.

Figure 12 shows that the total number of particles stays reasonably constant around the initialized values. In Fig. 13 the average energy per particle is shown to increase slightly for both the iterative and non-iterative runs, though seemingly remaining more constant in the latter case once the new equilibrium has been found.

Lastly, as discussed in the beginning of this section, we observe a drastic change in \(m_{g/q}^2\) and \(T_*\) within the first \(\Delta t = 100\) \(\textrm{GeV}^{-1}\) in Figs. 15 and 16. As the particles spread out more in t the system settles into extracting too large values for \(m_{g/q}^2\) and consequently too low values \(T_*\) for the non-iterative case. For the case of just one iteration, we see how the correct value of both \(m_{g/q}^2\) and \(T_*\) is extracted, within oscillations. Since the effective masses and temperature are consistent with the true values after just one iteration, it can be expected that further iterations will not lead to significant changes in the evolution. When the true values are not known, one has to find out how many iterations are needed by comparing the results from subsequent iterations.

To summarize, when running our system initialized in an infinite thermal equilibrium, with all relevant quantities needed to faithfully reproduce the AMY Kinetic Theory extracted dynamically during the run, the system remains in this equilibrium (up to small oscillations in particle number and minor shifts in average energy per particle).

Table 5 Comparison of the splitting and merging rates for the long run with \(N_{\textrm{iter}}\in \{0, 1\}\)
Table 6 Comparison of the total elastic scattering rate for the long run with \(N_{\textrm{iter}}\in \{0, 1\}\)
Fig. 14
figure 14

Number of elastic scatterings and inelastic splittings/merging as functions of time, bin width \(\Delta t_{\textrm{bin}}=25\) \(\textrm{GeV}^{-1}\). Left: \(N_{\textrm{iter}}=0\). Right: \(N_{\textrm{iter}}=1\)

Fig. 15
figure 15

Mean of extracted \(m_{g/q}^2\) as a function of time. The error bars correspond to the standard deviation between events. Left: \(N_{\textrm{iter}}=0\). Right: \(N_{\textrm{iter}}=1\)

Fig. 16
figure 16

Mean of \(T_*\) as a function of time. The error bars correspond to the standard deviation between events. Left: \(N_{\textrm{iter}}=0\). Right: \(N_{\textrm{iter}}=1\)

5 Conclusions

The AMY effective kinetic theory of QCD at high temperatures has been successfully applied to various aspects of heavy ion collisions and is a natural candidate for the description of small collisions systems. We therefore believe it is time to turn it into a phenomenology tool by constructing a Monte Carlo event generator that solves the AMY Boltzmann equations by explicit simulation. Monte Carlo event generators have the advantage that in principle any observable can be calculated from an event sample (instead of having to do a new calculation for each observable) and that results can be directly compared to experimental data.

We have introduced the parton cascade Alpaca as a part of the multi-purpose event generator Sherpa. Alpaca encodes the AMY collision kernels in a Lorentz invariant framework for simulating the dynamics of multi-particle systems. The ensemble average is thus a solution of the Boltzmann equation. Frame independence is achieved by ordering collision and splitting events not in a frame dependent observer time but in a frame independent generalised time [44].

The partons can undergo elastic scattering and effective quasi-collinear splitting or merging, where in the latter coherent multiple soft scattering during the formation has to be taken into account. Both types of processes, elastic and inelastic, depend on the phase space densities of partons through the effective masses \(m_g\) and \(m_q\) related to screening effects in the medium and the effective temperature \(T_*\). These quantities are local in position space but require integration over the momentum. We show that an estimate of the effective masses and temperature can be obtained from a single event without the need to provide further information about the phase space densities. In thermal equilibrium the analytical values are recovered with increasing precision as more and more partons are included in the estimate. However, in order to get an accurate value a large number of up to 30 particles has to be included. It remains to be seen whether this is good enough for out-of-equilibrium systems. In a similar way estimates of the local phase space density needed for Bose enhancement and Pauli blocking factors can be obtained.

To further validate the Alpaca framework we show that in thermal equilibrium

  • the elastic scattering rate for fixed cross section exhibits the expected scaling with temperature, volume and cross section

  • the effective masses have the correct value and the expected dependence on temperature

  • the elastic scattering rates with dynamical matrix elements reproduce the expected results within a few percent

  • for fixed \(\gamma \) the splitting/merging rate exhibits the expected scaling with \(\gamma \), temperature and volume

  • the effective temperature scales as expected with temperature

  • with dynamical \(\gamma \) the splitting and merging rates are the same and agree well with numerical results

  • when putting everything together and running over longer time scales the system remains in thermal equilibrium

This gives us confidence that Alpaca indeed faithfully reproduces the AMY dynamics. Going from thermal equilibrium to out-of-equilibrium systems requires only small extensions. The next step will thus be to apply Alpaca to out-of-equilibrium systems to study equilibration and to the modeling of heavy ion collisions.