Skip to content
Snippets Groups Projects
Commit 0d7c4820 authored by Richard Morgan Williams's avatar Richard Morgan Williams Committed by Rosen Matev
Browse files

RK --- stand in lines

parent 59cdd78f
No related branches found
No related tags found
1 merge request!1447RK --- stand in lines
......@@ -26,6 +26,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 = {}
......@@ -43,6 +44,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)
###############################################################################
# (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,
)
###############################################################################
# (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,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment