Get the Delphes tar file:

wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.4.1.tar.gz

Add the following lines to your .bashrc file in your home directory:

export ROOTSYS=/usr/local/cernroot/rootv5.34/root
export PATH=$PATH:$ROOTSYS/bin
export LD_LIBRARY_PATH=$ROOTSYS/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ROOTSYS/lib:$PYTHONDIR/lib:/opt/rh/python27/root/usr/lib64

Then "source .bashrc" so your shell knows where to find Root, and unpack:

tar -xvzf  Delphes-3.4.1.tar.gz

Now cd to the delphes directory and make (it takes several minutes):

cd Delphes-3.4.1
make

While that's making (or if it's already made), go to your MG5_aMC@NLO directory and open up a script to generate pp->ttbar:

cd /home/potter/MG5_aMC_v2_6_1
emacs lhc_pptottbar.dat &

In this put some lines like (set lpp1,2=1 means proton pdfs):

import model sm
generate p p > t t~
output lhc_pptottbar
launch
shower=Pythia8
set lpp1 1
set lpp2 1
set ebeam1 6500
set ebeam2 6500
set nevents 100
set iseed 1

So now we're going to generate 100 pp->ttbar events with MG5, which then asks Pythia8 to decay and hadronize the tops:

./bin/mg5_aMC lhc_pptottbar.dat

That should take about a minute. Now cd to the output directory:

cd lhc_pptottbar/
ls

You should see a whole bunch of stuff related to the event generation. Lets look for the file Delphes needs:

cd Events/run_01/
ls
gunzip tag_1_pythia8_events.hepmc.gz

Since MG5 automatically compresses the .hepmc file, we need to uncompress it before giving it to Delphes. Now move the .hepmc file to your Delphes directory and go there too:

mv tag_1_pythia8_events.hepmc /home/potter/Delphes-3.4.1
cd /home/potter/Delphes-3.4.1

We're now ready to run Delphes on our small ttbar event file. Let's use the ATLAS detector model in cards/delphes_card_ATLAS.tcl (scroll through this file later to see what it is doing!):

./DelphesHepMC cards/delphes_card_ATLAS.tcl ttbar.root tag_1_pythia8_events.hepmc

all in one line. That should take about five seconds to do 100 events. Full simulation would take an hour or more. Now view the file in Root:

root -l ttbar.root
root [1] TBrowser b

Scroll through and enjoy plots for electrons, muons, jets, missing ET and a whole bunch of other stuff we'll talk about later!