def test_vars2():
    logger = getLogger('test_vars2')
    from ostap.fitting.roofuncs import MonotonicPoly as MP
    f = MP('G', xvar=x, increasing=True, power=4)
    f.pars = (0.6, 0.8, (- 0.1), (- 0.6))
    f.a = 0.06
    f.b = 2.72
    f.a.release()
    f.b.release()
    eff2 = Efficiency1D('E4', f, cut=acc, xvar=x)
    r2 = eff2.fitTo(ds)
    logger.info(('Fit result using-MonotonicPoly \n%s' % r2.table(prefix='# ')))
    logger.info(('Compare with true efficiency (using MonotonicPoly)\n%s' % make_table(eff2, title='using MonotonicPoly')))
    with wait(2), use_canvas('test_pdf'):
        f2 = eff2.draw(ds, nbins=25)
def test_vars2():
    logger = getLogger('test_vars2')
    from ostap.fitting.roofuncs import MonotonicPoly as MP
    f = MP('G', xvar=x, increasing=True, power=4)
    f.pars = (0.6, 0.8, (- 0.1), (- 0.6))
    f.a = 0.06
    f.b = 2.72
    f.a.release()
    f.b.release()
    eff2 = Efficiency1D('E4', f, cut=acc, xvar=x)
    r2 = eff2.fitTo(ds)
    logger.info(('Fit result using-MonotonicPoly \n%s' % r2.table(prefix='# ')))
    logger.info(('Compare with true efficiency (using MonotonicPoly)\n%s' % make_table(eff2, title='using MonotonicPoly')))
    with wait(2), use_canvas('test_pdf'):
        f2 = eff2.draw(ds, nbins=25)