## Particle Decays

The `ParticleDecays` class performs the sequential decays of all unstable hadrons produced in the string fragmentation stage, i.e. up to and including b hadrons and their decay products, such as the tau lepton. It is not to be used for the decay of more massive resonances, such as top, Z^0 or SUSY, where decays must be performed already at the `ProcessLevel` of the event generation.

The decay description essentially copies the one present in PYTHIA since many years, but with some improvements, e.g. in the decay tables and the number of decay models available. Recently a more sophisticated handling of tau decays has also been introduced. Some issues may need further polishing.

### Variables determining whether a particle decays

Before a particle is actually decayed, a number of checks are made.

(i) Decay modes must have been defined for the particle kind; tested by the `canDecay()` method of `Event` (and `ParticleData`).

(ii) The main switch for allowing this particle kind to decay must be on; tested by the `mayDecay()` method of `Event` (and `ParticleData`).

(iii) Particles may be requested to have a nominal proper lifetime tau0 below a threshold.

`flag` ParticleDecays:limitTau0 (`default = off`)
When on, only particles with tau0 < tau0Max are decayed.

`parm` ParticleDecays:tau0Max (`default = 10.`; `minimum = 0.`)
The above tau0Max, expressed in mm/c.

(iv) Particles may be requested to have an actual proper lifetime tau below a threshold.

`flag` ParticleDecays:limitTau (`default = off`)
When on, only particles with tau < tauMax are decayed.

`parm` ParticleDecays:tauMax (`default = 10.`; `minimum = 0.`)
The above tauMax, expressed in mm/c.
In order for this and the subsequent tests to work, a tau is selected and stored for each particle, whether in the end it decays or not. (If each test would use a different temporary tau it would lead to inconsistencies.)

(v) Particles may be requested to decay within a given distance of the origin.

`flag` ParticleDecays:limitRadius (`default = off`)
When on, only particles with a decay within a radius r < rMax are decayed. There is assumed to be no magnetic field or other detector effects.

`parm` ParticleDecays:rMax (`default = 10.`; `minimum = 0.`)
The above rMax, expressed in mm.

(vi) Particles may be requested to decay within a given cylidrical volume around the origin.

`flag` ParticleDecays:limitCylinder (`default = off`)
When on, only particles with a decay within a volume limited by rho = sqrt(x^2 + y^2) < xyMax and |z| < zMax are decayed. There is assumed to be no magnetic field or other detector effects.

`parm` ParticleDecays:xyMax (`default = 10.`; `minimum = 0.`)
The above xyMax, expressed in mm.

`parm` ParticleDecays:zMax (`default = 10.`; `minimum = 0.`)
The above zMax, expressed in mm.

### Mixing

`flag` ParticleDecays:mixB (`default = on`)
Allow or not B^0 - B^0bar and B_s^0 - B_s^0bar mixing.

`parm` ParticleDecays:xBdMix (`default = 0.776`; `minimum = 0.74`; `maximum = 0.81`)
The mixing parameter x_d = Delta(m_B^0)/Gamma_B^0 in the B^0 - B^0bar system. (Default from RPP2006.)

`parm` ParticleDecays:xBsMix (`default = 26.05`; `minimum = 22.0`; `maximum = 30.0`)
The mixing parameter x_s = Delta(m_B_s^0)/Gamma_B_s^0 in the B_s^0 - B_s^0bar system. (Delta-m from CDF hep-ex-0609040, Gamma from RPP2006.)

### Tau decays

A new machinery has been introduced to handle tau lepton decays, with helicity information related to the production process and with the form of the hadronic current fitted to data. It is largely based on the corresponding Herwig++ implementation [Gre07], with some input from Tauola [Jad90]. A complete writeup is in preparation [Ilt11].

For taus in external processes, interfaced with Les Houches Acccord information available, e.g. via Les Houches Event Files (LHEF), the new machinery interprets the SPINUP number for tau leptons as giving their helicity, and decays them accordingly. The only exceptions are when a specific polarization is forced by the user (see below), which then overrides the SPINUP value, or when SPINUP has the special value 9 (unpolarized). In the latter case, PYTHIA defaults back to attempting to determine the helicity structure from the production process, in the same way as for internal processes.

This new machinery is on by default, but it is possible to revert to the simpler old decay handling, e.g. to study differences. Furthermore the spin tracing framework does not yet cover all possibilities; notably it cannot handle taus coming from SUSY decay chains (except via LHEF), so it makes sense to switch off the new machinery in such instances, for speed reasons if nothing else. In case only one tau mother species is undefined, the polarization involved can be set by hand.

`mode` ParticleDecays:sophisticatedTau (`default = 1`; `minimum = 0`; `maximum = 3`)
Choice of tau decay model.
`option` 0 : old decay model, with isotropic decays. When reading LHEF files, the SPINUP digit will be ignored.
`option` 1 : sophisticated decays where tau polarization is calculated from the tau production mechanism. When reading LHEF files, the SPINUP digit will be used.
`option` 2 : sophisticated decays as above, but additionally tau polarization is set to `ParticleDecaus:tauPolarization` for taus produced from `ParticleDecays:tauMother`. When reading LHEF files, this overrides the SPINUP digit.
`option` 3 : sophisticated decays where tau polarization is set to `ParticleDecaus:tauPolarization` for all tau decays. When reading LHEF files, this overrides the SPINUP digit.
Note: options `2` and `3`, to force a specific tau polarization, only affect the decay of the tau. The angular distribution of the tau itself, given by its production, is not modified by these options. If you want, e.g., a righthanded W, or a SUSY decay chain, the kinematics should be handled by the corresponding cross section class(es), supplemented by the resonance decay one(s). The options here could then still be used to ensure the correct polarization at the tau decay stage.

`parm` ParticleDecays:tauPolarization (`default = 0`; `minimum = -1.`; `maximum = 1.`)
Polarization of the tau when mode 2 or 3 of `ParticleDecays:sophisticatedTau` is selected.

`mode` ParticleDecays:tauMother (`default = 0`; `minimum = 0`)
Mother of the tau for forced polarization when mode 2 of `ParticleDecays:sophisticatedTau` is selected. You should give the positive identity code; to the extent an antiparticle exists it will automatically obtain the inverse polarization.

### Other variables

`parm` ParticleDecays:mSafety (`default = 0.0005`; `minimum = 0.`; `maximum = 0.01`)
Minimum mass difference required between the decaying mother mass and the sum of the daughter masses, kept as a safety margin to avoid numerical problems in the decay generation.

`parm` ParticleDecays:sigmaSoft (`default = 0.5`; `minimum = 0.2`; `maximum = 2.`)
In semileptonic decays to more than one hadron, such as B -> nu l D pi, decay products after the first three are dampened in momentum by an explicit weight factor exp(-p^2/sigmaSoft^2), where p is the three-momentum in the rest frame of the decaying particle. This takes into account that such further particles come from the fragmentation of the spectator parton and thus should be soft.

When a decay mode is defined in terms of a partonic content, a random multiplicity (and a random flavour set) of hadrons is to be picked, especially for some charm and bottom decays. This is done according to a Poissonian distribution, for n_p normal particles and n_q quarks the average value is chosen as
n_p/ 2 + n_q/4 + multIncrease * ln ( mDiff / multRefMass)
with mDiff the difference between the decaying particle mass and the sum of the normal-particle masses and the constituent quark masses. For gluonic systems multGoffset offers and optional additional term to the multiplicity. The lowest possible multiplicity is n_p + n_q/2 (but at least 2) and the highest possible 10. If the picked hadrons have a summed mass above that of the mother a new try is made, including a new multiplicity. These constraints imply that the actual average multiplicity does not quite agree with the formula above.

`parm` ParticleDecays:multIncrease (`default = 4.`; `minimum = 2.`; `maximum = 6.`)
The above multIncrease parameter, except for `meMode = 23`.

`parm` ParticleDecays:multIncreaseWeak (`default = 2.5`; `minimum = 1.`; `maximum = 4.`)
The above multIncrease parameter, specifically for `meMode = 23`. Here the weak decay implies that only the virtual W mass should contribute to the production of new particles, rather than the full meson mass.

`parm` ParticleDecays:multRefMass (`default = 0.7`; `minimum = 0.2`; `maximum = 2.0`)
The above multRefMass parameter.

`parm` ParticleDecays:multGoffset (`default = 0.5`; `minimum = 0.0`; `maximum = 2.0`)
The above multGoffset parameter.

`parm` ParticleDecays:colRearrange (`default = 0.5`; `minimum = 0.`; `maximum = 1.0`)
When a decay is given as a list of four partons to be turned into hadrons (primarily for modes 41 - 80) it is assumed that they are listed in pairs, as a first and a second colour singlet, which could give rise to separate sets of hadrons. Here colRearrange is the probability that this original assignment is not respected, and default corresponds to no memory of this original colour topology.

`flag` ParticleDecays:FSRinDecays (`default = true`)
When a particle decays to q qbar, g g, g g g or gamma g g, with `meMode > 90`, allow or not a shower to develop from it, before the partonic system is hadronized. (The typical example is Upsilon decay.) In addition, some variables defined for string fragmentation and for flavour production are used also here.

### Modes for Matrix Element Processing

Some decays can be treated better than what pure phase space allows, by reweighting with appropriate matrix elements. In others a partonic content has to be converted to a set of hadrons. The presence of such corrections is signalled by a nonvanishing `meMode()` value for a decay mode in the particle data table. The list of allowed possibilities almost agrees with the PYTHIA 6 ones, but several obsolete choices have been removed, a few new introduced, and most have been moved for better consistency. Here is the list of currently allowed `meMode()` codes:

- 0 : pure phase space of produced particles ("default"); input of partons is allowed and then the partonic content is converted into the minimal number of hadrons (i.e. one per parton pair, but at least two particles in total)
- 1 : omega and phi -> pi+ pi- pi0
- 2 : polarization in V -> PS + PS (V = vector, PS = pseudoscalar), when V is produced by PS -> PS + V or PS -> gamma + V
- 11 : Dalitz decay into one particle, in addition to the lepton pair (also allowed to specify a quark-antiquark pair that should collapse to a single hadron)
- 12 : Dalitz decay into two or more particles in addition to the lepton pair
- 13 : double Dalitz decay into two lepton pairs
- 21 : decay to phase space, but weight up neutrino_tau spectrum in tau decay
- 22 : weak decay; if there is a quark spectator system it collapses to one hadron; for leptonic/semileptonic decays the V-A matrix element is used, for hadronic decays simple phase space
- 23 : as 22, but require at least three particles in decay
- 31 : decays of type B -> gamma X, very primitive simulation where X is given in terms of its flavour content, the X multiplicity is picked according to a geometrical distribution with average number 2, and the photon energy spectrum is weighted up relative to pure phase space
- 42 - 50 : turn partons into a random number of hadrons, picked according to a Poissonian with average value as described above, but at least `code` - 40 and at most 10, and then distribute then in pure phase space; make a new try with another multiplicity if the sum of daughter masses exceed the mother one
- 52 - 60 : as 42 - 50, with multiplicity between `code` - 50 and 10, but avoid already explicitly listed non-partonic channels
- 62 - 70 : as 42 - 50, but fixed multiplicity `code` - 60
- 72 - 80 : as 42 - 50, but fixed multiplicity `code` - 70, and avoid already explicitly listed non-partonic channels
- 91 : decay to q qbar or g g, which should shower and hadronize
- 92 : decay onium to g g g or g g gamma (with matrix element), which should shower and hadronize
- 100 - : reserved for the description of partial widths of resonances

Three special decay product identity codes are defined.

- 81: remnant flavour. Used for weak decays of c and b hadrons, where the c or b quark decays and the other quarks are considered as a spectator remnant in this decay. In practice only used for baryons with multiple c and b quarks, which presumably would never be used, but have simple (copied) just-in-case decay tables. Assumed to be last decay product.
- 82: random flavour, picked by the standard fragmentation flavour machinery, used to start a sequence of hadrons, for matrix element codes in 41 - 80. Assumed to be first decay product, with -82 as second and last. Where multiplicity is free to be picked it is selected as for normal quarkonic systems. Currently unused.
- 83: as for 82, with matched pair 83, -83 of decay products. The difference is that here the pair is supposed to come from a closed gluon loop (e.g. eta_c -> g g) and so have a somewhat higher average multiplicity than the simple string assumed for 82, see the `ParticleDecays:multGoffset` parameter above.