ROOT Version: root 6.14.04-x86_64-slc6-gcc62-opt
Hello,
I am a newbie to PyROOT, and I am trying to extract the jet size from a branch inside a tree and fill a histogram with the size of jets per event. I am writing the following code, but I do not know how to access the “specific variable” from the branch-
treeName = "CollectionTree"
ch = ROOT.TChain(treeName)
for i in range(1,len(sys.argv)) :
ch.Add(sys.argv[i])
print sys.argv[i]
t = ROOT.xAOD.MakeTransientTree( ch )
fOut = ROOT.TFile.Open("fastsim.root","NEW")
h_jet_size = ROOT.TH1F("AntiKtEMPFlow","",40,0,40);
h_jet_size.GetYaxis().SetTitle("Number of Events")
for entry in xrange( t.GetEntries() ):
t.GetEntry(entry)
ievent +=1
#Fill here...
fOut.Write()
fOut.Close()
I have attached a screenshot of the tree, branches and leaves, I would like to make the histogram of the “size” of the AntiKtEmPFlowJets branch.
Thank for your help !