Using Pythia6 with Root

From: Rene Brun (Rene.Brun@cern.ch)
Date: Mon Feb 14 2000 - 09:21:35 MET


With Root version 2.23, a new class TPythia6 has been introduced.
Thanks to Pasha for his contribution.
As Pasha indicates in his mail below, TPythia6 expects a special Fortran
routine to be used with the original Fortran package pythia6.
I forgot to add in the release notes that a tar file containing
the Pythia6 source file + the necessary small files to build the
corresponding shared library are available on the Root web site at:
   ftp://root.cern.ch/root/pythia6.tar.gz

This tar file contains examples of makefiles to build the pythia libs.
Under Linux, the script building pythia is the following:
cat makePythia6.linux
# /bin/sh
g77 -c pythia6131.f
g77 -c  -fno-second-underscore tpythia6_called_from_cc.F
g77 -c  -fno-second-underscore pythia6_common_block_address.F
echo 'void MAIN__() {}' >main.c
gcc -c main.c
gcc -c pythia6_address.c
g77 -shared -Wl,-soname,libPythia6.so -o libPythia6.so \
 main.o pythia6_address.o tpythia6_called_from_cc.o \
 pythia6_common_block_address.o pythia6131.o

where main.c, pythia6_address.c, tpythia6_called_from_cc.F and
pythia6_common_block_address.F are special additions to the standard
pythia6 fortran source to be used from C++ and Root.

To use TPythia6 in Root, one has to link the libraries in the following
order:
  gSystem->Load("libPythia6");
  gSystem->Load("libEG");
  gSystem->Load("libEGPythia6");


Rene Brun


> Dear Root Developers,
> 
> I tried to start using TPythia6 library coming with ROOT distribution
> and found several problems:
> - there is a FORTRAN routine missing in it. This routine
>   is supposed to return the addresses of the FORTRAN common-blocks to provide
>   access to them from C++ side;
> - the declaration of /HEPEVT/ coming with ROOT distribution and
>   used by TGenerator corresponds to Pythia 5.7 and conflicts with
>   Pythia 6.x. Any attempt to use TPythia6 class would now lead to a seg.fault or
>   smth similar
>                                 Thanks for your help, Pasha



This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:18 MET