You can get the Java interface from pythiaJava.tar.gz.
Put it somewhere and extract with
tar -xvf <filename.tar.gz> This will create a directory
evtgen that contains the files.
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 the LD_LIBRARY_PATH variable contains the current directory. (.)
Make sure you have the pythia version you want
The distribution contains the file
evtgenpythiaisajet/pythia6xxx.f. You can replace that file with your favourite version 6.x of Pythia.
Build the program
The program is built in the evtgenpythiaisajet subdirectory.
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
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
In tests, we found that the options
-O2 -march=nocona lead to significant performance improvements.
Running the program
First drop into a bash shell (if you are not already, which would be a shame). Then
Now you can just run the program with
java EvtGen 10 to generate 10 files.
The program is going to read the files
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.