--
GavinKirby - 2010-09-29
This page documents the use of Pythia to generate ttH (Higgs-strahlung from top/tbar) events. The relevant code can be found in the Glasgow ATLAS subversion repository under
Pythiatth
. Note that in order to run it you will need to have the correct Pythia version in a directory at the same level as the
tth
directory (the
linktth_64.sh
script specifies the path to the Pythia version to use). There is a compiled and ready to use Pythia version (6.4) in /afs/phas.gla.ac.uk/user/g/gkirby/public/pythia6426. Note that the older linktth.sh script is for use with pythia6222, which is no longer used. Information about studies that have been carried out using this code may be found at
PythiattHWork. The "standard" version of this code generates semileptonic ttH events; a version to produce diletponic events is in progress, and will be included as a branch in the SVN repository.
Overview
The code can be found in the Pythiatth directory of the Glasgow "atlas" SVN repository.
The code consists primarily of four files, in addition to the .params file which specifies the run parameters. These files are:
- src/tth.f -- the main Fortran source code,
- inc/tth.inc -- contains variable declarations for the Fortran code
- inc/tth_inl.inc -- containing inline functions for the Fortran code
- inc/pycomm.inc -- inline functions for Pythia variables
The shell script
test/linktth_64.sh
is used to compile the code. It creates an executable file called
tth
(6.2 also has
tthsf
, i.e. using structure functions).
A run may be initiated in the test area by using the command
./tth < [filename].params > [output logfile]
for a given parameters file. The code is set up to dump unsatisfactory events and other select information in the output (logfile) for debugging purposes.
Params Files
Run information is specified in a .params file. The top line of a .params file should look like:
14000D0 5000 10 500 p p
In this case, 14000 is the centre of mass energy (in
GeV
), 5000 is the number of events to generate, 10 is the number of events to printout at the start of the run, 500 is the subsequent printout interval, and "p p" is the initial state appropriate to the LHC (e.g. p pbar would be used for Tevatron runs).
The .params files also contain switches to control particle decay modes, Q^2 scale parameters, particle mass settings (in particular, PMAS(25,1) controls the Higgs mass). Consult the
Pythia 6.4 manual for a full description of Pythia parameters.
Code Structure
tth.f
This contains the main function (
program higgs
) and the subroutines it calls. The main function generates the required number of events (as specified by the .params file) and tests them to ensure that they comply with specific criteria (for debugging/sanity checking purposes). It also creates an output text file called
PythiaOutput.dat
containing specific information about the generated events, such as neural net variables or event shape variables (the Boolean variable
writeout
is used to control which events are considered acceptable for this output file). The format of this output file is such that it can be parsed to create an ntuple using
the relevant tools.
tth.inc
This file contains variable declarations for the main program and each of the subroutines in
tth.f
: error counters, event particle counters and particle indices, as well as logical (Boolean) variables used in the main Fortran code. New variables must be declared in the main body of the file and then listed under the appropriate block below. All new variables should be zeroed before being used in the main Fortran code.
tth_inl.inc
Contains definitions of inline functions for the tth code.
pycomm_inl.inc
This file contains inline functions relating to Pythia internal variables (e.g. the energy and momenta of particles). It assigns these values to a set of variables (declared in the file) which can then be used in the main function (e.g. for writeout of a text file containing event information suitable for building an ntuple). Thus, pt_r(particle index) will return the pt of the relevant particle.
Changes from VBF
The code was initially designed to generate vector boson (WW) fusion events, and it has been adapted in stages to generate ttH events instead, with some additional modifications. In particular, the histogramming aspect of the initial VBF code (which used the Pythia data to prepare an hbook file) has been disabled, with a view to amending the code to produce a text output file containing the necessary information (in the appropriate format) to prepare root ntuples for histogramming and analysis.
Particle Number Checking
The code uses a number of independent checks to ensure that the events that Pythia is generating have the anticipated structure. In particular, it is important to check that the numbers of particles of each kind in an event are correct. For semileptonic ttH we expect to find one top, one tbar, one each of Wplus and Wminus (or two, for H->bbar), one lepton and its associated neutrino (or three leptons, for H->leptons), one (or two) each of b and bbar. The code has been developed to focus specifically on semileptonic ttH with H-->b/bbar, but can be modified for studies involving other Higgs production and decay modes.
Particle Parentage Checking
It is also important to check that the particles in each event correspond to the expected pattern of decays (i.e. parent/daughter particles). For instance, one expects the lepton in a semileptonic ttH process to appear as a result of the weak decay of a W (or from H->ll) and this condition can be imposed on events, so together with the independent counting of particles it is possible to impose the condition (for example) that any acceptable event must contain exactly one lepton with a W parent (of appropriate charge).