Residual distribution of simultaneous fit

Dear all,
i would like to put the residual distribution of a simultaneous fit.
I tried like this:

//my dataset
combData.plotOn(xframet,Cut(“sample==sample::signal”),RooFit::Name(“myHist1”));
//my pdf function
simPdf.plotOn(xframet,Slice(sample,“signal”),ProjWData(sample,combData),RooFit::Name(“myCurve1”)) ;
TCanvas canvas=new TCanvas (“canvas”,“c”,0,0,800,800);
canvas->cd();
RooHist
hresid = xframet->residHist() ;
RooPlot* frame2 = MrecJpsiMassCon.frame(Title(“Residual Distribution”)) ;
frame2->addPlotable(hresid,“P”) ;
frame2->Draw();

but it doesn’t work, because in this way I obtain exactly my dataset combData and not the residual distribution.
Could you please help me?

Thanks
Matthew