-- KrystsinaPetukhova - 2020-06-26

To install Pythia8 to run jointly with ROOT.

The guidelines below were used to setup Pythia8 to run concorrently with ROOT on a local PC.

1. To setup Pythia8.

To download Pythia8 source from the official website.

I have implemented one of the most up-to-date versions.

cd pythia8244/

.configure

// Optionally

// .configure

make

To change ~/.bashrc and specify folders for Pythia8 libraries.

export PYTHIA8=/the/absolute/path/to/the/folder/where/Pythia8/located
export PYTHIA8DATA=/the/absolute/path/to/the/folder/where/Pythia8/located/share/Pythia8/xmldoc

E.g., as it was on my PC,

export PYTHIA8=/home/krystsina/Downloads/pythia8244
export PYTHIA8DATA=/home/krystsina/Downloads/pythia8244/share/Pythia8/xmldoc

2. To setup ROOT.

You may want to download and complie ROOT CERN from the scratch so that it runs with Pythia8 smootly.

mkdir ROOT && cd ROOT

git clone http://root.cern.ch/git/root.git

mv root root-sources

mkdir root-build

mkdir root-install

cd root-sources/

I have checked out one of the most-up-date stable ROOT versions ROOT 6.21

git checkout -b v6-21-02 v6-21-02

cd ../root-build/

/// ./configure --all --with-gsl-incdir="/usr/local/include" --with-gsl-libdir="/usr/local/lib" --enable-pythia8 --with-pythia8-incdir=$PYTHIA8/include --with-pythia8-libdir=$PYTHIA8/lib

cmake -DCMAKE_INSTALL_PREFIX=$HOME/ROOT/root-install -DPYTHIA8_DIR=$PYTHIA8 -DPYTHIA8_INCLUDE_DIR=$PYTHIA8/include -DPYTHIA8_LIBRARY=$PYTHIA8/lib/libpythia8.so -DGSL_DIR=/usr/local -Dbuiltin_xrootd=ON -Droofit=ON -Dpythia8=ON ../root-sources

cmake --build . --target install -- -j4

To change ~/.bashrc and specify folders for ROOT libraries.
export ROOTSYS=/home/krystsina/ROOT/root-build #/usr/local/root
export PATH=$ROOTSYS/bin:$PATH
export PYTHONDIR=$ROOTSYS
export LD_LIBRARY_PATH=$ROOTSYS/lib:$PYTHONDIR/lib:$ROOTSYS/bindings/pyroot:$LD_LIBRARY_PATH
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH:$ROOTSYS/bindings/pyroot

3. To create joint disctionaries and libraries.

cd $PYTHIA8

mkdir PythiaDict && cd PythiaDict

wget http://www.graverini.net/elena/content/repo/pythiaROOT.h

wget http://www.graverini.net/elena/content/repo/pythiaLinkdef.h

rootcint -f pythiaDict.cxx -I$PYTHIA8/include pythiaROOT.h pythiaLinkdef.h

g++ -I$PYTHIA8/include `root-config --glibs` `root-config --cflags` -shared -fPIC -o pythiaDict.so pythiaDict.cxx

Edit | Attach | Watch | Print version | History: r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r1 - 2020-06-26 - KrystsinaPetukhova
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2023 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback