How to install PYTHIA and ISAJET and Link Them

Getting the Code

You can download the code from here event_generators.tar.gz.

Preparing Installation

Once you have the tar file do the followings:
[joe@machine]$ tar -zxvf event_generators.tar.gz
[joe@machine]$ cd event_generators
[joe@machine]$ mkdir lib  obj   

ISAJET Installation

Let's start with ISAJET installation.
[joe@machine]$ cd isajet_769 
Edit the Makefile (especially CERN related parts). However if you have afs you don't need to change anything.
[joe@machine]$ make 
If everything goes right we have now libisajet.a in this directory. Move it to the obj directory.
[joe@machine]$ mv libisajet.a ../lib/ 
[joe@machine]$ cd .. 

PYTHIA Installation

Now we can start to compile PYTHIA. In PYTHIA code there are some dummy routines to make PYTHIA usable with other event generators. In our case we are trying to make interface with ISAJET. So we need to delete these dummy routines in pythia. We already took out those PYDATA subroutine from PYTHIA. In pythia_6227 directory we have all these things done.
[joe@machine]$ cd pythia_6227 
[joe@machine]$ g77 -c pythia6227_isajet.f 
[joe@machine]$ g77 -c pydata.f 
[joe@machine]$ mv pythia6227_isajet.o ../obj/ 
[joe@machine]$ mv pydata.o ../obj/ 
Now we can go to obj directory and extract sugra.o and visaje.o from lib/libisajet.a.
[joe@machine]$ cd ../obj 
[joe@machine]$ ar -x ../lib/libisajet.a sugra.o 
[joe@machine]$ ar -x ../lib/libisajet.a visaje.o 
[joe@machine]$ ar -d ../lib/libisajet.a  sugra.o
[joe@machine]$ ar -d ../lib/libisajet.a  visaje.o
Basically we are done and we can use some examples now.

Running PYTHIA

When we created event_generatos directory we also had examples and datacards directories. Inside the examples directory we have one code.com script which compiles and creates executable for user routines. All you need is to edit path name for your event_generators directory.
[joe@machine]$ cd examples 
[joe@machine]$ code.com main61 
You must have main61.exe and you can run it now:
[joe@machine]$ ./main61.exe > log.txt
One can also use datacards to run PYTHIA.
[joe@machine]$ code.com datacard_ex
[joe@machine]$ ./datacard_ex.exe < ../datacards/test.input > log.txt

Last updated: January 06, 2005.
This document is maintained by Taylan Yetkin (tyetkin@fnal.gov) and Hans Wenzel (wenzel@fnal.gov)

Valid to XHTML 1.1, CSS