Combining Root and Pythia 8 on lxplus

Hi there,

I am trying to combine Root and Pythia 8 on my lxplus account. Pythia and Root work both fine by themselves, but the combination of the two doesn’t work. I tried to import the Root libraries in Pythia but I get several errors.

To get Root working on lxplus, I use the commands:

setenv ROOTSYS /afs/ set path= ( $path $ROOTSYS/bin )

I have installed Pythia in my own directories:

I followed an example of what to change in the Pythia Makefile to be able to import Root, but unfortunately it doesn’t work. This example said that I needed to include the following lines in my Pythia .cc-file:

#include "TApplication.h" #include "TROOT.h"

plus some other includes (TCanvas, TH2F, …). The main part has been changed to:

int main(int argc, char *argv[]) { TApplication* rootapp = new TApplication("app", &argc, argv); ...(code)... rootapp->Terminate(); return 0;

My Makefile was the standard Pythia 8 examples makefile, plus the added lines:

COMPILER = g++ Wno-long-long -g -Well CFLAGS = $(shell root-config --cflags) LIBS = $(shell root-config --libs) -lPhysics -lThread -lMinuit -lHtml -lVMC -lEG -lGeom

In my pythia8140/examples directory I then give the commands:

and I get the message:

rm -rf ../bin rm -rf *.exe rm -f *~; rm -f \#*; rm -f core* g++ -O2 -ansi -pedantic -W -Wall -Wshadow -I../include -o ../bin/CERN_pion_kaon_ratio.exe -pthread -I/afs/ -L/afs/ -lCore -lCint -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -pthread -lm -ldl -rdynamic -lPhysics -lThread -lMinuit -lHtml -lVMC -lEG -lGeom \ -L../lib/archive -lpythia8 -llhapdfdummy In file included from /afs/, from /afs/, from /afs/ warning: use of C99 long long integer constant /afs/ error: ISO C++ does not support ‘long long’ /afs/ error: ISO C++ does not support ‘long long’

Is this a problem I can solve by just changing a few lines, or do I need a different method to combine Pythia and Root? Any help would be really appreciated.

use ROOT version 5.26 or better 5.27/04