Home | News | Documentation | Download

How to read a tree file, and fill histogram with leaf

I have a file named “WW” that contains a tree named “mini” that contains leaves with information.

I want to write a script that reads this file and then plots multiple leaves into a histogram.


I would recommend RDataFrame if you want to plot stuff. The action Histo1D creates histograms, and if you want to do some computations with the values in the branches, you can Define a quantity before you histogram it.

Check out this tutorial that demonstrates a few features:

(All ROOT tutorials)