wiki:PythiaInterface
Last modified 6 years ago Last modified on 04/12/12 14:32:41

The Pythia package in the MadGraph simulation chain

If the Pythia package is downloaded and compiled and the file Cards/pythia_card.dat exists, Pythia will automatically be run by the generate_events script. To avoid this, just remove the file Cards/pythia_card.dat.

The easiest way to run Pythia on an existing generation is to go to the Events directory and run
../bin/run_pythia path_to_pythia 0 prefix_of_run
The second argument is 0 for serial and 1 for cluster running, path_to_pythia is the path to the

pythia

executable (usually =../../pythia-pgs/src=) and prefix_of_run is the name of the run, i.e. what comes before "unweightedevents.lhe.gz".

The Pythia package includes the following files and packages:

  • !ME2Pythia.f (a Pythia interface to read MadEvent LHE files)
  • pythia.f (the main program)
  • hep2lhe.f (reads STDHEP files and performs jet clustering to produce simplified LHE complient output files)
  • getjet.f (cone jet clustering)
  • ktclusdble.f (kt jet clustering)
  • Pythia 6.4.14
  • LHAPDF v4r2
  • StdHep 5.04.01
  • Tauola 2.1 (came with PGS 4.0)

The Pythia main program reads the file pythia_card.dat with Pythia run parameters, opens the LHE file unweighted_events.lhe and passes it to event simulation. The output is written in the form of StdHep files, which store all the Pythia event information in HEPEVT common block format.

The MadEvent-Pythia interface extracts and reads the MadEvent model parameters and necessary run parameters (including PDF and matching info), initializes Pythia and reads events. It also automatically performs the following actions:

  • Gives the default Pythia mass to massless final state particles from MadEvent, such as muons, electrons and quarks.
  • Adjusts the cross section to account for closed decay channels for final-state particles from MadEvent which are decayed by Pythia
  • If matching is turned on in MadEvent (using ickkw=1 in the run_card.dat), the type of matching is automatically specified and performed. See the matching section for instructions on how to use the matching implemented in MadEvent and Pythia.

The pythia_card.dat

If the pythia-pgs package is downloaded and compiled and the pythia_card.dat exists in the Cards directory, Pythia will automatically be run by the generate_events script. The syntax of the pythia_card.dat is:

parameter=value

Extra spaces can be used, but not tabs. ! or # at the start of lines indicate comments.

The parameters that can be set in the pythia_card.dat are:

  • Any Pythia parameters settings. Examples are MSTP(61) and MSTP(71) (for initial and final state radiation), MSTP(81) (for multiple interactions) and MSTJ(1) for hadronization/fragmentation. If internal processes are turned on using MSEL or MSUB(I) non-zero, Pythia will be run with only internal processes, and the event file is used only to define collider and PDF settings.
  • PSSCALE to choose the showering scale. PSSCALE=0 to use the scale SCALUP given by MadEvent, PSSCALE=1 to use the standard Herwig scale (the minimum dot product of color connected pairs)
  • NITER: number of iterations (-1 for all events in the LHE file)

Parameters relevant for matching:

  • IEXCFILE: 1 for exclusive samples (not including the highest jet multiplicity), 0 for inclusive samples (including the highest jet multiplicity)
  • QCUT. For matching using the kt scheme, this is the jet measure cutoff used by Pythia. If not given, it will be set to max(xqcut+5,xqcut*1.2) (where xqcut is read from the MadEvent run_card.dat)
  • MINJETS: Minimum jet multiplicity included in the matching (default -1: lowest multiplicity in file)
  • MAXJETS: Maximum jet multiplicity included in the matching (default -1: highest multiplicity in file)
  • KTSCHE: The kt clustering scheme used by KTCLUS. Default 4313 for hadron collisions, 1 for e+e- collisions.
  • EXCRES=PDG: Discard event with on-shell resonance PDG in event file. Repeat for additional resonances.

Parameters read by the hep2lhe converter:

  • IJETALG: 1 for cone jets by GETJET, 0 for kt jets by KTCLUS
  • ETCLUS: Minimum clustering scale for kt jets
  • ETMIN: Minimum ET for cone jets
  • RMAX: Maximum Delta(R) for cone jets
  • ETAMAX: Maximum pseudorapidity for particles in detector
  • ETAJETMAX: Maximum rapidity for reconstructed jets
  • NCY: Number of cells in the detector in the pseudorapitidy direction (for GETJET)
  • NCPHI: Number of cells in the detector in the phi direction (for GETJET)
  • KTSCHE: The kt clustering scheme used by KTCLUS. Default 4313.

-- Main.JohanAlwall - 21 Feb 2008