Hello,
I’m facing a problem to build a Splot for my fit using python3. I’m using the constructor below.
SPlot (const char *name, const char *title, RooDataSet &data, RooAbsPdf *pdf, const RooArgList &yieldsList)
And this is the error message:
none of the 5 overloaded methods succeeded. Full details:
SPlot::SPlot(const char* name, const char* title, RooDataSet& data, RooAbsPdf* pdf, const RooArgList& yieldsList, const RooArgSet& projDeps = RooArgSet(), bool useWeights = kTRUE, bool copyDataSet = kFALSE, const char* newName = “”, const RooCmdArg& fitToarg5 = RooCmdArg::none(), const RooCmdArg& fitToarg6 = RooCmdArg::none(), const RooCmdArg& fitToarg7 = RooCmdArg::none(), const RooCmdArg& fitToarg8 = RooCmdArg::none()) =>
TypeError: could not convert argument 4
The Fit before the Splot works fine. The problem appears when I add the line below.
sData = ROOT.RooStats.SPlot(“sData”,"",dataset,combinedPDF,ROOT.RooArgList(NSig,NBKG))
dataset is a RooDataSet
combinedPdf is a RooAddPdf
NSig and NBKG are RooRealVar
It seems that sPlot does not like ROOT.RooArgList(NSig,NBKG) argument. But it is working for fit.
Is it a bug or I’m doing something wrong?
Thanks!