| 4 | |
| 5 | == Pre-requisites == |
| 6 | |
| 7 | To successfully build Delphes the following prerequisite packages should be installed: |
| 8 | |
| 9 | - gcc/tcl: |
| 10 | |
| 11 | For linux users gcc/tcl should be already installed. For Mac users you should install XCode. |
| 12 | |
| 13 | - ROOT: |
| 14 | |
| 15 | can be downloaded from https://root.cern.ch/downloading-root |
| 16 | Go on latest release, and download a version under "Binary distributions". |
| 17 | |
| 18 | Once it is installed, type: |
| 19 | |
| 20 | {{{ |
| 21 | source [path_to_installation]/root/bin/thisroot.sh |
| 22 | }}} |
| 23 | |
| 24 | Then simply type in a terminal: |
| 25 | |
| 26 | {{{ |
| 27 | echo $ROOTSYS |
| 28 | }}} |
| 29 | |
| 30 | If a path is shown then root is properly installed. |
| 31 | |
| 32 | === Part I - Getting Started === |
| 33 | |
| 34 | 0) Create a tutorial directory: |
| 35 | |
| 36 | {{{ |
| 37 | mkdir DelphesTutorial |
| 38 | }}} |
| 39 | |
| 40 | 1) Get Delphes: |
| 41 | {{{ |
| 42 | git clone https://github.com/delphes/delphes.git |
| 43 | cd delphes |
| 44 | }}} |
| 45 | or, if you don't have "git" installed, simply type: |
| 46 | {{{ |
| 47 | wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.3.2.tar.gz |
| 48 | tar -zxf Delphes-3.3.2.tar.gz |
| 49 | mv Delphes-3.3.2 delphes |
| 50 | cd delphes |
| 51 | }}} |
| 52 | 2) Install it: |
| 53 | {{{ |
| 54 | ./configure |
| 55 | make -j 4 |
| 56 | }}} |
| 57 | 3) Download Z' to WW events in stdhep format |
| 58 | {{{ |
| 59 | gunzip ../MG5_aMC_v2_4_0/pp_h_eemm_res/Events/run_01/tag_1_pythia_events.hep.gz |
| 60 | gunzip ../MG5_aMC_v2_4_0/pp_h_eemm_res/Events/run_02/tag_1_pythia_events.hep.gz |
| 61 | }}} |
| 62 | {{{ |
| 63 | mkdir -p input |
| 64 | mv ../MG5_aMC_v2_4_0/pp_h_eemm_res/Events/run_01/tag_1_pythia_events.hep input/pp_h_eemm_m125.hep |
| 65 | mv ../MG5_aMC_v2_4_0/pp_h_eemm_res/Events/run_02/tag_1_pythia_events.hep input/pp_h_eemm_m750.hep |
| 66 | }}} |
| 67 | |
| 68 | 4) Finally, let's run Delphes. If the compilation went right, you should have three executables: |
| 69 | |
| 70 | - DelphesLHEF -> should not be used |
| 71 | - DelphesHepMC -> to be used on HepMC input format (*.hepmc) |
| 72 | - DelphesSTDHEP -> to be used on STDHEP input format (*.hep) |
| 73 | |
| 74 | Type for instructions (note that output file comes before input file): |
| 75 | {{{ |
| 76 | ./DelphesSTDHEP |
| 77 | }}} |
| 78 | To run on our your input file, type: |
| 79 | {{{ |
| 80 | ./DelphesSTDHEP cards/delphes_card_CMS.tcl delphes_output_m125.root input/pp_h_eemm_m125.hep |
| 81 | }}} |
| 82 | 5) Open freshly produced Delphes output with ROOT, and explore it. |
| 83 | {{{ |
| 84 | root -l delphes_output_m125.root |
| 85 | TBrowser t; |
| 86 | }}} |
| 87 | 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. |
| 88 | |
| 89 | You can then play plot important observable with a simple selection with the following syntax: |
| 90 | {{{ |
| 91 | Delphes->Draw("Muon.PT", "Muon.PT > 20"); |
| 92 | Delphes->Draw("Electron.PT", "Electron.PT > 20"); |
| 93 | }}} |
| 94 | - Note 1: Delphes - tree name, it can be learnt e.g. from TBrowser |
| 95 | - Note 2: !Muon/Electron - branch name; PT - variable (leaf) of this branch |
| 96 | {{{ |
| 97 | Delphes->Draw("Muon.Eta", "Muon.PT > 20"); |
| 98 | Delphes->Draw("Electron.Eta", "Electron.PT > 20"); |
| 99 | Delphes->Draw("Jet_size","Electron_size > 1 && Muon_size > 1"); |
| 100 | }}} |
| 101 | Objects are already ordered in PT, you can then plot leading ele/mu in this way: |
| 102 | {{{ |
| 103 | Delphes->Draw("Muon[0].PT", "Muon.PT > 20"); |
| 104 | Delphes->Draw("Electron[0].PT", "Electron.PT > 20"); |
| 105 | }}} |
| 106 | For more information on ROOT trees: |
| 107 | |
| 108 | http://cp3.irmp.ucl.ac.be/downloads/RootTreeDescription.html |
| 109 | |