def test_pdf():
    logger = getLogger('test_pdf')
    effPdf = Models.Monotonic_pdf('P6', xvar=x, power=4, increasing=True)
    maxe = (margin * effPdf(xmax))
    s0 = min((1.0 / emax), (1.0 / maxe))
    scale = ROOT.RooRealVar('scaleX', 'scaleX', s0, (0.2 * s0), (5.0 * s0))
    eff2 = Efficiency1D('E2', effPdf, cut=acc, scale=scale)
    r2 = eff2.fitTo(ds)
    logger.info(('Fit result using-Monotonic_pdf \n%s' % r2.table(prefix='# ')))
    logger.info(('Compare with true efficiency (using Monotonic_pdf)\n%s' % make_table(eff2, title='using Monotonic_pdf')))
    with wait(2), use_canvas('test_pdf'):
        f2 = eff2.draw(ds, nbins=25)
def test_pdf():
    logger = getLogger('test_pdf')
    effPdf = Models.Monotonic_pdf('P6', xvar=x, power=4, increasing=True)
    maxe = (margin * effPdf(xmax))
    s0 = min((1.0 / emax), (1.0 / maxe))
    scale = ROOT.RooRealVar('scaleX', 'scaleX', s0, (0.2 * s0), (5.0 * s0))
    eff2 = Efficiency1D('E2', effPdf, cut=acc, scale=scale)
    r2 = eff2.fitTo(ds)
    logger.info(('Fit result using-Monotonic_pdf \n%s' % r2.table(prefix='# ')))
    logger.info(('Compare with true efficiency (using Monotonic_pdf)\n%s' % make_table(eff2, title='using Monotonic_pdf')))
    with wait(2), use_canvas('test_pdf'):
        f2 = eff2.draw(ds, nbins=25)