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, ROOT.RooFit.RooConst(0), ROOT.RooFit.RooConst(0.1))
46ROOT.RooMsgService.instance().addStream(ROOT.RooFit.DEBUG, Topic=ROOT.RooFit.Integration)
49intLandau = landau.createIntegral({x})
50val = intLandau.getVal()
51print(
" [1] int_dx landau(x) = ", val)
58customConfig = ROOT.RooNumIntConfig(ROOT.RooAbsReal.defaultIntegratorConfig())
59integratorGKNotExisting = customConfig.method1D().setLabel(
"RooAdaptiveGaussKronrodIntegrator1D")
60if integratorGKNotExisting:
61 print(
"WARNING: RooAdaptiveGaussKronrodIntegrator is not existing because ROOT is built without Mathmore support")
64intLandau2 = landau.createIntegral({x}, NumIntConfig=customConfig)
65val2 = intLandau2.getVal()
66print(
" [2] int_dx landau(x) = ", val2)
73landau.setIntegratorConfig(customConfig)
77intLandau3 = landau.createIntegral({x})
78val3 = intLandau3.getVal()
79print(
" [3] int_dx landau(x) = ", val3)
83if not integratorGKNotExisting:
84 ROOT.RooAbsReal.defaultIntegratorConfig().method1D().setLabel(
"RooAdaptiveGaussKronrodIntegrator1D")
91 ROOT.RooAbsReal.defaultIntegratorConfig().getConfigSection(
"RooIntegrator1D").setRealValue(
"maxSteps", 30)
96 customConfig.getConfigSection(
"RooAdaptiveGaussKronrodIntegrator1D").setRealValue(
"maxSeg", 50)
97 customConfig.getConfigSection(
"RooAdaptiveGaussKronrodIntegrator1D").setCatLabel(
"method",
"15Points")
100 customConfig.getConfigSection(
"RooAdaptiveGaussKronrodIntegrator1D").find(
"method").Print(
"v")