I am using PyROOT (from ROOT v5.34/09) and RooFit (v3.56). I am trying to do a simultaneous fit, following the example, here:
root.cern.ch/root/html/tutorials … pdf.C.html
I have come to this step, but instead of 2 datasets (like in the example), I have 21 datasets that I want to combine. The example code snippet is here:
RooDataSet combData("combData","combined data",x,Index(sample),Import("physics",*data),Import("control",*data_ctl)) ;
Since the constructor is limited to 8 RooCmdArg arguments, I guess I have to use this same constructor:
RooDataSet(const char* name, const char* title, const RooArgSet& vars, const RooCmdArg& arg1, const RooCmdArg& arg2 = RooCmdArg(), const RooCmdArg& arg3 = RooCmdArg(), const RooCmdArg& arg4 = RooCmdArg(), const RooCmdArg& arg5 = RooCmdArg(), const RooCmdArg& arg6 = RooCmdArg(), const RooCmdArg& arg7 = RooCmdArg(), const RooCmdArg& arg8 = RooCmdArg())
… but with these two RooCmdArg arguments instead:
Index(RooCategory&)
Import(map<string,RooDataSet*>&)
The problem is that when I try to use map<string,RooDataSet*> in PyROOT, I get a seg fault. This seems to be a problem with std::maps and RooFit objects in PyROOT in general:
Do the RooFit experts know how to either (a) import 21 datasets into a RooDataSet in some other way, or (b) make std::maps work with RooFit variables?
Thanks very much,
Edmund