]> git.uio.no Git - u/mrichter/AliRoot.git/blame - PYTHIA8/pythia8140/xmldoc/AccessPYTHIA6Processes.xml
coverity
[u/mrichter/AliRoot.git] / PYTHIA8 / pythia8140 / xmldoc / AccessPYTHIA6Processes.xml
CommitLineData
b584e2f5 1<chapter name="Accessing Pythia6 Processes">
2
3<h2>Access PYTHIA 6 Processes</h2>
4
5Gradually all relevant processes from PYTHIA 6 are being
6re-implemented in PYTHIA 8, but this transition is not finished.
7For a while longer it may therefore at times be convenient to
8access the Fortran PYTHIA 6 process library. In order to give
9this access at runtime, and not only by writing/reading event files,
10an interface is provided to C++. This interface is residing in
11<code>Pythia6Interface.h</code>, and in addition the PYTHIA 6 library
12must be linked. The latter should normally be the most recent
13Fortran PYTHIA version, but must be at least 6.314, since this is
14the first version that allows processes to be output in the Les
15Houches format (and not only input).
16
17<p/>
18The routines interfaced are
19<ul>
20<li><code>pygive(command)</code> to give in a command to change a
21setting, e.g. to decide which processes should be generated,
22<li><code>pyinit( frame, beam, target, wIn)</code> to initialize
23the event generation chain,</li>
24<li><code>pyupin()</code> to fill this initialization information
25in the <code>HEPRUP</code> commonblock,</li>
26<li><code>pyupev()</code> to generate the next hard process and
27fill the event information in the <code>HEPEUP</code> commonblock,</li>
28<li><code>pylist( mode)</code> to list the event at the process
29level,</li>
30<li><code>pystat( mode)</code> to print statistics on the event
31generation process.</li>
32</ul>
33Details on allowed arguments are given in the PYTHIA 6.4 manual.
34
35<p/>
36These methods can be used in context of the
37<code><aloc href="LesHouchesAccord">LHAupFortran</aloc></code> class.
38The existing code there takes care of converting <code>HEPRUP</code>
39and <code>HEPEUP</code> commonblock information from Fortran to C++,
40and of making it available to the PYTHIA 8 methods. What needs to be
41supplied are the two <code>LHAupFortran::fillHepRup()</code> and
42<code>LHAupFortran::fillHepEup()</code> methods. The first can
43contain an arbitrary number of <code>pygive(...)</code>, followed
44by <code>pyinit(...)</code> and <code>pyupin()</code> in that order.
45The second only needs to contain <code>pyupev()</code>. Finally,
46the use of <code>pylist(...)</code> and <code>pystat(...)</code>
47is entirely optional, and calls are best put directly in the
48main program.
49
50<p/>
51This means that all other Fortran routines have not been interfaced
52and cannot be accessed directly from the C++ code; there is no need
53for them in the current setup.
54
55<p/>
56PYTHIA 6.4 does its own rejection of events internally, according to
57the strategy option 3. However, the current runtime interface does not
58take cross-section information from PYTHIA 6.4. This means that both
59the initial maxima and the final cross sections printed by the PYTHIA 8
60routines are irrelevant in this case. Instead you have to study the
61standard PYTHIA 6.4 initialization printout and call on
62<code>pystat(...)</code> at the end of the run to obtain this information.
63It also means that you cannot mix with internally generated events,
64unlike what could have been allowed for strategy 3. Should a strong need
65arise, PYTHIA 6.4 could be modified to work with strategy option 1 and
66thus allow a mixing with internal processes, but we do not expect this
67to happen.
68
69<p/>
70An example of a <code>fillHepRup()</code> method to set up
71<ei>Z^0</ei> production at LHC, with masses above 50 GeV, would be
72<pre>
73bool LHAinitFortran::fillHepRup() {
74 Pythia6Interface::pygive("msel = 11");
75 Pythia6Interface::pygive("ckin(1) = 50.");
76 Pythia6Interface::pyinit("cms","p","p",14000.);
77 Pythia6Interface::pyupin();
78 return true;
79}
80</pre>
81and the process-generic <code>fillHepEup()</code> method would be
82<pre>
83bool LHAupFortran::fillHepEup() {
84 Pythia6Interface::pyupev();
85 return true;
86}
87</pre>
88Note that, of all parameters that could be set with the
89<code>PYGIVE</code>, only those that influence the generation of the
90hard processes have any impact, since this is the only part of the
91Fortran code that is used. Also, if you want to set many parameters,
92you can easily collect them in one file (separate from PYTHIA 8
93input) and parse that file.
94
95<p/>
96All hard PYTHIA 6 processes should be available for full generation
97in PYTHIA 8, at least to the extent that they are defined for beams
98of protons and antiprotons, which is the key application for PYTHIA 8
99so far. Soft processes, i.e. elastic and diffractive scattering, as well
100as minimum-bias events, require a different kinematics machinery, and
101can only be generated with the internal PYTHIA 8 processes.
102
103<p/>
104A simple example is found in <code>main51.cc</code>, another with parsed
105input in <code>main52.cc</code> and a third with HepMC output in
106<code>main54.cc</code>.
107
108</chapter>
109
110<!-- Copyright (C) 2010 Torbjorn Sjostrand -->