in the TGraphAsymmErrors, in the Divide() method I find this check:
for (Int_t b=1; b<=nbins; ++b) {
//shall we use number of effective entries = (sum weights)^2 / sum (weights^2)
//" + 0.5" ensures correct rounding
if(bEffective) {
t =(Int_t)( total->GetBinContent(b) * total->GetBinContent(b) / total->GetSumw2()->At(b-1) + 0.5);
p =(Int_t)(pass->GetBinContent(b) * pass->GetBinContent(b) / pass->GetSumw2()->At(b-1) + 0.5);
if (p>t) {
Warning("Divide","histogram bin %d in pass has more effective entries than corresponding bin in total! (%d>%d)",b,p,t);
continue; //we may as well go on...
}
}
...
this, essentially, checks if the efficiency is lower than 1. The point is that for the bin “b” the weight is retrieved with
TH1::GetSumw2()->At(b-1) and I think that this retrieve the wrong weight since this is the weight of the previous (in fact “b-1”) bin…
However I see strange things related to this… I red about the possible problems with weighted histos, and since I have a weighted histo I “dumped” its content into a not weighted one in this way: