11from __future__
import print_function
20ROOT.RooAbsReal.defaultIntegratorConfig().
Print(
"v")
33ROOT.RooAbsReal.defaultIntegratorConfig().setEpsAbs(1e-6)
34ROOT.RooAbsReal.defaultIntegratorConfig().setEpsRel(1e-6)
41x = ROOT.RooRealVar(
"x",
"x", -10, 10)
42landau = ROOT.RooLandau(
"landau",
"landau", x,
43 ROOT.RooFit.RooConst(0), ROOT.RooFit.RooConst(0.1))
47ROOT.RooMsgService.instance().addStream(
48 ROOT.RooFit.DEBUG, ROOT.RooFit.Topic(ROOT.RooFit.Integration))
51intLandau = landau.createIntegral(ROOT.RooArgSet(x))
52val = intLandau.getVal()
53print(
" [1] int_dx landau(x) = ", val)
60customConfig = ROOT.RooNumIntConfig(
61 ROOT.RooAbsReal.defaultIntegratorConfig())
62integratorGKNotExisting = customConfig.method1D().setLabel(
"RooAdaptiveGaussKronrodIntegrator1D")
63if (integratorGKNotExisting) :
64 print(
"WARNING: RooAdaptiveGaussKronrodIntegrator is not existing because ROOT is built without Mathmore support")
67intLandau2 = landau.createIntegral(
68 ROOT.RooArgSet(x), ROOT.RooFit.NumIntConfig(customConfig))
69val2 = intLandau2.getVal()
70print(
" [2] int_dx landau(x) = ", val2)
77landau.setIntegratorConfig(customConfig)
81intLandau3 = landau.createIntegral(ROOT.RooArgSet(x))
82val3 = intLandau3.getVal()
83print(
" [3] int_dx landau(x) = ", val3)
87if (
not integratorGKNotExisting) :
88 ROOT.RooAbsReal.defaultIntegratorConfig().method1D().setLabel(
89 "RooAdaptiveGaussKronrodIntegrator1D")
96 ROOT.RooAbsReal.defaultIntegratorConfig().getConfigSection(
97 "RooIntegrator1D").setRealValue(
"maxSteps", 30)
102 customConfig.getConfigSection(
103 "RooAdaptiveGaussKronrodIntegrator1D").setRealValue(
"maxSeg", 50)
104 customConfig.getConfigSection(
105 "RooAdaptiveGaussKronrodIntegrator1D").setCatLabel(
"method",
"15Points")
108 customConfig.getConfigSection(
109 "RooAdaptiveGaussKronrodIntegrator1D").find(
"method").
Print(
"v")
void Print(std::ostream &os, const OptionType &opt)