Creating and Filling ROOT Trees

I am attempting to learn ROOT at the moment and have been given the task of filling a ROOT Tree with a particular variable, and then filling a Tree with another variable for comparison between the two. Apologies for the two, but can someone clarify exactly what a ROOT tree is? Is it just the same as a n-tuple? Is there some example code of how I would take a ROOT tree, fill it with a variable and then plot the distribution of that variable?

Apologies if this is very simple as I am new to ROOT.

Hi @Jjthestudent868;
Look a this example for both writing and reading TTree read and write

more example here -> TTree example
from number 24 to 31

and for what concern the drawing look a the TTree::Draw() method in the TTree page.

Cheers,
Stefano

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.