本文整理汇总了Python中ROOT.RooRealVar.getBinning方法的典型用法代码示例。如果您正苦于以下问题:Python RooRealVar.getBinning方法的具体用法?Python RooRealVar.getBinning怎么用?Python RooRealVar.getBinning使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ROOT.RooRealVar
的用法示例。
在下文中一共展示了RooRealVar.getBinning方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Inverse
# 需要导入模块: from ROOT import RooRealVar [as 别名]
# 或者: from ROOT.RooRealVar import getBinning [as 别名]
# tauk = Inverse('tauk', 'tauk', kgamma)
## acceptance
spline_knots = [ 0.5, 1.0, 1.5, 2.0, 3.0, 12.0 ]
spline_coeffs = [ 5.03902e-01, 7.32741e-01, 9.98736e-01,
1.16514e+00, 1.25167e+00, 1.28624e+00 ]
assert(len(spline_knots) == len(spline_coeffs))
# knot binning
knotbinning = RooBinning(time.getMin(), time.getMax(),
'{}_knotbinning'.format(mode))
for v in spline_knots:
knotbinning.addBoundary(v)
knotbinning.removeBoundary(time.getMin())
knotbinning.removeBoundary(time.getMax())
oldbinning, lo, hi = time.getBinning(), time.getMin(), time.getMax()
time.setBinning(knotbinning, '{}_knotbinning'.format(mode))
time.setBinning(oldbinning)
time.setRange(lo, hi)
del knotbinning, oldbinning, lo, hi
# knot coefficients
coefflist = RooArgList()
for i, v in enumerate(spline_coeffs):
coefflist.add(const(v))
i = len(spline_coeffs)
coefflist.add(one)
spline_knots.append(time.getMax())
spline_knots.reverse()
fudge = (spline_knots[0] - spline_knots[1]) / (spline_knots[2] - spline_knots[1])
lastmycoeffs = RooArgList()