12from __future__
import print_function
21ROOT.RooAbsReal.defaultIntegratorConfig().Print(
"v")
34ROOT.RooAbsReal.defaultIntegratorConfig().setEpsAbs(1e-6)
35ROOT.RooAbsReal.defaultIntegratorConfig().setEpsRel(1e-6)
40x = ROOT.RooRealVar(
"x",
"x", -10, 10)
41landau = ROOT.RooLandau(
"landau",
"landau", x, 0.0, 0.1)
44landau.forceNumInt(
True)
48ROOT.RooMsgService.instance().addStream(ROOT.RooFit.DEBUG, Topic=ROOT.RooFit.Integration)
51intLandau = landau.createIntegral({x})
52val = intLandau.getVal()
53print(
" [1] int_dx landau(x) = ", val)
60customConfig = ROOT.RooNumIntConfig(ROOT.RooAbsReal.defaultIntegratorConfig())
61integratorGKNotExisting = customConfig.method1D().setLabel(
"RooAdaptiveGaussKronrodIntegrator1D")
62if integratorGKNotExisting:
63 print(
"WARNING: RooAdaptiveGaussKronrodIntegrator is not existing because ROOT is built without Mathmore support")
66intLandau2 = landau.createIntegral({x}, NumIntConfig=customConfig)
67val2 = intLandau2.getVal()
68print(
" [2] int_dx landau(x) = ", val2)
75landau.setIntegratorConfig(customConfig)
79intLandau3 = landau.createIntegral({x})
80val3 = intLandau3.getVal()
81print(
" [3] int_dx landau(x) = ", val3)
85if not integratorGKNotExisting:
86 ROOT.RooAbsReal.defaultIntegratorConfig().method1D().setLabel(
"RooAdaptiveGaussKronrodIntegrator1D")
93 ROOT.RooAbsReal.defaultIntegratorConfig().getConfigSection(
"RooIntegrator1D").setRealValue(
"maxSteps", 30)
98 customConfig.getConfigSection(
"RooAdaptiveGaussKronrodIntegrator1D").setRealValue(
"maxSeg", 50)
99 customConfig.getConfigSection(
"RooAdaptiveGaussKronrodIntegrator1D").setCatLabel(
"method",
"15Points")
102 customConfig.getConfigSection(
"RooAdaptiveGaussKronrodIntegrator1D").find(
"method").Print(
"v")