Poisson errors for RooHist

Hi,

In RooFit to plot Poisson (which is the default if you have unweighted data) you need to use the plot option DataError(RooAbsData::Poisson). Your plot looks to me done with the option DataError(RooAbsData::SumW2).
Probably you have weighted data.

For your second question you can use the code below:

double alpha = 1. - confLevel;
double lower = ROOT::Math::gamma_quantile( alpha/2, n, 1.);
double upper = ROOT::Math::gamma_quantile_c( alpha/2, n+1, 1)

See also the code in TH1.cxx,

and

Lorenzo