Create a tree from a tree

Hi! I need to analyze a tree A and then, after some data elaboration, write a tree B with the elaborated data. I am analyzing tree A with the macro created by MakeSelector, which is working correctly for other things (e.g. creating spectra, etc…) but I do not understand in which part of the .C and .h files created by MakeSelector I should declare the tree B and its branches. Any help?

As you know the make-selector facility creates some code divided in several part. One of then is called one at before looping on the tree. You should create your new tuple there.