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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • High
    • Resolution: Fixed
    • < v5-28-00
    • 5.34/36
    • RooFit/RooStats
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved:
              Actual End: