I am making an efficiency turn-on plot, and I want to see the error bars. I am using the following code
TH1F *h1= new TH1F ("h1", "h1", 125, 0, 250); TH1F *h2= new TH1F ("h2", "h2", 125, 0, 250); h1->Sumw2(); h2->Sumw2(); Tree->Draw("met.metcorr>>h1", trigger&&offline); Tree->Draw("met.metcorr>>h2", offline); gr = new TGraphAsymmErrors(); gr->BayesDivide(h1,h2,"w"); gr->SetMarkerColor(4); gr->SetMarkerStyle(7); gr->Fit(fcurve,"R");
The problem is that even for points where the ratio of the two is 1, the error bars go above 1.0. What would the procedure be to get the errors right (the efficiency cannot be more than 1.0)? I add an example *ps file to show what I mean.
l1-turnon.ps (1.66 MB)