RooDataHist with RooSuperCategory

Hi,

I have a workspace set up (see code below) where I have imported two categories set up so that I can use use a RooSimWSTool to build a simultaneous p.d.f, where some parameters are split across only one of the categories and the others are split across the product of the two categories.

That works fine, but later on I want to import 8 histograms into each of the 8 product categories to create a RooDataHist object. Usually I could use the method:

RooDataHist(const char* name, const char* title, const RooArgList& vars, RooCategory& indexCat, map<std::string,RooDataHist*> dhistMap, Double_t wgt = 1.0)

but this doesn’t seem to be implemented for RooSuperCategory. Is there a workaround?

RooCategory *cat_bec = new RooCategory("cat_bec","cat_bec");
  cat_bec->defineType("yL");
  cat_bec->defineType("yH");
  RooCategory *cat_ptcts = new RooCategory("cat_ptcts","cat_ptcts");
  cat_ptcts->defineType("ptL_ctsL");
  cat_ptcts->defineType("ptL_ctsH");
  cat_ptcts->defineType("ptH_ctsL");
  cat_ptcts->defineType("ptH_ctsH");

  RooWorkspace *wsBase = constructWorkspace();
  wsBase->import(*cat_bec);
  wsBase->import(*cat_ptcts);
  //now associate to a grand ws
  RooSimWSTool *simtool = new RooSimWSTool(*wsBase);
  simtool->build("simModel","tot",SplitParam("c0,c1,c2,yieldBgd,channelFrac,channelFracExtraStateA,channelFracExtraStateB","cat_bec,cat_ptcts"), \
		 SplitParam("R,narrowFrac,sigma,sigmaExtraStateA,sigmaExtraStateB","cat_bec"));