Hello,
I plot the error bar of the efficiency but I think the length of error is not correct.
My test code is here and I have to use BayesDivide to derive efficiency.
The error bar seems too large and I am not familiar with Bares method.
Is the result correct?
#include "TGraphAsymmErrors.h"
#include "TCanvas.h"
#include "TH1F.h"
#include "TMath.h"
using namespace std;
void aserror() {
TCanvas *c1 = new TCanvas("c1","c1",3);
TH1F* h_pass = new TH1F("h_pass","h_pass",5,0,5);
TH1F* h_all = new TH1F("h_all","h_all",5,0,5);
h_pass->Sumw2();
h_all->Sumw2();
for (int i=0;i<5;i++) {
h_pass->Fill(i,TMath::Power(10,i+1)/2);
h_all->Fill(i,TMath::Power(10,i+1));
}
TGraphAsymmErrors* tgas = new TGraphAsymmErrors(5);
tgas->BayesDivide(h_pass,h_all);
tgas->Draw("ALP");
}
c1.pdf (13.3 KB)
_ROOT Version: ROOT 6.12/06
_Platform: Ubuntu 14 LTS
Compiler: Not Provided