Fork me on GitHub

Version 6 (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' (m= 2 TeV) to WW and dijet (pT > 1 TeV) events in stdhep format

wget 
wget
gunzip pp_zp_ww.hep.gz
gunzip pp_jj.hep.gz

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 out_pp_zp_ww.root pp_zp_ww.hep

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

root -l  out_pp_zp_ww.root
TBrowser t;

In the browser, double click on the "out_pp_zp_ww.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("Jet.Mass","Electron_size + Muon_size == 1");
    Delphes->Draw("Jet.Mass","Electron_size + Muon_size == 1 && Jet.PT > 500");
    

Objects are already ordered in PT, you can then plot the leading jet observables in this way:

Delphes->Draw("Jet[0].Mass");
Delphes->Draw("Jet[0].PT");

For more information on ROOT trees:

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

Part II - Understand and modify the configuration file

The delphes card can be schematically divided in three parts: The ExecutionPath is where the simulation/reconstruction sequence of modules is defined The list of modules configurations. The TreeWriter, where the user defines which objects he stores in the output tree.

You can find an explanation for most Delphes modules here: https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/Modules

  1. Open the card cards/delphes_card_CMS.tcl with your favorite editor and try to make sense of it. 2.
  1. The present version of the card produces a Jet collection without computing and storing in the output substructure variable. Add a new collection of fat-jets called FatJet in the card. In order to do this you will need to first call the process in the ExecutionPath:
    set ExecutionPath {
     ...
     FastJetFinder
     FatJetFinder
     ...  
    }
    
  2. Then configure the FastJetFinder module by switching on the options for substructure:
    ############
    # Fat Jet finder
    ############
    
    module FastJetFinder FatJetFinder {
      set InputArray EFlowMerger/eflow
    
      set OutputArray jets
    
      # algorithm: 1 CDFJetClu, 2 MidPoint, 3 SIScone, 4 kt, 5 Cambridge/Aachen, 6 antikt 
      set JetAlgorithm 5 
      set ParameterR 0.8
    
      set ComputeNsubjettiness 1
      set Beta 1.0
      set AxisMode 4
    
      set ComputeTrimming 1
      set RTrim 0.2
      set PtFracTrim 0.05
    
      set ComputePruning 1
      set ZcutPrun 0.1
      set RcutPrun 0.5
      set RPrun 0.8
    
      set ComputeSoftDrop 1
      set BetaSoftDrop 0.0
      set SymmetryCutSoftDrop 0.1
      set R0SoftDrop 0.8
    
      set JetPTMin 20.0
    }
    
  3. Finally, write the fat-jet collection in your output tree by adding it to the TreeWriter:
module TreeWriter TreeWriter {
  ...
  add Branch JetEnergyScale/jets Jet Jet
  add Branch FatJetFinder/jets FatJet Jet
  ...
}
  1. Now run Delphes with the newly modified card with jet substructure, on both the dijet and Z' samples:
    ./DelphesSTDHEP cards/delphes_card_CMS.tcl out_pp_zp_ww_js.root pp_zp_ww.hep
    ./DelphesSTDHEP cards/delphes_card_CMS.tcl out_pp_jj_js.root pp_jj.hep
    
  1. Open the files with ROOT TBrowser as in the Getting Started section, and make sure that the new jet substructure variables are properly stored.

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.