Hello ROOT experts,
I have a question concerning RooFit and how to handle a RooSimultaneous fit. In particular I start with a FOOT file (datafile pointer below) containing 2 trees:
TTree *tree_A = (TTree*)datafile->Get("emumass");
TTree *tree_B = (TTree*)datafile->Get("mumumass");
and then I define 2 datasets as:
RooDataSet data_A("data_emu","dataset with emu mass",tree_A,mass);
RooDataSet data_B("data_mumu","dataset with mumu mass",tree_B,mass);
Then, I want to make a Simulatenous fit with these two datasets, so I create a RooCategory :
RooCategory tagCat("tagCat","tagging Category");
tagCat.defineType("data_emu");
tagCat.defineType("data_mumu");
// Build PDFs for "data_emu" and "data_mumu" .... PDFA=bkg and PDFB=sig
RooSimultaneous simPdf("simPdf", "simPdf", tagCat);
simPdf.addPdf(sig, "data_mumu");
simPdf.addPdf(bkg, "data_emu");
My question is , how am I supposed to use the “fitTo” command since I have 2 datasets and not 1:
simPdf.fitTo(data);
Should have I first appended the datasets A and B in one ? Or is there another way I miss here ?
Thank you very much!
Georgia