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])
psi_m = PsiMassPdf(mpsi, Name = 'psi_m', mpsi_alpha_1 = dict(Value = 2, Constant = (year == '2011')), ParameteriseSigma = options.mass_param) psi_m = psi_m.pdf() # J/psi background from P2VV.Parameterizations.MassPDFs import Background_PsiMass as PsiBkgPdf bkg_mpsi = PsiBkgPdf(mpsi, Name = 'bkg_mpsi') # Create combinatorical background component mean = RealVar(Name = 'mean', Value = 5368, MinMax = (5300, 5400)) sigma = RealVar(Name = 'sigma', Value = 50, MinMax = (1, 500)) bkg_m = Pdf(Name = 'gauss', Type = Gaussian, Parameters = (m, mean, sigma)) # Create psi background component 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()
# Build the acceptance using the histogram as starting values input_file = os.path.join(base_location, 'data/start_values.root') ## hists = {hlt1_excl_biased_dec : {'excl_biased' : {'histogram' : 'hlt1_shape', 'average' : (6.285e-01, 1.633e-02)}, ## 'unbiased' : { 'bins' : t.getRange(), 'heights' : [0.5]}}} ## hists = {hlt1_excl_biased_dec : {'exclB' : {'histogram' : 'hlt1_shape'}, ## 'notExclB' : { 'bins' : t.getRange(), 'heights' : [0.7]}}, ## hlt2_biased : { 'B' : {'histogram' : 'hlt2_shape'}}, ## hlt2_unbiased : { 'UB' : {'histogram' : 'hlt2_shape'}}} hists = {hlt1_excl_biased_dec : {'exclB' : {'histogram' : 'hlt1_shape'}, 'notExclB' : { 'bins' : t.getRange(), 'heights' : [0.7]}}, hlt2_biased : { 'B' : {'histogram' : 'hlt2_shape'}}, hlt2_unbiased : { 'UB' : {'bins' : t.getRange(), 'heights' : [0.7]}}} from P2VV.Parameterizations.TimePDFs import Single_Exponent_Time pdf_wrapper = Single_Exponent_Time(Name = 'pdf', time = t, resolutionModel = tres.model()) tau = pdf_wrapper._tau pdf = pdf_wrapper.pdf() split_cats = [[run_period]] from itertools import chain split_pars = [[tau]] sim_pdf = SimultaneousPdf(pdf.GetName() + '_simul', MasterPdf = pdf, SplitCategories = split_cats, SplitParameters = split_pars) from ROOT import RooArgSet, RooArgList split_cat_pars = RooArgSet() sim_pdf.treeNodeServerList(split_cat_pars) split_cat = sim_pdf.indexCat() input_cats = RooArgList(split_cat) if split_cat.isFundamental() else split_cat.inputCatList() prototype = tres.model()