asc:tutorials:2014october28
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
asc:tutorials:2014october28 [2014/10/28 16:01] – [Lesson 2: Using pyROOT to read xAOD] asc | asc:tutorials:2014october28 [2014/10/28 20:17] – [Lesson 2: Using pyROOT to read xAOD] asc | ||
---|---|---|---|
Line 157: | Line 157: | ||
- | <code python | + | <code python xAODPythonMacro.py> |
# | # | ||
Line 196: | Line 196: | ||
Using this code, one can fill histograms. But the code runs slow. Below we will show how to use C++/ROOT compiled code to | Using this code, one can fill histograms. But the code runs slow. Below we will show how to use C++/ROOT compiled code to | ||
run over this file. | run over this file. | ||
+ | |||
+ | How do you know about methods of " | ||
+ | |||
+ | <code python> | ||
+ | print dir(el.trackParticle()) | ||
+ | </ | ||
How will you find xAOD variables without using ROOT TBrowser? Try this code: | How will you find xAOD variables without using ROOT TBrowser? Try this code: | ||
Line 204: | Line 210: | ||
</ | </ | ||
- | You will see a table with the names of the variables. | + | |
+ | <note warning> | ||
+ | To run the next example, please start from a new terminal, run rcSetup. This is needed to avoid a conflict with asetup</ | ||
Now you can fill a histogram in this Python code. You should create a histogram before the event loop: | Now you can fill a histogram in this Python code. You should create a histogram before the event loop: | ||
Line 223: | Line 232: | ||
Here the code that write a ROOT histogram: | Here the code that write a ROOT histogram: | ||
- | <code python | + | <code python |
# | # | ||
Line 257: | Line 266: | ||
hfile.Close() | hfile.Close() | ||
</ | </ | ||
- | ====== Lesson 3: Analysis program to read xAOD ====== | ||
- | Now we will create a C++/ROOT analysis program and run over this input xAOD file. Do not forget to run "kinit [email protected]" | + | Now open the root file and look at the histogram. |
+ | ====== Lesson 3: C++/ROOT program to read xAOD ====== | ||
+ | |||
+ | Now we will create a C++/ROOT analysis program and run over this input xAOD file. | ||
Use the same setup file as above. | Use the same setup file as above. | ||
asc/tutorials/2014october28.txt · Last modified: 2014/10/29 13:55 by asc