Changes in / [285752e:c1ea422] in git
- Files:
-
- 2 added
- 8 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
README.md
r285752e rc1ea422 5 5 6 6 More details can be found on the Delphes website http://cp3.irmp.ucl.ac.be/projects/delphes 7 8 Quick start with Delphes9 ========================10 11 Commands to get the code:12 13 ```14 wget http://cp3.irmp.ucl.ac.be/downloads/Delphes-3.4.1.tar.gz15 16 tar -zxf Delphes-3.4.1.tar.gz17 ```18 19 Commands to compile the code:20 21 ```22 cd Delphes-3.4.123 24 make25 ```26 27 Finally, we can run Delphes:28 29 ```30 ./DelphesHepMC31 ```32 33 Command line parameters:34 35 ```36 ./DelphesHepMC config_file output_file [input_file(s)]37 config_file - configuration file in Tcl format38 output_file - output file in ROOT format,39 input_file(s) - input file(s) in HepMC format,40 with no input_file, or when input_file is -, read standard input.41 ```42 43 Let's simulate some Z->ee events:44 45 ```46 wget http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz47 gunzip z_ee.hep.gz48 ./DelphesSTDHEP cards/delphes_card_CMS.tcl delphes_output.root z_ee.hep49 ```50 51 or52 53 ```54 curl -s http://cp3.irmp.ucl.ac.be/downloads/z_ee.hep.gz | gunzip | ./DelphesSTDHEP cards/delphes_card_CMS.tcl delphes_output.root55 ```56 57 For more detailed documentation, please visit https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook58 59 Configure Delphes on lxplus.cern.ch60 ====================================61 62 ```63 git clone git://github.com/delphes/delphes.git Delphes64 65 cd Delphes66 67 source /afs/cern.ch/sw/lcg/external/gcc/4.9.3/x86_64-slc6/setup.sh68 69 source /afs/cern.ch/sw/lcg/app/releases/ROOT/6.06.00/x86_64-slc6-gcc49-opt/root/bin/thisroot.sh70 71 make72 ```73 74 Simple analysis using TTree::Draw75 =================================76 77 Now we can start [ROOT](root.cern) and look at the data stored in the output ROOT file.78 79 Start ROOT and load Delphes shared library:80 81 ```82 root -l83 gSystem->Load("libDelphes");84 ```85 86 Open ROOT file and do some basic analysis using Draw or TBrowser:87 88 ```89 TFile::Open("delphes_output.root");90 Delphes->Draw("Electron.PT");91 TBrowser browser;92 ```93 94 Notes:95 * ```Delphes``` is the tree name. It can be learned e.g. from TBrowser.96 * ```Electron```is the branch name; ```PT``` is a variable (leaf) of this branch.97 98 Complete description of all branches can be found in [doc/RootTreeDescription.html](doc/RootTreeDescription.html).99 This information is also available [in the workbook](https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook/RootTreeDescription).100 101 Macro-based analysis102 ====================103 104 Analysis macro consists of histogram booking, event loop (histogram filling),105 histogram display.106 107 Start ROOT and load Delphes shared library:108 109 ```110 root -l111 gSystem->Load("libDelphes");112 ```113 114 Basic analysis macro:115 116 ```117 {118 // Create chain of root trees119 TChain chain("Delphes");120 chain.Add("delphes_output.root");121 122 // Create object of class ExRootTreeReader123 ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);124 Long64_t numberOfEntries = treeReader->GetEntries();125 126 // Get pointers to branches used in this analysis127 TClonesArray *branchElectron = treeReader->UseBranch("Electron");128 129 // Book histograms130 TH1 *histElectronPT = new TH1F("electron pt", "electron P_{T}", 50, 0.0, 100.0);131 132 // Loop over all events133 for(Int_t entry = 0; entry < numberOfEntries; ++entry)134 {135 136 // Load selected branches with data from specified event137 treeReader->ReadEntry(entry);138 139 // If event contains at least 1 electron140 if(branchElectron->GetEntries() > 0)141 {142 // Take first electron143 Electron *electron = (Electron*) branchElectron->At(0);144 145 // Plot electron transverse momentum146 histElectronPT->Fill(electron->PT);147 148 // Print electron transverse momentum149 cout << electron->PT << endl;150 }151 152 }153 154 // Show resulting histograms155 histElectronPT->Draw();156 }157 ```158 159 More advanced macro-based analysis160 ==================================161 162 The 'examples' directory contains ROOT macros [Example1.C](examples/Example1.C), [Example2.C](examples/Example2.C) and [Example3.C](examples/Example3.C).163 164 Here are the commands to run these ROOT macros:165 166 ```167 root -l168 .X examples/Example1.C("delphes_output.root");169 ```170 171 or172 173 ```174 root -l examples/Example1.C'("delphes_output.root")'175 ```
Note:
See TracChangeset
for help on using the changeset viewer.