st.setBins(200, 'cache') t = RealVar('time', Title = 'decay time', Unit='ps', Observable = True, MinMax = (-1, 1)) 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 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 ROOT import RooExponential as Exponential from ROOT import RooDecay as Decay # Time resolution model sig_tres = None mu = dict(MinMax = (-0.010, 0.010)) mu['Constant'] = False mu['Value'] = -0.00407301 from P2VV.Parameterizations.TimeResolution import Multi_Gauss_TimeResolution as TimeResolution ## Signal and background time resolutions. tres_args = dict(time = time_obs, sigmat = st, Cache = True, Parameterise = 'RMS', TimeResSFParam = 'linear_no_offset', timeResMu = mu, ScaleFactors = [(2, 2.1), (1, 1.26)], Fractions = [(2, 0.2)]) sig_tres = TimeResolution(Name = 'sig_tres', **tres_args) # Resolution models bkg_tres = TimeResolution(Name = 'bkg_tres', ParNamePrefix = 'bkg', time = time_obs, sigmat = st, Cache = True, Parameterise = 'RMS', TimeResSFParam = 'linear_no_offset', timeResMu = mu, ScaleFactors = [(2, 2.1), (1, 1.26)], Fractions = [(2, 0.2)]) # J/psi mass pdf from P2VV.Parameterizations.MassPDFs import DoubleCB_Psi_Mass as PsiMassPdf psi_m = PsiMassPdf(mpsi, Name = 'psi_m', mpsi_alpha_1 = dict(Name = 'mpsi_alpha_1', Value = 2., Constant = True)) psi_m = psi_m.pdf() # J/psi background from P2VV.Parameterizations.MassPDFs import Background_PsiMass as PsiBkgPdf bkg_mpsi = PsiBkgPdf(mpsi, Name = 'bkg_mpsi')
project_vars = [st, excl_biased] # now build the actual signal PDF... from ROOT import RooGaussian as Gaussian from ROOT import RooExponential as Exponential from ROOT import RooDecay as Decay # B time PDF from P2VV.Parameterizations.TimeResolution import Multi_Gauss_TimeResolution as TimeResolution tres_args = dict(time = t, sigmat = st, Cache = True, Parameterise = 'RMS', TimeResSFParam = 'linear', SplitFracs = False, ScaleFactors = [(2, 2.1), (1, 1.26)], Fractions = [(2, 0.2)], SplitMean = False) tres = TimeResolution(Name = 'tres', **tres_args) from P2VV.Parameterizations.TimePDFs import Single_Exponent_Time as TimePdf sig_t = TimePdf(t, tres.model()) # B mass pdf from P2VV.Parameterizations.MassPDFs import DoubleGauss_Signal_Mass as MassPdf sig_m = MassPdf(m, Name = 'sig_m', AvSigParameterisation = True) sig_m = sig_m.pdf() # background psi_c = RealVar( 'psi_c', Unit = '1/MeV', Value = -0.0004, MinMax = (-0.1, -0.0000001)) bkg_m = Pdf(Name = 'bkg_m', Type = Exponential, Parameters = [m, psi_c]) background = Component('background', (bkg_m,), Yield= (200000,500,5000000) ) signal = Component('signal', (sig_m, sig_t.pdf()), Yield= (200000,500,500000) )