Hi,
The BayesDivide in TGraphAsymmErrors assumes binomial distribution for
the pass/all bins. If you are using weights which are not integer,
then it is not anymore binomial statistics.
The result will be different according which model you use for the
weights.
In the non bayesian case, with TH1::Divide, you can perform division
of histogram for calculating efficiencies using weights
Best Regards
Lorenzo
On Mar 23, 2009, at 1:40 PM, James Jackson wrote:
> Hi,
>
> I am attempting to compute some efficiencies from pass / total
> histograms which do not have unit weighting (i.e. they are
> constructed with hist->SetBinContent(bin, eventWeight), where weight
> is not guaranteed to be integer). TGraphAsymmErrors doesn't like
> this (and I assume this is linked to the option whereby it will
> check the weights of the source histograms):
>
> root [0] TH1D *pass = new TH1D("pass", "", 1, 0, 1);
> root [1] TH1D *all = new TH1D("all", "", 1, 0, 1);
> root [2] pass->SetBinContent(1, 2.5);
> root [3] all->SetBinContent(1, 5);
> root [4] TGraphAsymmErrors a(pass, all);
> root [5] Double_t x, y;
> root [6] a.GetPoint(0, x, y)
> root [7] x
> (Double_t)5.00000000000000000e-01
> root [10] y
> (Double_t)4.00000000000000022e-01 <-- Should be 0.5!
>
> Is there anyway around this?
>
> Regards,
> James.
>
Received on Mon Mar 23 2009 - 17:43:02 CET
This archive was generated by hypermail 2.2.0 : Wed Mar 25 2009 - 23:50:02 CET