Filter and counts events from a TTree

Run:
root -l -q -b Sim.root -e 'Tree1->Print();'
and you will see that all branches are “vector<double>”.

Run:
root -l -q -b Sim.root -e 'Tree1->MakeClass();'
to generate a simple “analysis skeleton”.

Another possibility would be to use the ROOT::RDataFrame (e.g., with the help of the Data Frame tutorials).