def _IntErr(self): err = ROOT.Double() if self._hist.GetDimension() == 1: val = self._hist.IntegralAndError(0, self._hist.GetNbinsX() + 1, err) elif self._hist.GetDimension() == 2: val = self._hist.IntegralAndError(0, self._hist.GetNbinsX() + 1, 0, self._hist.GetNbinsY() + 1, err) return ufloat(val, err)
def Rate(hist): err = ROOT.Double() integral = hist.IntegralAndError(0, hist.GetNbinsX() + 1, err) return ufloat(integral, err)