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:48] asc |
snowmass2013:analyse_d3 [2013/06/01 03:02] asc |
||
---|---|---|---|
Line 1: | Line 1: | ||
[[snowmass2013: | [[snowmass2013: | ||
- | === 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 17: | Line 16: | ||
- | === Advanced | + | ==== Advanced |
This assumes that Delphes3 is already installed. You have the directory " | This assumes that Delphes3 is already installed. You have the directory " | ||
Line 67: | Line 66: | ||
But before you do this, you will need to set " | But before you do this, you will need to set " | ||
- | === How to analyze in PyROOT === | + | ==== How to analyze in PyROOT |
- | If ROOT was compiled using " | + | If ROOT was compiled using " |
+ | [[https:// | ||
- | <code python> | + | <code python |
# | # | ||
# Based on P.Onyisi example | # Based on P.Onyisi example | ||
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); | ||
+ | </ | ||
+ | Run this code as: | ||
+ | < | ||
+ | python test.py file.root | ||
</ | </ | ||
+ | You will see this image: | ||
+ | {{: | ||
+ | |||
+ | ====How to analyze in Java==== | ||
+ | |||
+ | MC truth information and most of ROOT files with Delphes outputs | ||
+ | are stored in the PROMC file format which can be analyzed on any platform. | ||
+ | Read this [[snowmass2013: | ||
--- // | --- // | ||