Division of two histograms, error propagation in RooDataHist

Hi there. I’m trying to calculate the acceptance function for my decay channel, and to do so I need to divide two histograms and perform a fit.

I’m having trouble with error propagation though. The Root TH1F I generate from the division of two other TH1Fs is correctly propagating the errors, like so:

TH1F acceptanceHist = (TH1F)trigTimeHist->Clone();
acceptanceHist->SetTitle(“B->PhiKs Acceptance ratio”);

but when I convert this to a RooDataHist it recalculates the errors, creating nonsense in the process, and causing the fit to make no sense (the ratio is never greater than 1, so when it recalcs the errors they’re huge):

RooDataHist accfnHist(“accfnHist”, “Acceptance Function”, *tau,acceptanceHist);

Am I doing this wrong? I could generate two RooDataHists instead of TH1Fs, but I can’t find a method to divide the two.



I think RooDataHist uses Poisson errors, so if you don’t have counts, like in the result of an histogram division it does not make much sense.

I would use the class TBinomialEfficiency for fitting the division of histograms, where you have the correct binomial error

root.cern.ch/root/htmldoc/TBinom … itter.html

Best Regards


Thanks! this is just what I needed.