Hi @jonas,
I would appreciate your comments on this issue. Here are more details on this,
I have two categories “mumu” and “ee” and the corresponding PDFs are “model_mumu” and “model_ee”. I perform 2-dimensional simultaneous fit on data sample names “combData” as
sample = ROOT.RooCategory("sample", "sample")
sample.defineType("mumu")
sample.defineType("ee")
combData = ROOT.RooDataSet("combData","combined data",ROOT.RooArgSet(Mbc,deltaE),ROOT.RooFit.Index(sample),ROOT.RooFit.Import("mumu",roo_dataA1),ROOT.RooFit.Import("ee",roo_dataA3))
simPdf = ROOT.RooSimultaneous("simPdf", "simultaneous pdf", sample)
simPdf.addPdf(model_mumu,"mumu")
simPdf.addPdf(model_ee,"ee")
While plotting, I want to show combined data sample, with separate PDFs as well as combined PDF. The combined data sample can be plotted using,
combData.plotOn(yframe,ROOT.RooFit.Cut("sample==sample::mumu || sample==sample::ee"))
The separate PDF as well as PDF components can be plotted using,
simPdf.plotOn(yframe,ROOT.RooFit.Slice(sample,"mumu"),ROOT.RooFit.Components("bkg_mumu"),ROOT.RooFit.ProjWData(sample,combData))
simPdf.plotOn(yframe,ROOT.RooFit.Slice(sample,"mumu"),ROOT.RooFit.ProjWData(sample,combData))
But, what I don’t understand is how to plot “mumu+ee” PDF as well as mumu+ee component PDFs. I tried something like,
simPdf.plotOn(yframe,ROOT.RooFit.Slice(sample,"mumu,ee"),ROOT.RooFit.Components("bkg_mumu,bkg_ee"),ROOT.RooFit.ProjWData(sample,combData))
simPdf.plotOn(yframe,ROOT.RooFit.Slice(sample,"mumu, ee"),ROOT.RooFit.ProjWData(sample,combData))
but it doesn’t help.
Thanks