Пример #1
0
from P2VV.Parameterizations.TimePDFs import LP2011_Background_Time as Background_Time
psi_t = Background_Time( Name = 'psi_t', time = time_obs, resolutionModel = sig_tres.model()
                         , psi_t_fml    = dict(Name = 'psi_t_fml',    Value = 6.7195e-01)
                         , psi_t_ll_tau = dict(Name = 'psi_t_ll_tau', Value = 1.3672, MinMax = (1,  2.5))
                         , psi_t_ml_tau = dict(Name = 'psi_t_ml_tau', Value = 1.3405e-01, MinMax = (0.01, 2.5))
                         )
psi_t = psi_t.pdf()

# J/psi signal component
psi_ll = Component('psi_ll', (psi_m, bkg_m, psi_t), Yield= (8.5575e+03,100,500000) )

# Background component
from P2VV.Parameterizations.TimePDFs import Prompt_Peak
background = Component('background', (bkg_mpsi.pdf(), bkg_m), Yield = (19620,100,500000) )
if options.add_background:
    bkg_t = Prompt_Peak(time_obs, bkg_tres.model(), Name = 'bkg_prompt_pdf')
    background[t] = bkg_t.pdf()

# B signal component
sig_t = Prompt_Peak(time_obs, resolutionModel = sig_tres.model(), Name = 'sig_t')

from P2VV.Parameterizations.MassPDFs import LP2011_Signal_Mass as Signal_Mass
sig_m = Signal_Mass(Name = 'sig_m', mass = m)
signal = Component('signal', (sig_m.pdf(), sig_t.pdf()), Yield = (3e5, 10000, 1e7))

# Prompt component
prompt_pdf = Prompt_Peak(time_obs, sig_tres.model(), Name = 'prompt_pdf')
prompt = Component('prompt', (prompt_pdf.pdf(), psi_m), Yield = (160160, 100, 500000))

# Read data
fit_mass = (options.fit_mass or not options.cache) or options.reduce
Пример #2
0
from P2VV.Parameterizations.TimeResolution import Multi_Gauss_TimeResolution as Multi_TimeResolution
tres_args = dict(time = t, sigmat = st, Cache = True)
tres_1 = Multi_TimeResolution(Name = 'tres', ParNamePrefix = 'one',
                              TimeResSFParam = 'linear',
                              timeResMu = dict(Value = 0.),
                              sf_one_offset = dict(Value = 0, Constant = True),
                              sf_one_slope = dict(Value = 1.174),
                              sf_two_offset = dict(Value = 0, Constant = True),
                              sf_two_slope = dict(Value = 2),
                              Fractions = [(2, 0.143)], **tres_args)
tres_2 = TimeResolution(Name = 'tres', ParNamePrefix = 'two', PerEventError = True,
                        timeResSigmaSF = dict(Value = 4.), **tres_args)

# Gaussians for Time
from P2VV.Parameterizations.TimePDFs import Prompt_Peak
g1 = Prompt_Peak(t, tres_1.model(), Name = 'g1')
g2 = Prompt_Peak(t, tres_2.model(), Name = 'g2')

# Mass shapes
from P2VV.Parameterizations.MassPDFs import Background_PsiMass as PsiBkgPdf
bkg_m = PsiBkgPdf(mpsi, Name = 'bkg_mpsi')

from P2VV.Parameterizations.MassPDFs import DoubleCB_Psi_Mass as PsiMassPdf
sig_m = PsiMassPdf(mpsi, Name = 'psi_m', mpsi_alpha_1 = dict(Value = 2, Constant = True),
                   mpsi_sigma_sf = dict(Value = 2.3), mpsi_frac = dict(Value = 0.8))

one = Component('one', [g1.pdf(), sig_m.pdf(), ln], Yield = (25000, 100, 100000))
two = Component('two', [g2.pdf(), bkg_m.pdf(), ln], Yield = (25000, 100, 100000))

sig_pdf = buildPdf(Name = 'sig_pdf', Components = [one], Observables = [mpsi, t, st])
bkg_pdf = buildPdf(Name = 'bkg_pdf', Components = [two], Observables = [mpsi, t, st])
Пример #3
0
                         )
psi_t = psi_t.pdf()

# Sigmat PDFs
from P2VV.Parameterizations.SigmatPDFs import DoubleLogNormal
sig_ln = DoubleLogNormal(st, ParNamePrefix = 'sig')
bkg_ln = DoubleLogNormal(st, ParNamePrefix = 'bkg')

# Background time pdf
from P2VV.Parameterizations.TimePDFs import Prompt_Peak
bkg_peak = Prompt_Peak(time_obs, bkg_tres.model(), Name = 'prompt_bkg')
bkg_t = Background_Time(Name = 'bkg_t', time = time_obs, resolutionModel = bkg_tres.model())

# J/psi signal component
psi_ll = Component('psi_ll', (psi_m, psi_t, sig_ln.pdf()), Yield= (8.5575e+03,100,500000) )
psi_prompt_pdf = Prompt_Peak(time_obs, sig_tres.model(), Name = 'psi_prompt_pdf')
psi_prompt = Component('psi_prompt', (psi_prompt_pdf.pdf(), psi_m, sig_ln.pdf()), Yield = (160160, 100, 500000))

# Background component
bkg_prompt_pdf = Prompt_Peak(time_obs, bkg_tres.model(), Name = 'bkg_prompt_pdf')
bkg_prompt = Component('bkg_prompt', (bkg_mpsi.pdf(), bkg_prompt_pdf.pdf(), bkg_ln.pdf()),
                       Yield = (19620,100,500000))
bkg_ll = Component('bkg_ll', (bkg_mpsi.pdf(), bkg_t.pdf(), bkg_ln.pdf()),
                    Yield = (19620,100,500000) )

from ROOT import RooKeysPdf
def observables(self):
    return self._observables
def conditional_observables(self):
    return set()
def external_constraints(self):
Пример #4
0
from P2VV.Parameterizations.SigmatPDFs import DoubleLogNormal
dln = DoubleLogNormal(st, frac_ln2 = dict(Value = 0.312508), k1 = dict(Value = 0.801757),
                      k2 = dict(Value = 1.37584), median = dict(Value = 0.0309409))
ln = dln.pdf()

# Resolution models
from P2VV.Parameterizations.TimeResolution import Gaussian_TimeResolution as TimeResolution
tres_args = dict(time = t, sigmat = st, PerEventError = True, Cache = True)
tres_1 = TimeResolution(Name = 'tres', ParNamePrefix = 'one',
                        timeResSigmaSF = dict(Value = 1.2), **tres_args)
tres_2 = TimeResolution(Name = 'tres', ParNamePrefix = 'two',
                        timeResSigmaSF = dict(Value = 2.), **tres_args)

# Gaussians
from P2VV.Parameterizations.TimePDFs import Prompt_Peak
g1 = Prompt_Peak(t, tres_1.model(), Name = 'g1')
g2 = Prompt_Peak(t, tres_2.model(), Name = 'g2')

one = Component('one', [g1.pdf(), ln])
frac2 = RealVar('frac2', Value = 0.2, MinMax = (0.01, 0.99))
two = Component('two', [g2.pdf(), ln], Yield = (frac2,))

pdf_one = buildPdf(Name = 'pdf_one', Components = [one], Observables = [t, st])
pdf = buildPdf(Name = 'pdf', Components = [one, two], Observables = [t, st])

from P2VV.Utilities.Resolution import SplitSigmat
split = SplitSigmat('', st)
sigmat_cat = split.split_cats()[0]

from P2VV import Dilution