Fork me on GitHub

Version 3 (modified by Michele Selvaggi, 8 years ago) ( diff )

--

Delphes Tutorial - MC4BSM July 2016

Pre-requisites

To successfully build Delphes the following prerequisite packages should be installed:

  • gcc/tcl:

For linux users gcc/tcl should be already installed. For Mac users you should install XCode.

  • ROOT:

can be downloaded from https://root.cern.ch/downloading-root Go on latest release, and download a version under "Binary distributions".

Once it is installed, type:

source [path_to_installation]/root/bin/thisroot.sh

Then simply type in a terminal:

echo $ROOTSYS

If a path is shown then root is properly installed.

Part I - Getting Started

0) Create a tutorial directory:

mkdir DelphesTutorial
cd DelphesTutorial

1) Get Delphes:

git clone https://github.com/delphes/delphes.git
cd delphes

or, if you don't have "git" installed, simply type:

wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.3.2.tar.gz
tar -zxf Delphes-3.3.2.tar.gz
mv Delphes-3.3.2 delphes
cd delphes

2) Install it:

./configure
make -j 4

3) Download Z' to WW events in stdhep format

gunzip ../MG5_aMC_v2_4_0/pp_h_eemm_res/Events/run_01/tag_1_pythia_events.hep.gz
gunzip ../MG5_aMC_v2_4_0/pp_h_eemm_res/Events/run_02/tag_1_pythia_events.hep.gz
mkdir -p input
mv ../MG5_aMC_v2_4_0/pp_h_eemm_res/Events/run_01/tag_1_pythia_events.hep input/pp_h_eemm_m125.hep
mv ../MG5_aMC_v2_4_0/pp_h_eemm_res/Events/run_02/tag_1_pythia_events.hep input/pp_h_eemm_m750.hep

4) Finally, let's run Delphes. If the compilation went right, you should have three executables:

  • DelphesLHEF -> should not be used
  • DelphesHepMC -> to be used on HepMC input format (*.hepmc)
  • DelphesSTDHEP -> to be used on STDHEP input format (*.hep)

Type for instructions (note that output file comes before input file):

./DelphesSTDHEP

To run on our your input file, type:

./DelphesSTDHEP cards/delphes_card_CMS.tcl delphes_output_m125.root input/pp_h_eemm_m125.hep

5) Open freshly produced Delphes output with ROOT, and explore it.

root -l delphes_output_m125.root
TBrowser t;

In the browser, double click on the "delphes_output_m125.root", and then on the "Delphes" tree. Play around by double clicking on the various branches/observables.

You can then play plot important observable with a simple selection with the following syntax:

Delphes->Draw("Muon.PT", "Muon.PT > 20");
Delphes->Draw("Electron.PT", "Electron.PT > 20");
  • Note 1: Delphes - tree name, it can be learnt e.g. from TBrowser
  • Note 2: Muon/Electron - branch name; PT - variable (leaf) of this branch
    Delphes->Draw("Muon.Eta", "Muon.PT > 20");
    Delphes->Draw("Electron.Eta", "Electron.PT > 20");
    Delphes->Draw("Jet_size","Electron_size > 1 && Muon_size > 1");
    

Objects are already ordered in PT, you can then plot leading ele/mu in this way:

Delphes->Draw("Muon[0].PT", "Muon.PT > 20");
Delphes->Draw("Electron[0].PT", "Electron.PT > 20");

For more information on ROOT trees:

http://cp3.irmp.ucl.ac.be/downloads/RootTreeDescription.html

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.