Access PYTHIA 6 Processes

In order to give access to the Fortran PYTHIA process library 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

Details on allowed arguments are given in the PYTHIA 6.4 manual.

These methods can be used in context of the LHAinitFortran and LHAevntFortran classes. 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 LHAinitFortran::fillHepRup() and LHAinitFortran::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.

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 LHAevntFortran::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 are the only ones fully implemented in 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.

Finally, note that it is currently not possible to mix processes from PYTHIA 6 with those from PYTHIA 8. This will be fixed later.

A simple example is found in main51.cc, another with parsed input in main52.cc and a third with HepMC output in main54.cc.