ROOT Version: rootv6.12.06
Platform: Ubuntu 16.04
My primary motive is to run Pythia8 directly using ROOT6.12.06. In better word, I want to run a pythia8 code and plot the data, all using a single macro and running it in ROOT.
So, what I did is mentioned step by step:
I installed ROOT 6.12.06 successfully in the location:
/usr/local/root
and added the following lines at the end of the .bashrc file, as mentioned in the ROOT readme file:
export ROOTSYS=/usr/local/root
export PATH=$ROOTSYS/bin:$PATH
export PYTHONDIR=$ROOTSYS
export LD_LIBRARY_PATH=$ROOTSYS/lib:$ROOTSYS/bindings/pyroot:$LD_LIBRARY_PATH
export PYTHONPATH=$ROOTSYS/lib:$PYTHONPATH:$ROOTSYS/bindings/pyroot
After that, I could open ROOT from any directory successfully and execute simple ROOT macros without any error.
Then, I installed Pythia 8.186 successfully, following instructions mentioned in the Lund University webpage, in the location:
/home/hp/Pythia8Progs/pythia8186
and as per this link, I further added these lines to my .bashrc file:
source /usr/local/root/bin/thisroot.sh
export PYTHIA8=/home/hp/Pythia8Progs/pythia8186
export LD_LIBRARY_PATH=$PYTHIA/lib:$LD_LIBRARY_PATH
Then I ran the pythia8.C file stored in the tutorials subdirectory of ROOT and this is the error that it showed:
root [6] .x pythia8.C
In file included from input_line_101:1:
/usr/local/root/tutorials/pythia/pythia8.C:23:10: fatal error: 'TPythia8.h' file not found
#include "TPythia8.h"
^~~~~~~~~~~~
/usr/local/root/tutorials/pythia/pythia8.C:41:4: error: unknown type name 'TPythia8'
TPythia8* pythia8 = new TPythia8();
^
/usr/local/root/tutorials/pythia/pythia8.C:41:28: error: unknown type name 'TPythia8'
TPythia8* pythia8 = new TPythia8();
I have done exactly what I have stated above. I don’t know what is wrong with the file and why it is not running. I presume somehow ROOT cannot find the TPythia8.h file stored in:
/usr/local/root/montecarlo/pythia8/TPythia8.h
But I don’t know how to correct it.
Please help. And suggest me if I can do anything else in order to run Pythia8 from ROOT6 itself.