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:35] – [Lesson 1: Looking at a xAOD file] asc | ||
---|---|---|---|
Line 95: | Line 95: | ||
__Method 1. If you are at ANL, copy it__: | __Method 1. If you are at ANL, copy it__: | ||
<code bash> | <code bash> | ||
- | cp / | + | cp / |
- | AOD.01482225._000140.pool.root | + | |
</ | </ | ||
Line 104: | Line 103: | ||
localSetupFAX --rootVersion=current-SL6 | localSetupFAX --rootVersion=current-SL6 | ||
voms-proxy-init -voms atlas | voms-proxy-init -voms atlas | ||
- | xrdcp $STORAGEPREFIX/ | + | xrdcp $STORAGEPREFIX/ |
</ | </ | ||
Line 120: | Line 119: | ||
setMeUpData anl-oct2014 mydata | setMeUpData anl-oct2014 mydata | ||
</ | </ | ||
- | The file will appear in " | + | The file will appear in " |
Line 157: | Line 156: | ||
- | <code python | + | <code python xAODPythonMacro.py> |
# | # | ||
Line 196: | Line 195: | ||
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 209: | ||
</ | </ | ||
- | 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 231: | ||
Here the code that write a ROOT histogram: | Here the code that write a ROOT histogram: | ||
- | <code python | + | <code python |
# | # | ||
Line 257: | Line 265: | ||
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