Version 10 (modified by 5 years ago) ( diff ) | ,
---|
Student Project BND - Spa September 2019
Pre-requisites
To successfully run this tutorial the following prerequisite packages should be installed:
- gfortran/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".
- MadGraph5
a version of MG5 can be downloaded here: https://launchpad.net/mg5amcnlo/2.0/2.5.x/+download/MG5_aMC_v2.5.5.tar.gz
- Delphes
start from here: https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/QuickTour
- Pythia8:
following instructions from here (or using the Pythia8 installation in MadGraph):
https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/Pythia8
0) Download data sample
From the Delphes main directory, download the pseudo-data file data.root
:
wget -O data.root https://cernbox.cern.ch/index.php/s/MIjpBmZmXjHmNm2/download
1) Access information in the ROOT file
Open the ROOT file (ignore the various warnings) and visualize its content via the TBrowser.
root -l data.root TBrowser t;
Open the Delphes Tree and then Event branch (by double-clicking). How many events are in this dataset? Likewise explore the Tree content by looking at other branches.
Non trivial information can also be plotted from the command line.
TFile *f = TFile::Open("data.root"); TBrowser browser; f->Get("Delphes")->Draw("Muon.PT");
Some information is not directly accessible from the browser interface but can nevertheless be access via command line. Every Delphes object has a 4-vector (called P4()) member of type TLorentzVector (see here for documentation: https://root.cern.ch/doc/master/classTLorentzVector.html)
So for example to plot the magnitude of the 3-momenta of the jets, or the jet invariant mass:
f->Get("Delphes")->Draw("Electron.P4().P()"); f->Get("Delphes")->Draw("Jet.P4().M()");
In order to perform an event-loop with a more sophisticated event selection you will have to write a small python macro. This macro takes as input the data.root
and produce an output file that contains a couple of histograms. Download the file called example.py
, and run it via the command python example.py data.root hist_data.root
.
This will create a file called hist_data.root
that can be browsed as done earlier with data.root
.
Attachments (2)
- example.py (2.1 KB ) - added by 5 years ago.
- plotStack.py (8.9 KB ) - added by 5 years ago.
Download all attachments as: .zip