Beispiel #1
0
                      k2 = dict(Value = 1.37584), median = dict(Value = 0.0309409))
ln = dln.pdf()

# Resolution models
from P2VV.Parameterizations.TimeResolution import Gaussian_TimeResolution as TimeResolution
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))
Beispiel #2
0
time_obs = t_diff if signal_MC else t

# now build the actual signal PDF...
from ROOT import RooGaussian as Gaussian
from ROOT import RooExponential as Exponential
from ROOT import RooDecay as Decay

# Time resolution model
sig_tres = None
if args[1] == 'single':
    from P2VV.Parameterizations.TimeResolution import Gaussian_TimeResolution as TimeResolution
    tres_args = dict(time = time_obs, sigmat = st, PerEventError = True,
                     BiasScaleFactor = False, Cache = True, MeanParameterisation = options.mu_param,
                     Simultaneous = options.simultaneous,
                     TimeResSFParam = options.sf_param, SplitMean = options.split_mean)
    sig_tres = TimeResolution(Name = 'tres', **tres_args)
    if options.add_background:
        bkg_tres = TimeResolution(Name = 'bkg_tres', ParNamePrefix = 'bkg', **tres_args)
elif args[1] == 'double':
    mu = dict(MinMax = (-0.010, 0.010))
    mu_values = {'MC11a_incl_Jpsi' : -0.000408, '2011_Reco14' : -0.00259,
                 '2011' : -0.00407301, '2012' : -0.00333,
                 'MC2011_Sim08a_incl_Jpsi' : -0.00076}
    mu['Value'] = mu_values.get(args[0], 0)
    # mu['Constant'] = options.simultaneous and not (options.split_mean or options.mu_param)
    from P2VV.Parameterizations.TimeResolution import Multi_Gauss_TimeResolution as TimeResolution
    sf_pee = options.simultaneous and options.sf_param
    tres_args = dict(time = time_obs, sigmat = st, Cache = True, Parameterise = options.parameterise,
                     TimeResSFParam = options.sf_param, SplitFracs = options.split_frac,
                     timeResMu = mu, Simultaneous = options.simultaneous,
                     ScaleFactors = [(2, 2.00), (1, 1.174)] if sf_pee else [(2, 0.1), (1, 0.06)],
project_vars = [hlt1_excl_biased_dec, hlt1_unbiased, hlt2_biased, hlt2_unbiased, run_period, st]

selected = Category('sel', States = {'Selected' : 1, 'NotSelected' : 0})

observables = [t, m, mpsi, st, hlt1_biased, hlt1_unbiased, hlt1_excl_biased_dec,
               hlt2_biased, hlt2_unbiased, hlt2_excl_biased, selected, nPV, run_period]

# now build the actual signal PDF...
from ROOT import RooGaussian as Gaussian
from ROOT import RooExponential as Exponential
from ROOT import RooDecay as Decay

from P2VV.Parameterizations.TimeResolution import Gaussian_TimeResolution as TimeResolution
tres = TimeResolution(Name = 'resolution', time = t, BiasScaleFactor = False,
                      timeResSigma = dict(Value = 0.045, Constant = True),
                      timeResMu = dict(Value = 0, Constant = True), Cache = False)

# B mass pdf
from P2VV.Parameterizations.MassPDFs import LP2011_Signal_Mass as Signal_BMass, LP2011_Background_Mass as Background_BMass
sig_m = Signal_BMass(Name = 'sig_m', mass = m, m_sig_mean = dict( Value = 5365, MinMax = (5363,5372)))

# Create combinatorical background component
bkg_m = Background_BMass( Name = 'bkg_m', mass = m, m_bkg_exp = dict( Name = 'm_bkg_exp' ) )

# Create components
signal_mass = Component('signal', (sig_m.pdf(),), Yield = (30000,100,100000))
background_mass = Component('background', (bkg_m.pdf(),), Yield = (100000,100,300000) )

## Build mass PDF
mass_pdf = buildPdf(Components = (signal_mass, background_mass), Observables = (m, ), Name='mass_pdf')