RooMCStudy with simultaneous fit

Let me answer my own question here:

one needs to pass the variable as RooArgSet that contains the variable itself and the category to RooMcStudy. So it should look like this:

fitvar = RooRealVar( ... )
category = RooCategory( ... )
combined_model = RooSimultaneous( ... )

mcstudy = RooMCStudy( combined_model, RooArgSet( fitvar, category ), ... )
5 Likes