Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using Pythia 8 on the UCD Linux server with ROOT

Similar presentations


Presentation on theme: "Using Pythia 8 on the UCD Linux server with ROOT"— Presentation transcript:

1 Using Pythia 8 on the UCD Linux server with ROOT
Pythia Mini-Session Using Pythia 8 on the UCD Linux server with ROOT

2 Setting up: Getting code
In your home directory, create a working directory for the Pythia installation mkdir pythia Download Pythia from the Pythia website. Note: Pythia tested and works. Later version tried and had problems, stick to 8.108 Zipped Tarball: pythia8108.tgz After unzipping and extracting tarball, should have a directory called “pythia8108” 1/13/2019 Manuel Calderón de la Barca Sánchez

3 Interlude before setup: Documentation
Documentation area: pythia8108/htmldoc/ Web documentation: Open the file Welcome.html in browser PDF documentation: pythia8100.pdf Of intereset: “Study output” Pythia Classes to manipulate the generated particles, momenta, decays etc. “Setup Run Tasks” Setting up the collision and beam parameters Turning on the relevant processes processes (e.g. heavy quark production) Phase space cuts, couplings, scales 1/13/2019 Manuel Calderón de la Barca Sánchez

4 Manuel Calderón de la Barca Sánchez
Compiling Pythia Read the README files! Basic installation: type ./configure type make The libraries are now built! 1/13/2019 Manuel Calderón de la Barca Sánchez

5 Running the first example
go to the examples directory There are 27 programs already given as examples. Check the README file (in the examples area) Start with main01.cc Check that it works: Type: make main01 Type: ./main01.exe 1/13/2019 Manuel Calderón de la Barca Sánchez

6 Compiling: Makefile compilation
Default: main00-main27 are compiled with: ../$(LIBDIRARCH)/libpythia8.a @mkdir -p ../$(BINDIR) $(CXX) $(CXXFLAGS) -I../$(INCDIR) -o \ -L../$(LIBDIRARCH) -lpythia8 -llhapdfdummy @ln -fs Where config.mk file is: SHELL = /bin/sh ARCH = Linux-gcc4 MYLCGPLATFORM = slc4_ia32_gcc34 SHAREDLIBS = no FC = gfortran CC = gcc FFLAGS = -O2 CFLAGS = -O2 CXXFLAGS = -O2 -ansi -pedantic -W -Wall -Wshadow FLIBS = -lgfortran -lgfortranbegin 1/13/2019 Manuel Calderón de la Barca Sánchez

7 Manuel Calderón de la Barca Sánchez
To use ROOT: Changes I Remove “pedantic” compilation flag in config.mk file. Rtypes.h uses long long type, not supported by ISO C++. Compiler needs to know ROOT includes, compiling flags, library path Add following to Makefile ROOTINC=($ROOTSYS)/include ROOTCFLAGS = -pthread -m32 -I/nuclearsoft/root/include ROOTLIBS = -L/nuclearsoft/root/lib -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic CXXFLAGS += $(ROOTCFLAGS) 1/13/2019 Manuel Calderón de la Barca Sánchez

8 Manuel Calderón de la Barca Sánchez
To use ROOT: Changes II Make use of main00 Makefile supports main00, but it is not given as example. Copy main01 to main00 and work from main00 Add specific instructions in Makefile for main00 main00 : \ ../$(LIBDIRARCH)/libpythia8.a @mkdir -p ../$(BINDIR) $(CXX) $(CXXFLAGS) -I../$(INCDIR) -o \ -L../$(LIBDIRARCH) -lpythia8 -llhapdfdummy\ $(ROOTLIBS) @ln -fs 1/13/2019 Manuel Calderón de la Barca Sánchez

9 A closer look at the first example
main00 should now be a copy of main01 main01 did the following: Turned on all QCD Hard processes Sampled phase-space with pTHat > 20 Check web documentation Phase space cuts, cuts in 2 → 2 processes pTHatMin : The minimum invariant pT intializes Pythia for p+p collisions at 14 TeV creates a Pythia Histogram to save the output of the charged multiplicity Makes a loop to generate 100 events Inside loop: Generates the next event lists the first event Loops over all particles in the event record, counts all final state particles that are charged fills the multiplicity histogram for the event Prints the statistics of the event (cross section, e.g.) Prints the ascii histogram to the terminal 1/13/2019 Manuel Calderón de la Barca Sánchez

10 Modification to use ROOT histogram
Includes: #include "TROOT.h" #include "TFile.h" #include "TH1.h" Add root histogram (instead of Pythia histogram) TH1D* multHist = new TH1D("multHist","Multiplicity",100,-0.5,99.5); Can also change pTHatMin to 1 for MinBias Fill histogram (instead of Pythia histogram) multHist->Fill(nCharged); Write output TFile* outFile = new TFile("pythiaOutputHistosTest.root","RECREATE"); multHist->Write(); outFile->Close(); 1/13/2019 Manuel Calderón de la Barca Sánchez


Download ppt "Using Pythia 8 on the UCD Linux server with ROOT"

Similar presentations


Ads by Google