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) with timing('Positive 5'), rooSilent(): r5, f = positive.fitTo(dataset5) with timing('Increasing 5'), rooSilent(): i5, f = increasing.fitTo(dataset5) with timing('Convex 5'), rooSilent():
result, f = m_d4.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_d4.phis: print "\tPoly4: phi= %s " % phi.ve() models.append(m_d4) # ============================================================================= logger.info("Test convex Poly(4)-Distribution") # ============================================================================= m_c4 = Models.Convex_pdf('C4', x, power=4, increasing=False, convex=True) with rooSilent(): result, f = m_c4.fitTo(dataset2) result, f = m_c4.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_c4.phis: print "\tPoly4: phi= %s " % phi.ve() models.append(m_c4)