Very often, the output of the program is to be fed into a subsequent
detector simulation program. It therefore becomes necessary to set up
an interface between the PYJETS common block and the detector
model. Preferably this should be done via the HEPEVT standard
common block, see section
, but sometimes this may not
be convenient. If a PYEDIT(2) call is made, the remaining
entries exactly correspond to those an ideal detector could see: all
non-decayed particles, with the exception of neutrinos. The translation
of momenta should be trivial (if need be, a PYROBO call can be
made to rotate the `preferred'
direction to whatever is the
longitudinal direction of the detector), and so should the translation
of particle codes. In particular, if the
detector simulation program also uses the standard Particle Data Group
codes, no conversion at all is needed. The problem then is to select
which particles are allowed to decay, and how decay vertex information
should be used.
Several switches regulate which particles are allowed to decay. First,
the master switch MSTJ(21) can be used to switch on/off all
decays (and it also contains a choice of how fragmentation should
be interfaced). Second, a particle must have decay modes defined for
it, i.e. the corresponding MDCY(KC,2) and MDCY(KC,3)
entries must be non-zero for compressed code KC = PYCOMP(KF).
This is true for all colour neutral particles except the neutrinos,
the photon, the proton and the neutron. (This statement is actually
not fully correct, since irrelevant `decay modes' with
MDME(IDC,2)=102 exist in some cases.) Third, the
individual switch in MDCY(KC,1) must be on. Of all the particles
with decay modes defined, only
,
,
and
are by default considered stable.
Finally, if MSTJ(22) does not have its default value 1, checks
are also made on the lifetime of a particle before it is allowed to
decay. In the simplest alternative, MSTJ(22)=2, the comparison
is based on the average lifetime, or rather
, measured in mm.
Thus if the limit PARJ(71) is (the default) 10 mm, then decays
of
,
,
,
,
,
and
are all switched off, but charm and bottom
still decay. No
values below 1
m are defined. With the
two options MSTJ(22)= 3 or 4, a spherical or cylindrical volume
is defined around the origin, and all decays taking place inside this
volume are ignored.
Whenever a particle is in principle allowed to decay, i.e. MSTJ(21) and MDCY on, an proper lifetime is selected once and for all and stored in V(I,5). The K(I,1) is then also changed to 4. For MSTJ(22)=1, such a particle will also decay, but else it could remain in the event record. It is then possible, at a later stage, to expand the volume inside which decays are allowed, and do a new PYEXEC call to have particles fulfilling the new conditions (but not the old) decay. As a further option, the K(I,1) code may be put to 5, signalling that the particle will definitely decay in the next PYEXEC call, at the vertex position given (by you) in the V vector.
This then allows the PYTHIA decay routines to be used inside a
detector simulation program, as follows. For a particle which did not
decay before entering the detector, its point of decay is still well
defined (in the absence of deflections by electric or magnetic fields),
eq. (
). If it interacts before that point, the
detector simulation program is left to handle things. If not, the
V vector is updated according to the formula above, K(I,1)
is set to 5, and PYEXEC is called, to give a set of decay
products, that can again be tracked.
A further possibility is to force particles to decay into specific
decay channels; this may be particularly interesting for charm or
bottom physics. The choice of channels left open is determined by the
values of the switches MDME(IDC,1) for decay channel IDC
(use PYLIST(12) to obtain the full listing). One or several
channels may be left open;
in the latter case effective branching ratios are automatically
recalculated without the need for your intervention. It is also
possible to differentiate between which channels are left open for
particles and which for antiparticles. Lifetimes are not affected by
the exclusion of some decay channels. Note that, whereas forced decays
can enhance the efficiency for several kinds of studies, it can
also introduce unexpected biases, in particular when events may contain
several particles with forced decays, cf. section
.