Preliminary
You can get the Java interface from pythiaJava.tar.gz.
Put it somewhere and extract with tar -xvf <filename.tar.gz>
Please also make sure that you have a proper version of a Java compiler with the JNI interface and that the environment variable $JDK_ROOT points to it.
Make sure you have the pythia version you want
The distribution contains the file evtgenpythiaisajet/pythia6228.f
. You can replace that file with your favourite version of Pythia.
Build the program
The program is built in the evtgenpythiaisajet subdirectory.
gcc3
If you have an older version of gcc, you most likely need to link against the g2c library. If you have the library, execute
g++ -shared -I$JDK_ROOT/include -I$JDK_ROOT/include/linux *.cpp *.f -lg2c -o ../libpythiaevtgen.so
gcc4
Newer versions of gcc come with the gfortran library. You can build the program with
g++ -shared -I$JDK_ROOT/include -I$JDK_ROOT/include/linux *.cpp *.f -lgfortran -o ../libpythiaevtgen.so
Running the program
First drop into a bash shell (if you are not already, which would be a shame). Then source setup.sh
.
Now you can just run the program with java EvtGen 10
to generate 10 files.
The program is going to read the files pythia.cmd
and pythia.cards
. The outputfile is events.stdhep. If you want it to use a different generator, run the command like this. java EvtGen 10 <name of lib>
where <name of lib
is resolved to the name lib<name of lib>evtgen.so
.