This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
snowmass2013:analyse_d3 [2013/06/01 02:53] asc [How to analyze in PyROOT] |
snowmass2013:analyse_d3 [2014/04/24 01:51] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
==== How to analyze in C++ ==== | ==== How to analyze in C++ ==== | ||
- | This example shows how to run a program over all files in a certain directory, fill histograms (pT and jet mass) and | + | This example shows how to run a C+= program over all Delphes ROOT files located |
- | save histograms | + | |
Look at the workbook of Delphes3 [[https:// | Look at the workbook of Delphes3 [[https:// | ||
Line 69: | Line 68: | ||
==== How to analyze in PyROOT ==== | ==== How to analyze in PyROOT ==== | ||
- | If ROOT was compiled using " | + | If ROOT was compiled using " |
+ | [[https:// | ||
<code python test.py> | <code python test.py> | ||
Line 86: | Line 86: | ||
t=f.Delphes # extract the tree | t=f.Delphes # extract the tree | ||
h=TH1D(' | h=TH1D(' | ||
- | c=TCanvas() # build a canvas | + | c1=TCanvas() # build a canvas |
n=0 | n=0 | ||
Line 98: | Line 98: | ||
if (raw_input(" | if (raw_input(" | ||
c1.Close(); sys.exit(1); | c1.Close(); sys.exit(1); | ||
- | |||
</ | </ | ||
Line 107: | Line 106: | ||
You will see this image: | You will see this image: | ||
- | {{: | + | {{: |
====How to analyze in Java==== | ====How to analyze in Java==== |