diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/__init__.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/__init__.py index 3d6e9f24715158aa64c56c92d3d98ad13cc87fb8..556037c98de704d22ab914ad5a0c11ca48c73486 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/__init__.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/__init__.py @@ -14,7 +14,6 @@ Submodule that defines all the QEE selection lines from . import hlt2_qee from . import spruce_qee -from . import spruce_qee_jets hlt2_turbo_lines = {} hlt2_turbo_lines.update(hlt2_qee.turbo_lines) @@ -28,4 +27,3 @@ all_lines.update(hlt2_full_lines) sprucing_lines = {} sprucing_lines.update(spruce_qee.sprucing_lines) -sprucing_lines.update(spruce_qee_jets.sprucing_jet_lines) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/spruce_qee.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/spruce_qee.py index 4c672e520830689fe257231d9683abd2b843038e..f4915fceace2bbd5020eff5122c215179acc86bc 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/spruce_qee.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/spruce_qee.py @@ -29,6 +29,7 @@ from Hlt2Conf.lines.qee.diboson import make_WW_emu_cand, make_WZ_Zll_Wlnu_cand, from Hlt2Conf.lines.qee.wz_boson_rare_decays import make_WZRareDecay_HadronGamma_cand, make_WZRareDecay_DiMuonMeson_cand, make_WRareDecay_DiMuonPhiDsp_cand from Hlt2Conf.lines.qee.qee_builders import muon_filter from Hlt2Conf.lines.qee.single_high_pt_muon import make_isolated_muons +from Hlt2Conf.lines.qee.di_bjet import make_SVTagDijets_cand, make_Dijets_cand, make_Trijets_cand, make_TrijetsTwoSVTag_cand # Necessary imports to hlt2_filter robustly; from inspect import signature @@ -45,6 +46,7 @@ def _hlt2_decision_name(line_defn): return f"{line_name}Decision" +################ Z -> ll lines ################ @register_line_builder(sprucing_lines) @configurable def z_to_mu_mu_sprucing_line(name='SpruceQEE_ZToMuMu', prescale=1): @@ -127,6 +129,7 @@ def same_sign_dielec_sprucing_line(name='SpruceQEE_DiElectronSameSign', prescale=prescale) +################ Z + Jet lines ################ @register_line_builder(sprucing_lines) @configurable def z_jet_sprucing_line(name='SpruceQEE_ZJet', prescale=1): @@ -175,7 +178,7 @@ def z_svjet_sprucing_line(name='SpruceQEE_ZSVJet', prescale=1): line_alg = make_Z0SVjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -187,7 +190,7 @@ def z_jetjet_sprucing_line(name='SpruceQEE_ZJetJet', prescale=1): line_alg = make_Z0jetjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -199,10 +202,11 @@ def z_svjetsvjet_sprucing_line(name='SpruceQEE_ZSVJetSVJet', prescale=1): line_alg = make_Z0SVjetSVjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) +################ W + Jet lines ################ @register_line_builder(sprucing_lines) @configurable def w_jet_sprucing_line(name='SpruceQEE_WJet', prescale=1): @@ -211,7 +215,7 @@ def w_jet_sprucing_line(name='SpruceQEE_WJet', prescale=1): line_alg = make_Wjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -223,7 +227,7 @@ def w_svjet_sprucing_line(name='SpruceQEE_WSVJet', prescale=1): line_alg = make_WSVjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -235,7 +239,7 @@ def w_jetjet_sprucing_line(name='SpruceQEE_WJetJet', prescale=1): line_alg = make_Wjetjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -247,7 +251,7 @@ def w_svjetsvjet_sprucing_line(name='SpruceQEE_WSVJetSVJet', prescale=1): line_alg = make_WSVjetSVjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -259,10 +263,11 @@ def zee_jet_sprucing_line(name='SpruceQEE_ZEEJet', prescale=1): line_alg = make_Z0_elec_jet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) +################ Z -> ll + Jet lines ################ @register_line_builder(sprucing_lines) @configurable def zee_svjet_sprucing_line(name='SpruceQEE_ZEESVJet', prescale=1): @@ -271,7 +276,7 @@ def zee_svjet_sprucing_line(name='SpruceQEE_ZEESVJet', prescale=1): line_alg = make_Z0_elec_SVjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -283,7 +288,7 @@ def zee_jetjet_sprucing_line(name='SpruceQEE_ZEEJetJet', prescale=1): line_alg = make_Z0_elec_jetjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -295,10 +300,11 @@ def zee_svjetsvjet_sprucing_line(name='SpruceQEE_ZEESVJetSVJet', prescale=1): line_alg = make_Z0_elec_SVjetSVjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) +################ W -> l + Jet lines ################ @register_line_builder(sprucing_lines) @configurable def we_jet_sprucing_line(name='SpruceQEE_WEJet', prescale=1): @@ -307,7 +313,7 @@ def we_jet_sprucing_line(name='SpruceQEE_WEJet', prescale=1): line_alg = make_W_elec_jet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -319,7 +325,7 @@ def we_svjet_sprucing_line(name='SpruceQEE_WESVJet', prescale=1): line_alg = make_W_elec_SVjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -331,7 +337,7 @@ def we_jetjet_sprucing_line(name='SpruceQEE_WEJetJet', prescale=1): line_alg = make_W_elec_jetjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) @@ -343,10 +349,11 @@ def we_svjetsvjet_sprucing_line(name='SpruceQEE_WESVJetSVJet', prescale=1): line_alg = make_W_elec_SVjetSVjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) +################ ttbar Jet lines ################ @register_line_builder(sprucing_lines) @configurable def ttbar_to_mu_e_sprucing_line(name='SpruceQEE_TTbarToMuE', prescale=1): @@ -368,10 +375,11 @@ def ttbar_to_mu_e_bjet_sprucing_line(name='SpruceQEE_TTbarToMuEBjet', line_alg = make_ttbar_MuEBjet_cand() return SpruceLine( name=name, - algs=upfront_reconstruction() + [line_alg], + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], prescale=prescale) +################ DiBoson lines ################ @register_line_builder(sprucing_lines) @configurable def WW_to_e_mu_sprucing_line(name='SpruceQEE_WWToMuE', prescale=1): @@ -462,6 +470,7 @@ for lepton_type, lepton_suffix in zip(["mu", "e"], ["Mu", "E"]): prescale=prescale) +################ W/Z RareDecay Hadron lines ################ @register_line_builder(sprucing_lines) @configurable def W_to_JPsi_Phi_Dsp_sprucing_line(name='SpruceQEE_DiMuonPhiDsp', prescale=1): @@ -521,6 +530,7 @@ for decay_type in ["JPsiDsp", "DiMuonDsp", "DiMuonPion"]: prescale=prescale) +################ Single muon lines ################ @register_line_builder(sprucing_lines) @configurable def single_muon_highpt_sprucing_line(name='SpruceQEE_SingleHighPtMuon', @@ -578,3 +588,53 @@ def single_muon_highpt_nomuid_sprucing_line( algs=upfront_reconstruction() + [line_alg], hlt2_filter_code=_hlt2_decision_name(single_muon_highpt_nomuid_line), prescale=prescale) + + +################ SV Di/Tri-Jet lines ################ +@register_line_builder(sprucing_lines) +@configurable +def SVTagDijets_sprucing_line(name='SpruceQEE_SVTagDijets', prescale=1): + """SV Tag Dijets sprucing line""" + + line_alg = make_SVTagDijets_cand() + return SpruceLine( + name=name, + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], + prescale=prescale) + + +@register_line_builder(sprucing_lines) +@configurable +def Dijets_sprucing_line(name='SpruceQEE_Dijets', prescale=1): + """Dijets sprucing line""" + + line_alg = make_Dijets_cand() + return SpruceLine( + name=name, + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], + prescale=prescale) + + +@register_line_builder(sprucing_lines) +@configurable +def Trijets_sprucing_line(name='SpruceQEE_Trijets', prescale=1): + """Trijets sprucing line""" + + line_alg = make_Trijets_cand() + return SpruceLine( + name=name, + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], + prescale=prescale) + + +@register_line_builder(sprucing_lines) +@configurable +def TrijetsTwoSVTag_sprucing_line(name='SpruceQEE_TrijetsTwoSVTag', + prescale=1): + """Trijets sprucing line""" + + line_alg = make_TrijetsTwoSVTag_cand() + return SpruceLine( + name=name, + algs=upfront_reconstruction() + [require_pvs(make_pvs()), line_alg], + prescale=prescale) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/spruce_qee_jets.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/spruce_qee_jets.py deleted file mode 100644 index 70b62a36833cfca0ba6cff7be078dc6d00d60c01..0000000000000000000000000000000000000000 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/qee/spruce_qee_jets.py +++ /dev/null @@ -1,72 +0,0 @@ -############################################################################### -# (c) Copyright 2019-2023 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. # -############################################################################### -""" -Definitions of the jets QEE sprucing lines. -""" - -from PyConf import configurable - -from Moore.config import register_line_builder, SpruceLine - -from RecoConf.reconstruction_objects import upfront_reconstruction - -from Hlt2Conf.lines.qee.di_bjet import make_SVTagDijets_cand, make_Dijets_cand, make_Trijets_cand, make_TrijetsTwoSVTag_cand - -sprucing_jet_lines = {} - - -@register_line_builder(sprucing_jet_lines) -@configurable -def SVTagDijets_sprucing_line(name='SpruceQEE_SVTagDijets', prescale=1): - """SV Tag Dijets sprucing line""" - - line_alg = make_SVTagDijets_cand() - return SpruceLine( - name=name, - algs=upfront_reconstruction() + [line_alg], - prescale=prescale) - - -@register_line_builder(sprucing_jet_lines) -@configurable -def Dijets_sprucing_line(name='SpruceQEE_Dijets', prescale=1): - """Dijets sprucing line""" - - line_alg = make_Dijets_cand() - return SpruceLine( - name=name, - algs=upfront_reconstruction() + [line_alg], - prescale=prescale) - - -@register_line_builder(sprucing_jet_lines) -@configurable -def Trijets_sprucing_line(name='SpruceQEE_Trijets', prescale=1): - """Trijets sprucing line""" - - line_alg = make_Trijets_cand() - return SpruceLine( - name=name, - algs=upfront_reconstruction() + [line_alg], - prescale=prescale) - - -@register_line_builder(sprucing_jet_lines) -@configurable -def TrijetsTwoSVTag_sprucing_line(name='SpruceQEE_TrijetsTwoSVTag', - prescale=1): - """Trijets sprucing line""" - - line_alg = make_TrijetsTwoSVTag_cand() - return SpruceLine( - name=name, - algs=upfront_reconstruction() + [line_alg], - prescale=prescale)