[[TOC]] = 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 delphes_output_pp_zp_ww.root pp_zp_ww.hep }}} 5) Open freshly produced Delphes output with ROOT, and explore it. {{{ root -l delphes_output_pp_zp_ww.root TBrowser t; }}} In the browser, double click on the " delphes_output_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