Tree;1 and tree;2 in ROOT files


I am creating a bunch of root files in which I create two trees: lh_train and lh_test. When I open these files, instead of just finding lh_train and lh_test, I find:

root [0] Attaching file LHProcessor.PowHegPythia_ggH125_tautaulh.mc11c.root as _file0... root [1] .ls TFile** LHProcessor.PowHegPythia_ggH125_tautaulh.mc11c.root TFile* LHProcessor.PowHegPythia_ggH125_tautaulh.mc11c.root KEY: TTree lh_train;2 KEY: TTree lh_train;1 KEY: TTree lh_test;2 KEY: TTree lh_test;1

And I find different numbers of events in ;1 and ;2. What is going on here? Why is ROOT splitting my trees in half? Do I need to consider all events found in ;1 and ;2, or is only one of these two real? I find that if I do

The number of events I see correspond to the number of events in lh_train;2, the events in lh_train;1 being completely dismissed. If I want access to the events in lh_train;1, I need to call it explicitly:

Should I even bother retrieving events in lh_train;1?

Cheers and thanks,

[url]Aux;1 aux;2 aux3;

Thanks! I suspected this has been discussed before, but I didn’t really know how to search for it…

So if I understand correctly, a new cycle is created whenever I hit Tree->Write(). So I closely inspected my code to find out if I happened to call Write more than once for each tree, and I don’t. Another thing that happens however, is that these ntuples of mine are generated in parallel, and then I use hadd to combine them. Is it possible hadd creates more than one cycle?

[url]Tree copy after hadd