Home | News | Documentation | Download

RooSimultaneous with different x range

Dear experts,

I am trying to use RooSimultaneous to fit with different datasets in different ranges, and this fit has a correlated variable that I need to get from the simultaneous result. I am not sure if this is allowed in the roosimultaneous, and if the same x variable will have correlation?

the code is like:

RooDataSet data1("data1", "data1", Tree1, RooArgSet(x));
RooDataSet data2("data2", "data2", Tree2, RooArgSet(x));

RooCategory sample("sample", "sample");
x.setRange("fitRange_1data", xmin1, xmax1);
x.setRange("fitRange_2data", xmin2, xmax2);

RooDataSet comdata("comdata", "combine data", x, Index(sample), Import("1data",data1), Import("2data",data2));

RooSimultaneous simPdf("simPdf", "simultaneous fit", sample);
RooFitResult  fitres = (RooFitResult*)simPdf->fitTo(comdata,Range("fitRange"), SplitRange(), Extended(true), Minos(false),Save(true));
type or paste code here

here data1 & data2 has to fit with the same x variable but in different range, however they are not correlated in x variable, but in another variable (let’s say it ratio). The fits looks quite weird, and I am not sure if the two dataset have correlation in x variable, do you have any suggestions?


1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

Hi @choccy ,
sorry for the late reply!

Let’s ping our RooFit expert @moneta .


You would need to post in addition to your full running code also your data set, so we can understand what the problem is.



This topic was automatically closed after 14 days. New replies are no longer allowed.