Skip to content
Snippets Groups Projects

RD common builders in the ThOr framework

Closed Vitalii Lisovskyi requested to merge vlisovsk_rd_builders_to_thor into master
@@ -79,7 +79,8 @@ def make_filter_tracks(
@configurable
def make_detached_tracks(name="rd_detached_tracks", mipchi2dvprimary_min=3.):
def make_rd_detached_tracks(name="rd_detached_tracks",
mipchi2dvprimary_min=3.):
"""
Return RD detached tracks.
"""
@@ -90,7 +91,7 @@ def make_detached_tracks(name="rd_detached_tracks", mipchi2dvprimary_min=3.):
@configurable
def make_detached_muons(
def make_rd_detached_muons(
name="rd_detached_muons",
mipchi2dvprimary_min=3., #TBC
pid=(F.PID_MU > 0.)):
@@ -105,7 +106,7 @@ def make_detached_muons(
@configurable
def make_detached_electrons(
def make_rd_detached_electrons(
name="rd_detached_electrons",
mipchi2dvprimary_min=3., #TBC
pid=(F.PID_E > 0.)):
@@ -120,7 +121,7 @@ def make_detached_electrons(
@configurable
def make_detached_pions(
def make_rd_detached_pions(
name="rd_detached_pions",
p_min=2 * GeV,
pt_min=250 * MeV,
@@ -139,7 +140,7 @@ def make_detached_pions(
@configurable
def make_detached_kaons(
def make_rd_detached_kaons(
name="rd_detached_kaons",
p_min=2 * GeV,
pt_min=250 * MeV,
@@ -150,7 +151,7 @@ def make_detached_kaons(
"""
return make_filter_tracks(
name=name,
make_particles=make_long_kaons,
make_particles=make_has_rich_long_kaons,
p_min=p_min,
pt_min=pt_min,
mipchi2dvprimary_min=mipchi2dvprimary_min,
@@ -158,7 +159,7 @@ def make_detached_kaons(
@configurable
def make_detached_protons(
def make_rd_detached_protons(
name="rd_detached_protons",
p_min=8.5 * GeV,
pt_min=250 * MeV,
@@ -169,7 +170,7 @@ def make_detached_protons(
"""
return make_filter_tracks(
name=name,
make_particles=make_long_protons,
make_particles=make_has_rich_long_protons,
p_min=p_min,
pt_min=pt_min,
mipchi2dvprimary_min=mipchi2dvprimary_min,
@@ -182,7 +183,7 @@ def make_detached_protons(
@configurable
def make_prompt_pions(name="rd_prompt_pions", pid=(F.PID_K < 0.)):
def make_rd_prompt_pions(name="rd_prompt_pions", pid=(F.PID_K < 0.)):
"""
Return RD prompt pions.
"""
@@ -191,7 +192,7 @@ def make_prompt_pions(name="rd_prompt_pions", pid=(F.PID_K < 0.)):
@configurable
def make_prompt_kaons(name="rd_prompt_kaons", pid=(F.PID_K > 0.)):
def make_rd_prompt_kaons(name="rd_prompt_kaons", pid=(F.PID_K > 0.)):
"""
Return RD prompt kaons.
"""
@@ -200,9 +201,9 @@ def make_prompt_kaons(name="rd_prompt_kaons", pid=(F.PID_K > 0.)):
@configurable
def make_prompt_protons(name="rd_prompt_protons",
p_min=10. * GeV,
pid=(F.PID_P > 0.)):
def make_rd_prompt_protons(name="rd_prompt_protons",
p_min=10. * GeV,
pid=(F.PID_P > 0.)):
"""
Return RD prompt protons.
"""
@@ -219,20 +220,20 @@ def make_prompt_protons(name="rd_prompt_protons",
def make_down_tracks(name="rd_down_tracks",
pid=None): #do we really need this one?
"""
Return RD down hadrons with pion mass hypothesis.
Return RD downstream hadrons with pion mass hypothesis.
"""
return make_filter_tracks(
make_particles=make_down_pions, name=name, pid=pid)
def make_detached_down_pions(
def make_rd_detached_down_pions(
name="rd_detached_down_pions",
#mipchi2dvprimary_min=3., #this does not work
pt_min=0. * MeV,
p_min=0 * GeV,
pid=None):
"""
Return RD down hadrons with pion mass hypothesis.
Return RD downstream hadrons with pion mass hypothesis.
"""
return make_filter_tracks(
make_particles=make_down_pions,
@@ -243,14 +244,14 @@ def make_detached_down_pions(
pid=pid)
def make_detached_down_kaons(
def make_rd_detached_down_kaons(
name="rd_detached_down_kaons",
#mipchi2dvprimary_min=3., #TBC
pt_min=0. * MeV,
p_min=0 * GeV,
pid=None):
"""
Return RD down hadrons with kaon mass hypothesis.
Return RD downstream hadrons with kaon mass hypothesis.
"""
return make_filter_tracks(
make_particles=make_down_kaons,
@@ -261,14 +262,14 @@ def make_detached_down_kaons(
pid=pid)
def make_detached_down_protons(
def make_rd_detached_down_protons(
name="rd_detached_down_protons",
#mipchi2dvprimary_min=3., #TBC
pt_min=0. * MeV,
p_min=0 * GeV,
pid=None):
"""
Return RD down hadrons with proton mass hypothesis.
Return RD downstream hadrons with proton mass hypothesis.
"""
return make_filter_tracks(
make_particles=make_down_protons,
@@ -338,7 +339,7 @@ def make_rd_merged_pi0s(name="rd_merged_pi0s",
@configurable
def make_rd_ks0_lls(
name="rd_ks0_lls",
make_pions=make_detached_pions,
make_pions=make_rd_detached_pions,
make_pvs=make_pvs,
am_min=460 * MeV, # ~40 MeV window
am_max=540 * MeV,
@@ -374,7 +375,7 @@ def make_rd_ks0_lls(
@configurable
def make_rd_ks0_dds(
name="rd_ks0_dds",
make_pions=make_detached_down_pions,
make_pions=make_rd_detached_down_pions,
make_pvs=make_pvs,
am_min=420 * MeV, # ~75 MeV window
am_max=570 * MeV,
@@ -410,8 +411,8 @@ def make_rd_ks0_dds(
@configurable
def make_rd_lambda_lls(
name="rd_lambda_lls",
make_protons=make_detached_protons,
make_pions=make_detached_pions,
make_protons=make_rd_detached_protons,
make_pions=make_rd_detached_pions,
make_pvs=make_pvs,
am_min=1076 * MeV, # ~40 MeV window
am_max=1156 * MeV,
@@ -455,8 +456,8 @@ def make_rd_lambda_lls(
@configurable
def make_rd_lambda_dds(
name="rd_lambda_dds",
make_protons=make_detached_down_protons,
make_pions=make_detached_down_pions,
make_protons=make_rd_detached_down_protons,
make_pions=make_rd_detached_down_pions,
make_pvs=make_pvs,
am_min=1050 * MeV, # ~65 MeV window
am_max=1180 * MeV,
@@ -504,8 +505,8 @@ def make_rd_lambda_dds(
@configurable
def make_rd_detached_kstar0s(name="rd_detached_kstar0s",
make_detached_pions=make_detached_pions,
make_detached_kaons=make_detached_kaons,
make_rd_detached_pions=make_rd_detached_pions,
make_rd_detached_kaons=make_rd_detached_kaons,
make_pvs=make_pvs,
am_min=592 * MeV,
am_max=1192 * MeV,
@@ -521,8 +522,8 @@ def make_rd_detached_kstar0s(name="rd_detached_kstar0s",
"StdVeryLooseDetachedKstar" cuts.
'''
pions = make_detached_pions(p_min=pi_p_min, pt_min=pi_pt_min)
kaons = make_detached_kaons(p_min=k_p_min, pt_min=k_pt_min)
pions = make_rd_detached_pions(p_min=pi_p_min, pt_min=pi_pt_min)
kaons = make_rd_detached_kaons(p_min=k_p_min, pt_min=k_pt_min)
descriptor = '[K*(892)0 -> K+ pi-]cc'
combination_code = require_all(
in_range(am_min, F.MASS, am_max), F.MAXDOCACHI2CUT(adocachi2cut))
@@ -538,7 +539,7 @@ def make_rd_detached_kstar0s(name="rd_detached_kstar0s",
@configurable
def make_rd_detached_phis(
name="rd_detached_phis",
make_detached_kaons=make_detached_kaons,
make_rd_detached_kaons=make_rd_detached_kaons,
make_pvs=make_pvs,
am_max=1100 * MeV, #min is the di-kaon threshold anyway
k_p_min=2 * GeV,
@@ -551,7 +552,7 @@ def make_rd_detached_phis(
"StdLooseDetachedPhi2KK" cuts.
'''
kaons = make_detached_kaons(p_min=k_p_min, pt_min=k_pt_min)
kaons = make_rd_detached_kaons(p_min=k_p_min, pt_min=k_pt_min)
descriptor = 'phi(1020) -> K+ K-'
combination_code = require_all(F.MASS < am_max,
F.MAXDOCACHI2CUT(adocachi2cut))
@@ -572,7 +573,9 @@ def make_rd_detached_phis(
@configurable
def filter_dimuon_noMVA(max_dimuon_mass=6000 * MeV):
dimuons = make_detached_mumu(probnn_mu=0.05, pt_mu=150 * MeV)
dimuons = make_detached_mumu(
probnn_mu=0.0,
pt_mu=150 * MeV) # I think the ProbNN does not work properly atm
code = require_all(F.MASS < max_dimuon_mass)
return ParticleFilter(dimuons, F.FILTER(code))
@@ -596,7 +599,7 @@ def filter_dielectron_noMVA(max_dielectron_mass=6000 * MeV):
@configurable
def make_rd_tauons_hadronic_decay(
name="rd_tauons_hadronic_decay",
make_pions=make_detached_pions,
make_pions=make_rd_detached_pions,
descriptor="[tau+ -> pi- pi+ pi+]cc",
pi_pt_min=150 * MeV,
pi_ipchi2_min=4.0,
Loading