diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/__init__.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/__init__.py index 2b64ac0aa2d6833c6efd51b42441adff1b7acc4e..905ac824f66ffb330848090bef8c0f2294a76a0e 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/__init__.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/__init__.py @@ -25,6 +25,7 @@ from . import b_to_ll_LFV from . import b_to_kstarmumu from . import hlt2_btosmutau_exclusive from . import hlt2_btostautau_exclusive +from . import bu_to_xll # provide "all_lines" for correct registration by the overall HLT2 lines module all_lines = {} @@ -41,6 +42,7 @@ all_lines.update(b_to_ll_LFV.hlt2_lines) all_lines.update(b_to_kstarmumu.all_lines) all_lines.update(hlt2_btosmutau_exclusive.all_lines) all_lines.update(hlt2_btostautau_exclusive.all_lines) +all_lines.update(bu_to_xll.all_lines) sprucing_lines = {} sprucing_lines.update(spruce_beauty2xtaul.sprucing_lines) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/bu_to_xll.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/bu_to_xll.py new file mode 100644 index 0000000000000000000000000000000000000000..b8d8507ea32e3c937cea9548a4798cc40fcc7ae9 --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/bu_to_xll.py @@ -0,0 +1,74 @@ +############################################################################### +# (c) Copyright 2022 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.lines import Hlt2Line +from Moore.config import register_line_builder +from .builders.rd_prefilters import rd_prefilter +from RecoConf.reconstruction_objects import make_pvs_v2 as make_pvs +from .builders import rdbuilder_thor +from .builders import bu_to_xll_builders + +all_lines = {} +""" +Definition of the b -> X ll exclusive lines + +Migration of selections from StrippingBu2LLK + +Includes: + B+ -> J/psi(1S) K+ (cc) +for J/psi = e+ e- or mu+ mu- + +Contact: Richard Williams (rmw68@cam.ac.uk) +""" + + +@register_line_builder(all_lines) +def BuToKpEE_line(name="Hlt2RD_BuToKpEE_Line", prescale=1): + + pvs = make_pvs() + dielectrons = rdbuilder_thor.make_rd_detached_dielectron( + opposite_sign=True) + kaons = rdbuilder_thor.make_rd_detached_kaons() + + Bu = bu_to_xll_builders.make_rd_BToXll( + dielectrons, + kaons, + pvs, + Descriptor="[B+ -> J/psi(1S) K+]cc", + name="make_rd_BToXll_for_" + name, + ) + + return Hlt2Line( + name=name, + algs=rd_prefilter() + [dielectrons, Bu], + prescale=prescale, + ) + + +@register_line_builder(all_lines) +def BuToKpMuMu_line(name="Hlt2RD_BuToKpMuMu_Line", prescale=1): + + pvs = make_pvs() + dimuons = rdbuilder_thor.make_rd_detached_dimuon(same_sign=False) + kaons = rdbuilder_thor.make_rd_detached_kaons() + + Bu = bu_to_xll_builders.make_rd_BToXll( + dimuons, + kaons, + pvs, + Descriptor="[B+ -> J/psi(1S) K+]cc", + name="make_rd_BToXll_for_" + name, + ) + + return Hlt2Line( + name=name, + algs=rd_prefilter() + [dimuons, Bu], + prescale=prescale, + ) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/builders/bu_to_xll_builders.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/builders/bu_to_xll_builders.py new file mode 100644 index 0000000000000000000000000000000000000000..8329b1d845b2347e6333c5214658ec0540a5bf1a --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/rd/builders/bu_to_xll_builders.py @@ -0,0 +1,58 @@ +############################################################################### +# (c) Copyright 2022 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 Functors.math import in_range +from GaudiKernel.SystemOfUnits import MeV +import Functors as F +from Hlt2Conf.algorithms_thor import ParticleCombiner +from Hlt2Conf.algorithms_thor import require_all +from PyConf import configurable + + +@configurable +def make_rd_BToXll( + dileptons, + hadrons, + pvs, + Descriptor, + name="rd_BToXll", + am_min=4000 * MeV, + am_max=6500 * MeV, + B_pt_min=500 * MeV, + adocachi2cut=30., + bpvipchi2_max=16, + min_cosine=0.9995, + FDchi2_min=144, + vchi2pdof_max=25., +): + + ### Make the Bu or Bs -> hadron l+ l- candidate ### + + combination_code = require_all( + in_range(am_min, F.MASS, am_max), + F.SUM(F.PT) > B_pt_min, + F.MAXDOCACHI2CUT(adocachi2cut), + ) + + vertex_code = require_all( + F.BPVIPCHI2(pvs) < bpvipchi2_max, + F.BPVDIRA(pvs) > min_cosine, + F.BPVFDCHI2(pvs) > FDchi2_min, + F.CHI2DOF < vchi2pdof_max, + ) + + return ParticleCombiner( + [dileptons, hadrons], + DecayDescriptor=Descriptor, + CombinationCut=combination_code, + name=name, + CompositeCut=vertex_code, + )