Weight of the final tree after 'hadd'ing weighted trees

Hello all,

I have trees which are weighted(using SetWeight method).
lets say :
T1 with weight w1;
T2 with weight w2 &
T3 with weight w3
If I add the trees now using hadd, what is the weight of the resultant
tree?
Is it just the simple addition of the weights i.e. w1+w2+w3?

Thanks in advance,
Best Regards,
Shilpi

[quote]If I add the trees now using hadd, what is the weight of the resultant
tree?[/quote]It is currently the weight of the first tree.

[quote]Is it just the simple addition of the weights i.e. w1+w2+w3? [/quote]I don’t think this would be the right answer, since this weight is typically applies to each entries individually.

If the weight are not the same and since SetWeight is unique for an entire TTree, it does not made semantic sense to merge your TTree objects … as per definition there will be information lost.

If you need each TTree to have their own weight, the right solution is to keep them separated and use them with a TChain.

Cheers,
Philippe.

Hello Philippe,

Thanks much for correcting me about the
weights and the trees.

Best Regards,
Shilpi