Hello RooFitters,
I am trying to perform some MC tests to check if we can recover a specified amount of injected signal. As a part of this test, we try to generate toy samples with zero events, where we would expect a delta function around zero, but we obtain a distribution shown below. Is this the expected behavior?
Screenshot 2018-09-21 13.48.50.pdf (31.0 KB)
RooWorkspace* r = new RooWorkspace("r");
r->factory().process("N_landau[17.1525631, 0., 50.]");
r->factory().process("RooLandau::landau(mjj[0., 100.], landau_mean[40.],"
"landau_width[10.])");
RooExtendPdf* extended_landau = new RooExtendPdf(
"extended_landau", "", *r->pdf("landau"), *r->var("N_landau"));
r->import(*extended_landau);
r->var("landau_mean")->setConstant();
r->var("landau_width")->setConstant();
extended_landau_mc_study = new RooMCStudy(*extended_landau,
*r->var("mjj"),
Binned(kTRUE),
Extended(),
FitOptions(Save(kTRUE)));
extended_landau_mc_study->generateAndFit(
1000, 0, kTRUE);