def test_vars3():
    logger = getLogger('test_vars3')
    a = ROOT.RooRealVar('A', 'a', 0.05, 0, 1)
    b = ROOT.RooRealVar('B', 'b', 0.02, (- 0.05), 0.1)
    c = ROOT.RooRealVar('C', 'c', 0.005, 0, 0.1)
    import ostap.fitting.roofuncs as R
    from ostap.fitting.funbasic import Fun1D
    X = Fun1D(x, xvar=x, name='X')
    F = ((a + (b * X)) + (c * (X ** 2)))
    eff2 = Efficiency1D('E5', F, cut=acc, xvar=x)
    r2 = eff2.fitTo(ds)
    logger.info(('Fit result using-Fun1D \n%s' % r2.table(prefix='# ')))
    logger.info(('Compare with true efficiency (using Fun1D)\n%s' % make_table(eff2, title='using Fnu1D')))
    with wait(2), use_canvas('test_vars3'):
        f2 = eff2.draw(ds, nbins=25)
def test_vars3():
    logger = getLogger('test_vars3')
    a = ROOT.RooRealVar('A', 'a', 0.05, 0, 1)
    b = ROOT.RooRealVar('B', 'b', 0.02, (- 0.05), 0.1)
    c = ROOT.RooRealVar('C', 'c', 0.005, 0, 0.1)
    import ostap.fitting.roofuncs as R
    from ostap.fitting.funbasic import Fun1D
    X = Fun1D(x, xvar=x, name='X')
    F = ((a + (b * X)) + (c * (X ** 2)))
    eff2 = Efficiency1D('E5', F, cut=acc, xvar=x)
    r2 = eff2.fitTo(ds)
    logger.info(('Fit result using-Fun1D \n%s' % r2.table(prefix='# ')))
    logger.info(('Compare with true efficiency (using Fun1D)\n%s' % make_table(eff2, title='using Fnu1D')))
    with wait(2), use_canvas('test_vars3'):
        f2 = eff2.draw(ds, nbins=25)