Access PYTHIA 6 Processes
Gradually all relevant processes from PYTHIA 6 are being
re-implemented in PYTHIA 8, but this transition is not finished.
For a while longer it may therefore at times be convenient to
access the Fortran PYTHIA 6 process library. In order to give
this access at runtime, and not only by writing/reading event files,
an interface is provided to C++. This interface is residing in
Pythia6Interface.h
, and in addition the PYTHIA 6 library
must be linked. The latter should normally be the most recent
Fortran PYTHIA version, but must be at least 6.314, since this is
the first version that allows processes to be output in the Les
Houches format (and not only input).
The routines interfaced are
pygive(command)
to give in a command to change a
setting, e.g. to decide which processes should be generated,
pyinit( frame, beam, target, wIn)
to initialize
the event generation chain,
pyupin()
to fill this initialization information
in the HEPRUP
commonblock,
pyupev()
to generate the next hard process and
fill the event information in the HEPEUP
commonblock,
pylist( mode)
to list the event at the process
level,
pystat( mode)
to print statistics on the event
generation process.
Details on allowed arguments are given in the PYTHIA 6.4 manual.
These methods can be used in context of the
LHAupFortran
class.
The existing code there takes care of converting HEPRUP
and HEPEUP
commonblock information from Fortran to C++,
and of making it available to the PYTHIA 8 methods. What needs to be
supplied are the two LHAupFortran::fillHepRup()
and
LHAupFortran::fillHepEup()
methods. The first can
contain an arbitrary number of pygive(...)
, followed
by pyinit(...)
and pyupin()
in that order.
The second only needs to contain pyupev()
. Finally,
the use of pylist(...)
and pystat(...)
is entirely optional, and calls are best put directly in the
main program.
This means that all other Fortran routines have not been interfaced
and cannot be accessed directly from the C++ code; there is no need
for them in the current setup.
PYTHIA 6.4 does its own rejection of events internally, according to
the strategy option 3. However, the current runtime interface does not
take cross-section information from PYTHIA 6.4. This means that both
the initial maxima and the final cross sections printed by the PYTHIA 8
routines are irrelevant in this case. Instead you have to study the
standard PYTHIA 6.4 initialization printout and call on
pystat(...)
at the end of the run to obtain this information.
It also means that you cannot mix with internally generated events,
unlike what could have been allowed for strategy 3. Should a strong need
arise, PYTHIA 6.4 could be modified to work with strategy option 1 and
thus allow a mixing with internal processes, but we do not expect this
to happen.
An example of a fillHepRup()
method to set up
Z^0 production at LHC, with masses above 50 GeV, would be
bool LHAinitFortran::fillHepRup() {
Pythia6Interface::pygive("msel = 11");
Pythia6Interface::pygive("ckin(1) = 50.");
Pythia6Interface::pyinit("cms","p","p",14000.);
Pythia6Interface::pyupin();
return true;
}
and the process-generic fillHepEup()
method would be
bool LHAupFortran::fillHepEup() {
Pythia6Interface::pyupev();
return true;
}
Note that, of all parameters that could be set with the
PYGIVE
, only those that influence the generation of the
hard processes have any impact, since this is the only part of the
Fortran code that is used. Also, if you want to set many parameters,
you can easily collect them in one file (separate from PYTHIA 8
input) and parse that file.
All hard PYTHIA 6 processes should be available for full generation
in PYTHIA 8, at least to the extent that they are defined for beams
of protons and antiprotons, which is the key application for PYTHIA 8
so far. Soft processes, i.e. elastic and diffractive scattering, as well
as minimum-bias events, require a different kinematics machinery, and
can only be generated with the internal PYTHIA 8 processes.
A simple example is found in main51.cc
, another with parsed
input in main52.cc
and a third with HepMC output in
main54.cc
.