Re: Wighted Sum of TTrees

From: Axel Naumann <Axel.Naumann_at_cern.ch>
Date: Thu, 8 Jul 2010 18:08:21 +0200


Hi Hovhannes,

you could simply create a new TTree with a weight branch and for further analysis add it as a friend to the merged tree. You fill that new tree for each event with the current tree's weight. Sounds like a major overhead - but because ROOT's TFiles are zipped this will leave you with almost nothing on disk and a very flexible layout in memory.

Cheers, Axel.

Hovhannes Khandanyan wrote on 07/08/2010 12:55 PM:
>
> Dear ROOTers,
>
> I need to combine TTrees (presumably in TChain ) assigning weights to
> each in much the same way as one makes a weighted sum of the TH1
> histograms. What would be he easiest/recommended way to do this.
>
> Thanks,
> Hovhannes
>
>
>
Received on Thu Jul 08 2010 - 18:08:26 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 08 2010 - 23:50:02 CEST