diff --git a/Hlt/Hlt2Conf/options/examples/bnoc/hlt1_and_hlt2_lines_bnoc.py b/Hlt/Hlt2Conf/options/examples/bnoc/hlt1_and_hlt2_lines_bnoc.py index 757352bba1a8550a752e7cfc7589caccdb657806..ae4b00533cb1786933ec115b918b8382ab8c03e9 100644 --- a/Hlt/Hlt2Conf/options/examples/bnoc/hlt1_and_hlt2_lines_bnoc.py +++ b/Hlt/Hlt2Conf/options/examples/bnoc/hlt1_and_hlt2_lines_bnoc.py @@ -68,8 +68,6 @@ options.conddb_tag = 'sim-20180530-vc-md100' options.ntuple_file = "eff_ntuple_bnoc_hlt1_and_hlt2.root" # needed to run over FTv6 data -from RecoConf.hlt1_tracking import default_ft_decoding_version -default_ft_decoding_version.global_bind(value=6) from HltEfficiencyChecker.config import run_chained_hlt_with_tuples from RecoConf.reconstruction_objects import reconstruction diff --git a/Hlt/Hlt2Conf/options/examples/bnoc/hlt1_and_hlt2_rate_bnoc.py b/Hlt/Hlt2Conf/options/examples/bnoc/hlt1_and_hlt2_rate_bnoc.py index 15cd6e9529da2d7fe638265a8895091ca6de6d84..8f6d2de74129385997e17095978c905e542ffc6b 100644 --- a/Hlt/Hlt2Conf/options/examples/bnoc/hlt1_and_hlt2_rate_bnoc.py +++ b/Hlt/Hlt2Conf/options/examples/bnoc/hlt1_and_hlt2_rate_bnoc.py @@ -30,9 +30,6 @@ options.evt_max = 1000 options.print_freq = 100 options.ntuple_file = "rate_ntuple_bnoc_hlt1_and_hlt2.root" -from RecoConf.hlt1_tracking import default_ft_decoding_version -default_ft_decoding_version.global_bind(value=6) - # TODO stateProvider_with_simplified_geom must go away from option files from RecoConf.global_tools import stateProvider_with_simplified_geom with reconstruction.bind(from_file=False): diff --git a/Hlt/Hlt2Conf/options/examples/bnoc/hlt2_lines_bnoc.py b/Hlt/Hlt2Conf/options/examples/bnoc/hlt2_lines_bnoc.py index 06afd0d045cf21b2dfee74f8ad594a5270bf499d..b836e5e70b20dc05af0535fb7ad55293c8eb80a9 100644 --- a/Hlt/Hlt2Conf/options/examples/bnoc/hlt2_lines_bnoc.py +++ b/Hlt/Hlt2Conf/options/examples/bnoc/hlt2_lines_bnoc.py @@ -72,8 +72,6 @@ options.conddb_tag = 'sim-20180530-vc-md100' options.ntuple_file = "eff_ntuple_bnoc_hlt2.root" # needed to run over FTv6 data -from RecoConf.hlt1_tracking import default_ft_decoding_version -default_ft_decoding_version.global_bind(value=6) from RecoConf.reconstruction_objects import reconstruction from RecoConf.global_tools import stateProvider_with_simplified_geom diff --git a/Hlt/Hlt2Conf/options/examples/bnoc/hlt2_rate_bnoc.py b/Hlt/Hlt2Conf/options/examples/bnoc/hlt2_rate_bnoc.py index 3dc96b6e413a1c3cda30c2899502219040674a23..77f695e2e3147af31dc0585029020bbc9a073431 100644 --- a/Hlt/Hlt2Conf/options/examples/bnoc/hlt2_rate_bnoc.py +++ b/Hlt/Hlt2Conf/options/examples/bnoc/hlt2_rate_bnoc.py @@ -12,7 +12,7 @@ from Moore import options from Hlt2Conf.lines.bnoc import all_lines -#from Hlt2Conf.lines.bnoc.BdsToKstzKstzb import Bds_KstzKstzb_line +#from Hlt2Conf.lines.bnoc.hlt2_bnoc import Bds_KstzKstzb_line def make_lines(): @@ -36,8 +36,6 @@ options.evt_max = 100000 options.ntuple_file = "rate_ntuple_bnoc_hlt2.root" # needed to run over FTv2 data -from RecoConf.hlt1_tracking import default_ft_decoding_version -default_ft_decoding_version.global_bind(value=2) from RecoConf.reconstruction_objects import reconstruction #from RecoConf.protoparticles import make_charged_protoparticles diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/B_ppbarhh.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/B_ppbarhh.py new file mode 100644 index 0000000000000000000000000000000000000000..e1f55c88d161d0e40c70c49d0676df9a137cf16d --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/B_ppbarhh.py @@ -0,0 +1,75 @@ +############################################################################### +# (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. # +############################################################################### +""" +* Definition of BNOC BdToppbarhh lines +""" + +from GaudiKernel.SystemOfUnits import MeV, mm + +from PyConf import configurable +from Hlt2Conf.lines.bnoc.utils import check_process +from Hlt2Conf.lines.bnoc.builders.B_ppbarhh_builder import make_B2ppbarhh, make_PionsforB2ppbarhh, make_KaonsforB2ppbarhh, make_ProtonsforB2ppbarhh + +B0_kwargs = { + "am_max_ppbar": 5000 * MeV, + "adoca_chi2_ppbar": 20.0, + "asum_PT_ppbar": 750 * MeV, + "asum_P_ppbar": 7000 * MeV, + "am_max_ppbarK": 5600 * MeV, + "adoca_chi2_ppbarK": 20., + "am_min_ppbarKpi": 5050. * MeV, + "am_max_ppbarKpi": 5550. * MeV, + "adoca_chi2_ppbarKpi": 20.0, + "amaxdoca4h": 0.25 * mm, + "comb_PTSUM_min": 3000 * MeV, + "B_dira_min": 0.9999, + "B_vtx_CHI2_max": 25.0, + "B_PT_min": 1000 * MeV, + "B_minip": 0.2 * mm +} + + +@check_process +@configurable +def make_Bd0ToPPbarKPi(process): + pions = make_PionsforB2ppbarhh() + kaons = make_KaonsforB2ppbarhh() + protons = make_ProtonsforB2ppbarhh() + Bd0 = make_B2ppbarhh( + particles=[protons, protons, kaons, pions], + DecayDescriptor=["[B0 -> p+ p~- K+ pi-]cc"], + **B0_kwargs) + return Bd0 + + +@check_process +@configurable +def make_Bd0ToPPbarPiPi(process): + pions = make_PionsforB2ppbarhh() + protons = make_ProtonsforB2ppbarhh() + Bd0 = make_B2ppbarhh( + particles=[protons, protons, pions, pions], + DecayDescriptor=["[B0 -> p+ p~- pi+ pi-]cc"], + **B0_kwargs) + return Bd0 + + +@check_process +@configurable +def make_Bd0ToPPbarKK(process): + + kaons = make_KaonsforB2ppbarhh() + protons = make_ProtonsforB2ppbarhh() + Bd0 = make_B2ppbarhh( + particles=[protons, protons, kaons, kaons], + DecayDescriptor=["[B0 -> p+ p~- K+ K-]cc"], + **B0_kwargs) + return Bd0 diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BdsToVV.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BdsToVV.py index 03827825f6016e42a8efc0f04db3e83916eeaf9b..848af540d1f2c180ed26abc6abb7e9d80ce2c862 100755 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BdsToVV.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BdsToVV.py @@ -16,7 +16,7 @@ from GaudiKernel.SystemOfUnits import MeV, mm, GeV, picosecond from PyConf import configurable from RecoConf.reconstruction_objects import make_pvs -from Hlt2Conf.lines.bnoc.builders.basic_builder import make_wide_kstar0, make_phi, make_rho0, make_tight_kaons +from Hlt2Conf.lines.bnoc.builders.basic_builder import make_wide_kstar0, make_phi, make_rho0, make_tight_kaons, make_tight_pions from Hlt2Conf.lines.bnoc.builders.combiners import make_twobody, make_phixtwobody from Hlt2Conf.lines.bnoc.utils import check_process @@ -103,11 +103,12 @@ def make_BdsToKstzKstzb(process): @configurable def _make_BdsToKstzPhi(particles, descriptor, - am_min=4500 * MeV, - am_max=6800 * MeV, + am_min=5000 * MeV, + am_max=6000 * MeV, vtx_am_min=4550 * MeV, vtx_am_max=6750 * MeV, make_pvs=make_pvs, + asumpt_min=1500 * MeV, adoca12_max=0.3 * mm, vchi2pdof_max=15, mipchi2_max=25, @@ -131,13 +132,18 @@ def _make_BdsToKstzPhi(particles, @check_process @configurable def make_BdsToKstzPhi(process): - kstar = make_wide_kstar0() + kstar = make_wide_kstar0( + make_pions=make_tight_pions, + make_kaons=make_tight_kaons, + am_max=1800 * MeV, + asumpt_min=500 * MeV) phi = make_phi( make_kaons=make_tight_kaons, - k_pidk_min=0., + k_pidk_min=-5., + k_p_min=1.5 * GeV, k_pt_min=500 * MeV, - vchi2pdof_max=9, - motherpt_min=900 * MeV) + asumpt_min=500 * MeV, + vchi2pdof_max=9) line_alg = _make_BdsToKstzPhi( particles=[phi, kstar], make_pvs=make_pvs, diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BdsTohhhh.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BdsTohhhh.py index 716a6a936e9ec0ff8d62c8ba86007190d7fd95e5..aa23e19d4c233201e89ada483d586a90a565491f 100755 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BdsTohhhh.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BdsTohhhh.py @@ -43,7 +43,7 @@ Bds_kwargs = { @check_process @configurable def make_BdsToPiPiPiPi(process): - pions = make_soft_pions() + pions = make_soft_pions(pt_min=500 * MeV) Bds = make_b2x( particles=[pions, pions, pions, pions], descriptors=['B0 -> pi+ pi+ pi- pi-'], @@ -56,8 +56,8 @@ def make_BdsToPiPiPiPi(process): @check_process @configurable def make_BdsToKPiPiPi(process): - pions = make_soft_pions() - kaons = make_soft_kaons() + pions = make_soft_pions(pt_min=500 * MeV) + kaons = make_soft_kaons(pt_min=500 * MeV) Bds = make_b2x( particles=[kaons, pions, pions, pions], descriptors=['[B0 -> K+ pi+ pi- pi-]cc'], @@ -70,8 +70,8 @@ def make_BdsToKPiPiPi(process): @check_process @configurable def make_BdsToKKPiPi(process): - pions = make_soft_pions() - kaons = make_soft_kaons() + pions = make_soft_pions(pt_min=500 * MeV) + kaons = make_soft_kaons(pt_min=500 * MeV) Bds = make_b2x( particles=[kaons, kaons, pions, pions], descriptors=['B0 -> K+ K- pi+ pi-'], @@ -84,8 +84,8 @@ def make_BdsToKKPiPi(process): @check_process @configurable def make_BdsToKKKPi(process): - pions = make_soft_pions() - kaons = make_soft_kaons() + pions = make_soft_pions(pt_min=500 * MeV) + kaons = make_soft_kaons(pt_min=500 * MeV) Bds = make_b2x( particles=[kaons, kaons, kaons, pions], descriptors=['[B0 -> K+ K+ K- pi-]cc'], diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BuToKShhh.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BuToKShhh.py index 028923f73887c87dc2f105d26893fdbc792f4d73..8d00ef2baa5a7d3ca5eef0408d0fa21d05c76cab 100755 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BuToKShhh.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/BuToKShhh.py @@ -37,7 +37,7 @@ def make_BuToKSPiPiPi_LL(process): if process == 'spruce': pions = make_soft_pions(pi_pidk_max=None) elif process == 'hlt2': - pions = make_soft_pions() + pions = make_soft_pions(pt_min=300 * MeV) KsLL = make_ks_LL() Bu = make_b2x( particles=[KsLL, pions, pions, pions], @@ -72,8 +72,8 @@ def make_BuToKSKpPiPi_LL(process): pions = make_soft_pions(pi_pidk_max=None) kaons = make_soft_kaons(k_pidk_min=None) elif process == 'hlt2': - pions = make_soft_pions(pt_min=250 * MeV) - kaons = make_soft_kaons(pt_min=250 * MeV) + pions = make_soft_pions(pt_min=300 * MeV) + kaons = make_soft_kaons(pt_min=300 * MeV) KsLL = make_ks_LL() Bu = make_b2x( particles=[KsLL, kaons, pions, pions], diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/bTohh.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/bTohh.py new file mode 100755 index 0000000000000000000000000000000000000000..c4785b25bc781c21aeba871d7be96762215a735c --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/bTohh.py @@ -0,0 +1,193 @@ +############################################################################### +# (c) Copyright 2019 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. # +############################################################################### +""" +* Definition of BNOC bTohh lines +""" + +from __future__ import absolute_import, division, print_function + +from GaudiKernel.SystemOfUnits import MeV # will be needed once the full set of lines is back + +from Hlt2Conf.lines.bnoc.utils import check_process + +from Hlt2Conf.lines.bnoc.builders import basic_builder +from Hlt2Conf.lines.bnoc.builders import b_builder + +############################################## +# For B+ -> Lambda~0 p+(LL,DD), Bc+ -> Lambda~0 p+(LL,DD) +# Xi_b- -> Lambda~0 pi+(LL,DD), Xi_b- -> Lambda~0 K+(LL,DD) lines +############################################## + + +@check_process +def make_BuToKpPi0(process): + kaons = basic_builder.make_soft_kaons( + k_pidk_min=-0.5, + p_min=12000 * MeV, + pt_min=1200 * MeV, + tr_ghost_prob_max=0.5, + trchi2todof_max=3.0, + mipchi2_min=50) + pions = basic_builder.make_merged_pi0s(p_min=5000 * MeV, pt_min=3500 * MeV) + + line_alg = b_builder.make_b2Kpi( + particles=[kaons, pions], + descriptor='[B+ -> K+ pi0]cc', + comb_m_min=4000 * MeV, + comb_m_max=6200 * MeV, + comb_pt_min=5000 * MeV, + mtdocachi2_max=10.0, + pt_min=4000 * MeV) + return line_alg + + +@check_process +def make_BuToLambdapLL(process): + if process == 'spruce': + protons = basic_builder.make_soft_protons(p_pidp_min=None) + lambdas = basic_builder.make_veryloose_lambda_LL() + elif process == 'hlt2': + protons = basic_builder.make_soft_protons( + p_pidp_min=None, pt_min=250 * MeV) + lambdas = basic_builder.make_veryloose_lambda_LL() + + line_alg = b_builder.make_b2Lambdah( + particles=[lambdas, protons], + descriptors=['[B+ -> Lambda~0 p+]cc'], + am_min=4800. * MeV, + am_max=6000. * MeV) + return line_alg + + +@check_process +def make_BuToLambdapDD(process): + if process == 'spruce': + protons = basic_builder.make_soft_protons(p_pidp_min=None) + lambdas = basic_builder.make_loose_lambda_DD() + elif process == 'hlt2': + protons = basic_builder.make_soft_protons( + p_pidp_min=None, pt_min=250 * MeV) + lambdas = basic_builder.make_loose_lambda_DD() + + line_alg = b_builder.make_b2Lambdah( + particles=[lambdas, protons], + descriptors=['[B+ -> Lambda~0 p+]cc'], + am_min=4800. * MeV, + am_max=6000. * MeV) + return line_alg + + +@check_process +def make_BcToLambdapLL(process): + if process == 'spruce': + protons = basic_builder.make_soft_protons(p_pidp_min=None) + lambdas = basic_builder.make_veryloose_lambda_LL() + elif process == 'hlt2': + protons = basic_builder.make_soft_protons( + p_pidp_min=None, pt_min=250 * MeV) + lambdas = basic_builder.make_veryloose_lambda_LL() + + line_alg = b_builder.make_b2Lambdah( + particles=[lambdas, protons], + descriptors=['[B_c+ -> Lambda~0 p+ ]cc'], + am_min=5800. * MeV, + am_max=7000. * MeV) + return line_alg + + +@check_process +def make_BcToLambdapDD(process): + if process == 'spruce': + protons = basic_builder.make_soft_protons(p_pidp_min=None) + lambdas = basic_builder.make_loose_lambda_DD() + elif process == 'hlt2': + protons = basic_builder.make_soft_protons( + p_pidp_min=None, pt_min=250 * MeV) + lambdas = basic_builder.make_loose_lambda_DD() + + line_alg = b_builder.make_b2Lambdah( + particles=[lambdas, protons], + descriptors=['[B_c+ -> Lambda~0 p+]cc'], + am_min=5800. * MeV, + am_max=7000. * MeV) + return line_alg + + +@check_process +def make_XibToLambdapiLL(process): + if process == 'spruce': + pions = basic_builder.make_soft_pions(pi_pidk_max=None) + lambdas = basic_builder.make_veryloose_lambda_LL() + elif process == 'hlt2': + pions = basic_builder.make_soft_pions( + pi_pidk_max=None, pt_min=250 * MeV) + lambdas = basic_builder.make_veryloose_lambda_LL() + + line_alg = b_builder.make_b2Lambdah( + particles=[lambdas, pions], + descriptors=['[Xi_b- -> Lambda0 pi-]cc'], + am_min=5000. * MeV, + am_max=6600. * MeV) + return line_alg + + +@check_process +def make_XibToLambdapiDD(process): + if process == 'spruce': + pions = basic_builder.make_soft_pions(pi_pidk_max=None) + lambdas = basic_builder.make_loose_lambda_DD() + elif process == 'hlt2': + pions = basic_builder.make_soft_pions( + pi_pidk_max=None, pt_min=250 * MeV) + lambdas = basic_builder.make_loose_lambda_DD() + + line_alg = b_builder.make_b2Lambdah( + particles=[lambdas, pions], + descriptors=['[Xi_b- -> Lambda0 pi-]cc'], + am_min=5000. * MeV, + am_max=6600. * MeV) + return line_alg + + +@check_process +def make_XibToLambdaKLL(process): + if process == 'spruce': + kaons = basic_builder.make_soft_kaons(k_pidk_min=None) + lambdas = basic_builder.make_veryloose_lambda_LL() + elif process == 'hlt2': + kaons = basic_builder.make_soft_kaons( + k_pidk_min=None, pt_min=250 * MeV) + lambdas = basic_builder.make_veryloose_lambda_LL() + + line_alg = b_builder.make_b2Lambdah( + particles=[lambdas, kaons], + descriptors=['[Xi_b- -> Lambda0 K-]cc'], + am_min=5000. * MeV, + am_max=6600. * MeV) + return line_alg + + +@check_process +def make_XibToLambdaKDD(process): + if process == 'spruce': + kaons = basic_builder.make_soft_kaons(k_pidk_min=None) + lambdas = basic_builder.make_loose_lambda_DD() + elif process == 'hlt2': + kaons = basic_builder.make_soft_kaons( + k_pidk_min=None, pt_min=250 * MeV) + lambdas = basic_builder.make_loose_lambda_DD() + + line_alg = b_builder.make_b2Lambdah( + particles=[lambdas, kaons], + descriptors=['[Xi_b- -> Lambda0 K-]cc'], + am_min=5000. * MeV, + am_max=6600. * MeV) + return line_alg diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/bbaryon_to_lightbaryon_h.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/bbaryon_to_lightbaryon_h.py new file mode 100755 index 0000000000000000000000000000000000000000..58950daebb37cf19546714e08aa8dd183b24f67e --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/bbaryon_to_lightbaryon_h.py @@ -0,0 +1,325 @@ +############################################################################### +# (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. # +############################################################################### +""" +* Definition of BNOC b-baryon -> hyperon h (h) lines +""" +from __future__ import absolute_import, division, print_function + +from GaudiKernel.SystemOfUnits import MeV + +from Hlt2Conf.lines.bnoc.utils import check_process +from Hlt2Conf.lines.bnoc.builders import basic_builder +from Hlt2Conf.lines.bnoc.builders import combiners +all_lines = {} + + +########################################################### +# Form the Lambda_b0 -> Xi- K+, Xi- -> Lambda0 pi-, Lambda0 -> p+ pi- +# Xi- decays into Lambda0(LL or DD) and pi-(L) +########################################################## +@check_process +def make_LbToXimKp_XimToLambdaLLPi(process): + if process == 'spruce': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_LL(), + pions=basic_builder.make_pions(pi_pidk_max=None)) + kaons = basic_builder.make_kaons(k_pidk_min=None) + if process == 'hlt2': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_LL(), + pions=basic_builder.make_pions()) + kaons = basic_builder.make_kaons() + line_alg = combiners.make_twobody( + particles=[hyperons, kaons], + am_min=5510 * MeV, + am_max=5730 * MeV, + vtx_am_min=5540 * MeV, + vtx_am_max=5700 * MeV, + name="LbToXimKp_LLL_Commbiner", + descriptor='[Lambda_b0 -> Xi- K+]cc') + return line_alg + + +@check_process +def make_LbToXimKp_XimToLambdaDDPi(process): + if process == 'spruce': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_DD(), + pions=basic_builder.make_pions(pi_pidk_max=None)) + kaons = basic_builder.make_kaons(k_pidk_min=None) + elif process == 'hlt2': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_DD(), + pions=basic_builder.make_pions()) + kaons = basic_builder.make_kaons() + line_alg = combiners.make_twobody( + particles=[hyperons, kaons], + am_min=5510 * MeV, + am_max=5730 * MeV, + vtx_am_min=5540 * MeV, + vtx_am_max=5700 * MeV, + name="LbToXimKp_DDL_Commbiner", + descriptor='[Lambda_b0 -> Xi- D0]cc') + return line_alg + + +########################################################### +# Form the Xi_b0 -> Xi- pi+, Xi- -> Lambda0 pi-, Lambda0 -> p+ pi- +# Xi- decays into Lambda0(LL or DD) and pi-(L) +########################################################## +@check_process +def make_Xib0ToXimPip_XimToLambdaLLPi(process): + if process == 'spruce': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_LL(), + pions=basic_builder.make_pions(pi_pidk_max=None)) + pions = basic_builder.make_pions(pi_pidk_max=None) + elif process == 'hlt2': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_LL(), + pions=basic_builder.make_pions()) + pions = basic_builder.make_pions() + line_alg = combiners.make_twobody( + particles=[hyperons, pions], + am_min=5680 * MeV, + am_max=5900 * MeV, + vtx_am_min=5710 * MeV, + vtx_am_max=5870 * MeV, + name="Xib0ToXimPip_LLL_Commbiner", + descriptor='[Xi_b0 -> Xi- pi+]cc') + return line_alg + + +@check_process +def make_Xib0ToXimPip_XimToLambdaDDPi(process): + if process == 'spruce': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_DD(), + pions=basic_builder.make_pions(pi_pidk_max=None)) + pions = basic_builder.make_pions(pi_pidk_max=None) + if process == 'hlt2': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_DD(), + pions=basic_builder.make_pions()) + pions = basic_builder.make_pions() + line_alg = combiners.make_twobody( + particles=[hyperons, pions], + am_min=5680 * MeV, + am_max=5900 * MeV, + vtx_am_min=5710 * MeV, + vtx_am_max=5870 * MeV, + name="Xib0ToXimPip_DDL_Commbiner", + descriptor='[Xi_b0 -> Xi- pi+]cc') + return line_alg + + +########################################################### +# Form the Xi_b- -> Xi- pi+ pi-, Xi- -> Lambda0 pi-, Lambda0 -> p+ pi- +# Xi- decays into Lambda0(LL or DD) and pi-(L) +########################################################## +@check_process +def make_XibmToXimPipPim_XimToLambdaLLPi(process): + if process == 'spruce': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_LL(), + pions=basic_builder.make_pions(pi_pidk_max=None)) + pions = basic_builder.make_pions(pi_pidk_max=None) + if process == 'hlt2': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_LL(), + pions=basic_builder.make_pions()) + pions = basic_builder.make_pions() + line_alg = combiners.make_threebody( + particles=[hyperons, pions, pions], + am_min=5680 * MeV, + am_max=5900 * MeV, + vtx_am_min=5710 * MeV, + vtx_am_max=5870 * MeV, + name="XibmToXimPipPim_LLL_Commbiner", + descriptor='[Xi_b- -> Xi- pi+ pi-]cc') + return line_alg + + +@check_process +def make_XibmToXimPipPim_XimToLambdaDDPi(process): + if process == 'spruce': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_DD(), + pions=basic_builder.make_pions(pi_pidk_max=None)) + pions = basic_builder.make_pions(pi_pidk_max=None) + elif process == 'hlt2': + hyperons = basic_builder.make_xim_to_lambda0pim( + lambdas=basic_builder.make_lambda_DD(), + pions=basic_builder.make_pions()) + pions = basic_builder.make_pions() + line_alg = combiners.make_threebody( + particles=[hyperons, pions, pions], + am_min=5680 * MeV, + am_max=5900 * MeV, + vtx_am_min=5710 * MeV, + vtx_am_max=5870 * MeV, + name="XibmToXimPipPim_DDL_Commbiner", + descriptor='[Xi_b- -> Xi- pi+ pi-]cc') + return line_alg + + +########################################################### +# Form the Xi_b0 -> Omega- K+, Omega- -> Lambda0 K-, Lambda0 -> p+ pi- +# Omega- decays into Lambda0(LL or DD) and pi-(L) +########################################################## +@check_process +def make_Xib0ToOmmKp_OmmToLambdaLLK(process): + if process == 'spruce': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_LL(), + kaons=basic_builder.make_kaons(k_pidk_min=None)) + kaons = basic_builder.make_kaons(k_pidk_min=None) + elif process == 'hlt2': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_LL(), + kaons=basic_builder.make_kaons()) + kaons = basic_builder.make_kaons() + line_alg = combiners.make_twobody( + particles=[hyperons, kaons], + am_min=5680 * MeV, + am_max=5900 * MeV, + vtx_am_min=5710 * MeV, + vtx_am_max=5870 * MeV, + name="Xib0ToOmmKp_LLL_Commbiner", + descriptor='[Xi_b0 -> Omega- K+]cc') + return line_alg + + +@check_process +def make_Xib0ToOmmKp_OmmToLambdaDDK(process): + if process == 'spruce': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_DD(), + kaons=basic_builder.make_kaons(k_pidk_min=None)) + kaons = basic_builder.make_kaons(k_pidk_min=None) + if process == 'hlt2': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_DD(), + kaons=basic_builder.make_kaons()) + kaons = basic_builder.make_kaons() + line_alg = combiners.make_twobody( + particles=[hyperons, kaons], + am_min=5680 * MeV, + am_max=5900 * MeV, + vtx_am_min=5710 * MeV, + vtx_am_max=5870 * MeV, + name="Xib0ToOmmKp_DDL_Commbiner", + descriptor='[Xi_b0 -> Omega- K+]cc') + return line_alg + + +########################################################### +# Form the Xi_b- -> Omega- K+ pi-, Omega- -> Lambda0 K-, Lambda0 -> p+ pi- +# Omega- decays into Lambda0(LL or DD) and pi-(L) +########################################################## +@check_process +def make_XibmToOmmKpPim_OmmToLambdaLLK(process): + if process == 'spruce': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_LL(), + kaons=basic_builder.make_kaons(k_pidk_min=None)) + kaons = basic_builder.make_kaons(k_pidk_min=None) + pions = basic_builder.make_pions(pi_pidk_max=None) + elif process == 'hlt2': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_LL(), + kaons=basic_builder.make_kaons()) + kaons = basic_builder.make_kaons() + pions = basic_builder.make_pions() + line_alg = combiners.make_threebody( + particles=[hyperons, kaons, pions], + am_min=5680 * MeV, + am_max=5900 * MeV, + vtx_am_min=5710 * MeV, + vtx_am_max=5870 * MeV, + name="XibmToOmmKpPim_LLL_Commbiner", + descriptor='[Xi_b- -> Omega- K+ pi-]cc') + return line_alg + + +@check_process +def make_XibmToOmmKpPim_OmmToLambdaDDK(process): + if process == 'spruce': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_DD(), + kaons=basic_builder.make_kaons(k_pidk_min=None)) + kaons = basic_builder.make_kaons(k_pidk_min=None) + pions = basic_builder.make_pions(pi_pidk_max=None) + if process == 'hlt2': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_DD(), + kaons=basic_builder.make_kaons()) + kaons = basic_builder.make_kaons() + pions = basic_builder.make_pions() + line_alg = combiners.make_threebody( + particles=[hyperons, kaons, pions], + am_min=5680 * MeV, + am_max=5900 * MeV, + vtx_am_min=5710 * MeV, + vtx_am_max=5870 * MeV, + name="XibmToOmmKpPim_DDL_Commbiner", + descriptor='[Xi_b- -> Omega- K+ pi-]cc') + return line_alg + + +########################################################### +# Form the Omega_b- -> Omega- pi+ pi-, Omega- -> Lambda0 K-, Lambda0 -> p+ pi- +# Omega- decays into Lambda0(LL or DD) and pi-(L) +########################################################## +@check_process +def make_OmbmToOmmPipPim_OmmToLambdaLLK(process): + if process == 'spruce': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_LL(), + kaons=basic_builder.make_kaons(k_pidk_min=None)) + pions = basic_builder.make_pions(pi_pidk_max=None) + elif process == 'hlt2': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_LL(), + kaons=basic_builder.make_kaons()) + pions = basic_builder.make_pions() + line_alg = combiners.make_threebody( + particles=[hyperons, pions, pions], + am_min=5970 * MeV, + am_max=6130 * MeV, + vtx_am_min=6000 * MeV, + vtx_am_max=6100 * MeV, + name="OmbmToOmmPipPim_LLL_Commbiner", + descriptor='[Xi_b- -> Omega- pi+ pi-]cc') + return line_alg + + +@check_process +def make_OmbmToOmmPipPim_OmmToLambdaDDK(process): + if process == 'spruce': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_DD(), + kaons=basic_builder.make_kaons(k_pidk_min=None)) + pions = basic_builder.make_pions(pi_pidk_max=None) + if process == 'hlt2': + hyperons = basic_builder.make_omegam_to_lambda0km( + lambdas=basic_builder.make_lambda_DD(), + kaons=basic_builder.make_kaons()) + pions = basic_builder.make_pions() + line_alg = combiners.make_threebody( + particles=[hyperons, pions, pions], + am_min=5970 * MeV, + am_max=6130 * MeV, + vtx_am_min=6000 * MeV, + vtx_am_max=6100 * MeV, + name="OmbmToOmmPipPim_DDL_Commbiner", + descriptor='[Xi_b- -> Omega- pi+ pi-]cc') + return line_alg diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/B_ppbarhh_builder.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/B_ppbarhh_builder.py new file mode 100644 index 0000000000000000000000000000000000000000..f06067a20ed48d978b9a5152668dd10d11267083 --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/B_ppbarhh_builder.py @@ -0,0 +1,178 @@ +############################################################################### +# (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. # +############################################################################### +""" +Builds for BNOC BdToppbarhh line +""" + +from GaudiKernel.SystemOfUnits import GeV, MeV, mm + +from Hlt2Conf.algorithms import ParticleContainersMerger + +from RecoConf.reconstruction_objects import make_pvs +from PyConf import configurable + +from Hlt2Conf.standard_particles import (make_has_rich_long_pions, + make_has_rich_long_kaons, + make_has_rich_long_protons) + +import Functors as F +from Functors import require_all +from Functors.math import in_range +from Hlt2Conf.algorithms_thor import ParticleFilter, ParticleCombiner + + +@configurable +def filter_PionsforB2ppbarhh(make_particles, + make_pvs=make_pvs, + trchi2todof_max=3, + mipchi2_min=4, + tr_ghost_prob_max=0.4, + pt_min=300 * MeV, + p_min=1.5 * GeV): + pvs = make_pvs() + code = require_all(F.PT > pt_min, F.P > p_min, F.CHI2DOF < trchi2todof_max, + F.GHOSTPROB < tr_ghost_prob_max, + F.MINIPCHI2(pvs) > mipchi2_min) + return ParticleFilter(make_particles(), F.FILTER(code)) + + +@configurable +def make_PionsforB2ppbarhh(pi_pidk_max=5., p_min=1.5 * GeV, pt_min=300 * MeV): + """Return pions filtered by thresholds set for this selection.""" + pions = filter_PionsforB2ppbarhh( + make_particles=make_has_rich_long_pions, p_min=p_min, pt_min=pt_min) + if pi_pidk_max is not None: + code = F.PID_K < pi_pidk_max + pions = ParticleFilter(pions, F.FILTER(code)) + return pions + + +@configurable +def filter_KaonsforB2ppbarhh(make_particles, + make_pvs=make_pvs, + trchi2todof_max=3, + mipchi2_min=6.0, + tr_ghost_prob_max=0.4, + pt_min=300 * MeV, + p_min=1.5 * GeV): + pvs = make_pvs() + code = require_all(F.PT > pt_min, F.P > p_min, F.CHI2DOF < trchi2todof_max, + F.GHOSTPROB < tr_ghost_prob_max, + F.MINIPCHI2(pvs) > mipchi2_min) + return ParticleFilter(make_particles(), F.FILTER(code)) + + +@configurable +def make_KaonsforB2ppbarhh(k_pidk_min=-5., p_min=1.5 * GeV, pt_min=300 * MeV): + """Return kaons filtered by thresholds set for this selection.""" + kaons = filter_KaonsforB2ppbarhh( + make_particles=make_has_rich_long_kaons, p_min=p_min, pt_min=pt_min) + if k_pidk_min is not None: + code = F.PID_K > k_pidk_min + kaons = ParticleFilter(kaons, F.FILTER(code)) + return kaons + + +@configurable +def filter_ProtonsforB2ppbarhh(make_particles, + make_pvs=make_pvs, + trchi2todof_max=3, + mipchi2_min=9, + tr_ghost_prob_max=0.4, + pt_min=300 * MeV, + p_min=1.5 * GeV): + pvs = make_pvs() + code = require_all(F.PT > pt_min, F.P > p_min, F.CHI2DOF < trchi2todof_max, + F.GHOSTPROB < tr_ghost_prob_max, + F.MINIPCHI2(pvs) > mipchi2_min) + return ParticleFilter(make_particles(), F.FILTER(code)) + + +@configurable +def make_ProtonsforB2ppbarhh(p_pidp_min=-5., p_min=1.5 * GeV, + pt_min=300 * MeV): + """Return protons filtered by thresholds set for this selection.""" + protons = filter_ProtonsforB2ppbarhh( + make_particles=make_has_rich_long_protons, p_min=p_min, pt_min=pt_min) + if p_pidp_min is not None: + code = F.PID_P > p_pidp_min + protons = ParticleFilter(protons, F.FILTER(code)) + return protons + + +@configurable +def _make_B2ppbarhh(particles, + DecayDescriptor, + am_max_ppbar=5000.0 * MeV, + adoca_chi2_ppbar=20.0, + asum_PT_ppbar=750.0 * MeV, + asum_P_ppbar=7000.0 * MeV, + am_max_ppbarK=5600.0 * MeV, + adoca_chi2_ppbarK=20.0, + am_min_ppbarKpi=5050 * MeV, + am_max_ppbarKpi=5550 * MeV, + adoca_chi2_ppbarKpi=20.0, + amaxdoca4h=0.25 * mm, + comb_PTSUM_min=3000.0 * MeV, + B_dira_min=0.9999, + B_vtx_CHI2_max=25.0, + B_PT_min=1000.0 * MeV, + B_minip=0.2 * mm): + + combination12_code = require_all( + F.MASS < am_max_ppbar, + F.SUM(F.PT) > asum_PT_ppbar, + F.SUM(F.P) > asum_P_ppbar, + F.MAXDOCACHI2CUT(adoca_chi2_ppbar)) #cuts on the ppbar combination + + combination123_code = require_all( + F.MASS < am_max_ppbarK, + F.MAXDOCACHI2CUT(adoca_chi2_ppbarK)) #cuts on the ppbarK combination + + combination_code = require_all( + in_range(am_min_ppbarKpi, F.MASS, am_max_ppbarKpi), + F.MAXDOCACHI2CUT( + adoca_chi2_ppbarKpi)) #cuts on the ppbarKpi combination + + pvs = make_pvs() + + vertex_code = require_all( + in_range(am_min_ppbarKpi, F.MASS, am_max_ppbarKpi), + F.BPVDIRA(pvs) > B_dira_min, F.CHI2DOF < B_vtx_CHI2_max, + F.SUM(F.PT) > comb_PTSUM_min, F.PT > B_PT_min, + F.MINIPCHI2(pvs) < B_minip) #cuts on the B0 + + return ParticleCombiner( + particles, + DecayDescriptor=DecayDescriptor, + Combination12Cut=combination12_code, + Combination123Cut=combination123_code, + CombinationCut=combination_code, + CompositeCut=vertex_code) + + +''' for iteration on descriptors elements ''' + + +@configurable +def make_B2ppbarhh(particles, + DecayDescriptor, + name='BNOCB2ppbarhhMerger', + **decay_arguments): + assert len(DecayDescriptor) > 0 + b_hadrons = [] + for descriptor in DecayDescriptor: + b_hadrons.append( + _make_B2ppbarhh( + particles=particles, + DecayDescriptor=descriptor, + **decay_arguments)) + return ParticleContainersMerger(b_hadrons, name=name) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/b_builder.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/b_builder.py index 675f8611d6cecf60dbcf5d570f469745b14b73d3..d64c839a70c820587f970708291a50d404a29320 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/b_builder.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/b_builder.py @@ -22,6 +22,7 @@ from RecoConf.reconstruction_objects import make_pvs import Functors as F from Functors.math import in_range from Hlt2Conf.algorithms_thor import ParticleCombiner +from Functors import require_all @configurable @@ -196,6 +197,7 @@ def _make_b2hhh( in_range(CORRMmin, F.BPVCORRM(pvs), CORRMmax), F.CHI2DOF < vtx_chi2pdof_max, F.BPVIPCHI2(pvs) < bpvipchi2_max, + F.BPVFDCHI2(pvs) > FDCHI2, F.MIN_ELEMENT @ F.ALLPV_FD(pvs) > PVDOCAmin, F.BPVFDCHI2(pvs) > FDCHI2, F.MINIPCHI2(pvs) < IPCHI2_min, F.BPVLTIME(pvs) > bpvltime_min, @@ -227,6 +229,61 @@ def make_b2hhh(particles, return ParticleContainersMerger(b_hadrons, name=name) +@configurable +def _make_b2Lambdah(particles, + descriptor, + name='BNOCb2LambdahCombiner', + apt_min=1000.0 * MeV, + apt1_min=500.0 * MeV, + sumpt_min=800.0 * MeV, + sumpt_num_min=2, + am_min=4800. * MeV, + am_max=7000. * MeV, + acutdocachi2=5.0, + vt_pt=800.0 * MeV, + vt_vchi2pdof_max=12., + vt_bpvdira_min=0.995, + mipchidv_max=15., + bpvvdchi2=30.0): + ''' + For B+->Lambda~0 p+, Bc+->Lambda~0 p+ + ''' + + combination_code = require_all(F.PT > apt_min, + F.CHILD(1, F.PT) > apt1_min, + F.SUM(F.PT > sumpt_min) >= sumpt_num_min, + in_range(am_min, F.MASS, am_max), + F.MAXDOCACHI2CUT(acutdocachi2)) + + pvs = make_pvs() + + vertex_code = require_all(F.PT > vt_pt, + F.BPVDIRA(pvs) > vt_bpvdira_min, + F.CHI2DOF < vt_vchi2pdof_max, + F.MINIPCHI2(pvs) < mipchidv_max, + F.BPVFDCHI2(pvs) > bpvvdchi2) + return ParticleCombiner( + particles, + name=name, + DecayDescriptor=descriptor, + CombinationCut=combination_code, + CompositeCut=vertex_code) + + +@configurable +def make_b2Lambdah(particles, + descriptors, + name='BNOCb2LambdahMerger', + **decay_arguments): + assert len(descriptors) > 0 + b_hadrons = [] + for descriptor in descriptors: + b_hadrons.append( + _make_b2Lambdah( + particles=particles, descriptor=descriptor, **decay_arguments)) + return ParticleContainersMerger(b_hadrons, name=name) + + @configurable def _make_b2ksh(particles, descriptor, @@ -274,3 +331,62 @@ def make_b2ksh(particles, #''' b hadrons builders using the make_b2x and make_b2hhh defined above ''' + + +@configurable +def make_b2Kpi(particles, + descriptor, + name='BNOCb2KpiMerger', + comb_m_min=4000 * MeV, + comb_m_max=6200 * MeV, + comb_pt_min=5000 * MeV, + mtdocachi2_max=10.0, + pt_min=4000 * MeV): + combination_code = require_all( + in_range(comb_m_min, F.MASS, comb_m_max), + F.SUM(F.PT) > comb_pt_min, + ) + + pvs = make_pvs() + composite_code = require_all( + F.MTDOCACHI2(1, pvs) < mtdocachi2_max, + F.PT > pt_min, + ) + return ParticleCombiner( + particles, + ParticleCombiner="ParticleAdder", + name=name, + DecayDescriptor=descriptor, + CombinationCut=combination_code, + CompositeCut=composite_code, + ) + + +@configurable +def _make_b2hh(particles, + descriptor, + am_min=4700 * MeV, + am_max=6200 * MeV, + sum_pt=4500 * MeV, + docachi2=9.0, + pt_min=1200 * MeV, + dira_min=0.99, + ipchi2_max=9, + fdchi2_min=100): + pvs = make_pvs() + combination_cut = require_all( + F.SUM(F.PT) > sum_pt, + in_range(am_min, F.MASS, am_max), + F.MAXDOCACHI2CUT(docachi2), + ) + composite_cut = require_all( + F.PT > pt_min, + F.BPVDIRA(pvs) > dira_min, + F.BPVIPCHI2(pvs) < ipchi2_max, + F.BPVFDCHI2(pvs) > fdchi2_min, + ) + return ParticleCombiner( + particles, + DecayDescriptor=descriptor, + CombinationCut=combination_cut, + CompositeCut=composite_cut) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/basic_builder.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/basic_builder.py index 31e788e756b031c962489c5b59760136c41b01cd..eb773c3214927bf1b9e03af3bfc7317b79944b0c 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/basic_builder.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/builders/basic_builder.py @@ -12,7 +12,7 @@ """ from __future__ import absolute_import, division, print_function -from GaudiKernel.SystemOfUnits import GeV, MeV, mm +from GaudiKernel.SystemOfUnits import GeV, MeV, mm, ps from RecoConf.reconstruction_objects import make_pvs @@ -26,12 +26,18 @@ from Hlt2Conf.standard_particles import ( make_has_rich_long_protons, make_photons, make_resolved_pi0s, - make_merged_pi0s) + make_merged_pi0s, + make_LambdaLL, + make_LambdaDD, + make_long_protons_for_V0, + make_down_protons_for_V0, + make_long_pions_for_V0, + make_down_pions_for_V0) import Functors as F from Functors.math import in_range from Hlt2Conf.algorithms_thor import ParticleCombiner, ParticleFilter - +from Functors import require_all from Hlt2Conf.lines.topological_b import make_filtered_topo_twobody, make_filtered_topo_threebody #################################### @@ -241,13 +247,80 @@ def make_resolved_pi0s(make_particles=make_resolved_pi0s, pt_min=0 * MeV): @configurable -def make_merged_pi0s(make_particles=make_merged_pi0s, pt_min=0 * MeV): +def make_merged_pi0s(make_particles=make_merged_pi0s, + p_min=0 * MeV, + pt_min=0 * MeV): """For the time being just a dummy selection""" - code = F.PT > pt_min + code = require_all(F.PT > pt_min, F.P > p_min) return ParticleFilter(make_particles(), F.FILTER(code)) +@configurable +def make_detached_protons(p_min=2. * GeV, mipchi2_min=9., + p_pidp_min=-2.): #(F.PID_P > -2.)): + """ + Return detached pions. + """ + + protons = filter_particles( + make_particles=make_long_protons_for_V0, + p_min=p_min, + mipchi2_min=mipchi2_min) + if p_pidp_min is not None: + code = F.PID_P > p_pidp_min + protons = ParticleFilter(protons, F.FILTER(code)) + return protons + + +@configurable +def make_detached_down_protons(p_min=2. * GeV, mipchi2_min=4., + p_pidp_min=None): + """ + Return downstream hadrons with proton mass hypothesis. + """ + protons = filter_particles( + make_particles=make_down_protons_for_V0, + p_min=p_min, + mipchi2_min=mipchi2_min) + + if p_pidp_min is not None: + code = F.PID_P > p_pidp_min + protons = ParticleFilter(protons, F.FILTER(code)) + return protons + + +@configurable +def make_detached_pions(p_min=2. * GeV, mipchi2_min=9., + pi_pidk_max=2.): #(F.PID_K <= 2.)): + """ + Return detached pions. + """ + pions = filter_particles( + make_particles=make_long_pions_for_V0, + p_min=p_min, + mipchi2_min=mipchi2_min) + if pi_pidk_max is not None: + code = F.PID_K < pi_pidk_max + pions = ParticleFilter(pions, F.FILTER(code)) + return pions + + +@configurable +def make_detached_down_pions(p_min=2. * GeV, mipchi2_min=4., pi_pidk_max=None): + """ + Return downstream hadrons with pion mass hypothesis. + """ + pions = filter_particles( + make_particles=make_down_pions_for_V0, + p_min=p_min, + mipchi2_min=mipchi2_min) + if pi_pidk_max is not None: + code = F.PID_K < pi_pidk_max + pions = ParticleFilter(pions, F.FILTER(code)) + return pions + + #################################### # ks, kstar0, ... 2-body decays # #################################### @@ -362,6 +435,7 @@ def make_wide_kstar0(name="BnoCWideKstarCombiner", make_pvs=make_pvs, am_min=630 * MeV, am_max=1600 * MeV, + pi_pidk=5, pi_p_min=2 * GeV, pi_pt_min=500 * MeV, k_pidk_min=-5., @@ -376,7 +450,7 @@ def make_wide_kstar0(name="BnoCWideKstarCombiner", Build wide Kstar0 candidates. ''' - pions = make_pions(p_min=pi_p_min, pt_min=pi_pt_min) + pions = make_pions(pi_pidk_max=pi_pidk, p_min=pi_p_min, pt_min=pi_pt_min) kaons = make_kaons(k_pidk_min=k_pidk_min, p_min=k_p_min, pt_min=k_pt_min) descriptor = '[K*(892)0 -> K+ pi-]cc' combination_code = F.require_all( @@ -505,6 +579,200 @@ def ft_extra_outputs(t_trk_mipchi2_min=0): ("LongTracksOS", LongALL), ("UpstreamTracksOS", UpstreamALL)] +#################################### +# lambda0 2-body decays # +#################################### +def make_lambda_LL(make_lambda=make_LambdaLL, + m_max=1135 * MeV, + m_min=1095 * MeV, + pt_min=550 * MeV, + p_min=1.0 * GeV, + vchi2dof_max=9., + endvz_min=-100.0 * mm, + endvz_max=500.0 * mm): + code = require_all( + in_range(m_min, F.MASS, m_max), F.PT > pt_min, F.P > p_min, + F.CHI2DOF < vchi2dof_max, in_range(endvz_min, F.END_VZ, endvz_max)) + return ParticleFilter( + make_lambda(), F.FILTER(code), name="LambdaLLCombiner") + + +def make_lambda_DD(make_lambda=make_LambdaDD, + m_max=1140 * MeV, + m_min=1095 * MeV, + pt_min=500.0 * MeV, + p_min=1.0 * GeV, + vchi2dof_max=9., + endvz_min=300.0 * mm, + endvz_max=2275.0 * mm): + code = require_all( + in_range(m_min, F.MASS, m_max), F.PT > pt_min, F.P > p_min, + F.CHI2DOF < vchi2dof_max, in_range(endvz_min, F.END_VZ, endvz_max)) + return ParticleFilter( + make_lambda(), F.FILTER(code), name="LambdaDDCombiner") + + +@configurable +def make_veryloose_lambda_LL( + name="veryloose_lambda_LL", + make_protons=make_detached_protons, + make_pions=make_detached_pions, + make_pvs=make_pvs, + mass_window_comb_min=1065. * MeV, + mass_window_comb_max=1165. * MeV, + mass_window_min=1095. * MeV, + mass_window_max=1135. * MeV, + pi_p_min=2. * GeV, + p_p_min=2. * GeV, + p_pt_min=0., # recommended to be small + pi_pt_min=0., # has to be 0 !!! + pi_ipchi2_min=9., + p_ipchi2_min=9., + adocachi2cut=30., + bpvvdchi2_min=4., + bpvltime_min=1. * ps, + vchi2pdof_max=15., + childcut_trchi2dof1=3.0, + childcut_trchi2dof2=3.0, + childcut_trghostprob1=0.5, + childcut_trghostprob2=0.5, +): + + protons = make_protons( + p_min=p_p_min, mipchi2_min=p_ipchi2_min, + p_pidp_min=None) # important to get rid of any PID cuts! + pions = make_pions( + p_min=pi_p_min, mipchi2_min=pi_ipchi2_min, pi_pidk_max=None) + descriptor = '[Lambda0 -> p+ pi-]cc' + combination_code = require_all( + in_range(mass_window_comb_min, F.MASS, mass_window_comb_max), + F.MAXDOCACHI2CUT(adocachi2cut)) + pvs = make_pvs() + vertex_code = require_all( + in_range(mass_window_min, F.MASS, mass_window_max), + F.CHI2DOF < vchi2pdof_max, + F.BPVLTIME(pvs) > bpvltime_min, + F.BPVFDCHI2(pvs) > bpvvdchi2_min, + F.CHILD(1, F.CHI2DOF) < childcut_trchi2dof1, + F.CHILD(2, F.CHI2DOF) < childcut_trchi2dof2, + F.CHILD(1, F.GHOSTPROB) < childcut_trghostprob1, + F.CHILD(2, F.GHOSTPROB) < childcut_trghostprob2) + return ParticleCombiner([protons, pions], + name=name, + DecayDescriptor=descriptor, + CombinationCut=combination_code, + CompositeCut=vertex_code) + + +@configurable +def make_loose_lambda_DD( + name="loose_lambda_DD", + make_protons=make_detached_down_protons, + make_pions=make_detached_down_pions, + make_pvs=make_pvs, + mass_window_comb_min=1035. * MeV, + mass_window_comb_max=1195. * MeV, + mass_window_min=1090. * MeV, + mass_window_max=1140. * MeV, + pi_p_min=2. * GeV, + p_p_min=2. * GeV, + p_pt_min=0., # recommended to be small + pi_pt_min=0., # has to be 0 !!! + pi_ipchi2_min=4., + p_ipchi2_min=4., + adocachi2cut=25., + bpvltime_min=1. * ps, + vchi2pdof_max=15., + vt_p_min=5000. * MeV, + vt_bpvvdchi2_min=50., +): + + protons = make_protons( + p_min=p_p_min, + #mipchi2_min=p_ipchi2_min, + p_pidp_min=None) # important to get rid of any PID cuts! + pions = make_pions( + p_min=pi_p_min, + #mipchi2_min=pi_ipchi2_min, + pi_pidk_max=None) + descriptor = '[Lambda0 -> p+ pi-]cc' + combination_code = require_all( + in_range(mass_window_comb_min, F.MASS, mass_window_comb_max), + F.MAXDOCACHI2CUT(adocachi2cut)) + pvs = make_pvs() + vertex_code = require_all( + in_range(mass_window_min, F.MASS, mass_window_max), + F.P > vt_p_min, + F.CHI2DOF < vchi2pdof_max, #for run2, it's VFASPF(VCHI2)<15.0 + #F.BPVLTIME(pvs) > bpvltime_min, + F.BPVFDCHI2(pvs) > vt_bpvvdchi2_min) + + return ParticleCombiner([protons, pions], + name=name, + DecayDescriptor=descriptor, + CombinationCut=combination_code, + CompositeCut=vertex_code) + + +############################################################################### +# Specific hyperon decay builders, overrides default cuts where needed # +############################################################################### +@configurable +def make_xim_to_lambda0pim(lambdas, + pions, + comb_m_min=1248 * MeV, + comb_m_max=1396 * MeV, + comb_pt_min=500 * MeV, + m_min=1258 * MeV, + m_max=1386 * MeV, + pt_min=300 * MeV, + vchi2pdof_max=10., + bpvfdchi2_min=10.): + """ Make Xi- -> Lambda pi- using long pi-. """ + # Todo, tune cuts for Xi- from b, default is from c + pvs = make_pvs() + combination_code = require_all( + in_range(comb_m_min, F.MASS, comb_m_max), + F.SUM(F.PT) > comb_pt_min) + vertex_code = require_all( + in_range(m_min, F.MASS, m_max), F.PT > pt_min, + F.CHI2DOF < vchi2pdof_max, + F.BPVFDCHI2(pvs) > bpvfdchi2_min) + return ParticleCombiner([lambdas, pions], + name="XimToLambdaPiCombiner", + DecayDescriptor="[Xi- -> Lambda0 pi-]cc", + CombinationCut=combination_code, + CompositeCut=vertex_code) + + +@configurable +def make_omegam_to_lambda0km(lambdas, + kaons, + comb_m_min=1630 * MeV, + comb_m_max=1715 * MeV, + comb_pt_min=500 * MeV, + m_min=1640 * MeV, + m_max=1705 * MeV, + pt_min=100 * MeV, + vchi2pdof_max=5., + bpvfdchi2_min=10.): + """ Make Omega- -> Lambda K- from long tracks. """ + # Todo, tune cuts for Omega- from b, default is from c + pvs = make_pvs() + combination_code = require_all( + in_range(comb_m_min, F.MASS, comb_m_max), + F.SUM(F.PT) > comb_pt_min) + vertex_code = require_all( + in_range(m_min, F.MASS, m_max), F.PT > pt_min, + F.CHI2DOF < vchi2pdof_max, + F.BPVFDCHI2(pvs) > bpvfdchi2_min) + return ParticleCombiner([lambdas, kaons], + name="OmmToLambdaKCombiner", + DecayDescriptor="[Omega- -> Lambda0 K-]cc", + CombinationCut=combination_code, + CompositeCut=vertex_code) + + ################################ # select topo-prefiltered tracks ################################ diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/hlt2_bnoc.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/hlt2_bnoc.py index 2f153dbff7a86f6af6c89902761dba57d1b0a365..90611016452b413ec10c9ec5c7a1c438a57ccd1a 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/hlt2_bnoc.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/hlt2_bnoc.py @@ -27,6 +27,8 @@ from Hlt2Conf.lines.bnoc import BdsToVV from Hlt2Conf.lines.bnoc import BuToKShhh from Hlt2Conf.lines.bnoc import BuTohhh from Hlt2Conf.lines.bnoc import BcTohhh +from Hlt2Conf.lines.bnoc import bbaryon_to_lightbaryon_h +from Hlt2Conf.lines.bnoc import bTohh from Hlt2Conf.lines.bnoc import BuToKSh PROCESS = 'hlt2' @@ -195,6 +197,14 @@ def Bu_KSPiPiPi_LL_line(name='Hlt2BnoC_BuToKSPiPiPi_LL', min_threebody_mva=min_threebody_mva)) +@register_line_builder(hlt2_lines) +@configurable +def BuKPi_line(name="Hlt2BnoC_BuToKpPi0", prescale=1): + line_alg = bTohh.make_BuToKpPi0(process=PROCESS) + return HltLine( + name=name, algs=bnoc_prefilters() + [line_alg], prescale=prescale) + + @register_line_builder(hlt2_lines) @configurable def Bu_KSPiPiPi_DD_line(name='Hlt2BnoC_BuToKSPiPiPi_DD', @@ -416,7 +426,7 @@ def Bu_KSKKK_DD_line(name='Hlt2BnoC_BuToKSKKK_DD', @register_line_builder(hlt2_lines) -def BuToKKK_hlt2_line(name='Hlt2BNOC_BuToKKK', prescale=1): +def BuToKKK_hlt2_line(name='Hlt2BnoC_BuToKKK', prescale=1): line_alg = BuTohhh.make_BuToKKK(process=PROCESS) return HltLine( name=name, @@ -425,7 +435,7 @@ def BuToKKK_hlt2_line(name='Hlt2BNOC_BuToKKK', prescale=1): @register_line_builder(hlt2_lines) -def BuToKpiK_hlt2_line(name='Hlt2BNOC_BuToKpiK', prescale=1): +def BuToKpiK_hlt2_line(name='Hlt2BnoC_BuToKpiK', prescale=1): line_alg = BuTohhh.make_BuToKpiK(process=PROCESS) return HltLine( name=name, @@ -434,7 +444,7 @@ def BuToKpiK_hlt2_line(name='Hlt2BNOC_BuToKpiK', prescale=1): @register_line_builder(hlt2_lines) -def BuToKpipi_hlt2_line(name='Hlt2BNOC_BuToKpipi', prescale=1): +def BuToKpipi_hlt2_line(name='Hlt2BnoC_BuToKpipi', prescale=1): line_alg = BuTohhh.make_BuToKpipi(process=PROCESS) return HltLine( name=name, @@ -443,7 +453,7 @@ def BuToKpipi_hlt2_line(name='Hlt2BNOC_BuToKpipi', prescale=1): @register_line_builder(hlt2_lines) -def BuTopipipi_hlt2_line(name='Hlt2BNOC_BuTopipipi', prescale=1): +def BuTopipipi_hlt2_line(name='Hlt2BnoC_BuTopipipi', prescale=1): line_alg = BuTohhh.make_BuTopipipi(process=PROCESS) return HltLine( name=name, @@ -452,7 +462,7 @@ def BuTopipipi_hlt2_line(name='Hlt2BNOC_BuTopipipi', prescale=1): @register_line_builder(hlt2_lines) -def BuToKpKppim_hlt2_line(name='Hlt2BNOC_BuToKpKppim', prescale=1): +def BuToKpKppim_hlt2_line(name='Hlt2BnoC_BuToKpKppim', prescale=1): line_alg = BuTohhh.make_BuToKpKppim(process=PROCESS) return HltLine( name=name, @@ -461,7 +471,7 @@ def BuToKpKppim_hlt2_line(name='Hlt2BNOC_BuToKpKppim', prescale=1): @register_line_builder(hlt2_lines) -def BuTopippipKm_hlt2_line(name='Hlt2BNOC_BuTopippipKm', prescale=1): +def BuTopippipKm_hlt2_line(name='Hlt2BnoC_BuTopippipKm', prescale=1): line_alg = BuTohhh.make_BuTopippipKm(process=PROCESS) return HltLine( name=name, @@ -471,7 +481,7 @@ def BuTopippipKm_hlt2_line(name='Hlt2BNOC_BuTopippipKm', prescale=1): #Bc->hhh @register_line_builder(hlt2_lines) -def BcToKKK_hlt2_line(name='Hlt2BNOC_BcToKKK', prescale=1): +def BcToKKK_hlt2_line(name='Hlt2BnoC_BcToKKK', prescale=1): line_alg = BcTohhh.make_BcToKKK(process=PROCESS) return HltLine( name=name, @@ -480,7 +490,7 @@ def BcToKKK_hlt2_line(name='Hlt2BNOC_BcToKKK', prescale=1): @register_line_builder(hlt2_lines) -def BcToKpiK_hlt2_line(name='Hlt2BNOC_BcToKpiK', prescale=1): +def BcToKpiK_hlt2_line(name='Hlt2BnoC_BcToKpiK', prescale=1): line_alg = BcTohhh.make_BcToKpiK(process=PROCESS) return HltLine( name=name, @@ -489,7 +499,7 @@ def BcToKpiK_hlt2_line(name='Hlt2BNOC_BcToKpiK', prescale=1): @register_line_builder(hlt2_lines) -def BcToKpipi_hlt2_line(name='Hlt2BNOC_BcToKpipi', prescale=1): +def BcToKpipi_hlt2_line(name='Hlt2BnoC_BcToKpipi', prescale=1): line_alg = BcTohhh.make_BcToKpipi(process=PROCESS) return HltLine( name=name, @@ -498,7 +508,7 @@ def BcToKpipi_hlt2_line(name='Hlt2BNOC_BcToKpipi', prescale=1): @register_line_builder(hlt2_lines) -def BcTopipipi_hlt2_line(name='Hlt2BNOC_BcTopipipi', prescale=1): +def BcTopipipi_hlt2_line(name='Hlt2BnoC_BcTopipipi', prescale=1): line_alg = BcTohhh.make_BcTopipipi(process=PROCESS) return HltLine( name=name, @@ -507,7 +517,7 @@ def BcTopipipi_hlt2_line(name='Hlt2BNOC_BcTopipipi', prescale=1): @register_line_builder(hlt2_lines) -def BcToKpKppim_hlt2_line(name='Hlt2BNOC_BcToKpKppim', prescale=1): +def BcToKpKppim_hlt2_line(name='Hlt2BnoC_BcToKpKppim', prescale=1): line_alg = BcTohhh.make_BcToKpKppim(process=PROCESS) return HltLine( name=name, @@ -516,7 +526,7 @@ def BcToKpKppim_hlt2_line(name='Hlt2BNOC_BcToKpKppim', prescale=1): @register_line_builder(hlt2_lines) -def BcTopippipKm_hlt2_line(name='Hlt2BNOC_BcTopippipKm', prescale=1): +def BcTopippipKm_hlt2_line(name='Hlt2BnoC_BcTopippipKm', prescale=1): line_alg = BcTohhh.make_BcTopippipKm(process=PROCESS) return HltLine( name=name, @@ -524,6 +534,273 @@ def BcTopippipKm_hlt2_line(name='Hlt2BNOC_BcTopippipKm', prescale=1): algs=bnoc_prefilters(require_topo=True, require_GEC=True) + [line_alg]) +############################################## +# From the bbaryon_to_lightbaryon_h builder +############################################## + + +@register_line_builder(hlt2_lines) +def LbToXimKp_XimToLambdaLLPi_line(name='Hlt2BnoC_LbToXimKp_XimToLambdaLLPi', + prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_LbToXimKp_XimToLambdaLLPi( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def LbToXimKp_XimToLambdaDDPi_line(name='Hlt2BnoC_LbToXimKp_XimToLambdaDDPi', + prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_LbToXimKp_XimToLambdaDDPi( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def Xib0ToXimPip_XimToLambdaLLPi_line( + name='Hlt2BnoC_Xib0ToXimPip_XimToLambdaLLPi', prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_Xib0ToXimPip_XimToLambdaLLPi( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def Xib0ToXimPip_XimToLambdaDDPi_line( + name='Hlt2BnoC_Xib0ToXimPip_XimToLambdaDDPi', prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_Xib0ToXimPip_XimToLambdaDDPi( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def XibmToXimPipPim_XimToLambdaLLPi_line( + name='Hlt2BnoC_XibmToXimPipPim_XimToLambdaLLPi', prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_XibmToXimPipPim_XimToLambdaLLPi( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def XibmToXimPipPim_XimToLambdaDDPi_line( + name='Hlt2BnoC_XibmToXimPipPim_XimToLambdaDDPi', prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_XibmToXimPipPim_XimToLambdaDDPi( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def Xib0ToOmmKp_OmmToLambdaLLK_line(name='Hlt2BnoC_Xib0ToOmmKp_OmmToLambdaLLK', + prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_Xib0ToOmmKp_OmmToLambdaLLK( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def Xib0ToOmmKp_OmmToLambdaDDK_line(name='Hlt2BnoC_Xib0ToOmmKp_OmmToLambdaDDK', + prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_Xib0ToOmmKp_OmmToLambdaDDK( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def XibmToOmmKpPim_OmmToLambdaLLK_line( + name='Hlt2BnoC_XibmToOmmKpPim_OmmToLambdaLLK', prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_XibmToOmmKpPim_OmmToLambdaLLK( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def XibmToOmmKpPim_OmmToLambdaDDK_line( + name='Hlt2BnoC_XibmToOmmKpPim_OmmToLambdaDDK', prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_XibmToOmmKpPim_OmmToLambdaDDK( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def OmbmToOmmPipPim_OmmToLambdaLLK_line( + name='Hlt2BnoC_OmbmToOmmPipPim_OmmToLambdaLLK', prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_OmbmToOmmPipPim_OmmToLambdaLLK( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +@register_line_builder(hlt2_lines) +def OmbmToOmmPipPim_OmmToLambdaDDK_line( + name='Hlt2BnoC_OmbmToOmmPipPim_OmmToLambdaDDK', prescale=1): + line_alg = bbaryon_to_lightbaryon_h.make_OmbmToOmmPipPim_OmmToLambdaDDK( + process=PROCESS) + return HltLine( + name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) + + +#bTohh +@register_line_builder(hlt2_lines) +def BuToLambdapLL_hlt2_line(name='Hlt2BnoC_BuToLambdapLL', + prescale=1, + min_twobody_mva=0.1, + min_threebody_mva=0.1): + line_alg = bTohh.make_BuToLambdapLL(process=PROCESS) + return HltLine( + name=name, + prescale=prescale, + algs=bnoc_prefilters( + require_topo=True, + require_GEC=True, + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva) + [line_alg], + extra_outputs=Topo_prefilter_extra_outputs( + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva)) + + +@register_line_builder(hlt2_lines) +def BuToLambdapDD_hlt2_line(name='Hlt2BnoC_BuToLambdapDD', + prescale=1, + min_twobody_mva=0.1, + min_threebody_mva=0.1): + line_alg = bTohh.make_BuToLambdapDD(process=PROCESS) + return HltLine( + name=name, + prescale=prescale, + algs=bnoc_prefilters( + require_topo=True, + require_GEC=True, + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva) + [line_alg], + extra_outputs=Topo_prefilter_extra_outputs( + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva)) + + +@register_line_builder(hlt2_lines) +def BcToLambdapLL_hlt2_line(name='Hlt2BnoC_BcToLambdapLL', + prescale=1, + min_twobody_mva=0.1, + min_threebody_mva=0.1): + line_alg = bTohh.make_BcToLambdapLL(process=PROCESS) + return HltLine( + name=name, + prescale=prescale, + algs=bnoc_prefilters( + require_topo=True, + require_GEC=True, + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva) + [line_alg], + extra_outputs=Topo_prefilter_extra_outputs( + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva)) + + +@register_line_builder(hlt2_lines) +def BcToLambdapDD_hlt2_line(name='Hlt2BnoC_BcToLambdapDD', + prescale=1, + min_twobody_mva=0.1, + min_threebody_mva=0.1): + line_alg = bTohh.make_BcToLambdapDD(process=PROCESS) + return HltLine( + name=name, + prescale=prescale, + algs=bnoc_prefilters( + require_topo=True, + require_GEC=True, + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva) + [line_alg], + extra_outputs=Topo_prefilter_extra_outputs( + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva)) + + +@register_line_builder(hlt2_lines) +def XibToLambdapiLL_hlt2_line(name='Hlt2BnoC_XibToLambdapiLL', + prescale=1, + min_twobody_mva=0.1, + min_threebody_mva=0.1): + line_alg = bTohh.make_XibToLambdapiLL(process=PROCESS) + return HltLine( + name=name, + prescale=prescale, + algs=bnoc_prefilters( + require_topo=True, + require_GEC=True, + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva) + [line_alg], + extra_outputs=Topo_prefilter_extra_outputs( + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva)) + + +@register_line_builder(hlt2_lines) +def XibToLambdapiDD_hlt2_line(name='Hlt2BnoC_XibToLambdapiDD', + prescale=1, + min_twobody_mva=0.1, + min_threebody_mva=0.1): + line_alg = bTohh.make_XibToLambdapiDD(process=PROCESS) + return HltLine( + name=name, + prescale=prescale, + algs=bnoc_prefilters( + require_topo=True, + require_GEC=True, + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva) + [line_alg], + extra_outputs=Topo_prefilter_extra_outputs( + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva)) + + +@register_line_builder(hlt2_lines) +def XibToLambdaKLL_hlt2_line(name='Hlt2BnoC_XibToLambdaKLL', + prescale=1, + min_twobody_mva=0.1, + min_threebody_mva=0.1): + line_alg = bTohh.make_XibToLambdaKLL(process=PROCESS) + return HltLine( + name=name, + prescale=prescale, + algs=bnoc_prefilters( + require_topo=True, + require_GEC=True, + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva) + [line_alg], + extra_outputs=Topo_prefilter_extra_outputs( + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva)) + + +@register_line_builder(hlt2_lines) +def XibToLambdaKDD_hlt2_line(name='Hlt2BnoC_XibToLambdaKDD', + prescale=1, + min_twobody_mva=0.1, + min_threebody_mva=0.1): + line_alg = bTohh.make_XibToLambdaKDD(process=PROCESS) + return HltLine( + name=name, + prescale=prescale, + algs=bnoc_prefilters( + require_topo=True, + require_GEC=True, + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva) + [line_alg], + extra_outputs=Topo_prefilter_extra_outputs( + min_twobody_mva=min_twobody_mva, + min_threebody_mva=min_threebody_mva)) + + +#Ksh @register_line_builder(hlt2_lines) def BuToKsLLPi_hlt2_line(name='Hlt2BnoC_BuToKsLLPi', prescale=1, diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/spruce_bnoc.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/spruce_bnoc.py index b26cf6f8d69c52c2bdb6e1aa3fd8fbd6b665a96c..65581a77a3906a21cf8e1a90dcb6aeb348845bb7 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/spruce_bnoc.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/bnoc/spruce_bnoc.py @@ -12,45 +12,11 @@ """ from __future__ import absolute_import, division, print_function -from Moore.config import SpruceLine, register_line_builder +#from Moore.config import SpruceLine, register_line_builder -from PyConf import configurable +#from PyConf import configurable -from Hlt2Conf.lines.bnoc.prefilters import bnoc_prefilters - -from Hlt2Conf.lines.bnoc import BuToKShhh +#from Hlt2Conf.lines.bnoc.prefilters import bnoc_prefilters PROCESS = 'spruce' sprucing_lines = {} - - -@register_line_builder(sprucing_lines) -@configurable -def Bu_KSPiPiPi_LL_line(name='SpruceBnoC_BuToKSPiPiPi_LL', prescale=1): - line_alg = BuToKShhh.make_BuToKSPiPiPi_LL(process=PROCESS) - return SpruceLine( - name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) - - -@register_line_builder(sprucing_lines) -@configurable -def Bu_KSPiPiPi_DD_line(name='SpruceBnoC_BuToKSPiPiPi_DD', prescale=1): - line_alg = BuToKShhh.make_BuToKSPiPiPi_DD(process=PROCESS) - return SpruceLine( - name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) - - -@register_line_builder(sprucing_lines) -@configurable -def Bu_KSKKK_LL_line(name='SpruceBnoC_BuToKSKKK_LL', prescale=1): - line_alg = BuToKShhh.make_BuToKSKKK_LL(process=PROCESS) - return SpruceLine( - name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg]) - - -@register_line_builder(sprucing_lines) -@configurable -def Bu_KSKKK_DD_line(name='SpruceBnoC_BuToKSKKK_DD', prescale=1): - line_alg = BuToKShhh.make_BuToKSKKK_DD(process=PROCESS) - return SpruceLine( - name=name, prescale=prescale, algs=bnoc_prefilters() + [line_alg])