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