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

RooMCStudy::fit should take RooMCStudy::genData(i)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: < v5-28-00
    • Fix Version/s: 5.34/36
    • Component/s: RooFit/RooStats
    • Labels:
      None
    • Environment:

      GNU/Linux

      Description

      Hi All,

      I tried to look in the posts to see if this bug is reported and didn't find anything, so I thought I'd post it here.

      To generate and fit, but not in the same step, I am calling:

      RooMCStudy *mgr = new RooMCStudy(....);

      RooRandom::randomGenerator()-&gt;SetSeed( jobId);

      mgr-&gt;generate(nRuns,int(total),kTRUE);

      TList* allData = new TList();

      for (int i = 0; i &lt; nRuns; i++)
      {
      allData-&gt;Add(mgr-&gt;genData);
      }

      mgr-&gt;fit(nRuns,*allData);

      However this fails at compilation due to the following bug. mgr-&gt;genData is a `const RooDataSet*' and neither mgr-&gt;fitSample() nor TList::Add() will take a const arguement.

      This type of generation and fitting is necessary for a blind toy study, and with a lot of events I wish to avoid the need to write all the data out to a file, or copy the whole object.

      A method mgr-&gt;fit() with no arguements would be nice, to fit all the previously generated data. Otherwise mgr-&gt;fit(mgr-&gt;genData) would be equally good.

      Thanks,

      Rob Lambert

        Attachments

          Activity

            People

            Assignee:
            shageboe Stephan Hageboeck
            Reporter:
            rlambert Rob lambert (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Actual End: