diff --git a/.gitignore b/.gitignore index 65e280a5088721ac13e7673f1d4a637da5a6921c..b980654d2e8a3a1ed30d4dd8547d3514cc97cb4b 100644 --- a/.gitignore +++ b/.gitignore @@ -31,3 +31,7 @@ doc/_env* doc/_build doc/graphviz doc/selection/thor_functors_reference.generated.rst + +# Environment files (VSCode) +**/.vscode +.env \ No newline at end of file diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/HbToHcTauNu_TauToMuNuNu.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/HbToHcTauNu_TauToMuNuNu.py index 4af1ec84ea5fb9f000dcfca6ab4e6d74ecd040b5..22c0161f1944296c0e664c8ebcdbd5e4b97ab203 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/HbToHcTauNu_TauToMuNuNu.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/HbToHcTauNu_TauToMuNuNu.py @@ -27,7 +27,8 @@ from Moore.config import HltLine, register_line_builder from Hlt2Conf.algorithms import ParticleContainersMerger from PyConf import configurable -from .builders.base_builder import make_tauons_muonic_decay, make_fake_tauons_muonic_decay, make_pions, make_kaons +from .builders.base_builder import make_tauons_muonic_decay, make_fake_tauons_muonic_decay +from .builders.base_builder import make_pions, make_kaons from .builders.charm_hadron_builder import make_dplus_tokpipi, make_ds_tokkpi from .builders.b_builder import make_b2xtaunu diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/LbToLcTauNu.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/LbToLcTauNu.py new file mode 100644 index 0000000000000000000000000000000000000000..8e4d1ce645d47d72a69ec82240c1e2ef025cd737 --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/LbToLcTauNu.py @@ -0,0 +1,66 @@ +############################################################################### +# (c) Copyright 2021 CERN for the benefit of the LHCb Collaboration # +# # +# This software is distributed under the terms of the GNU General Public # +# Licence version 3 (GPL Version 3), copied verbatim in the file "COPYING". # +# # +# In applying this licence, CERN does not waive the privileges and immunities # +# granted to it by virtue of its status as an Intergovernmental Organization # +# or submit itself to any jurisdiction. # +############################################################################### +from Moore.config import HltLine, register_line_builder +import Functors as F + +from .builders.base_builder import make_tauons_muonic_decay +from .builders.charm_hadron_builder import make_lambdac_topkpi +from .builders.b_builder import make_b2xtaunu + +from .builders import sl_line_prefilter + +from GaudiKernel.SystemOfUnits import MeV + +all_lines = {} + + +@register_line_builder(all_lines) +def lbtolctaunu_lctopkpi_tautomunuline( + name="Hlt2SLB_LbToLcTauNu_LcToPKPi_TauToMuNuNuLine", prescale=1): + """ + Selection for the decay Lb0 -> Lc+(-> p K pi) tau-(-> mu nu nu) nu. + """ + + Lc_mass = 2286.46 # units MeV + delta_Lc_comb = 100.0 # units MeV, Delta combination + delta_Lc_comp = 80.0 # units MeV, Delta composite + + tauons = make_tauons_muonic_decay() + + lcs = make_lambdac_topkpi( + mother_m_min=(Lc_mass - delta_Lc_comp) * MeV, + mother_m_max=(Lc_mass + delta_Lc_comp) * MeV, + mother_pt_min=2500 * MeV, + comb_m_min=(Lc_mass - delta_Lc_comb) * MeV, + comb_m_max=(Lc_mass + delta_Lc_comb) * MeV, + comb_pt_min=None, + comb_pt_any_min=None, + comb_pt_sum_min=2500 * MeV, + daughter_p_min=2000 * MeV, + daughter_pt_min=300 * MeV, + daughter_trghostprob_max=0.5, + daughter_mipchi2_min=9, + kaon_pid=(F.PID_K > 4.), + pion_pid=(F.PID_K < 2.), + proton_pid=(F.PID_P > 0)) + + lbs = make_b2xtaunu( + particles=[lcs, tauons], + descriptor="[Lambda_b0 -> Lambda_c+ mu-]cc", + comb_m_max=10200 * MeV, + comb_doca_max=None, + bpvfdchi2_min=25) + + return HltLine( + name=name, + algs=sl_line_prefilter() + [lbs], + prescale=prescale, + extra_outputs=[("Lc", lcs), ("Tau", tauons)]) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/__init__.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/__init__.py index 0afbf7402ec4d6c597414394695e3d2ab0e375bf..7d81cd1ead57e18bba17f8585a703290009fbf1e 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/__init__.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/__init__.py @@ -12,7 +12,7 @@ Submodule that defines all the SL selection lines. """ -from . import LbToPMuNu_all, BsToKMuNu_all, LbToLcMuNu, BuToD0MuNu_D0ToKPi, BcToD0MuNu_D0ToKPi, BToPPBarMuNu_all +from . import LbToPMuNu_all, BsToKMuNu_all, LbToLcMuNu, BuToD0MuNu_D0ToKPi, BcToD0MuNu_D0ToKPi, BToPPBarMuNu_all, LbToLcTauNu from . import hlt2_semileptonic from . import spruce_semileptonic @@ -20,6 +20,7 @@ all_lines = {} all_lines.update(LbToPMuNu_all.all_lines) all_lines.update(BsToKMuNu_all.all_lines) all_lines.update(LbToLcMuNu.all_lines) +all_lines.update(LbToLcTauNu.all_lines) all_lines.update(BuToD0MuNu_D0ToKPi.all_lines) all_lines.update(BcToD0MuNu_D0ToKPi.all_lines) all_lines.update(BToPPBarMuNu_all.all_lines) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/builders/b_builder.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/builders/b_builder.py index adbc109197aded953949e091518ac710527f6872..59cb554a01c9210795a0d8d4c90caac357da9b15 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/builders/b_builder.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/builders/b_builder.py @@ -110,8 +110,12 @@ def make_b2xtaunu(particles, SL b-hadron decay builder specialized in semi-tauonic decays. ''' pvs = make_pvs() - combination_code = require_all( - in_range(comb_m_min, F.MASS, comb_m_max), F.MAXDOCACUT(comb_doca_max)) + combination_code = require_all(in_range(comb_m_min, F.MASS, comb_m_max)) + + if comb_doca_max is not None: + combination_code = require_all(combination_code, + F.MAXDOCACUT(comb_doca_max)) + vertex_code = require_all( in_range(m_min, F.MASS, m_max), F.CHI2DOF < vchi2pdof_max, F.BPVDIRA(pvs) > bpvdira_min, diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/builders/charm_hadron_builder.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/builders/charm_hadron_builder.py index eb4d83d8815d4e3676301936c73e4c7d678502f3..6c3c8728d0d4110cdd1f82c7693ccf8c3209970d 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/builders/charm_hadron_builder.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/semileptonic/builders/charm_hadron_builder.py @@ -66,6 +66,9 @@ def make_Hc_to_nbody(particles, descriptor, comb_m_min, comb_m_max, + mother_m_min=None, + mother_m_max=None, + mother_pt_min=None, name="HcToNBodyBuilder", make_pvs=make_pvs, comb_pt_min=2000 * MeV, @@ -121,6 +124,11 @@ def make_Hc_to_nbody(particles, F.BPVDIRA(pvs) > bpvdira_min, F.BPVFDCHI2(pvs) > bpvfdchi2_min) + if (mother_m_min is not None) and (mother_m_max is not None): + mother_code = require_all(mother_code, + in_range(mother_m_min, F.MASS, mother_m_max)) + if mother_pt_min is not None: + mother_code = require_all(mother_code, F.PT > mother_pt_min) if bpvvdz_min is not None: mother_code = require_all(mother_code, F.BPVVDZ > bpvvdz_min) @@ -385,3 +393,53 @@ def make_dst0_tod0gamma(name="Dst0ToD0Gamma", DecayDescriptor="D*(2007)0 -> D0 gamma", CombinationCut=combination_code, CompositeCut=vertex_code) + + +@configurable +def make_lambdac_topkpi(name="LcTopKPiBuilder", + mother_m_min=None, + mother_m_max=None, + mother_pt_min=None, + comb_m_min=2256 * MeV, + comb_m_max=2317 * MeV, + comb_pt_min=2500 * MeV, + comb_pt_any_min=800 * MeV, + comb_pt_sum_min=1500 * MeV, + comb_doca_max=None, + daughter_p_min=150 * MeV, + daughter_pt_min=150 * MeV, + daughter_trghostprob_max=0.4, + daughter_mipchi2_min=10., + kaon_pid=(F.PID_K > 5.), + pion_pid=(F.PID_K < 50.), + proton_pid=(F.PID_P > 5.)): + """ + Builder for the decay Lambda_c+ -> p+ K- pi+. + """ + + with base_builder.make_candidate.bind( + p_min=daughter_p_min, + pt_min=daughter_pt_min, + trghostprob_max=daughter_trghostprob_max, + mipchi2_min=daughter_mipchi2_min): + particles = [ + base_builder.make_protons(pid=proton_pid), + base_builder.make_kaons(pid=kaon_pid), + base_builder.make_pions(pid=pion_pid) + ] + + descriptor = "[Lambda_c+ -> p+ K- pi+]cc" + + return make_Hc_to_nbody( + particles=particles, + descriptor=descriptor, + mother_m_min=mother_m_min, + mother_m_max=mother_m_max, + mother_pt_min=mother_pt_min, + comb_m_min=comb_m_min, + comb_m_max=comb_m_max, + name=name, + comb_pt_min=comb_pt_min, + comb_pt_any_min=comb_pt_any_min, + comb_pt_sum_min=comb_pt_sum_min, + comb_doca_max=comb_doca_max)