Dear all,

I am trying to combine RooSimultaneous that is created from RooFFTConvPdf product with an efficiency function:

```
t = RooRealVar("t", "t", -10., 30.)
tau = RooRealVar("tau", "tau", 1.54, 0.1, 5.)
tau2 = RooRealVar("tau2", "tau2", 0.9, 0.1, 3.)
mean = RooRealVar("mean", "mean", 0)
sigma = RooRealVar("sigma", "sigma", 0.5)
gaussian_resol = RooGaussian("gauss", "gauss", t, mean, sigma)
datahist = gaussian_resol.generateBinned(t, 100000)
acceptance = RooFormulaVar("spline", "spline", "0.3+0.02*t", RooArgList(t))
resol = RooHistPdf("res", "res", t, datahist)
true = RooTruthModel("true", "true", t)
model1 = RooDecay("model1", "model1", t, tau, true, RooDecay.SingleSided)
model2 = RooDecay("model2", "model2", t, tau2, true, RooDecay.SingleSided)
cat = RooCategory("cat", "cat")
cat.defineType("long")
cat.defineType("short")
model = RooSimultaneous("model", "model", cat)
model.addPdf(model1, "long")
model.addPdf(model2, "short")
model1conv = RooFFTConvPdf("model1Conv", "model1Conv", t, model1, resol)
model1Eff = RooEffProd("model1Eff", "model1Eff", model1conv, acceptance)
model2conv = RooFFTConvPdf("model2Conv", "model2Conv", t, model2, resol)
model2Eff = RooEffProd("model2Eff", "model2Eff", model2conv, acceptance)
modelconv = RooFFTConvPdf("modelConv", "modelConv", t, model, resol)
modelEff = RooEffProd("modelEff", "modelEff", modelconv, acceptance)
frame1 = t.frame()
data1 = model1Eff.generate(RooArgSet(t), 10000)
data2 = model2Eff.generate(RooArgSet(t), 20000)
data = RooDataSet("data", "data", RooArgSet(t), RooFit.Index(cat), RooFit.Import("long" , data1), RooFit.Import("short", data2))
modelEff.fitTo(data)
data.plotOn(frame1)
modelEff.plotOn(frame1)
```

And I get the following error:

```
[#0] FATAL:InputArguments -- RooAbsCategoryLValue::setBin(cat) ERROR: ranges not implemented for setting bins in categories.
Traceback (most recent call last):
File "/project/bfys/valukash/BsJpsiphi/p2vv/scripts/run2/fit/test_numtr2.py", line 65, in <module>
fit()
File "/project/bfys/valukash/BsJpsiphi/p2vv/scripts/run2/fit/test_numtr2.py", line 51, in fit
modelEff.fitTo(data)
TypeError: none of the 2 overloaded methods succeeded. Full details:
RooFitResult* RooAbsPdf::fitTo(RooAbsData& data, const RooLinkedList& cmdList) =>
TypeError: takes at least 2 arguments (1 given)
RooFitResult* RooAbsPdf::fitTo(RooAbsData& data, const RooCmdArg& arg1 = RooCmdArg::none(), const RooCmdArg& arg2 = RooCmdArg::none(), const RooCmdArg& arg3 = RooCmdArg::none(), const RooCmdArg& arg4 = RooCmdArg::none(), const RooCmdArg& arg5 = RooCmdArg::none(), const RooCmdArg& arg6 = RooCmdArg::none(), const RooCmdArg& arg7 = RooCmdArg::none(), const RooCmdArg& arg8 = RooCmdArg::none()) =>
logic_error: Ranges not implemented for setting bins in categories.
```

I am not entirely sure what am I configuring wrong. Does anyone have a clue?

Thank you in advance.

ROOT version: 6.24/06

test_numtr2.py (2.4 KB)

log_new.txt (2.6 KB)