2008.07.20 How to install Pythia 6 and 8 on your laptop?

Under:

 

How to install Pythia 6 and 8 on your laptop?


    • Install Pythia 6 and build the interface to ROOT

    Download the file pythia6.tar.gz from the ROOT site ftp://root.cern.ch/root/pythia6.tar.gz and unpack.
    tar zxvf pythia6.tar.gz
    
    A directory pythia6/ will be created and some files unpacked into it. Cd into it and compile the Pythia 6 interface to ROOT.
    cd pythia6/
    ./makePythia6.linux
    
    For more information, consult Installing ROOT from Source and skip to the section Pythia Event Generators.

    • Install Pythia 8

    Download the latest version of Pythia from http://home.thep.lu.se/~torbjorn/Pythia.html and unpack.
    tar zxvf pythia8108.tgz
    
    A directory pythia8108/ will be created. Cd into it and follow the instructions in the README file to build Pythia 8. Set the environment variables PYTHIA8 and PYTHIA8DATA (preferably in /etc/profile.d/pythia8.sh):
    export PYTHIA8=$HOME/pythia8108
    export PYTHIA8DATA=$PYTHIA8/xmldoc
    
    Run configure with the option for shared-library creation turned on.
    ./configure --enable-shared
    make
    

    • Install ROOT from source

    Download the source code for ROOT from http://root.cern.ch/ and compile.
    tar zxvf root_v5.20.00.source.tar.gz
    cd root/
    ./configure linux --with-pythia6-libdir=$HOME/pythia6 \
      --enable-pythia8 \
      --with-pythia8-incdir=$PYTHIA8/include \
      --with-pythia8-libdir=$PYTHIA8/lib
    make
    make install
    
    Set the following environment variables (preferably in /etc/profile.d/root.sh):
    export ROOTSYS=/usr/local/root
    export PATH=$PATH:$ROOTSYS/bin
    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib:/usr/local/pythia6
    export MANPATH=$MANPATH:$ROOTSYS/man
    
    You should be good to go. Try running the following Pythia 6 and 8 sample macros:
    root $ROOTSYS/tutorial/pythia/pythiaExample.C
    root $ROOTSYS/tutorial/pythia/pythia8.C
    

Pibero Djawotho
Last updated on Sun Jul 20 23:35:39 EDT 2008