3 <title>Accessing Pythia6 Processes</title>
4 <link rel="stylesheet" type="text/css" href="pythia.css"/>
5 <link rel="shortcut icon" href="pythia32.gif"/>
9 <script language=javascript type=text/javascript>
10 function stopRKey(evt) {
11 var evt = (evt) ? evt : ((event) ? event : null);
12 var node = (evt.target) ? evt.target :((evt.srcElement) ? evt.srcElement : null);
13 if ((evt.keyCode == 13) && (node.type=="text"))
17 document.onkeypress = stopRKey;
20 if($_POST['saved'] == 1) {
21 if($_POST['filepath'] != "files/") {
22 echo "<font color='red'>SETTINGS SAVED TO FILE</font><br/><br/>"; }
24 echo "<font color='red'>NO FILE SELECTED YET.. PLEASE DO SO </font><a href='SaveSettings.php'>HERE</a><br/><br/>"; }
28 <form method='post' action='AccessPYTHIA6Processes.php'>
30 <h2>Access PYTHIA 6 Processes</h2>
32 Gradually all relevant processes from PYTHIA 6 are being
33 re-implemented in PYTHIA 8, but this transition is not finished.
34 For a while longer it may therefore at times be convenient to
35 access the Fortran PYTHIA 6 process library. In order to give
36 this access at runtime, and not only by writing/reading event files,
37 an interface is provided to C++. This interface is residing in
38 <code>Pythia6Interface.h</code>, and in addition the PYTHIA 6 library
39 must be linked. The latter should normally be the most recent
40 Fortran PYTHIA version, but must be at least 6.314, since this is
41 the first version that allows processes to be output in the Les
42 Houches format (and not only input).
45 The routines interfaced are
47 <li><code>pygive(command)</code> to give in a command to change a
48 setting, e.g. to decide which processes should be generated,
49 <li><code>pyinit( frame, beam, target, wIn)</code> to initialize
50 the event generation chain,</li>
51 <li><code>pyupin()</code> to fill this initialization information
52 in the <code>HEPRUP</code> commonblock,</li>
53 <li><code>pyupev()</code> to generate the next hard process and
54 fill the event information in the <code>HEPEUP</code> commonblock,</li>
55 <li><code>pylist( mode)</code> to list the event at the process
57 <li><code>pystat( mode)</code> to print statistics on the event
58 generation process.</li>
60 Details on allowed arguments are given in the PYTHIA 6.4 manual.
63 These methods can be used in context of the
64 <?php $filepath = $_GET["filepath"];
65 echo "<a href='LesHouchesAccord.php?filepath=".$filepath."' target='page'>";?><code>LHAupFortran</code></a> class.
66 The existing code there takes care of converting <code>HEPRUP</code>
67 and <code>HEPEUP</code> commonblock information from Fortran to C++,
68 and of making it available to the PYTHIA 8 methods. What needs to be
69 supplied are the two <code>LHAupFortran::fillHepRup()</code> and
70 <code>LHAupFortran::fillHepEup()</code> methods. The first can
71 contain an arbitrary number of <code>pygive(...)</code>, followed
72 by <code>pyinit(...)</code> and <code>pyupin()</code> in that order.
73 The second only needs to contain <code>pyupev()</code>. Finally,
74 the use of <code>pylist(...)</code> and <code>pystat(...)</code>
75 is entirely optional, and calls are best put directly in the
79 This means that all other Fortran routines have not been interfaced
80 and cannot be accessed directly from the C++ code; there is no need
81 for them in the current setup.
84 PYTHIA 6.4 does its own rejection of events internally, according to
85 the strategy option 3. However, the current runtime interface does not
86 take cross-section information from PYTHIA 6.4. This means that both
87 the initial maxima and the final cross sections printed by the PYTHIA 8
88 routines are irrelevant in this case. Instead you have to study the
89 standard PYTHIA 6.4 initialization printout and call on
90 <code>pystat(...)</code> at the end of the run to obtain this information.
91 It also means that you cannot mix with internally generated events,
92 unlike what could have been allowed for strategy 3. Should a strong need
93 arise, PYTHIA 6.4 could be modified to work with strategy option 1 and
94 thus allow a mixing with internal processes, but we do not expect this
98 An example of a <code>fillHepRup()</code> method to set up
99 <i>Z^0</i> production at LHC, with masses above 50 GeV, would be
101 bool LHAinitFortran::fillHepRup() {
102 Pythia6Interface::pygive("msel = 11");
103 Pythia6Interface::pygive("ckin(1) = 50.");
104 Pythia6Interface::pyinit("cms","p","p",14000.);
105 Pythia6Interface::pyupin();
109 and the process-generic <code>fillHepEup()</code> method would be
111 bool LHAupFortran::fillHepEup() {
112 Pythia6Interface::pyupev();
116 Note that, of all parameters that could be set with the
117 <code>PYGIVE</code>, only those that influence the generation of the
118 hard processes have any impact, since this is the only part of the
119 Fortran code that is used. Also, if you want to set many parameters,
120 you can easily collect them in one file (separate from PYTHIA 8
121 input) and parse that file.
124 All hard PYTHIA 6 processes should be available for full generation
125 in PYTHIA 8, at least to the extent that they are defined for beams
126 of protons and antiprotons, which is the key application for PYTHIA 8
127 so far. Soft processes, i.e. elastic and diffractive scattering, as well
128 as minimum-bias events, require a different kinematics machinery, and
129 can only be generated with the internal PYTHIA 8 processes.
132 A simple example is found in <code>main51.cc</code>, another with parsed
133 input in <code>main52.cc</code> and a third with HepMC output in
134 <code>main54.cc</code>.
139 <!-- Copyright (C) 2010 Torbjorn Sjostrand -->