Calculate the integral of graph plotted from a TTree

Yes, I think it’s unfortunate that the subtle syntax difference between “X:Y” and “X:Y >> foo” makes the difference between getting an unbinned TGraph and a binned TH2D.

I had a somewhat frustrating conversation with some ROOT experts a few years ago when I ran into this problem. You can read their explanations here: TGraph saved to file shows up as TH2F

I’m glad you resolved your issue.

Jean-François