next up previous contents
Next: Further comments Up: How to Include External Previous: An example   Contents

PYTHIA as a generator of external processes

It is possible to write PYTHIA-generated hard processes to disk, and then read them back in for the generation of a complete event, making use of the LHA conventions. This facility may be of limited practical usefulness, and is mainly intended for debug purposes. Thus there are some limitations to what it can do, especially no pileup and no photon beams (including the 'gamma/l' options), and no weighted events. Basically, it is intended for hard processes in $\mathrm{p}\mathrm{p}/ \mathrm{p}\overline{\mathrm{p}}/ \mathrm{e}^+\mathrm{e}^-$ collisions. Events are stored using the IDWTUP = 3 strategy, i.e. already mixed and reweighted, so no rejection step is needed.

To generate the appropriate files, you have to:

92.
Open one file where the initial run information in HEPRUP can be stored, and give its file number in MSTP(161).
93.
Open one file where events in the HEPEUP format can be stored, and give its file number in MSTP(162).
94.
Define hard processes as normally, and initialize with PYINIT.
95.
In the event loop, replace the call to PYEVNT (or PYEVNW) by a call to PYUPEV, which will generate the hard process as usual, and write this process onto file number MSTP(162).
96.
After all events have been generated, call PYUPIN to store the run information. (The name of this routine may seem inappropriate, since it is not called at the initialization but at the end. However, the name refers to this information being read in first in the next step, see below).

Once you have these files, you can use them in a later run to generate complete events. This run follows the normal pattern for user-defined processes, with only minor additions.

97.
Open the file where the initial run information in HEPRUP was stored, and give its file number in MSTP(161).
98.
Open the file where events in the HEPEUP format were stored, and give its file number in MSTP(162).
99.
Initialize as usual with CALL PYINIT('USER',' ',' ',0D0). The 'dummy' UPINIT routine in the Pythia library contains the code for reading the initial run information written by PYUPIN (but not in any other format), so in this case you need not supply any routine of your own.
100.
In the event loop, call PYEVNT (or PYEVNW) as usual to generate the next event. The 'dummy' UPEVNT routine in the PYTHIA library contains the code for reading the event information written by PYUPEV (but not in any other format), so in this case you need not supply any routine of your own.


next up previous contents
Next: Further comments Up: How to Include External Previous: An example   Contents
Stephen_Mrenna 2012-10-24