Pythia 8

Posted on October 10, 2009. Filed under: Uncategorized | Tags: , |

I (finally !) tried out Pythia 8. I went directly to follow the instructions in the worksheet which has been at use at summer schools. Indeed, after an introduction on page 1 I found installation instructions on page 2 and an application example on page 3. The building literally took only a handful of minutes.

I pasted the ‘hello world’ example from the worksheet into a text editor (in a separate directory) and put together a three line makefile to get this to build and run. I got:

 PYTHIA Error: settings file ../xmldoc/Index.xml not found
 PYTHIA Abort from Pythia::Pythia: settings unavailable   
 PYTHIA Abort from Pythia::init: initialization failed

Ok, I admit I did deviate from the standard instructions, so it’s time to search for ‘xml’ in the README file. It turns out that there are two ways of specifying the location of the wanted xml files, one of them is by setting the environment variable PYTHIA8DATA to point to the xmldoc directory of the Pythia installation. Now I get the familiar event listing — Pythia 8 is up and running in less than 15 minutes !

The following pages in the worksheet gives code snippets on how to do standard things such as accessing the id’s of the generate particles etc.

In the past, I used to work with a C++ wrapper around Pythia 6 (which is Fortran) and I think I even rewrote such a wrapper once myself. No need to do so any more: Pythia 8 comes with its own classes for particles and four-vectors (Vec4) which e.g. has an overloaded operator+ allowing to calculate invariant masses of multiple particles very easily.

I found 36 examples in the examples subdirectory of the Pythia installation, ranging from 33 to 349 lines. I always liked working examples as they provide a good starting point for your own programs and well written example code is often faster to read than instructions. Already in the first example (main01.cc) I found how to get all final (non-decayed ?) charged particles  and how to fill histograms with Pythia’s own histogramming code.

PYTHIA Error: settings file ../xmldoc/Index.xml not found
PYTHIA Abort from Pythia::Pythia: settings unavailable
PYTHIA Abort from Pythia::init: initialization failed

Advertisements

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

One Response to “Pythia 8”

RSS Feed for Andre Holzner's Blog Comments RSS Feed

hi!
i am using pythia8. But i need to link it with root. For that i reffered to
http://home.thep.lu.se/~torbjorn/php8130/ROOTusage.php?filepath=files/

but i am having problem when i install root from source. Is there any other way i can do this?


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: