Dear RooFit experts,
I would like to perform a simultaneous fit of a signal + background model in an “analysis” plus a “control” region.
For the model, I have constructed a RooSimultaneous object with two categories (“analysis” and “control”).
For the data, I tried to construct a RooDataHist.
What I am having difficulties with is that in the analysis region, I would like to fit variable X in the range xMin…xMax, while in the control region, I would like to fit another variable Y in the range yMin…yMax.
I passed a std::map (two entries: “analysis” and “control”, each pointing to a one-dimensional histogram), a RooCategory object (in which the “analysis” and “control” regions are defined) and a RooArgList containing the variables X and Y.
I seem to be missing something, though - once I try to run that code, I get an error message:
[#0] ERROR:InputArguments – RooDataHist::ctor(fitData) ERROR: dimension of input histogram must match number of continuous variables
cmsRun: roofit/roofitcore/src/RooDataHist.cxx:354: void RooDataHist::importTH1Set(const RooArgList&, RooCategory&, std::map<std::string, TH1*, std::lessstd::string, std::allocator<std::pair<const std::string, TH1*> > >, Double_t): Assertion `0’ failed.
and my program aborts.
I believe my problem is due to the fact that I am using one-dimensional histograms, but two variables (X and Y) for the fit (?)
Hmh, what would be the best way to simultaneously fit the distribution of X in the analysis region and the distribution of Y in the control region ?
Thank you very much,
Christian