Esempio n. 1
0
mK = 0.49369
mPion = 0.1396

bw = cpp.Gaudi.Math.Phi0(1.0195, 0.0043, mK)

signal = Models.BreitWigner_pdf('BW0',
                                bw,
                                mass=m_phi,
                                gamma=0.0043,
                                mean=1.0195,
                                convolution=0.0015)

## Phase space as background:
ps = cpp.Gaudi.Math.PhaseSpaceNL(2 * mK, 10.0, 2, 5)
bkg = Models.PSPol_pdf('PS0', mass=m_phi, phasespace=ps, power=1)

f2 = cpp.Gaudi.Math.Flatte2(0.980, 165, 4.21, mPion, mPion, mK, mK)

flatte = Models.Flatte2_pdf('F20', f2, mass=m_phi, m0_980=1.000, m0g1=0.165)

flatte.mean.fix(0.980)

model = Models.Fit1D(signal=signal, othersignals=[flatte], background=bkg)

model.S.fix(10000)
model.B.fix(5000)
model.S_1.fix(5000)

data = model.pdf.generate(varset, 20000)
Esempio 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 "\tPoly4e       tau=  %s " % result(m_p4e.tau.GetName())[0]
    for phi in m_p4e.phis:
        print "\tPoly4e:      phi=  %s " % phi.ve()

models.append(m_p4e)

# =============================================================================
logger.info("Test  Poly(4)*PS -Distribution")
# =============================================================================
ps = cpp.Gaudi.Math.PhaseSpaceNL(0, 20, 2, 4)
m_ps = Models.PSPol_pdf('PS', x, ps, power=4)

with rooSilent():
    result, f = m_ps.fitTo(dataset2)
    result, f = m_ps.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_ps.phis:
        print "\tPoly3ps:     phi=  %s " % phi.ve()

models.append(m_ps)
Esempio n. 3
0
sigPhi0 = Models.BreitWigner_pdf('Phi0',
                                 bw,
                                 mean=1.0195,
                                 gamma=0.0043,
                                 mass=m_phi,
                                 convolution=0.0005)

sigPhi = sigPhi0

ps2 = cpp.Gaudi.Math.PhaseSpaceNL(2 * 0.4937, 5.278 - 3.096, 2, 3)
model0 = Models.Fit2D(
    signal_1=sigB,
    signal_2=sigPhi0,
    ##
    bkg2=Models.PSPol_pdf('PSP0', m_phi, ps2, power=1),
    bkgB=Models.PSPol_pdf('PSB0', m_phi, ps2, power=1),
    suffix='_GEN')
model0.bkg1.tau.fix(0)
model0.bkgA.tau.fix(0)

model0.ss.fix(1000)
model0.sb.fix(300)
model0.bs.fix(300)
model0.bb.fix(300)

model1 = Models.Fit2D(
    signal_1=sigB,
    signal_2=sigPhi,
    ##
    bkg2=Models.PSPol_pdf('PSP', m_phi, ps2, power=1),