diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/Bd2KstG_Bs2PhiG.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/Bd2KstG_Bs2PhiG.py index 55ec05773b305df90b4c48e5ec9b9310dd50c496..8cfb1c617eb2991210e183cbb4e780ea247ff849 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/Bd2KstG_Bs2PhiG.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/Bd2KstG_Bs2PhiG.py @@ -11,8 +11,8 @@ """ Registration of high-PT photon radiative lines Bs -> phi(-> KK) gamma Bd -> Kst(-> pi K) gamma -author: Biplab Dey -date: 9.05.22 +author: Biplab Dey, Debashis Sahoo +date: 14.05.24 """ from Moore.config import register_line_builder from Moore.lines import Hlt2Line @@ -24,11 +24,9 @@ from GaudiKernel.SystemOfUnits import GeV, MeV import Functors as F from Functors.math import in_range -from Hlt2Conf.lines.rd.builders.rdbuilder_thor import ( - make_rd_detached_kstar0s, make_rd_detached_phis) - from Hlt2Conf.lines.pid.utils.neutral_pid import ( - make_b2xgamma_excl, make_exclusive_highpt_photons) + make_b2xgamma_excl, make_exclusive_highpt_photons, + make_calib_detached_phis, make_calib_detached_kstar0s) from RecoConf.reconstruction_objects import upfront_reconstruction @@ -39,13 +37,13 @@ all_lines = {} def bs_to_phig_line(name="Hlt2PID_Bs2PhiG", prescale=1.): pvs = make_pvs() - # align with the RD construction. Cuts are tuned from my Run2 analysis - phis = make_rd_detached_phis( + + phis = make_calib_detached_phis( name='PID_BsToPhiG_Phi_{hash}', - k_p_min=4.5 * GeV, - k_pt_min=700. * MeV, - k_ipchi2_min=9., - k_pid=(F.PID_K > -5), + k_p_min=2. * GeV, + k_pt_min=500. * MeV, + k_ipchi2_min=55., + k_pid=(F.PID_K > 0.), phi_pt_min=1500. * MeV, ) @@ -72,7 +70,9 @@ def bs_to_phig_line(name="Hlt2PID_Bs2PhiG", prescale=1.): name=name, algs=upfront_reconstruction() + [require_pvs(pvs), phi_filt, b_s0], prescale=prescale, - persistreco=True) + persistreco=True, + calo_clusters=True, + calo_digits=True) @register_line_builder(all_lines) @@ -80,26 +80,25 @@ def bd_to_kstg_line(name="Hlt2PID_BdToKstG", prescale=1.0): pvs = make_pvs() - # align with the RD construction. Cuts are tuned from my Run2 analysis - kst = make_rd_detached_kstar0s( + kst = make_calib_detached_kstar0s( name='PID_BdToKstG_Kst_{hash}', am_min=695. * MeV, am_max=1095. * MeV, - pi_p_min=2.5 * GeV, - pi_pt_min=300. * MeV, - pi_ipchi2_min=8., - pi_pid=(F.PID_K < 8.), - k_p_min=5. * GeV, - k_pt_min=550. * MeV, - k_ipchi2_min=8., - k_pid=(F.PID_K > -5.), + pi_p_min=2. * GeV, + pi_pt_min=500. * MeV, + pi_ipchi2_min=55., + pi_pid=(F.PID_K < -2.), + k_p_min=2. * GeV, + k_pt_min=500. * MeV, + k_ipchi2_min=55., + k_pid=((F.PID_K > 1.) & ((F.PID_K - F.PID_P) > -5.)), kstar0_pt_min=1500. * MeV, adocachi2cut=30., - vchi2pdof_max=25.) + vchi2pdof_max=15.) - # +/-150 MeV mass window and K<->pi mis-ID cut + # +/-100 MeV mass window and K<->pi mis-ID cut kst_filt_code = F.require_all( - in_range(745. * MeV, F.MASS, 1045. * MeV), + in_range(795. * MeV, F.MASS, 995. * MeV), (F.CHILD(1, F.PID_K) - F.CHILD(2, F.PID_K)) > -5.) kst_filt = ParticleFilter( kst, F.FILTER(kst_filt_code), name='filt_PID_BdToKstG_Kst_{hash}') @@ -114,12 +113,14 @@ def bd_to_kstg_line(name="Hlt2PID_BdToKstG", prescale=1.0): comb_m_min=4100 * MeV, comb_m_max=6500 * MeV, pt_min=3000 * MeV, - dira_min=0.9985, - bpv_ipchi2_max=12, + dira_min=0.9995, + bpv_ipchi2_max=9, name='PID_BdToKstGamma_Combiner_{hash}') return Hlt2Line( name=name, algs=upfront_reconstruction() + [require_pvs(pvs), kst_filt, b0], prescale=prescale, - persistreco=True) + persistreco=True, + calo_clusters=True, + calo_digits=True) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/D2EtapPi.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/D2EtapPi.py index 1a70cdb64c3a73d6c0ae2156656d87060225c558..f91a18c966e75c1b5c881b065ec56451ad678d16 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/D2EtapPi.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/D2EtapPi.py @@ -13,7 +13,7 @@ D(+) -> eta' (-> rho0 gamma) pi+ Run2 TurCal ref: https://cds.cern.ch/record/2764341/files/LHCb-INT-2021-002.pdf? Table 9 author: Biplab Dey, Debashis Sahoo -date: 20.11.2023 +date: 14.05.2024 """ from Moore.config import register_line_builder @@ -36,4 +36,6 @@ def D2EtapPi_line(name="Hlt2PID_D2EtapPi", prescale=1.): name=name, algs=upfront_reconstruction() + [require_pvs(pvs), d], prescale=prescale, - persistreco=True) + persistreco=True, + calo_clusters=True, + calo_digits=True) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/Dsst2DsG_KKpi.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/Dsst2DsG_KKpi.py index 5dff595346cee80f658ff32a0d8b28fff2afb9d5..9775763448dad411135a642b5893e2736b443dab 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/Dsst2DsG_KKpi.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/Dsst2DsG_KKpi.py @@ -13,7 +13,7 @@ D*s+ -> Ds+ (-> K K pi) gamma Run2 TurCal ref: https://cds.cern.ch/record/2764341/files/LHCb-INT-2021-002.pdf? Table 9 author: Biplab Dey, Debashis Sahoo -date: 20.11.2023 +date: 14.05.2024 """ from Moore.config import register_line_builder @@ -40,7 +40,7 @@ def Dsst2DsG_line(name="Hlt2PID_Dsst2DsG", prescale=1.): photon = ParticleFilter( make_photons(), F.FILTER(F.PT > 500. * MeV), name="pid_low_pt_gamma") dsst_comb_code = F.require_all( - in_range(2050. * MeV, F.MASS, 2250. * MeV), F.PT > 1. * GeV) + in_range(2000. * MeV, F.MASS, 2300. * MeV), F.PT > 2.5 * GeV) ###NO vertex cut is applied on Dsst dsst = ParticleCombiner( @@ -54,4 +54,6 @@ def Dsst2DsG_line(name="Hlt2PID_Dsst2DsG", prescale=1.): name=name, algs=upfront_reconstruction() + [require_pvs(pvs), dsst], prescale=prescale, - persistreco=True) + persistreco=True, + calo_clusters=True, + calo_digits=True) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/DstToD0Pi_D0ToKPiPi0.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/DstToD0Pi_D0ToKPiPi0.py index f761ffc629b9a973ff2986bc8d170c6d541ced6a..3d976c5d5965759b83e05f882d427caf722817e2 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/DstToD0Pi_D0ToKPiPi0.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/DstToD0Pi_D0ToKPiPi0.py @@ -13,7 +13,7 @@ Dst+ -> D0 (-> K- pi+ pi0) pi+ Run2 TurCal ref: https://cds.cern.ch/record/2764341/files/LHCb-INT-2021-002.pdf? Table 5 author: Biplab Dey, Debashis Sahoo -date: 14.02.2024 +date: 14.05.2024 """ from Moore.config import register_line_builder @@ -42,7 +42,9 @@ def dstdzkpipiz_R_line(name="Hlt2PID_DstToD0Pi_D0ToKPiPi0Resolved", name=name, algs=upfront_reconstruction() + [require_pvs(pvs), dst], prescale=prescale, - persistreco=True) + persistreco=True, + calo_clusters=True, + calo_digits=True) @register_line_builder(all_lines) @@ -59,4 +61,6 @@ def dstdzkpipiz_M_line(name="Hlt2PID_DstToD0Pi_D0ToKPiPi0Merged", prescale=1.): name=name, algs=upfront_reconstruction() + [require_pvs(pvs), dst], prescale=prescale, - persistreco=True) + persistreco=True, + calo_clusters=True, + calo_digits=True) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/EtaMuMuG.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/EtaMuMuG.py index afd910477a382012fd2e3770cf1777bc626ac1f7..c86a748344450305d8c63ac28276b700eaa061c6 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/EtaMuMuG.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/EtaMuMuG.py @@ -13,7 +13,7 @@ Eta->mu+ mu- gamma Run2 TurCal ref: https://cds.cern.ch/record/2764341/files/LHCb-INT-2021-002.pdf? Table 11 author: Biplab Dey, Debashis Sahoo -date: 20.11.2023 +date: 14.05.2024 """ from Moore.config import register_line_builder @@ -40,9 +40,9 @@ def EtaMuMuG_line(name="Hlt2PID_EtaMuMuG", prescale=1.): photon = ParticleFilter( make_photons(), F.FILTER(F.PT > 500. * MeV), name="pid_low_pt_gamma") eta_comb_code = F.require_all( - in_range(400. * MeV, F.MASS, 700. * MeV), F.PT > 1. * GeV) + in_range(400. * MeV, F.MASS, 800. * MeV), F.PT > 1. * GeV) eta_vert_code = F.require_all( - in_range(410. * MeV, F.MASS, 690. * MeV), + in_range(410. * MeV, F.MASS, 800. * MeV), F.BPVIPCHI2(pvs) < 10, ) @@ -57,4 +57,6 @@ def EtaMuMuG_line(name="Hlt2PID_EtaMuMuG", prescale=1.): name=name, algs=upfront_reconstruction() + [require_pvs(pvs), eta], prescale=prescale, - persistreco=True) + persistreco=True, + calo_clusters=True, + calo_digits=True) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/utils/neutral_pid.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/utils/neutral_pid.py index ef5ef2669fd0333b8ab8c2bbe097cf5a18dfabef..465bdbe694d67f3d65a2a8ca551fe970a5ddcf0a 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/utils/neutral_pid.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/pid/utils/neutral_pid.py @@ -14,7 +14,7 @@ photons with high pt cut Run2 TurCal ref: https://cds.cern.ch/record/2764341/files/LHCb-INT-2021-002.pdf? author: Biplab Dey, Debashis Sahoo -date: 14.02.2024 +date: 14.05.2024 """ from GaudiKernel.SystemOfUnits import GeV, MeV, ps, mm import Functors as F @@ -23,9 +23,6 @@ from Functors.math import in_range from PyConf import configurable -#from Hlt2Conf.lines.rd.builders.rdbuilder_thor import (make_rd_detached_kstar0s) - -#from Hlt2Conf.standard_particles import (make_photons) from Hlt2Conf.standard_particles import ( make_photons, # phiG/KstG make_has_rich_long_pions, @@ -116,6 +113,42 @@ def make_calib_has_rich_detached_kaons( pid=pid) +@configurable +def make_calib_detached_phis( + name="pid_detached_phis_{hash}", + make_calib_detached_kaons=make_calib_has_rich_detached_kaons, + make_pvs=make_pvs, + am_min=950. * MeV, #the real min is the di-kaon threshold + am_max=1100. * MeV, + k_p_min=2. * GeV, + k_pt_min=100. * MeV, + k_ipchi2_min=4., + k_pid=(F.PID_K > 0.), + phi_pt_min=400. * MeV, + adocachi2cut=30., + vchi2pdof_max=25.): + ''' + Build phi(1020) candidates. Approximately corresponding to the Run2 + "StdLooseDetachedPhi2KK" cuts. + ''' + + kaons = make_calib_detached_kaons( + p_min=k_p_min, + pt_min=k_pt_min, + mipchi2dvprimary_min=k_ipchi2_min, + pid=k_pid) + descriptor = 'phi(1020) -> K+ K-' + combination_code = F.require_all( + in_range(am_min, F.MASS, am_max), F.MAXSDOCACHI2CUT(adocachi2cut)) + + vertex_code = F.require_all(F.CHI2DOF < vchi2pdof_max, F.PT > phi_pt_min) + return ParticleCombiner([kaons, kaons], + name=name, + DecayDescriptor=descriptor, + CombinationCut=combination_code, + CompositeCut=vertex_code) + + @configurable def make_calib_detached_kstar0s( name="pid_detached_kstar0s_{hash}", @@ -180,17 +213,17 @@ def make_DstDz2Kpipiz( # can be resolved or merged pvs = make_pvs() Kpi = make_calib_detached_kstar0s( - am_min=100. * MeV, + am_min=630. * MeV, am_max=4000. * MeV, - pi_p_min=2.5 * GeV, + pi_p_min=2. * GeV, pi_pt_min=track_pt_min, pi_ipchi2_min=25., - pi_pid=(F.PID_K < 0.), - k_p_min=5. * GeV, + pi_pid=(F.PID_K < -3.), + k_p_min=2. * GeV, k_pt_min=track_pt_min, k_ipchi2_min=25., - k_pid=(F.PID_K > 0.), - kstar0_pt_min=0. * MeV, + k_pid=((F.PID_K > 2.) & ((F.PID_K - F.PID_P) > 2)), + kstar0_pt_min=1000. * MeV, adocachi2cut=30., vchi2pdof_max=9.) @@ -199,17 +232,17 @@ def make_DstDz2Kpipiz( # can be resolved or merged ) Kpi = ParticleFilter(Kpi, F.FILTER(Kpi_filt_code), name=name + "_Kpi") - d0_m_min = 1600. * MeV - d0_m_max = 2100. * MeV + d0_m_min = 1800. * MeV + d0_m_max = 1930. * MeV comb_code_D0 = F.require_all( F.PT > 4000. * MeV, - in_range(d0_m_min - 200. * MeV, F.MASS, d0_m_max + 200. * MeV), + in_range(d0_m_min, F.MASS, d0_m_max), ) vert_code_D0 = F.require_all( in_range(d0_m_min, F.MASS, d0_m_max), F.BPVDIRA(pvs) > 0.9999, - F.BPVIPCHI2(pvs) < 9, + F.BPVIPCHI2(pvs) < 9., F.BPVFDCHI2(pvs) > 75., ) @@ -220,14 +253,11 @@ def make_DstDz2Kpipiz( # can be resolved or merged CombinationCut=comb_code_D0, CompositeCut=vert_code_D0) - deltaM_min = 135.421 * MeV - deltaM_max = 155.421 * MeV - comb_code_Dstp = F.require_all( F.PT > 4000. * MeV, - in_range(deltaM_min, F.MASS - F.CHILD(1, F.MASS), deltaM_max), + in_range(1750. * MeV, F.MASS, 2400 * MeV), ) - vert_code_Dstp = F.require_all(F.BPVIPCHI2(pvs) < 9, ) + vert_code_Dstp = F.require_all(F.BPVIPCHI2(pvs) < 9, F.CHI2DOF < 9) return ParticleCombiner( name=name, @@ -274,19 +304,22 @@ def make_b2xgamma_excl(intermediate, photons, pvs, descriptor, comb_m_min, def make_prompt_ds(name="pid_prompt_ds"): pvs = make_pvs() - k_code = F.require_all(F.PT > 500. * MeV, - F.MINIPCHI2(pvs) > 2., F.PID_K > 0.) + k_code = F.require_all( + F.PT > 500. * MeV, + F.MINIPCHI2(pvs) > 10., + ((F.PID_K > 5.) & ((F.PID_K - F.PID_P) > 0)), + ) kaon = ParticleFilter( make_has_rich_long_kaons(), F.FILTER(k_code), name="pid_kaon") - pi_code = F.require_all(F.PT > 250. * MeV, - F.MINIPCHI2(pvs) > 2., F.PID_K < 0.) + pi_code = F.require_all(F.PT > 300. * MeV, + F.MINIPCHI2(pvs) > 10., F.PID_K < -1.) pion = ParticleFilter( make_has_rich_long_pions(), F.FILTER(pi_code), name="pid_pion") - # +/- 20MeV window - ds_m_min = 1938 * MeV - ds_m_max = 1998 * MeV + # +/- 12 MeV window + ds_m_min = 1956 * MeV + ds_m_max = 1980 * MeV ds_comb_code = F.require_all( in_range(ds_m_min - 20 * MeV, F.MASS, ds_m_max + 20 * MeV), F.MAXSDOCACHI2 < 50, @@ -296,8 +329,8 @@ def make_prompt_ds(name="pid_prompt_ds"): ds_vert_code = F.require_all( in_range(ds_m_min, F.MASS, ds_m_max), F.BPVDIRA(pvs) > 0.99995, - F.BPVIPCHI2(pvs) < 150, - F.BPVFDCHI2(pvs) > 75, F.CHI2DOF < 5, + F.BPVIPCHI2(pvs) < 7., + F.BPVFDCHI2(pvs) > 75., F.CHI2DOF < 2.5, F.BPVLTIME(pvs) > 0.2 * ps) return ParticleCombiner( @@ -346,7 +379,7 @@ def make_d2etappi(name="pid_d2etappi"): pvs = make_pvs() pi_code = F.require_all(F.PT > 500. * MeV, F.P > 1000. * MeV, - F.MINIPCHI2(pvs) > 4., F.PID_K < 0.) + F.MINIPCHI2(pvs) > 12., F.PID_K < 0.) pi = ParticleFilter( make_has_rich_long_pions(), F.FILTER(pi_code), name="pi") @@ -384,8 +417,8 @@ def make_d2etappi(name="pid_d2etappi"): F.PT > 2000. * MeV, ) d_vert_code = F.require_all( - in_range(1800. * MeV, F.MASS, 2050. * MeV), - F.CHI2DOF < 20, + in_range(1650. * MeV, F.MASS, 2250. * MeV), + F.CHI2DOF < 4, F.BPVDIRA(pvs) > 0.999, F.BPVIPCHI2(pvs) < 10, )