Dear All,
I am trying to fit a simultaneous PDF to a binned dataset : there is one fit variable (the mass) and a bunch of categories reflecting different datataking periods, magnet polarities, decay modes, etc. I first make an unbinned dataset containing all the events and then bin it
RooDataHist binneddata("binneddata","binneddata",RooArgSet(qval,rswscat,compptcat,btaucat,channelcat,magpolcat,yearcat,bflavcat),data);
“qval” is the mass variable, the rest are categories. The eventual PDF contains various functions of the mass variable, whose parameters I want to variously split and/or share depending on the values of the various categories. All events have the qval and the various categories set when I create the dataset.
Then I try to make a simultaneous PDF (note the following is python code)
SimPdfTool = RooSimWSTool(fitworkspace)
SimWSPDF = SimPdfTool.build("SimWSPDF","WSPDF",RooFit.SplitParam(varstosplit,"compptcat,yearcat,channelcat"))
I don’t split in the simultaneous fit on all the categories. This gives the following type of error once I try to fit
[#0] ERROR:InputArguments -- RooCategory::isStateInRange(rswscat) ERROR: must specificy valid range name and state name
[#0] ERROR:InputArguments -- RooCategory::isStateInRange(btaucat) ERROR: must specificy valid range name and state name
[#0] ERROR:InputArguments -- RooCategory::isStateInRange(magpolcat) ERROR: must specificy valid range name and state name
[#0] ERROR:InputArguments -- RooCategory::isStateInRange(bflavcat) ERROR: must specificy valid range name and state name
I have tried modifying the tutorial related to the RooSimWSTool, and I can reproduce the problem in a toy case : if I bin the dataset the problem is there, and if I do the same thing with the unbinned dataset then the problem is not there.
I would be grateful if someone could explain where I am going wrong. I am using ROOT v5.34/04. Doing an unbinned fit is not an option because of the size of the dataset.
Many thanks,
Vava