{"action":"created","issue":{"url":"https://api.github.com/repos/root-project/root/issues/1916","repository_url":"https://api.github.com/repos/root-project/root","labels_url":"https://api.github.com/repos/root-project/root/issues/1916/labels{/name}","comments_url":"https://api.github.com/repos/root-project/root/issues/1916/comments","events_url":"https://api.github.com/repos/root-project/root/issues/1916/events","html_url":"https://github.com/root-project/root/pull/1916","id":317602599,"number":1916,"title":"critical bugfix in RooFit to avoid last bin getting lost in histogram","user":{"login":"cburgard","id":1086852,"avatar_url":"https://avatars0.githubusercontent.com/u/1086852?v=4","gravatar_id":"","url":"https://api.github.com/users/cburgard","html_url":"https://github.com/cburgard","followers_url":"https://api.github.com/users/cburgard/followers","following_url":"https://api.github.com/users/cburgard/following{/other_user}","gists_url":"https://api.github.com/users/cburgard/gists{/gist_id}","starred_url":"https://api.github.com/users/cburgard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cburgard/subscriptions","organizations_url":"https://api.github.com/users/cburgard/orgs","repos_url":"https://api.github.com/users/cburgard/repos","events_url":"https://api.github.com/users/cburgard/events{/privacy}","received_events_url":"https://api.github.com/users/cburgard/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"lmoneta","id":5213559,"avatar_url":"https://avatars1.githubusercontent.com/u/5213559?v=4","gravatar_id":"","url":"https://api.github.com/users/lmoneta","html_url":"https://github.com/lmoneta","followers_url":"https://api.github.com/users/lmoneta/followers","following_url":"https://api.github.com/users/lmoneta/following{/other_user}","gists_url":"https://api.github.com/users/lmoneta/gists{/gist_id}","starred_url":"https://api.github.com/users/lmoneta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmoneta/subscriptions","organizations_url":"https://api.github.com/users/lmoneta/orgs","repos_url":"https://api.github.com/users/lmoneta/repos","events_url":"https://api.github.com/users/lmoneta/events{/privacy}","received_events_url":"https://api.github.com/users/lmoneta/received_events","type":"User","site_admin":false},"assignees":[{"login":"lmoneta","id":5213559,"avatar_url":"https://avatars1.githubusercontent.com/u/5213559?v=4","gravatar_id":"","url":"https://api.github.com/users/lmoneta","html_url":"https://github.com/lmoneta","followers_url":"https://api.github.com/users/lmoneta/followers","following_url":"https://api.github.com/users/lmoneta/following{/other_user}","gists_url":"https://api.github.com/users/lmoneta/gists{/gist_id}","starred_url":"https://api.github.com/users/lmoneta/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lmoneta/subscriptions","organizations_url":"https://api.github.com/users/lmoneta/orgs","repos_url":"https://api.github.com/users/lmoneta/repos","events_url":"https://api.github.com/users/lmoneta/events{/privacy}","received_events_url":"https://api.github.com/users/lmoneta/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2018-04-25T12:17:09Z","updated_at":"2018-04-25T17:34:33Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/root-project/root/pulls/1916","html_url":"https://github.com/root-project/root/pull/1916","diff_url":"https://github.com/root-project/root/pull/1916.diff","patch_url":"https://github.com/root-project/root/pull/1916.patch"},"body":"We have recently discovered a critical bug in RooFit which (under some arcane circumstances) causes the last bin to go missing from a `RooHistFunc`. Notably, the occurence of this effect is a rounding issue that only happens for some values of upper bounds of observables. \r\n\r\nI have attached a python test case that showcases the problem. The assertion in the last line will fail in the current master of ROOT, but will succeed using the bugfix in this MR.\r\n\r\n    import ROOT\r\n    from math import pi\r\n    \r\n    xmin = -25.2\r\n    xmax = 6.3\r\n    nbins = 35\r\n    hfname = \"hists.root\"\r\n    \r\n    histfile = ROOT.TFile.Open(hfname,\"RECREATE\")\r\n    \r\n    signalSR = ROOT.TH1F(\"signalSR\",\"signal\",nbins,xmin,xmax)\r\n    signalSR.FillRandom(\"gaus\")\r\n    \r\n    backgroundSR = ROOT.TH1F(\"backgroundSR\",\"background\",nbins,xmin,xmax)\r\n    backgroundSR.FillRandom(\"pol0\")\r\n    \r\n    signalCR = ROOT.TH1F(\"signalCR\",\"signal\",nbins,xmin,xmax)\r\n    signalCR.FillRandom(\"pol0\")\r\n    \r\n    backgroundCR = ROOT.TH1F(\"backgroundCR\",\"background\",nbins,xmin,xmax)\r\n    backgroundCR.FillRandom(\"pol0\")\r\n    \r\n    histfile.Write()\r\n    histfile.Close()\r\n    \r\n    sigSR = ROOT.RooStats.HistFactory.Sample(\"signal\",\"\",hfname,\"signalSR\")\r\n    sigSR.AddNormFactor(\"mu\",1.,0.,10.,False)\r\n    bkgSR = ROOT.RooStats.HistFactory.Sample(\"background\",\"\",hfname,\"backgroundSR\")\r\n    bkgSR.AddNormFactor(\"norm\",1.,0.,10.,False)\r\n    \r\n    sr = ROOT.RooStats.HistFactory.Channel(\"SR\")\r\n    sr.AddSample(sigSR)\r\n    sr.AddSample(bkgSR)\r\n    \r\n    sigCR = ROOT.RooStats.HistFactory.Sample(\"signal\",\"\",hfname,\"signalCR\")\r\n    sigCR.AddNormFactor(\"mu\",1.,0.,10.,False)\r\n    bkgCR = ROOT.RooStats.HistFactory.Sample(\"background\",\"\",hfname,\"backgroundCR\")\r\n    bkgCR.AddNormFactor(\"norm\",1.,0.,10.,False)\r\n    \r\n    cr = ROOT.RooStats.HistFactory.Channel(\"CR\")\r\n    cr.AddSample(sigCR)\r\n    cr.AddSample(bkgCR)\r\n    \r\n    \r\n    meas = ROOT.RooStats.HistFactory.Measurement(\"meas\")\r\n    meas.AddChannel(sr)\r\n    meas.AddChannel(cr)\r\n    \r\n\r\n    meas.CollectHistograms()\r\n    ws = ROOT.RooStats.HistFactory.HistoToWorkspaceFactoryFast.MakeCombinedModel(meas)\r\n    pdf = ws.pdf(\"model_SR\")\r\n    obs = ws.var(\"obs_x_SR\")\r\n    hist = pdf.createHistogram(\"hist\",obs,ROOT.RooFit.IntrinsicBinning(1))\r\n\r\n    assert(hist.GetNbinsX() == nbins)"},"comment":{"url":"https://api.github.com/repos/root-project/root/issues/comments/384370528","html_url":"https://github.com/root-project/root/pull/1916#issuecomment-384370528","issue_url":"https://api.github.com/repos/root-project/root/issues/1916","id":384370528,"user":{"login":"phsft-bot","id":25639015,"avatar_url":"https://avatars1.githubusercontent.com/u/25639015?v=4","gravatar_id":"","url":"https://api.github.com/users/phsft-bot","html_url":"https://github.com/phsft-bot","followers_url":"https://api.github.com/users/phsft-bot/followers","following_url":"https://api.github.com/users/phsft-bot/following{/other_user}","gists_url":"https://api.github.com/users/phsft-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/phsft-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phsft-bot/subscriptions","organizations_url":"https://api.github.com/users/phsft-bot/orgs","repos_url":"https://api.github.com/users/phsft-bot/repos","events_url":"https://api.github.com/users/phsft-bot/events{/privacy}","received_events_url":"https://api.github.com/users/phsft-bot/received_events","type":"User","site_admin":false},"created_at":"2018-04-25T17:34:33Z","updated_at":"2018-04-25T17:34:33Z","author_association":"COLLABORATOR","body":"Build failed on slc6/gcc62.\n[See console output](https://epsft-jenkins.cern.ch/job/root-pullrequests-build/23241/console).\n### Errors:\n- ERROR: Timeout after 10 minutes \n- ERROR: Error fetching remote repo 'origin' \n- stderr: error: RPC failed; result=18, HTTP code = 200 \n- error: fetch-pack died of signal 15 \n- ERROR: Error fetching remote repo 'origin' \n\n"}}
{"actor":{"display_login":"phsft-bot"}}