PYTHIA muon software for PHENIX
LAST UPDATES (dec 2004)
- january 8th, 2003 - created
- january 14th, 2003 - add PYTHIA 6.205
- december 21th, 2004 - add PYTHIA 6.205 for SL3 (Rob Hobbs)
This tutorial aims to help beginners to run through the PYTHIA event generation process for PHENIX:
- PYTHIA documentation : provides links to PYTHIA homepage, PYTHIA manuals for
version 5.7 (current PHENIX version) and version 6.2, and Pythia Particle/parton data tables for both
versions 5.7 and 6.2 (be cautious, they are different !).
- PYTHIA muon code : provides fortran code and makefiles to produce events
with PYTHIA. Note that upgrade effort is made on PYTHIA 6.205 only.
- PYTHIA muon cards : provides information about datacards used to drive
the event generation and selection. Provides, in addition, some control parameter files to use as starting
examples.
- PYTHuple : gives information about PYTHIA output rootuple. Also provides
a short example to analyze this rootuple.
PYTHIA documentation
- Web pages
- Paper docs
- Pythia Particle/parton data table
Notes:
- Some KF particle codes have been changed between PYTHIA 5.7 and PYTHIA 6.205. As an example,
psi' is quoted as KF=30443 in PYTHIA 5.7 and as KF=100443 in PYTHIA 6.205. These changes shouldn't
affect the KF particle code to GEANT3 (PISA) particle code translation (see SUBROUTINE GETPAR in
gen_pythia_muon.f).
- In addition IDC decay codes and KC codes have been changed between the two PYTHIA versions. These
changes should be taken into account when one is requesting some specific decay channels in the .par files.
PYTHIA muon code
how to install and run the code
PYTHIA muon cards
The PYTHIA muon production is controlled by a set of datacards put together in one
control parameters (.par) file. Datacards are gathered in five different sets controlling
five different steps in the data production:
Some control parameter files can be find here.
control cards for process description
- General settings
- MSTP(51) and/or MSTP(52) = choice of proton parton-distribution set and library.
- MSEL = a switch to select between full user control and some preprogrammed
alternatives.
- MSEL = 0 : full user control. Desired subprocesses have to be switched on in MSUB.
- MSEL = 1 : QCD high-pT processes.
- Process selection
- MSUB = array to be set when MSEL=0 to choose which subset of subprocesses to include
in the generation. Note that ISUB is the process code number (as an example, ISUB=86 is gg->J/psi+g).
- MSUB(ISUB) = 0 : the subprocess ISUB is excluded.
- MSUB(ISUB) = 1 : the subprocess ISUB is included.
- KPFR(ISUB,J) = give the KF flavor codes of the products produced in subprocess ISUB.
- KPFR(86,1) = 553 : produce upsilon (1s) instead of J/psi for process 86.
- Particle decays
- MDME(IDC,1) = on/off switch for individual decay channel IDC.
- MDME(IDC,1) = 0 : channel is switched off.
- MDME(IDC,1) = 1 : channel is switched on.
control datacards for event generation
- tnumevt = number of generated events
- sqrts = center of mass energy
control datacards for geometrical selection
With these datacards, one defines the acceptance regions. In fact, during the generation process,
Pythia will stop generating events when tnumevt signal events (defined in control
datacards for signal description) are generated within these acceptance regions.
- thmi_no = north theta min : north object if theta.GE.thmi_no (deg)
- thma_no = north theta max : north object if theta.LE.thma_no (deg)
- no_on = if .true., switch north detector on
- thmi_su = south theta min : south object if theta.GE.thmi_su (deg)
- thma_su = south theta max : south object if theta.LE.thma_su (deg)
- su_on = if .true., switch south detector on
control datacards for signal description
With these datacards, one defines the signal events. In fact, during the generation process, Pythia
will stop generating events when tnumevt signal events are generated within the acceptance
regions (defined in control datacards for geometrical description).
- isig1 = particle parent's ID (443=J/psi)
- iprod1 = particle ID (13=mu-)
- nprod1 = number [min,max] of iprod1 (coming from isig1) particles
- p1mima = momentum [min,max] of iprod1 particles
- isig2 = particle parent's ID (443=J/psi)
- iprod2 = particle ID (-13=mu+)
- nprod2 = number [min,max] of iprod2 (coming from isig2) particles
- p2mima = momentum [min,max] of iprod2 particles
- Mi = invariant mass [min,max] of the iprod1, iprod2 system
(nprod1 & nprod2 must be=1)
As an example, if isig1=443 / iprod1=13 / nprod1=1,2 / p1mima=0,1000, an event
will be defined as a signal event only if it contains at least 1 and at most 2 mu- with momentum
values between 0 and 1000 GeV; all of them coming from a J/psi decay.
Notes:
- if isig1 (and/or isig2) = 0: iprod1 (and/or iprod2) particle's parent is not checked.
- if iprod1 (and/or iprod2) = 0: all particles coming from isig1 (and/or isig2) are checked.
Resonance Mode: (pythia6205 only) isig1=isig2!=0 and iprod1=-iprod2
- if nprod1=1,1 and nprod2=1,1: keep only events with 1 iprod1 type particle
and 1 iprod2 type particle within detector acceptance (where
p1mima and p2mima are included in the acceptance
definition). In addition, both particles come from the same parent particle.
- If nprod1=1,"large number" and nprod2=1,"large number": same as above, except
that more than 1 iprod1 particle and iprod2 particle can be found within detector
acceptance (no p1mima and p2mima selection for additionnal particles).
control datacards for output selection
With these datacards, one controls output files. When generating events, two files are created:
pythia.dat which contains the particle information used by PISA as an input, and pythia.hist
which contains one or two ntuples (depending on do1 and do2 switches) for analysis at generation
level; ntuple h100 contains signal events within user defined acceptance while ntuple h1000
contains all generated signal events.
- verb = verbose mode: print particle/parton data table and
list the first 10 events details
- wriflag = output file option: if .true. write (in pythia.dat)
particle from signal selection only. If .false. write all particles from selected events.
- h_file = ntuple file option: ntuple filename
- do1 = ntuple file option:
if .TRUE. produce ntuple before selection
- do2 = ntuple file option:
if .TRUE. produce ntuple after selection
Notes:
- Note that for J/psi->mu+mu-, if wriflag = true only two particles, the two muons, are written
in pythia.dat. Consequently, at reconstruction stage, no vertex position will be given by the vertex
detectors.
some control parameter files
The following files provide, for tutorial purpose, datacard sets for some
useful processes. Some processes are pretty well defined in pythia; they are
indicated by a green ball. Other processes need user investigation; they are
indicated by a red ball.
= 100% confidence
|
= 50% confidence
|
= 10% confidence
|
PYTHuple
The pythia output rootuple
First of all, since PYTHIA is using HBOOK, one gets a HBOOK file as an output. In order
to produce a ROOT file, type:
Then, depending of what selection you make in the datacards (see do1 and do2 ),
you'll get one or two TTree.
- h100 is the TTree containing all the generated events.
- h1000 is the TTree containing all the accepted events (the ones which are written
in pythia.dat).
CAUTION: The maximum memory size allowed by HBOOK is ~130 MB, meaning that you can't produce
a HBOOK file bigger than that size. Depending of the cuts you use, h100 can be huge
and then reach the 130MB limit. If you want to produce more then 10000 events, you should
first check what the output size should be.
The pythia rootuple variables
h100 and h1000 TTree have the same variable contain. Here are the variables
description:
- Event = event number
- Vx = event vertex x position
- Vy = event vertex y position
- Vz = event vertex z position
- ID = particle ID
- Px = particle Px
- Py = particle Py
- Pz = particle Pz
- E = particle E
- pID = particle's parent ID
- pPx = particle's parent Px
- pPy = particle's parent Py
- pPz = particle's parent Pz
- pE = particle's parent E
- gpID = particle's grand-parent ID
- gpPx = particle's grand-parent Px
- gpPy = particle's grand-parent Py
- gpPz = particle's grand-parent Pz
- gpE = particle's grand-parent E
A simple root macro to analyze pythia output
In "your pythia"/bin directory:
- download h1000.C
- > h2root pythia.hist
- > root
- root [0] .x h1000.C
Page maintained by Frédéric