Exemplo n.º 1
0
## random.seed(10)
for i in xrange(0, events):

    v1 = random.expovariate(1 / 3.0)
    if not 0 < v1 < 10: continue

    x.setVal(v1)
    dataset4.add(varset4)

    v2 = 10 - v1
    x.setVal(v2)
    dataset5.add(varset4)

import Ostap.FitModels as Models

positive = Models.PolyPos_pdf('PP', mass4, power=3)
increasing = Models.Monothonic_pdf('PI', mass4, power=3, increasing=True)
decreasing = Models.Monothonic_pdf('PD', mass4, power=3, increasing=False)
inc_convex = Models.Convex_pdf('PIX',
                               mass4,
                               power=3,
                               increasing=True,
                               convex=True)
dec_convex = Models.Convex_pdf('PDX',
                               mass4,
                               power=3,
                               increasing=False,
                               convex=True)
convex = Models.ConvexOnly_pdf('PX', mass4, power=3, convex=True)
concave = Models.ConvexOnly_pdf('PX', mass4, power=3, convex=False)
Exemplo n.º 2
0
if 0 != result.status() or 3 != result.covQual():
    logger.warning('Fit is not perfect MIGRAD=%d QUAL=%d ' %
                   (result.status(), result.covQual()))
    print result
else:
    print "\tPoly2e2    alpha=  %s " % result(m_p2e2.alpha.GetName())[0]
    print "\tPoly2e2    delta=  %s " % result(m_p2e2.delta.GetName())[0]
    for phi in m_p2e2.phis:
        print "\tPoly2e2:      phi=  %s " % phi.ve()

models.append(m_p2e2)

# =============================================================================
logger.info("Test  Poly(6)-Distribution")
# =============================================================================
m_p6 = Models.PolyPos_pdf('P6', x, power=6)

with rooSilent():
    result, f = m_p6.fitTo(dataset2)
    result, f = m_p6.fitTo(dataset2)

if 0 != result.status() or 3 != result.covQual():
    logger.warning('Fit is not perfect MIGRAD=%d QUAL=%d ' %
                   (result.status(), result.covQual()))
    print result
else:
    for phi in m_p6.phis:
        print "\tPoly6:       phi= %s " % phi.ve()

models.append(m_p6)
Exemplo n.º 3
0
    result, f = m_gamma.fitTo(dataset2)

if 0 != result.status() or 3 != result.covQual():
    logger.warning('Fit is not perfect MIGRAD=%d QUAL=%d ' %
                   (result.status(), result.covQual()))
    print result
else:
    print "\tGamma:       k    = %s " % result(m_gamma.k.GetName())[0]
    print "\tGamma:       theta= %s " % result(m_gamma.theta.GetName())[0]

models.append(m_gamma)

# =============================================================================
logger.info("Test  Poly(4)-Distribution")
# =============================================================================
m_p4 = Models.PolyPos_pdf('P4', x, power=4)

with rooSilent():
    result, f = m_p4.fitTo(dataset2)
    result, f = m_p4.fitTo(dataset2)

if 0 != result.status() or 3 != result.covQual():
    logger.warning('Fit is not perfect MIGRAD=%d QUAL=%d ' %
                   (result.status(), result.covQual()))
    print result
else:
    for phi in m_p4.phis:
        print "\tPoly6:       phi= %s " % phi.ve()

models.append(m_p4)