I got a question on how exactly does RooPlot::chisquare() compute the result? To be specific, I have a distribution with several 0-entry bins. And the chi2 calculation based on SumW2 would not work in such situation. However, the method RooPlot::chisquare() still somehow gave me an answer and I am just wondering why. Is it calculation based on Poisson errors?
I accessed Poisson based chi2 using:
RooChi2Var chi2 (“chi2”, “chi2”, *model,datah,DataError(RooAbsData::Poisson));
but the result was not compatible with RooPlot::chisquare() (a very huge difference, assuming RooChi2Var computed chi2, and I divided ndof from it). I believe RooChi2Var with Poisson errors should be able to treat 0 entries properly.
I looked into codes and it seems RooPlot::chisquare() is actually referencing RooHist::GetEYhigh() / low() to get the errors but unfortunately I did not manage to find the implementation on the calculation. So maybe the question can be reduced to how exactly does RooHist::GetEYhigh() / low() compute the result?
Thanks a lot!