Ask: how to access the sub-dataset in the joint dataset

Dear RooFit expert,

May I ask a simple question? How to access the sub-dataset in a joint dataset?

I paste more code at the bottom. Here I just put the key part to discuss
[size=85] RooDataSet* obsData = new RooDataSet(“obsData”,"combined data ",*Observables, Index(*catelist), Import(“MET_2m”, *test11 ) );
[/size]
This is a test code. I could put more datasets into “obsData”. My question is how could I retrieve the “test11” from “obsData”?

Thank you in advance.

Cheers

Lei

P.S. most detailed code as following:

//==== read input root file of each category ====
g_inputfile[0] = new TFile( “…/…/Input/MET_2m/Limit_tot_2012_Normal_Histo2.root” );

//=== read input histogram from each category root file ===
//****** data signal background
g_dt_hist[0] = (TH1F *)g_inputfile[0]->Get(“HMass_Normaldata_2tag_MET1_2j”) ->Clone(“MET_2m_HMass_Normaldata_2tag_MET1_2j”);
g_bkg_hist[0][0] = (TH1F *)g_inputfile[0]->Get(“HMass_Normalconst_2tag_MET1_2j”)->Clone(“MET_2m_HMass_Normalconst_2tag_MET1_2j”);

atlas_invMass[0] = new RooRealVar(“atlas_invMass_MET_2m”, “atlas_invMass_MET_2m”, 125, 40, 290);
RooDataHist *new_data = new RooDataHist(“newdata1”,“datanew1”, atlas_invMass[0], g_dt_hist[0]);
RooDataSet
test11 = (RooDataSet *)new_data->Clone(“MET_2m_test”);

RooArgSet* Observables = new RooArgSet();
Observables->add(*atlas_invMass[0]);

RooCategory* catelist = new RooCategory(“catelist”,“catelist”);
catelist -> defineType( “MET_2m” ) ;

RooDataSet* obsData = new RooDataSet(“obsData”,"combined data ",*Observables, Index(*catelist), Import(“MET_2m”, *test11 ) );