def test_vars1():
    from ostap.fitting.roofuncs import BernsteinPoly as BP
    logger = getLogger('test_vars1')
    f = BP('G', xvar=x, power=4)
    f.pars = (0.2, 0.2, 0.2, 0.2)
    eff2 = Efficiency1D('E3', f.fun, cut=acc, xvar=x)
    r2 = eff2.fitTo(ds)
    logger.info(('Fit result using-BernsteinPoly \n%s' % r2.table(prefix='# ')))
    logger.info(('Compare with true efficiency (using BernsteinPoly)\n%s' % make_table(eff2, title='using BernsteinPoly')))
    with wait(2), use_canvas('test_pdf'):
        f2 = eff2.draw(ds, nbins=25)
def test_vars1():
    from ostap.fitting.roofuncs import BernsteinPoly as BP
    logger = getLogger('test_vars1')
    f = BP('G', xvar=x, power=4)
    f.pars = (0.2, 0.2, 0.2, 0.2)
    eff2 = Efficiency1D('E3', f.fun, cut=acc, xvar=x)
    r2 = eff2.fitTo(ds)
    logger.info(('Fit result using-BernsteinPoly \n%s' % r2.table(prefix='# ')))
    logger.info(('Compare with true efficiency (using BernsteinPoly)\n%s' % make_table(eff2, title='using BernsteinPoly')))
    with wait(2), use_canvas('test_pdf'):
        f2 = eff2.draw(ds, nbins=25)