Created
February 24, 2014 05:01
-
-
Save lukedeo/9182200 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rootpy | |
from rootpy.io import root_open | |
from rootpy.tree import Tree, TreeChain | |
# -- Let me real quick grab a nasty d3pd | |
f = root_open('user.dguest.050909._00001.skim-output.root') | |
# -- Yank that tree out of there... | |
T = f['physics'] | |
# -- pythonically grab a list of branches | |
br = T.branchnames | |
# -- STICKS THE ENTIRE THING IN AN NDARRAY | |
ntuple = T.to_array() | |
# -- grab the leading jet pt of the second event. | |
leading_jet_pt = ntuple['jet_AntiKt4LCTopo_pt'][2][0] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment