Skip to content
Snippets Groups Projects

fanjie/run3_Lb2LcDKpi

Closed Fanjie Meng requested to merge fanjie/run3_Lb2LcDKpi into master
1 unresolved thread
4 files
+ 26
14
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -9,6 +9,7 @@ particle_dict = {"Lambda_b0": {"abbr": "Lb", "type": "toplevel", "daughters":[]}
"B_s0": {"abbr": "Bs", "type": "toplevel", "daughters":[]},
"J/psi(1S)": {"abbr": "Jpsi", "type": "composite", "daughters": ["mu+", "mu-"]},
"psi(2S)": {"abbr": "psi2S", "type": "composite", "daughters": ["mu+", "mu-"]},
"phi(1020)": {"abbr": "phi", "type": "composite", "daughters": ["K+", "K-"]},
"Lambda0": {"abbr": "Lambda", "type": "composite", "daughters": ["p+", "pi-"]},
"Lambda~0": {"abbr": "Lambda", "type": "composite", "daughters": ["p~-", "pi+"]},
"mu+": {"abbr": "mup", "type": "basic", "daughters":[]},
@@ -33,6 +34,7 @@ def descriptor(particles, cc=False):
def decay_branches(mother, daughters, decay_descriptor):
psi_pos = 0
phi_pos = 0
Lambda_pos = 0
Pm_pos = Pp_pos = 0
Km_pos = Kp_pos = 0
@@ -64,6 +66,10 @@ def decay_branches(mother, daughters, decay_descriptor):
true_pos = branch_descriptor.rfind("(", 0, branch_descriptor.find("psi", psi_pos))
branches.update({daughter: branch_descriptor[:true_pos]+"^"+branch_descriptor[true_pos:]})
psi_pos = branch_descriptor.find("psi", psi_pos) + len("psi(nS)")
if "phi" in daughter:
true_pos = branch_descriptor.rfind("(", 0, branch_descriptor.find("phi", phi_pos))
branches.update({daughter: branch_descriptor[:true_pos]+"^"+branch_descriptor[true_pos:]})
phi_pos = branch_descriptor.find("phi", phi_pos) + len("phi(1020)")
if "Lambda" in daughter:
true_pos = branch_descriptor.rfind("(", 0, branch_descriptor.find("Lambda", Lambda_pos))
branches.update({daughter: branch_descriptor[:true_pos]+"^"+branch_descriptor[true_pos:]})
@@ -124,20 +130,14 @@ def default_names(particles):
abbr = particle_df["abbr"][ particle ]
names.append( abbr )
names += [f"{daughter_abbr}_{abbr}" for daughter_abbr in particle_df["abbr"][particle_df["daughters"][particle]]]
#if particle == "J/psi(1S)" or particle == "psi(2S)":
# names += ["mup_psi", "mum_psi"]
#elif particle == "Lambda0":
# names += ["Pp_Lambda", "Pim_Lambda"]
#elif particle == "Lambda~0":
# names += ["Pm_Lambda", "Pip_Lambda"]
return names
def default_branches(particles, cc=False):
names = default_names(particles)
return decay_branches(names[0], names[1:], descriptor(particles, cc))
#branches = default_branches( ["B+","J/psi(1S)", "p+", "Lambda~0"], True)
#print(branches)
branches = default_branches( ["B+","J/psi(1S)", "phi(1020)", "K+"], True)
print(branches)
#branches = decay_branches("Bs", ["Jpsi", "Pp", "Pm", "mup", "mum"], "[B_s0 -> J/psi(1S) p+ p~-]cc")
#print(branches)
Loading