Skip to content
Snippets Groups Projects

Lb2D0Lz Run3

Merged Dong Ao requested to merge aodong/Lb2DL into master
1 unresolved thread
2 files
+ 2
177
Compare changes
  • Side-by-side
  • Inline
Files
2
  • ca2261ce
    fix dv · ca2261ce
    dao authored
+ 0
174
@@ -132,180 +132,6 @@ def make_composite_dtf_variables(pvs, data, DTF=None, pv_constraint=False, mass_
return dtf_variables+DTF_chi2ndof
#
def make_dtf_variables_ddstar(pvs, input_data, ptype):
if ptype not in ["basic", "composite"]:
Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
DTF = DecayTreeFitter( name=f'DTF_{{hash}}' , input_particles=input_data)
DTF_PV = DecayTreeFitter( name=f'DTF_PV_{{hash}}' , input_particles=input_data, input_pvs=pvs)
DTF_PV_FixD = DecayTreeFitter( name=f'DTF_PV_FixD_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["D0", "D+"])
DTF_PV_FixDDstar = DecayTreeFitter( name=f'DTF_PV_FixDDstar_{{hash}}', input_particles=input_data, input_pvs=pvs, mass_constraints=["D0", "D+", "D*(2010)+"])
DTF_PV_FixB = DecayTreeFitter( name=f'DTF_PV_FixB_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["B+", "D0", "D+", "D*(2010)+"])
if ptype == "basic":
dtf_vars = make_basic_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
return dtf_vars
if ptype == "composite":
dtf_vars = make_composite_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
return dtf_vars
#
def make_dtf_variables_dstardstar(pvs, input_data, ptype):
if ptype not in ["basic", "composite"]:
Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
DTF = DecayTreeFitter( name=f'DTF_{{hash}}' , input_particles=input_data)
DTF_PV = DecayTreeFitter( name=f'DTF_PV_{{hash}}' , input_particles=input_data, input_pvs=pvs)
DTF_PV_FixD = DecayTreeFitter( name=f'DTF_PV_FixD_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["D0"])
DTF_PV_FixDDstar = DecayTreeFitter( name=f'DTF_PV_FixDDstar_{{hash}}', input_particles=input_data, input_pvs=pvs, mass_constraints=["D0", "D*(2010)+"])
DTF_PV_FixB = DecayTreeFitter( name=f'DTF_PV_FixB_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["B+", "D0", "D*(2010)+"])
if ptype == "basic":
dtf_vars = make_basic_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
return dtf_vars
if ptype == "composite":
dtf_vars = make_composite_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
return dtf_vars
#
def make_dtf_variables_d0dstar(pvs, input_data, ptype):
if ptype not in ["basic", "composite"]:
Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
DTF = DecayTreeFitter( name=f'DTF_{{hash}}' , input_particles=input_data)
DTF_PV = DecayTreeFitter( name=f'DTF_PV_{{hash}}' , input_particles=input_data, input_pvs=pvs)
DTF_PV_FixD = DecayTreeFitter( name=f'DTF_PV_FixD_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["D0"])
DTF_PV_FixDDstar = DecayTreeFitter( name=f'DTF_PV_FixDDstar_{{hash}}', input_particles=input_data, input_pvs=pvs, mass_constraints=["D0", "D*(2010)+"])
DTF_PV_FixB = DecayTreeFitter( name=f'DTF_PV_FixB_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["B0", "D0", "D*(2010)+"])
if ptype == "basic":
dtf_vars = make_basic_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
return dtf_vars
if ptype == "composite":
dtf_vars = make_composite_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
return dtf_vars
def make_dtf_variables_d0ds1(pvs, input_data, ptype):
if ptype not in ["basic", "composite"]:
Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
DTF = DecayTreeFitter( name=f'DTF_{{hash}}' , input_particles=input_data)
DTF_PV = DecayTreeFitter( name=f'DTF_PV_{{hash}}' , input_particles=input_data, input_pvs=pvs)
DTF_PV_FixD = DecayTreeFitter( name=f'DTF_PV_FixD_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["D0", "D_s+"])
DTF_PV_FixDDstar = DecayTreeFitter( name=f'DTF_PV_FixDDstar_{{hash}}', input_particles=input_data, input_pvs=pvs, mass_constraints=["D0", "D_s+", "D_s1(2460)+"])
DTF_PV_FixB = DecayTreeFitter( name=f'DTF_PV_FixB_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["B+", "D0", "D_s+", "D_s1(2460)+"])
DTF_PV_FixBn = DecayTreeFitter( name=f'DTF_PV_FixBn_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["B+", "D0", "D_s+"])
if ptype == "basic":
dtf_vars = make_basic_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixBn, pv_constraint=True, mass_constraint=True, particle_name="Bn")
return dtf_vars
if ptype == "composite":
dtf_vars = make_composite_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixBn, pv_constraint=True, mass_constraint=True, particle_name="Bn")
return dtf_vars
def make_dtf_variables_dds1(pvs, input_data, ptype):
if ptype not in ["basic", "composite"]:
Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
DTF = DecayTreeFitter( name=f'DTF_{{hash}}' , input_particles=input_data)
DTF_PV = DecayTreeFitter( name=f'DTF_PV_{{hash}}' , input_particles=input_data, input_pvs=pvs)
DTF_PV_FixD = DecayTreeFitter( name=f'DTF_PV_FixD_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["D+", "D_s+"])
DTF_PV_FixDDstar = DecayTreeFitter( name=f'DTF_PV_FixDDstar_{{hash}}', input_particles=input_data, input_pvs=pvs, mass_constraints=["D+", "D_s+", "D_s1(2460)+"])
DTF_PV_FixB = DecayTreeFitter( name=f'DTF_PV_FixB_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["B0", "D+", "D_s+", "D_s1(2460)+"])
DTF_PV_FixBn = DecayTreeFitter( name=f'DTF_PV_FixBn_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["B0", "D+", "D_s+"])
if ptype == "basic":
dtf_vars = make_basic_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixBn, pv_constraint=True, mass_constraint=True, particle_name="Bn")
return dtf_vars
if ptype == "composite":
dtf_vars = make_composite_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixBn, pv_constraint=True, mass_constraint=True, particle_name="Bn")
return dtf_vars
def make_dtf_variables_dstds1(pvs, input_data, ptype):
if ptype not in ["basic", "composite"]:
Exception(f"I want \'basic\' or \'composite\'. Got {ptype}")
DTF = DecayTreeFitter( name=f'DTF_{{hash}}' , input_particles=input_data)
DTF_PV = DecayTreeFitter( name=f'DTF_PV_{{hash}}' , input_particles=input_data, input_pvs=pvs)
DTF_PV_FixD = DecayTreeFitter( name=f'DTF_PV_FixD_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["D0", "D_s+", "D*(2010)+"])
DTF_PV_FixDDstar = DecayTreeFitter( name=f'DTF_PV_FixDDstar_{{hash}}', input_particles=input_data, input_pvs=pvs, mass_constraints=["D0", "D_s+", "D*(2010)+", "D_s1(2460)+"])
DTF_PV_FixB = DecayTreeFitter( name=f'DTF_PV_FixB_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["B0", "D0", "D_s+", "D*(2010)+", "D_s1(2460)+"])
DTF_PV_FixBn = DecayTreeFitter( name=f'DTF_PV_FixBn_{{hash}}' , input_particles=input_data, input_pvs=pvs, mass_constraints=["B0", "D0", "D_s+", "D*(2010)+"])
if ptype == "basic":
dtf_vars = make_basic_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
dtf_vars += make_basic_dtf_variables(pvs, input_data, DTF=DTF_PV_FixBn, pv_constraint=True, mass_constraint=True, particle_name="Bn")
return dtf_vars
if ptype == "composite":
dtf_vars = make_composite_dtf_variables(pvs, input_data, DTF=DTF, pv_constraint=False, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV, pv_constraint=True, mass_constraint=False)
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixD, pv_constraint=True, mass_constraint=True, particle_name="D")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixDDstar, pv_constraint=True, mass_constraint=True, particle_name="DDstar")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixB, pv_constraint=True, mass_constraint=True, particle_name="B")
dtf_vars += make_composite_dtf_variables(pvs, input_data, DTF=DTF_PV_FixBn, pv_constraint=True, mass_constraint=True, particle_name="Bn")
return dtf_vars
def make_dtf_variables_lb2d0lz(pvs, input_data, ptype):
Loading