## Beam Remnants

### Introduction

The `BeamParticle` class contains information on all partons extracted from a beam (so far). As each consecutive multiparton interaction defines its respective incoming parton to the hard scattering a new slot is added to the list. This information is modified when the backwards evolution of the spacelike shower defines a new initiator parton. It is used, both for the multiparton interactions and the spacelike showers, to define rescaled parton densities based on the x and flavours already extracted, and to distinguish between valence, sea and companion quarks. Once the perturbative evolution is finished, further beam remnants are added to obtain a consistent set of flavours. The current physics framework is further described in Sjo04.

The introduction of rescattering in the multiparton interactions framework further complicates the processing of events. Specifically, when combined with showers, the momentum of an individual parton is no longer uniquely associated with one single subcollision. Nevertheless the parton is classified with one system, owing to the technical and administrative complications of more complete classifications. Therefore the addition of primordial kT to the subsystem initiator partons does not automatically guarantee overall pT conservation. Various tricks are used to minimize the mismatch, with a brute force shift of all parton pT's as a final step.

Much of the above information is stored in a vector of `ResolvedParton` objects, which each contains flavour and momentum information, as well as valence/companion information and more. The `BeamParticle` method `list()` shows the contents of this vector, mainly for debug purposes.

The `BeamRemnants` class takes over for the final step of adding primordial kT to the initiators and remnants, assigning the relative longitudinal momentum sharing among the remnants, and constructing the overall kinematics and colour flow. This step couples the two sides of an event, and could therefore not be covered in the `BeamParticle` class, which only considers one beam at a time.

The methods of these classes are not intended for general use, and so are not described here.

In addition to the parameters described on this page, note that the choice of parton densities is made in the `Pythia` class. Then pointers to the pdf's are handed on to `BeamParticle` at initialization, for all subsequent usage.

### Primordial kT

The primordial kT of initiators of hard-scattering subsystems are selected according to Gaussian distributions in p_x and p_y separately. The widths of these distributions are chosen to be dependent on the hard scale of the central process and on the mass of the whole subsystem defined by the two initiators: sigma = (sigma_soft * Q_half + sigma_hard * Q) / (Q_half + Q) * m / (m + m_half * y_damp) Here Q is the hard-process renormalization scale for the hardest process and the pT scale for subsequent multiparton interactions, m the mass of the system, and sigma_soft, sigma_hard, Q_half, m_half and y_damp parameters defined below. Furthermore each separately defined beam remnant has a distribution of width sigma_remn, independently of kinematical variables.

Note that, for external (LHE) events Q_half is treated as zero. This is so that LHE events with low-pT extra jets (e.g., in the context of POWHEG-style merging) are given the same primordial kT as their Born-level counterparts.

Allow or not selection of primordial kT according to the parameter values below.
The width sigma_soft in the above equation, assigned as a primordial kT to initiators in the soft-interaction limit.
The width sigma_hard in the above equation, assigned as a primordial kT to initiators in the hard-interaction limit.
The scale Q_half in the equation above, defining the half-way point between hard and soft interactions. For external (LHE) events, this parameter is treated as zero.
The scale m_half in the equation above, defining the half-way point between low-mass and high-mass subsystems. (Kinematics construction can easily fail if a system is assigned a primordial kT value higher than its mass, so the mass-dampening is intended to reduce some troubles later on.)
For a system of mass m and energy E the dampening factor y_damp above is defined as y_damp = pow( E/m, r_red), where r_red is the current parameter. The effect is to reduce the primordial kT of low-mass systems extra much if they are at large rapidities (recall that E/m = cosh(y) before kT is added). The reason for this dampening is purely technical, and for reasonable values should not have dramatic consequences overall.
The width sigma_remn, assigned as a primordial kT to beam-remnant partons.

A net kT imbalance is obtained from the vector sum of the primordial kT values of all initiators and all beam remnants. This quantity is compensated by a shift shared equally between all partons, except that the dampening factor m / (m_half + m) is again used to suppress the role of small-mass systems.

Note that the current sigma definition implies that <pT^2> = <p_x^2>+ <p_y^2> = 2 sigma^2. It thus cannot be compared directly with the sigma of nonperturbative hadronization, where each quark-antiquark breakup corresponds to <pT^2> = sigma^2 and only for hadrons it holds that <pT^2> = 2 sigma^2. The comparison is further complicated by the reduction of primordial kT values by the overall compensation mechanism.

Is only relevant when rescattering is switched on in the multiparton interactions scenario. For a normal interaction the rapidity and mass of a system is preserved when primordial kT is introduced, by appropriate modification of the incoming parton momenta. Kinematics construction is more complicated for a rescattering, and two options are offered. Differences between these can be used to explore systematic uncertainties in the rescattering framework.
The default behaviour is to keep the incoming rescattered parton as is, but to modify the unrescattered incoming parton so as to preserve the invariant mass of the system. Thereby the rapidity of the rescattering is modified.
The alternative is to retain the rapidity (and mass) of the rescattered system when primordial kT is introduced. This is made at the expense of a modified longitudinal momentum of the incoming rescattered parton, so that it does not agree with the momentum it ought to have had by the kinematics of the previous interaction.
For a double rescattering, when both incoming partons have already scattered, there is no obvious way to retain the invariant mass of the system in the first approach, so the second is always used.

### Colour flow

The colour in the separate subproccsses are tied together via the assignment of colour flow in the beam remnants. The assignment of colour flow is not known from first principles and therefore it is not an unambiguous procedure. Thus two different models have been implemented in `Pythia`. These will be referred to as new and old, based on the time of the implementation.

The old model tries to reconstruct the colour flow in a way that a LO PS would produce the beam remnants. The starting point is the junction structure of the beam particle (if it is a baryon). The gluons are attached to a quark line and quark-antiquark pairs are added as if coming from a gluon splittings. Thus this model captures the qualitative behaviour that is expected from leading colour QCD. The model is described in more detail in Sjo04.

The new model is built on the full SU(3) colour structure of QCD. The starting point is the scattered partons from the MPI. Each of these are initially assumed uncorrelated in colour space, allowing the total outgoing colour configuration to be calculated as an SU(3) product. Since the beam particle is a colour singlet, the beam remnant colour configuration has to be the inverse of the outgoing colour configuration. The minimum amount of gluons are added to the beam remnant in order to obtain this colour configuration.

The above assumption of uncorrelated MPIs in colour space is a good assumption for a few well separated hard MPIs. However if the number of MPIs become large and ISR is included, such that the energy scale becomes lower (and thus distances becomes larger), the assumption loses its validity. This is due to saturation effects. The modelling of saturation is done in crude manner, as an exponential suppresion of high multiplet states.

None of the models above can provide a full description of the colour flow in an event, however. Therefore additional colour reconfiguration is needed. This is referred to as colour reconnection. Several different models for colour reconnection are implemented, see Colour Reconection.

Switch to choose between the two different colour models for the beam remnant. `The old beam remnant model.` `The new beam remnant model.`
Controls the suppresion due to saturation in the new model. The exact formula used is exp(-M / k), where M is the multiplet size and k is this parameter. Thus a small number will result in a large saturation.

### Further variables

The maximum valence quark kind allowed in acceptable incoming beams, for which multiparton interactions are simulated. Default is that hadrons may contain u, d and s quarks, but not c and b ones, since sensible kinematics has not really been worked out for the latter.
When a sea quark has been found, a companion antisea quark ought to be nearby in x. The shape of this distribution can be derived from the gluon mother distribution convoluted with the g → q qbar splitting kernel. In practice, simple solutions are only feasible if the gluon shape is assumed to be of the form g(x) ~ (1 - x)^p / x, where p is an integer power, the parameter above. Allowed values correspond to the cases programmed.
Since the whole framework is approximate anyway, this should be good enough. Note that companions typically are found at small Q^2, if at all, so the form is supposed to represent g(x) at small Q^2 scales, close to the lower cutoff for multiparton interactions.

When assigning relative momentum fractions to beam-remnant partons, valence quarks are chosen according to a distribution like (1 - x)^power / sqrt(x). This power is given below for quarks in mesons, and separately for u and d quarks in the proton, based on the approximate shape of low-Q^2 parton densities. The power for other baryons is derived from the proton ones, by an appropriate mixing. The x of a diquark is chosen as the sum of its two constituent x values, and can thus be above unity. (A common rescaling of all remnant partons and particles will fix that.) An additional enhancement of the diquark momentum is obtained by its x value being rescaled by the `valenceDiqEnhance` factor.

The abovementioned power for valence quarks in mesons.
The abovementioned power for valence u quarks in protons.
The abovementioned power for valence d quarks in protons.
Enhancement factor for valence diquarks in baryons, relative to the simple sum of the two constituent quarks.
The abovementioned power for gluons.
The gluon PDF is approximated with g(x) ~ (1 - x)^p / x, which integrates to infinity when integrated from 0 to 1. This cut-off is introduced as a minimum to avoid the problems with infinities.
The `off` option is intended for debug purposes only, as follows. When more than one valence quark is kicked out of a baryon beam, as part of the multiparton interactions scenario, the subsequent hadronization is described in terms of a junction string topology. This description involves a number of technical complications that may make the program more unstable. As an alternative, by switching this option off, junction configurations are rejected (which gives an error message that the remnant flavour setup failed), and the multiparton interactions and showers are redone until a junction-free topology is found.
This parameter is only relevant if the new colour reconnection scheme is used. (see colour reconnection) This parameter tells whether to form a junction or a di-quark if more than two valence quarks are found in the beam remnants. If off a di-quark is formed and if on a junction will be formed.
This parameter is only relevant if the new Beam remnant model is used. This parameter tells whether to allow the formation of junction structures in the colour configuration of the scattered partons.
Switch to to force either or both of the beam remnants to collapse to a single hadron, namely the original incoming one. Must only be used when this is physically meaningful, e.g. when a photon can be viewed as emitted from a proton that does not break up in the process. `Both hadronic beams are resolved.` `Beam A is unresolved, beam B resolved.` `Beam A is resolved, beam B unresolved.` `Both hadronic beams are unresolved.`