## Spacelike Showers

The PYTHIA algorithm for spacelike initial-state showers is based on the article [Sjo05], where a transverse-momentum-ordered backwards evolution scheme is introduced, with the extension to fully interleaved evolution covered in [Cor10a]. This algorithm is a further development of the virtuality-ordered one presented in [Sj085], with matching to first-order matrix element for Z^0, W^+- and Higgs (in the m_t -> infinity limit) production as introduced in [Miu99].

The normal user is not expected to call `SpaceShower` directly, but only have it called from `Pythia`, via `PartonLevel`. Some of the parameters below, in particular `SpaceShower:alphaSvalue`, would be of interest for a tuning exercise, however.

### Main variables

The maximum pT to be allowed in the shower evolution is related to the nature of the hard process itself. It involves a delicate balance between not doublecounting and not leaving any gaps in the coverage. The best procedure may depend on information only the user has: how the events were generated and mixed (e.g. with Les Houches Accord external input), and how they are intended to be used. Therefore a few options are available, with a sensible default behaviour.

`mode` SpaceShower:pTmaxMatch (`default = 0`; `minimum = 0`; `maximum = 2`)
Way in which the maximum shower evolution scale is set to match the scale of the hard process itself.
`option` 0 : (i) if the final state of the hard process (not counting subsequent resonance decays) contains at least one quark (u, d, s, c ,b), gluon or photon then pT_max is chosen to be the factorization scale for internal processes and the `scale` value for Les Houches input; (ii) if not, emissions are allowed to go all the way up to the kinematical limit. The reasoning is that in the former set of processes the ISR emission of yet another quark, gluon or photon could lead to doublecounting, while no such danger exists in the latter case.
`option` 1 : always use the factorization scale for an internal process and the `scale` value for Les Houches input, i.e. the lower value. This should avoid doublecounting, but may leave out some emissions that ought to have been simulated. (Also known as wimpy showers.)
`option` 2 : always allow emissions up to the kinematical limit. This will simulate all possible event topologies, but may lead to doublecounting. (Also known as power showers.)
Note 1: These options only apply to the hard interaction. Emissions off subsequent multiparton interactions are always constrainted to be below the factorization scale of the process itself.
Note 2: Some processes contain matrix-element matching to the first emission; this is the case notably for single gamma^*/Z^0, W^+- and H^0 production. Then default and option 2 give the correct result, while option 1 should never be used.

`parm` SpaceShower:pTmaxFudge (`default = 1.0`; `minimum = 0.25`; `maximum = 2.0`)
In cases where the above `pTmaxMatch` rules would imply that pT_max = pT_factorization, `pTmaxFudge` introduces a multiplicative factor f such that instead pT_max = f * pT_factorization. Only applies to the hardest interaction in an event, cf. below. It is strongly suggested that f = 1, but variations around this default can be useful to test this assumption.

`parm` SpaceShower:pTmaxFudgeMPI (`default = 1.0`; `minimum = 0.25`; `maximum = 2.0`)
A multiplicative factor f such that pT_max = f * pT_factorization, as above, but here for the non-hardest interactions (when multiparton interactions are allowed).

`mode` SpaceShower:pTdampMatch (`default = 0`; `minimum = 0`; `maximum = 2`)
These options only take effect when a process is allowed to radiate up to the kinematical limit by the above `pTmaxMatch` choice, and no matrix-element corrections are available. Then, in many processes, the fall-off in pT will be too slow by one factor of pT^2. That is, while showers have an approximate dpT^2/pT^2 shape, often it should become more like dpT^2/pT^4 at pT values above the scale of the hard process. Whether this actually is the case depends on the particular process studied, e.g. if t-channel gluon exchange is likely to dominate. If so, the options below could provide a reasonable high-pT behaviour without requiring higher-order calculations.
`option` 0 : emissions go up to the kinematical limit, with no special dampening.
`option` 1 : emissions go up to the kinematical limit, but dampened by a factor k^2 Q^2_fac/(pT^2 + k^2 Q^2_fac), where Q_fac is the factorization scale and k is a multiplicative fudge factor stored in `pTdampFudge` below.
`option` 2 : emissions go up to the kinematical limit, but dampened by a factor k^2 Q^2_ren/(pT^2 + k^2 Q^2_ren), where Q_ren is the renormalization scale and k is a multiplicative fudge factor stored in `pTdampFudge` below.
Note: These options only apply to the hard interaction. Emissions off subsequent multiparton interactions are always constrainted to be below the factorization scale of the process itself.

`parm` SpaceShower:pTdampFudge (`default = 1.0`; `minimum = 0.25`; `maximum = 4.0`)
In cases 1 and 2 above, where a dampening is imposed at around the factorization or renormalization scale, respectively, this allows the pT scale of dampening of radiation by a half to be shifted by this factor relative to the default Q_fac or Q_ren. This number ought to be in the neighbourhood of unity, but variations away from this value could do better in some processes.

The amount of QCD radiation in the shower is determined by

`parm` SpaceShower:alphaSvalue (`default = 0.137`; `minimum = 0.06`; `maximum = 0.25`)
The alpha_strong value at scale `M_Z^2`. Default value is picked equal to the one used in CTEQ 5L.

The actual value is then regulated by the running to the scale pT^2, at which it is evaluated

`mode` SpaceShower:alphaSorder (`default = 1`; `minimum = 0`; `maximum = 2`)
Order at which alpha_strong runs,
`option` 0 : zeroth order, i.e. alpha_strong is kept fixed.
`option` 1 : first order, which is the normal value.
`option` 2 : second order. Since other parts of the code do not go to second order there is no strong reason to use this option, but there is also nothing wrong with it.

QED radiation is regulated by the alpha_electromagnetic value at the pT^2 scale of a branching.

`mode` SpaceShower:alphaEMorder (`default = 1`; `minimum = -1`; `maximum = 1`)
The running of alpha_em.
`option` 1 : first-order running, constrained to agree with `StandardModel:alphaEMmZ` at the Z^0 mass.
`option` 0 : zeroth order, i.e. alpha_em is kept fixed at its value at vanishing momentum transfer.
`option` -1 : zeroth order, i.e. alpha_em is kept fixed, but at `StandardModel:alphaEMmZ`, i.e. its value at the Z^0 mass.

There are two complementary ways of regularizing the small-pT divergence, a sharp cutoff and a smooth dampening. These can be combined as desired but it makes sense to coordinate with how the same issue is handled in multiparton interactions.

`flag` SpaceShower:samePTasMPI (`default = off`)
Regularize the pT -> 0 divergence using the same sharp cutoff and smooth dampening parameters as used to describe multiparton interactions. That is, the `MultipartonInteractions:pT0Ref`, `MultipartonInteractions:ecmRef`, `MultipartonInteractions:ecmPow` and `MultipartonInteractions:pTmin` parameters are used to regularize all ISR QCD radiation, rather than the corresponding parameters below. This is a sensible physics ansatz, based on the assumption that colour screening effects influence both MPI and ISR in the same way. Photon radiation is regularized separately in either case.
Warning: if a large `pT0` is picked for multiparton interactions, such that the integrated interaction cross section is below the nondiffractive inelastic one, this `pT0` will automatically be scaled down to cope. Information on such a rescaling does NOT propagate to `SpaceShower`, however.

The actual `pT0` parameter used at a given CM energy scale, ecmNow, is obtained as
pT0 = pT0(ecmNow) = pT0Ref * (ecmNow / ecmRef)^ecmPow
where pT0Ref, ecmRef and ecmPow are the three parameters below.

`parm` SpaceShower:pT0Ref (`default = 2.0`; `minimum = 0.5`; `maximum = 10.0`)
Regularization of the divergence of the QCD emission probability for pT -> 0 is obtained by a factor pT^2 / (pT0^2 + pT^2), and by using an alpha_s(pT0^2 + pT^2). An energy dependence of the pT0 choice is introduced by the next two parameters, so that pT0Ref is the pT0 value for the reference cm energy, pT0Ref = pT0(ecmRef).

`parm` SpaceShower:ecmRef (`default = 1800.0`; `minimum = 1.`)
The ecmRef reference energy scale introduced above.

`parm` SpaceShower:ecmPow (`default = 0.0`; `minimum = 0.`; `maximum = 0.5`)
The ecmPow energy rescaling pace introduced above.

`parm` SpaceShower:pTmin (`default = 0.2`; `minimum = 0.1`; `maximum = 10.0`)
Lower cutoff in pT, below which no further ISR branchings are allowed. Normally the pT0 above would be used to provide the main regularization of the branching rate for pT -> 0, in which case pTmin is used mainly for technical reasons. It is possible, however, to set pT0Ref = 0 and use pTmin to provide a step-function regularization, or to combine them in intermediate approaches. Currently pTmin is taken to be energy-independent.

`parm` SpaceShower:pTminChgQ (`default = 0.5`; `minimum = 0.01`)
Parton shower cut-off pT for photon coupling to a coloured particle.

`parm` SpaceShower:pTminChgL (`default = 0.0005`; `minimum = 0.0001`)
Parton shower cut-off mass for pure QED branchings. Assumed smaller than (or equal to) pTminChgQ.

`flag` SpaceShower:rapidityOrder (`default = off`)
Force emissions, after the first, to be ordered in rapidity, i.e. in terms of decreasing angles in a backwards-evolution sense. Could be used to probe sensitivity to unordered emissions. Only affects QCD emissions.

### Further variables

These should normally not be touched. Their only function is for cross-checks.

There are three flags you can use to switch on or off selected branchings in the shower:

`flag` SpaceShower:QCDshower (`default = on`)
Allow a QCD shower; on/off = true/false.

`flag` SpaceShower:QEDshowerByQ (`default = on`)
Allow quarks to radiate photons; on/off = true/false.

`flag` SpaceShower:QEDshowerByL (`default = on`)
Allow leptons to radiate photons; on/off = true/false.

There are some further possibilities to modify the shower:

`flag` SpaceShower:MEcorrections (`default = on`)
Use of matrix element corrections; on/off = true/false.

`flag` SpaceShower:MEafterFirst (`default = on`)
Use of matrix element corrections also after the first emission, for dipole ends of the same system that did not yet radiate. Only has a meaning if `MEcorrections` above is switched on.

`flag` SpaceShower:phiPolAsym (`default = on`)
Azimuthal asymmetry induced by gluon polarization; on/off = true/false.

`flag` SpaceShower:phiIntAsym (`default = on`)
Azimuthal asymmetry induced by interference; on/off = true/false.

`parm` SpaceShower:strengthIntAsym (`default = 0.7`; `minimum = 0.`; `maximum = 0.9`)
Size of asymmetry induced by interference. Natural value of order 0.5; expression would blow up for a value of 1.

`mode` SpaceShower:nQuarkIn (`default = 5`; `minimum = 0`; `maximum = 5`)
Number of allowed quark flavours in g -> q qbar branchings, when kinematically allowed, and thereby also in incoming beams. Changing it to 4 would forbid g -> b bbar, etc.

### Technical notes

Almost everything is equivalent to the algorithm in [1]. Minor changes are as follows.

- It is now possible to have a second-order running alpha_s, in addition to fixed or first-order running.
- The description of heavy flavour production in the threshold region has been modified, so as to be more forgiving about mismatches between the c/b masses used in Pythia relative to those used in a respective PDF parametrization. The basic idea is that, in the threshold region of a heavy quark Q, Q = c/b, the effect of subsequent Q -> Q g branchings is negligible. If so, then
  f_Q(x, pT2) = integral_mQ2^pT2 dpT'2/pT'2 * alpha_s(pT'2)/2pi * integral P(z) g(x', pT'2) delta(x - z x')
  so use this to select the pT2 of the g -> Q Qbar branching. In the old formalism the same kind of behaviour should be obtained, but by a cancellation of a 1/f_Q that diverges at the theshold and a Sudakov that vanishes.
  The strategy therefore is that, once pT2 < f * mQ2, with f a parameter of the order of 2, a pT2 is chosen like dpT2/pT2 between mQ2 and f * mQ2, a nd a z flat in the allowed range. Thereafter acceptance is based on the product of three factors, representing the running of alpha_strong, the splitting kernel (including the mass term) and the gluon density weight. At failure, a new pT2 is chosen in the same range, i.e. is not required to be lower since no Sudakov is involved.
- The QED algorithm now allows for hadron beams with non-zero photon content. The backwards-evolution of a photon in a hadron is identical to that of a gluon, with CF -> eq^2 and CA -> 0. Note that this will only work in conjunction with parton distribution that explicitly include photons as part of the hadron structure (such as the MRST2004qed set). Since Pythia's internal sets do not allow for photon content in hadrons, it is thus necessary to use the LHAPDF interface to make use of this feature. The possibility of a fermion backwards-evolving to a photon has not yet been included, nor has photon backwards-evolution in lepton beams.