Hello,
I have three rootfiles with the same TTree, sig1.root, sig2.root and bkg.root.
Each sample has its own cross section and a different number of events; I want to “merge” this TTrees to the same integrated luminosity.
I must use the output TTree in RooFit, so I think that doing something like TTree::SetWeight for each TTree in the TChain will not work.
My idea was: compute the number of events, for each sample, corresponding to the same integrated luminosity, and then
TChain dataset("treename");
dataset.Add("sig1.root", sig1_wanted_events);
dataset.Add("sig2.root", sig2_wanted_events);
dataset.Add("bkg.root", bkg_wanted_events);
However, this solution does not work, I actually don’t know why (I even get some odd behaviour, e.g. the TChain::GetEntries() method returns a different value if called different times, something I quite do not understand). Any suggestions?
Thank you.