Difference between revisions of "PYTHIA"

From EIC
Jump to navigation Jump to search
(Replaced content with "This page is now maintained at [https://eic.github.io/software/pythia6.html https://eic.github.io/software/pythia6.html].")
Tag: Replaced
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Overview of PYTHIA: ==
+
This page is now maintained at [https://eic.github.io/software/pythia6.html https://eic.github.io/software/pythia6.html].
* For e-p collisions only versions of PYTHIA 6.4 can be used, the absolute latest version 6.4.28 is installed and all improvements are integrated.
 
Pythia8 does not yet support e-p collisions.
 
* Its webpage: http://pythia6.hepforge.org.
 
* The manual: http://www.thep.lu.se/~torbjorn/pythia/lutp0613man2.pdf and the notes on updates after the manual got published http://www.hepforge.org/archive/pythia6/update_notes-6.4.28.txt.
 
* A file containing all particle codes and decay channels with branching ratios implemented in pythia: [http://www.phenix.bnl.gov/WWW/publish/elke/EIC/Files-for-Wiki/Pythia.6.4.particles.codes.and.decays.txt [PYTHIA PDG]].
 
 
 
==== Pythia processes important in e-p ====
 
 
 
{| class="wikitable" style="text-align:left" border="1" cellpadding="3" cellspacing="0"
 
|-
 
! style="background:#ffdead;" |Subprocess
 
! style="background:#ffdead;" |#
 
! style="background:#ffdead;" |Description
 
|-
 
|colspan="3" align="center"| soft VMD
 
|-
 
!V N → V N
 
!91
 
!elastic VMD
 
|-
 
!V N → V X
 
!92
 
!single-diffractive VMD
 
|-
 
!V N → XN
 
!93
 
!single-diffractive VMD
 
|-
 
!V N → XX
 
!94
 
!double-diffractive VMD
 
|-
 
!V N → X
 
!95
 
!soft non-diffractive VMD low-pT
 
|-
 
|colspan="3" align="center" | QCD 2→2
 
|-
 
!
 
!96
 
!semihard QCD 2→2
 
|-
 
|colspan="3" align="center" | RESOLVED (hard VMD and anomalous)
 
|-
 
!qq → qq
 
!11
 
!QCD 2 → 2(q)
 
|-
 
!q qbar → q qbar
 
!12
 
!
 
|-
 
!q qbar → gg
 
!13
 
!
 
|-
 
!gq → gq
 
!28
 
!
 
|-
 
!qg → qg
 
!28
 
!QCD 2 → 2(g)
 
|-
 
!gg → q qbar
 
!53
 
!
 
|-
 
!gg → gg
 
!68
 
!
 
|-
 
|colspan="3" align="center" | DIRECT
 
|-
 
!γ∗q → q
 
!99 
 
!LO DIS
 
|-
 
!γ∗T q → qg
 
!131 
 
!(transverse) QCDC
 
|-
 
!γ∗L q → qg
 
!132 
 
!(longitudinal) QCDC
 
|-
 
!γ∗T g → q qbar
 
!135 
 
!(transverse) PGF
 
|-
 
!γ∗L g → q qbar
 
!136 
 
!(longitudinal) PGF
 
|}
 
VMD: Vector Meson Dominance, describing the elastic diffractive production of Vector Mesons.
 
QCDC: QCD-Compton, radiation of a gluon from incoming or outgoing quark lines.
 
PGF: Photon Gluon Fusion.
 
 
 
==pythiaeRHIC==
 
 
 
pythiaeRHIC is the EIC science task force's programme for running PYTHIA.
 
It is based on PYTHIA 6.4.13 and was modified to include radiative corrections using [[#Documentation on Radiative Corrections: | RADGEN]].
 
The main programme can be viewed [http://svn.racf.bnl.gov/svn/eic/Generators/pythiaeRHIC/trunk/erhic/pythia6.f95 here].
 
Installations can be found under the EIC AFS directory, numbered by version.
 
e.g. version 1.0.0 is located at
 
/afs/rhic.bnl.gov/eic/PACKAGES/pythiaeRHIC/1.0.0
 
The code can also be checked out from the EIC Subversion repository.
 
To check out a particular version e.g. 1.0.0, do:
 
svn checkout http://svn.racf.bnl.gov/svn/eic/Generators/pythiaeRHIC/tags/1.0.0 pythiaeRHIC
 
To check out the version with the latest updates, do:
 
svn checkout http://svn.racf.bnl.gov/svn/eic/Generators/pythiaeRHIC/trunk pythiaeRHIC
 
It is compiled using configure and make.
 
Building the programme generates an executable named ''pythiaeRHIC'', plus shared libraries for PYTHIA and RADGEN.
 
Input is provided by a steer file, an example of which is included with the distribution (see [[#Original version | below]] for the location of more examples).
 
Output can be produced in a ROOT tree format, described [[eic-smear | here]], or an ASCII file, described [[#ASCII output file structure | below]].
 
See the included README for further instructions on building and running.
 
 
 
===Original version===
 
 
 
The original version of the code supported ASCII output only, but is the same in physics content (e.g. supporting radiative corrections).
 
An installation is located at
 
/afs/rhic.bnl.gov/eic/PACKAGES/PYTHIA-RAD-CORR-32BIT
 
This directory contains several example steer files, named "input.data. XXXXX.eic", which also work with the new code.
 
There are also generated [[#2) with radiative corrections | RADGEN lookup tables]].
 
Here are example files for [[Media:Input.data.eAu_noradcorr.eic.pdf‎ | eAu]] and [[Media:Input.data.ep_noradcorr.eic.pdf‎ | ep]].
 
The main program, named pyMaineRHIC.f, can be viewed [[Media:PyMaineRHIC-Jan2012.pdf | here]].
 
Several other routines are needed, which are in the same directory.
 
 
 
=== ASCII output file structure ===
 
 
 
The output file text format has the following structure:
 
* 1st line:  "PYTHIA EVENT FILE"
 
* 2nd line: "============================================"
 
* 3rd line: Information on event wise variables stored in the file
 
{| class="wikitable" style="text-align:left" border="1" cellpadding="2" cellspacing="0"
 
| I: || 0 (line index)
 
|-
 
| ievent: || eventnumber running from 1 to XXX
 
|-
 
| genevent: || trials to generate this event
 
|-
 
| subprocess: || pythia subprocess (MSTI(1)), for details see table above
 
|-
 
| nucleon: || hadron beam type (MSTI(12))               
 
|-
 
| targetparton: || parton hit in the target (MSTI(16))
 
|-
 
| xtargparton: || x of target parton (PARI(34))
 
|-
 
| beamparton: || in case of resolved photon processes and soft VMD the virtual photon has a hadronic structure. This gives the info which parton interacted with the target parton (MSTI(15))
 
|-
 
| xbeamparton: || x of beam parton (PARI(33))             
 
|-
 
| thetabeamparton: || theta of beam parton (PARI(53))
 
|-
 
| truey, trueQ2, truex, trueW2, trueNu: || are the kinematic variables of the event.
 
|-
 
| || If radiative corrections are turned on they are different from what is calculated from the scattered lepton.
 
|-
 
| || If radiative corrections are turned off they are the same as what is calculated from the scattered lepton
 
|-
 
| leptonphi:|| phi of the lepton (VINT(313)) 
 
|-
 
| s_hat: || shat of the process (PARI(14))
 
|-
 
| t_hat: || Mandelstam t (PARI(15))
 
|-
 
| u_hat: || Mandelstm u (PARI(16))
 
|-
 
| pt2_hat: || pthat^2 of the hard scattering (PARI(18))
 
|-
 
| Q2_hat: || Q2hat of the hard scattering (PARI(22)),
 
|-
 
| F2, F1, R, sigma_rad, SigRadCor: || information used and needed in the radiative correction code
 
|-
 
| EBrems: || energy of the radiative photon in the nuclear rest frame
 
|-
 
| photonflux: || flux factor from PYTHIA (VINT(319))
 
|-
 
| nrTracks: || number of tracks in this event, includes also virtual particles
 
|}
 
* 4th line: "============================================"
 
* 5th line: Information on track wise variables stored in the file
 
{| class="wikitable" style="text-align:left" border="1" cellpadding="2" cellspacing="0"
 
| I: || line index, runs from 1 to nrTracks 
 
|- 
 
|K(I,1): || status code KS (1: stable particles      11: particles which decay        55; radiative photon)
 
|-
 
|K(I,2): || particle KF code (211: pion, 2112:n, ....)
 
|- 
 
|K(I,3): || line number of parent particle
 
|-
 
|K(I,4): || normally the line number of the first daughter; it is 0 for an undecayed particle or unfragmented parton
 
|- 
 
|K(I,5): || normally the line number of the last daughter; it is 0 for an undecayed particle or unfragmented parton.       
 
|- 
 
|P(I,1): || px of particle 
 
|- 
 
|P(I,2): || py of particle 
 
|- 
 
|P(I,3): || pz of particle
 
|- 
 
|P(I,4): || Energy of particle
 
|- 
 
|P(I,5): || mass of particle 
 
|- 
 
|V(I,1): || x vertex information 
 
|-
 
|V(I,2): || y vertex information 
 
|- 
 
|V(I,3): || z vertex information
 
|}
 
* 6th line: "============================================"
 
* 7th line: event information for first event
 
* 8th line: "============================================"
 
* 9th to X-1 line: trackwise info of 1st event
 
* Xth line "=============== Event finished ==============="
 
 
 
The first six lines form the file header, while '''the information from line 7 to X repeats for each event'''.
 
A ROOT file can be generated from the ASCII file using the [[BuildTree]] routine.
 
The produced tree is equivalent to that produced directly by pythiaeRHIC.
 
 
 
== Using pythiaeRHIC ==
 
 
 
=== How to Run the Code ===
 
 
 
==== 1) without radiative corrections ====
 
Use redirection to input a steer file to configure pythiaeRHIC's behavior [and optionally direct messages to a log file]:
 
  pythiaeRHIC < input.data_noradcor.eic [ > XXX.log ]
 
The "input.data_noradcor.eic" steer file is one of the steer file examples, with settings tuned for Hermes, and/or H1 and ZEUS.
 
If you want to run only elastic vector meson production the example steer file is "input.data_noradcor.VM.eic"
 
 
 
==== 2) with radiative corrections ====
 
 
 
* Create a directory called radgen in the area you want to run the code.
 
* Either generate the lookup table for your cuts and beam energy settings first…
 
    pythiaeRHIC < input.data_make-radcor.eic
 
* …or use one of the files already generated, located here:
 
/afs/rhic.bnl.gov/eic/PACKAGES/PYTHIA-RAD-CORR-32BIT/radgen
 
Files are named "radgen(electron beam energy)x(proton beam energy)", for example "radgen10x100" or "radgen4x100".
 
* To run the code with radiative corrections simply change the steer file to either input.data_radcor.eic or input.data_radcor.VM.eic and type
 
pythiaeRHIC < input.data_radcor.eic > XXX.log
 
 
 
=== Monte Carlo normalization===
 
 
 
To normalize your counts to a cross section you need two pieces of information:
 
<ol>
 
<li>the total number of event trials, NGEN(0,3), which is printed to the screen/logfile when PYTHIA finishes.</li>
 
<li>the total integrated cross section, PARI(1), printed in microbarn (10<sup>-6</sup>) to the screen/logfile when PYTHIA finishes.</li>
 
</ol>
 
Both these values are also written to the output ROOT file as TObjStrings.
 
Recall that
 
 
 
'''Counts = Integrated Luminosity x Cross Section'''.
 
The cross section represented by some event count is
 
count * total integrated cross section / total number of trials
 
To calculate the corresponding luminosity represented by the generated events
 
Luminosity = total number of trials / total integrated cross section
 
 
 
== Documentation on Radiative Corrections ==
 
 
 
The code implemented in PYTHIA to calculate radiative corrections is called RADGEN.
 
The writeup on it can be found [http://arXiv.org/pdf/hep-ph/9906408 here].
 
The following steps have been done to implement it in PYTHIA:
 
* change the subroutine pygaga.f so it calls RADGEN after you have thrown y and Q2
 
* get the true y and Q2 from RADGEN and the radiated photon
 
* Pythia will continue to now generate an event based on this y and Q2
 
* Pythia still operates under accept reject, the extra weigt from the radiative corrections is absorbed in the flux factor
 
 
 
=== Additional Info on radiative corrections ===
 
Webpages with codes:
 
* [http://www.jlab.org/RC/ [http://www.jlab.org/RC/]]
 
* [http://www.desy.de/~heramc/mclist.html [http://www.desy.de/~heramc/mclist.html]]
 
* Nuclear beams in HERA.
 
Other references:
 
M. Arneodo, (Turin U. & INFN, Cosenza) , A. Bialas, (Jagiellonian U.) , M.W. Krasny, (Paris U., VI-VII & Paris U., VI-VII) , T. Sloan, (Lancaster U.) , M. Strikman, (Penn State U.) . Sep 1996. 40pp.
 
To be published in the proceedings of Workshop on Future Physics at HERA,
 
Hamburg, Germany, 25-26 Sep 1995.
 
In *Hamburg 1995/96, Future physics at HERA* 887-926.
 
e-Print: hep-ph/9610423
 
and the references 5 and 6 in this article
 
to find them check [http://www.desy.de/~heraws96/ [here]]
 
 
 
[[Category:Event Generators]]
 

Latest revision as of 14:06, 9 June 2020

This page is now maintained at https://eic.github.io/software/pythia6.html.