Example 1: Quick start with Delphes =================================== 1. Connect to ipnorsay.in2p3.fr: ssh -Y username@ipnorsay.in2p3.fr 2. Setup ROOT environment variables: use root 3. Commands to get the code: wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.1.2.tar.gz tar -zxf Delphes-3.1.2.tar.gz 4. Commands to compile the code: cd Delphes-3.1.2 make -j 4 5. Finally, we can run Delphes: ./DelphesSTDHEP 6. and simulate some Z -> e-e+ events: ./DelphesSTDHEP examples/delphes_card_CMS.tcl step_1.root /projet/pth/delphes/Samples/z_ee.hep or curl -s http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz | gunzip | ./DelphesSTDHEP examples/delphes_card_CMS.tcl step_1.root Example 2: Simple analysis using TTree::Draw ============================================ Now we can start ROOT and look at the data stored on the tree 1. Start ROOT and load shared library: root -l gSystem->Load("libDelphes"); 2. Open ROOT tree file and do some basic analysis using Draw or TBrowser: TFile::Open("step_1.root"); Delphes->Draw("Electron.PT", "Electron.PT > 20"); TBrowser browser; Note 1: Delphes - tree name, it can be learnt e.g. from TBrowser Note 2: Electron - branch name; PT - variable (leaf) of this branch Complete description of all branches can be found in Delphes/doc/RootTreeDescription.html This file is also available via web: http://cp3.irmp.ucl.ac.be/downloads/RootTreeDescription.html Example 3: Macro-based analysis =============================== Analysis macro consists of histogram booking, event loop (histogram filling), histogram display Delphes/examples contains macros Example1.C, Example2.C and Example3.C 1. Here are commands to run a macro reconstructing the Z boson invariant mass: cp /projet/pth/delphes/Tutorial/InvariantMass.C . root -l -b -q InvariantMass.C'("step_1.root", "step_1_plots.root")' The step_1_plots.root file contains 1 histogram of the e-e+ invariant mass. root step_1_plots.root TBrowser browser; Example 4: Modifying configuration file ======================================= 1. Change the electron energy smearing in the configuration file: edit examples/delphes_card_CMS.tcl replace resolution formula for electrons with: # resolution formula for electrons set ResolutionFormula { (abs(eta) <= 3.0) * sqrt(energy^2*0.007^2 + energy*0.07^2 + 0.35^2) + (abs(eta) > 3.0 && abs(eta) <= 5.0) * sqrt(energy^2*0.107^2 + energy*2.08^2) } 2. rerun Delphes: ./DelphesSTDHEP examples/delphes_card_CMS.tcl step_2.root /projet/pth/delphes/Samples/z_ee.hep 3. redo the invariant mass histograms: root -l -b -q InvariantMass.C'("step_2.root", "step_2_plots.root")' 4. compare histograms: root -l step_1_plots.root step_2_plots.root ((TH1F *)_file0->Get("mee"))->SetLineColor(kBlue); ((TH1F *)_file1->Get("mee"))->SetLineColor(kRed); _file0->Get("mee")->Draw(); _file1->Get("mee")->Draw("SAME"); In step_1 electron energy resolution is given by tracker+ECAL, in step_2 only ECAL.