Could RooMCStudy do a two-steps fitting?

Hi,

I am just wondering whether RooMCStudy could do a two steps fitting like this:

  1. fit the mass distribution firstly to get the signal fraction, mass mean and sigma, then fix them.
  2. do a mass-lifetime combined fitting, only let the lifetimes of the signal and the background be floating, the other parameters are fixed to the value gotten in step 1).

How could I do it with RooMCStudy?

BTW: any comments on the issue
http://root.cern.ch/phpBB2/viewtopic.php?t=6248&highlight=
are also appreciated.

Thank you very much.

Hi,

There is a number of ways in which you can accomplish this.

One way is to use multiple RooMCStudy objects. First you create one that only generates the toy datasets by calling generate() instead of generateAndFit while setting the keepData flag or providing the ascii file pattern to write generated datasets out to file. If you have many or large datasets the 2nd option is better to avoid running out of memory. Once the datasets are generated, you can run RooMCStudy twice to fit these saved datasets in different configurations. This approach requires no coding, but makes it a bit more cumbersome to analyze correlations between fits in different configurations on the same toy dataset.

Alternatively you can write a RooMCStudy plugin module that configures and performs the 2nd fit. This method explicitly allows you to write the fit summary information of both fits into a single dataset Depending on your problem this may be a more elegant solution. Have a look at RooDLLSignificanceMCSModule for an example of such a plugin module.

Wouter