User Tools

Site Tools


snowmass2013:analyse_d3

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

snowmass2013:analyse_d3 [2013/05/30 18:53]
127.0.0.1 external edit
snowmass2013:analyse_d3 [2014/04/24 01:51]
Line 1: Line 1:
-[[snowmass2013:montecarlo| <<back]] 
- 
-=== How to analyze Delphes3 ROOT files === 
- 
-This example shows how to run a program over all files in a certain directory, fill histograms (pT and jet mass) and 
-save histograms in an output ROOT file. 
- 
-Look at the workbook of Delphes3 [[https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook| Delphes3 workbook]]. 
-To get started, install Delphes. You  should see the library "libDelphes.so" The you can browser the ROOT tree as: 
- 
-<code C> 
-gSystem->Load("libDelphes"); 
-TFile::Open("delphes_output.root"); 
-Delphes->Draw("Electron.PT"); 
-TBrowser browser; 
-</code> 
- 
- 
-=== Advanced  Delphes3 example  === 
- 
-This assumes that Delphes3 is already installed. You have the directory "Delphes3" with the shared file "libDelphes.so" inside. 
- 
-Get the analysis file: {{:snowmass2013:antup.tgz|}} 
- 
-<code> 
-tar -zvxf antup.tgz 
-cd antup 
-</code> 
- 
-So you will see 2 directories: 
-<code> 
-delphes3 
-antup 
-</code> 
- 
- 
-Now go to the directory "antup"  and link the existing  Delphes3 installation: 
- 
-<code> 
-ln -s  ../Delphes3  delphes 
-</code> 
- 
-In my case, it will look as: 
- 
-<code> 
-analysis.h 
-A_RUN_TEST 
-data.in 
-delphes -> ../Delphes3/ 
-main.cxx 
-Make_input 
-out 
-</code> 
- 
-Check that you see the shared Delphes3 file 
- 
-<code> 
-ls -l delphes/*so 
-</code> 
- 
-You should see "delphes/libDelphes.so"  
- 
- 
-The main file which fills histograms is "main.cxx". It fills some jet variables and save histograms in the ROOT file in "/out" directory. 
- 
-To run the code, run "./A_RUN_TEST" which loops over the existing ROOT files.  
-But before you do this, you will need to set "DATA_DIR" variable inside "A_RUN_TEST" to navigate to the directory with your "ROOT" files. 
- 
- --- //[[[email protected]|Sergei Chekanov]] 2013/03/13 10:23// 
- 
  
snowmass2013/analyse_d3.txt · Last modified: 2014/04/24 01:51 (external edit)