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
1 file
+ 97
41
Compare changes
  • Side-by-side
  • Inline
@@ -28,15 +28,15 @@ from Hlt2Conf.standard_particles import (
make_has_rich_long_kaons,
make_has_rich_long_protons,
make_long_pions,
#make_long_kaons,
#make_long_protons,
make_long_kaons,
make_long_protons,
#make_has_rich_down_pions, make_has_rich_down_kaons, make_has_rich_down_protons, # we don't usually need RICH info in fact for D tracks
make_down_pions,
make_down_kaons,
make_down_protons,
#make_KsLL, make_KsDD, make_LambdaLL, make_LambdaDD, # we build our own versions below
make_long_muons,
make_long_electrons_no_brem,
make_long_electrons_with_brem,
make_photons,
make_resolved_pi0s,
make_merged_pi0s,
@@ -77,17 +77,16 @@ def make_filter_tracks(
# Detached #
####################################
@configurable
def make_rd_detached_tracks(name="rd_detached_tracks",
mipchi2dvprimary_min=3.):
"""
Return RD detached tracks.
"""
return make_filter_tracks(
name=name,
make_particles=make_long_pions,
mipchi2dvprimary_min=mipchi2dvprimary_min)
# @configurable
# def make_rd_detached_tracks(name="rd_detached_tracks",
# mipchi2dvprimary_min=3.):
# """
# Return RD detached tracks.
# """
# return make_filter_tracks(
# name=name,
# make_particles=make_long_pions,
# mipchi2dvprimary_min=mipchi2dvprimary_min)
@configurable
@@ -96,7 +95,7 @@ def make_rd_detached_muons(
mipchi2dvprimary_min=3., #TBC
pid=(F.PID_MU > 0.)):
"""
Return RD detached pions.
Return RD detached muons.
"""
return make_filter_tracks(
name=name,
@@ -111,11 +110,11 @@ def make_rd_detached_electrons(
mipchi2dvprimary_min=3., #TBC
pid=(F.PID_E > 0.)):
"""
Return RD detached pions.
Return RD detached electrons with brem recovery.
"""
return make_filter_tracks(
name=name,
make_particles=make_long_electrons_no_brem,
make_particles=make_long_electrons_with_brem,
mipchi2dvprimary_min=mipchi2dvprimary_min,
pid=pid)
@@ -126,7 +125,7 @@ def make_rd_detached_pions(
p_min=2 * GeV,
pt_min=250 * MeV,
mipchi2dvprimary_min=3., #TBC
pid=(F.PID_K <= 0.)):
pid=(F.PID_K <= 2.)):
"""
Return RD detached pions.
"""
@@ -145,13 +144,13 @@ def make_rd_detached_kaons(
p_min=2 * GeV,
pt_min=250 * MeV,
mipchi2dvprimary_min=3., #TBC
pid=(F.PID_K > 0.)):
pid=(F.PID_K > -2.)):
"""
Return RD detached kaons.
"""
return make_filter_tracks(
name=name,
make_particles=make_has_rich_long_kaons,
make_particles=make_long_kaons,
p_min=p_min,
pt_min=pt_min,
mipchi2dvprimary_min=mipchi2dvprimary_min,
@@ -161,13 +160,71 @@ def make_rd_detached_kaons(
@configurable
def make_rd_detached_protons(
name="rd_detached_protons",
p_min=8.5 * GeV,
p_min=2. * GeV,
pt_min=250 * MeV,
mipchi2dvprimary_min=3., #TBC
pid=(F.PID_P > 0.)):
pid=(F.PID_P > -2.)):
"""
Return RD detached protons.
"""
return make_filter_tracks(
name=name,
make_particles=make_long_protons,
p_min=p_min,
pt_min=pt_min,
mipchi2dvprimary_min=mipchi2dvprimary_min,
pid=pid)
@configurable
def make_rd_has_rich_detached_pions(
name="rd_has_rich_detached_pions",
p_min=2 * GeV,
pt_min=250 * MeV,
mipchi2dvprimary_min=3., #TBC
pid=(F.PID_K <= 0.)):
"""
Return RD detached pions with hasRich.
"""
return make_filter_tracks(
name=name,
make_particles=make_has_rich_long_pions,
p_min=p_min,
pt_min=pt_min,
mipchi2dvprimary_min=mipchi2dvprimary_min,
pid=pid)
@configurable
def make_rd_has_rich_detached_kaons(
name="rd_has_rich_detached_kaons",
p_min=2 * GeV,
pt_min=250 * MeV,
mipchi2dvprimary_min=3., #TBC
pid=(F.PID_K > 0.)):
"""
Return RD detached kaons with hasRich.
"""
return make_filter_tracks(
name=name,
make_particles=make_has_rich_long_kaons,
p_min=p_min,
pt_min=pt_min,
mipchi2dvprimary_min=mipchi2dvprimary_min,
pid=pid)
@configurable
def make_rd_has_rich_detached_protons(
name="rd_has_rich_detached_protons",
p_min=8.5 *
GeV, #kaon RICH threshold below which we have no p-K separation
pt_min=250 * MeV,
mipchi2dvprimary_min=3., #TBC
pid=require_all(F.PID_P > 0., F.PID_P - F.PID_K > -2.)):
"""
Return RD detached protons with hasRich.
"""
return make_filter_tracks(
name=name,
make_particles=make_has_rich_long_protons,
@@ -294,7 +351,7 @@ def make_rd_photons(name="rd_photons",
e_min=0 * MeV):
"""For the time being just a dummy selection"""
code = require_all(F.PT > et_min)
code = F.PT > et_min
return ParticleFilter(make_particles(), F.FILTER(code), name=name)
@@ -327,7 +384,7 @@ def make_rd_merged_pi0s(name="rd_merged_pi0s",
cl_min=0):
"""For the time being just a dummy selection"""
code = require_all(F.PT > pt_min, )
code = F.PT > pt_min
return ParticleFilter(make_particles(), F.FILTER(code), name=name)
@@ -504,19 +561,20 @@ def make_rd_lambda_dds(
@configurable
def make_rd_detached_kstar0s(name="rd_detached_kstar0s",
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,
pi_p_min=2 * GeV,
pi_pt_min=100 * MeV,
k_p_min=2 * GeV,
k_pt_min=100 * MeV,
kstar0_pt_min=400 * MeV,
adocachi2cut=30.,
vchi2pdof_max=25):
def make_rd_detached_kstar0s(
name="rd_detached_kstar0s",
make_rd_detached_pions=make_rd_has_rich_detached_pions,
make_rd_detached_kaons=make_rd_has_rich_detached_kaons,
make_pvs=make_pvs,
am_min=592 * MeV,
am_max=1192 * MeV,
pi_p_min=2 * GeV,
pi_pt_min=100 * MeV,
k_p_min=2 * GeV,
k_pt_min=100 * MeV,
kstar0_pt_min=400 * MeV,
adocachi2cut=30.,
vchi2pdof_max=25):
'''
Build Kstar0 candidates. Approximately corresponding to the Run2
"StdVeryLooseDetachedKstar" cuts.
@@ -539,7 +597,7 @@ def make_rd_detached_kstar0s(name="rd_detached_kstar0s",
@configurable
def make_rd_detached_phis(
name="rd_detached_phis",
make_rd_detached_kaons=make_rd_detached_kaons,
make_rd_detached_kaons=make_rd_has_rich_detached_kaons,
make_pvs=make_pvs,
am_max=1100 * MeV, #min is the di-kaon threshold anyway
k_p_min=2 * GeV,
@@ -573,9 +631,7 @@ def make_rd_detached_phis(
@configurable
def filter_dimuon_noMVA(max_dimuon_mass=6000 * MeV):
dimuons = make_detached_mumu(
probnn_mu=0.0,
pt_mu=150 * MeV) # I think the ProbNN does not work properly atm
dimuons = make_detached_mumu(probnn_mu=0.0, pt_mu=150 * MeV)
code = require_all(F.MASS < max_dimuon_mass)
return ParticleFilter(dimuons, F.FILTER(code))
Loading