User Tools

Site Tools


snowmass2013:analyse_d3

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
snowmass2013:analyse_d3 [2013/06/01 02:50]
asc [How to analyze in Java]
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 in  a certain directory, fill histograms (pT and jet mass) and save them in an output ROOT file.
-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]]. Look at the workbook of Delphes3 [[https://cp3.irmp.ucl.ac.be/projects/delphes/wiki/WorkBook| Delphes3 workbook]].
Line 69: Line 68:
 ==== How to analyze in PyROOT ==== ==== How to analyze in PyROOT ====
  
-If ROOT was compiled using "python" option, you can use PyROOT to loop over events. Here is a small example to plot transverse moment of electrons (based on the original code of Peter Onyisi with some modifications):+If ROOT was compiled using "python" option, you can use PyROOT to loop over events. Here is a small example to plot transverse moment of electrons (based on the original code of Peter Onyisiwith some modifications, see 
 +[[https://indico.cern.ch/getFile.py/access?contribId=5&resId=0&materialId=slides&confId=255032| his talk]]):
  
 <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('ele','Electron #eta',8,-4,4) # initialize a histogram h=TH1D('ele','Electron #eta',8,-4,4) # initialize a histogram
-c=TCanvas() # build a canvas+c1=TCanvas() # build a canvas
  
 n=0 n=0
Line 98: Line 98:
 if (raw_input("Press any key to exit") != "-9999"): if (raw_input("Press any key to exit") != "-9999"):
     c1.Close(); sys.exit(1);     c1.Close(); sys.exit(1);
- 
 </code> </code>
  
Line 105: Line 104:
 python test.py file.root python test.py file.root
 </code> </code>
 +
 +You will see this image:
 +{{:snowmass2013:screenshot_from_2013-05-31_21_55_04.png?200|}}
  
 ====How to analyze in Java==== ====How to analyze in Java====
Line 110: Line 112:
 MC truth information and most of ROOT files with Delphes outputs 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.  are stored in the PROMC file format which can be analyzed on any platform.
 +Read this [[snowmass2013:analyse_d36_promc| this section]].
  
  --- //[[[email protected]|Sergei Chekanov]] 2013/03/13 10:23//  --- //[[[email protected]|Sergei Chekanov]] 2013/03/13 10:23//
  
  
snowmass2013/analyse_d3.1370055050.txt.gz · Last modified: 2013/06/01 02:50 by asc