Re: Combining rootfiles with different weights

From: Rene Brun <Rene.Brun_at_cern.ch>
Date: Sat, 2 Feb 2008 08:59:38 +0100


You should be more specific about what you mean by "combine events". Do you have histograms, Trees?
Do you want to combine the data structures of one event in Tree1 with data structures of another event
in Tree2 (something like pile-up)?
If you just want to add histograms from 2 files, use TH1::Add with the weight argument.
See also TTree::SetWeight.

Rene Brun

Anil Singh wrote:
> Dear Rooters,
>
> I am trying to combine events from two root files. One corresponds to one channel and other to another one. I want to create a cumulative file containing events from both channels in proportion to their crossections. Is it possible to do some jugglery with hadd macro and
> make it to do "weighted addition" or some thing similar??
>
> Any help will be grately appreciated.
>
> A. Singh
> LPC, Fermi Lab
>
>
Received on Sat Feb 02 2008 - 08:59:44 CET

This archive was generated by hypermail 2.2.0 : Sat Feb 02 2008 - 11:50:01 CET