Hello everyone,
I have been learning about computational methods and particle physics for about year.
Recently i have started to do data analysis of the root output files (of MC True and Reco datasets) in order to produce Sensitivity plots of the setup.
Could anyone give me some suggestions or References (links, papers, books…anything is appreciated)
Hello dpiparo,
Ok, I see, if i need to narrow down the question, i am basically looking for a references about reading a TChain/TTree structure and reaching the event datas from pyRoot.
Thank you for your help.
this is very precise indeed.
So suppose to have a TTree called mytree in a file called myfile.root:
import ROOT
f = ROOT.TFile("myfile.root")
t = f.mytree
for event in t:
print t.col1
print t.col2
#....
Where col1 and col2 are the names of the branches in your tree.
In case you need to build a TChain, you can build it following the documentation here. The looping is identical.