Numeric algorithm tuning: configuration and customization of how MC sampling algorithms on specific p.d.f.s are executed
import ROOT
x = ROOT.RooRealVar("x", "x", 0, 10)
model = ROOT.RooChebychev("model", "model", x, ROOT.RooArgList(
ROOT.RooFit.RooConst(0), ROOT.RooFit.RooConst(0.5), ROOT.RooFit.RooConst(-0.1)))
ROOT.RooAbsPdf.defaultGeneratorConfig().method1D(
ROOT.kFALSE, ROOT.kFALSE).setLabel("RooAcceptReject")
data_ar = model.generate(ROOT.RooArgSet(
x), 10000, ROOT.RooFit.Verbose(ROOT.kTRUE))
data_ar.Print()
model.specialGeneratorConfig(ROOT.kTRUE).method1D(
ROOT.kFALSE, ROOT.kFALSE).setLabel("RooFoamGenerator")
ROOT.RooAbsPdf.defaultGeneratorConfig().getConfigSection(
"RooAcceptReject").setRealValue("nTrial1D", 2000)
model.specialGeneratorConfig().getConfigSection(
"RooFoamGenerator").setRealValue("chatLevel", 1)
data_foam = model.generate(ROOT.RooArgSet(x), 10000, ROOT.RooFit.Verbose())
data_foam.Print()
- Date
- February 2018
- Authors
- Clemens Lange, Wouter Verkerke (C++ version)
Definition in file rf902_numgenconfig.py.