Fork the code from Git here (or here for the official version) before cloning it to your local directory.
Do yourself a favour and be organized:
mkdir $HOME/Phase2UpgradeStudies cd $HOME/Phase2UpgradeStudies
Clone your personal copy of the repository
git clone git@github.com:$USERNAME/Delphes
Make an alias to the main repository so you can fetch the latest changes
git remote add official_delphes git@github.com:sethzenz/Delphes //or git@github.com:delphes/delphes for the official
Build
cd Delphes/ ./configure make
Congratulations, you are now ready to run Delphes! Depending on what type of input files you want to use, different codes are run. For HepMC files the syntax is
./DelphesHepMC Datacard.tcl output.root input.hepmc
Three arguments must be passed: the data card containing the detector configuration, the output file and the input MC file.
Try your setup with some Z→ee events and an example data card:
wget http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz gunzip z_ee.hep.gz ./DelphesSTDHEP examples/delphes_card_CMS.tcl delphes_output.root z_ee.hep
Examine the output:
root -l gSystem->Load("libDelphes"); TFile::Open("delphes_output.root"); Delphes->Draw("Electron.PT"); TBrowser browser;
The different branches of the “Delphes” tree are listed here. For macro based analysis look in the examples/ directory. Example1.C gives a simple example of histogram booking, event loop and histogram display. Check the WorkBook for more advanced examples.