Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-5608

2-dim function is not properly integrated in TH2::FillRandom

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • 5.34/00, 6.00.00
    • None
    • Core Libraries
    • None
    • -

    Description

      According to the description, "The distribution contained in the function fname (TF2) is integrated over the channel contents".
      However, for whatever reason the "integration" in TH2D::FillRandom is actually summing the function values evaluated at the bin centres.

      So, instead of

       
      integral[ibin] = integral[ibin-1] + f1->Eval(xv[0],xv[1]);

      It should be more like

       
      integral[ibin] = integral[ibin-1] + f1->Integral(fXaxis.GetBinLowEdge(binx), fXaxis.GetBinUpEdge(binx), fYaxis.GetBinLowEdge(biny), fYaxis.GetBinUpEdge(biny));

      Attachments

        Activity

          People

            moneta Lorenzo Moneta
            039a8b546e74244770cc boger@jinr.ru (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: