############################################################################### # (c) Copyright 2020 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. # ############################################################################### """ Lines to select the decay D*+ -> D0 pi+ with D0 -> KS0 KS0 and KS0 -> pi+ pi-. The KS0 can be reconstructed either from long or downstream tracks, resulting in the combinations LLLL, LLDD, DDDD. The tight lines apply tighter cuts on the KS0 and D*+ invariant masses for the LLLL and LLDD lines, and on the KS0 invariant masses for the DDDD line. """ import Functors as F from Functors.math import in_range from GaudiKernel.SystemOfUnits import MeV, mm, GeV from Moore.config import register_line_builder from Moore.lines import Hlt2Line from RecoConf.reconstruction_objects import make_pvs from Hlt2Conf.standard_particles import make_down_pions, make_long_pions, make_up_pions from Hlt2Conf.algorithms import ParticleContainersMerger from Hlt2Conf.algorithms_thor import (ParticleCombiner, ParticleFilter) from Hlt2Conf.lines.charm.particle_properties import _KS_M from Hlt2Conf.lines.charm.prefilters import charm_prefilters # from Hlt2Conf.lines.charm.up_taggers import make_tagging_pions from PyConf.Algorithms import Monitor__ParticleRange ##################################################################### ### Shortcuts for filters and builders used throughout the module ### ##################################################################### def make_tagging_pions(): return ParticleFilter( make_long_pions(), F.FILTER(F.require_all(F.PT > 200 * MeV, F.P > 1 * GeV)), ) def _make_long_pions_from_ks(): return ParticleFilter( make_long_pions(), F.FILTER(F.MINIPCHI2CUT(IPChi2Cut=36., Vertices=make_pvs()))) def _make_down_pions_from_ks(): return ParticleFilter( make_down_pions(), F.FILTER(F.require_all(F.PT > 175 * MeV, F.P > 3000 * MeV))) def _make_down_pions_from_ks_LD(): return ParticleFilter( make_down_pions(), F.FILTER(F.require_all(F.PT > 100 * MeV, F.P > 2000 * MeV))) def _make_up_pions_from_ks(): return ParticleFilter( make_up_pions(), F.FILTER(F.MINIPCHI2CUT(IPChi2Cut=10., Vertices=make_pvs()))) def _make_ll_ks_tight(descriptor="KS0 -> pi+ pi-"): """Returns maker for KS0 -> pi+ pi- constructed with two long pions with a tighter mass cut.""" return ParticleCombiner( [_make_long_pions_from_ks(), _make_long_pions_from_ks()], DecayDescriptor=descriptor, name='Charm_D0ToKsKs_Ks_LL_Tight_{hash}', CombinationCut=F.require_all( in_range(_KS_M - 50 * MeV, F.MASS, _KS_M + 50 * MeV), F.PT > 450 * MeV, ), CompositeCut=F.require_all( in_range(_KS_M - 30 * MeV, F.MASS, _KS_M + 30 * MeV), F.CHI2DOF < 7, # TODO: study if this cut can be tightened in_range(-100 * mm, F.END_VZ, 500 * mm), F.PT > 500 * MeV, ), ) def _make_ll_ks_tight_ULLL(descriptor="KS0 -> pi+ pi-"): """Returns maker for KS0 -> pi+ pi- constructed with two long pions with a tighter mass cut for ULLL.""" return ParticleCombiner( [_make_long_pions_from_ks(), _make_long_pions_from_ks()], DecayDescriptor=descriptor, name='Charm_D0ToKsKs_Ks_LL_Tight_ULLL{hash}', CombinationCut=F.require_all( in_range(_KS_M - 50 * MeV, F.MASS, _KS_M + 50 * MeV), F.PT > 250 * MeV, ), CompositeCut=F.require_all( in_range(_KS_M - 30 * MeV, F.MASS, _KS_M + 30 * MeV), F.CHI2DOF < 7, # TODO: study if this cut can be tightened in_range(-100 * mm, F.END_VZ, 500 * mm), F.PT > 300 * MeV, ), ) def _make_ld_ks_tight(descriptor="KS0 -> pi+ pi-"): """Returns maker for KS0 -> pi+ pi- constructed with a long and down pion with a tighter mass cut.""" return ParticleCombiner( [_make_long_pions_from_ks(), _make_down_pions_from_ks_LD()], DecayDescriptor=descriptor, name='Charm_D0ToKsKs_Ks_LD_Tight_{hash}', CombinationCut=F.require_all( in_range(_KS_M - 85 * MeV, F.MASS, _KS_M + 85 * MeV), F.PT > 450 * MeV, ), CompositeCut=F.require_all( in_range(_KS_M - 65 * MeV, F.MASS, _KS_M + 65 * MeV), F.CHI2DOF < 10, # TODO: study if this cut can be tightened in_range(50 * mm, F.END_VZ, 500 * mm), F.PT > 500 * MeV, ), ) def _make_dd_ks_tight(descriptor="KS0 -> pi+ pi-"): """Returns maker for KS0 -> pi+ pi- constructed with two downstream pions with a tighter mass cut.""" return ParticleCombiner( [_make_down_pions_from_ks(), _make_down_pions_from_ks()], DecayDescriptor=descriptor, name='Charm_D0ToKsKs_Ks_DD_Tight_{hash}', CombinationCut=F.require_all( in_range(_KS_M - 80 * MeV, F.MASS, _KS_M + 80 * MeV), F.PT > 450 * MeV, ), CompositeCut=F.require_all( in_range(_KS_M - 60 * MeV, F.MASS, _KS_M + 60 * MeV), F.CHI2DOF < 10, # TODO: study if this cut can be tightened in_range(300 * mm, F.END_VZ, 2275 * mm), F.PT > 500 * MeV, ), ) def _make_ul_ks_tight(descriptor="KS0 -> pi+ pi-"): # change req """Returns maker for KS0 -> pi+ pi- constructed with one long and one up pion with a tighter mass cut.""" return ParticleCombiner( [_make_up_pions_from_ks(), _make_long_pions_from_ks()], DecayDescriptor=descriptor, name='Charm_D0ToKsKs_Ks_UL_Tight_{hash}', CombinationCut=F.require_all( in_range(_KS_M - 90 * MeV, F.MASS, _KS_M + 90 * MeV), F.PT < 5050 * MeV, ), CompositeCut=F.require_all( in_range(_KS_M - 70 * MeV, F.MASS, _KS_M + 70 * MeV), F.CHI2DOF < 10, # TODO: study if this cut can be tightened in_range(-100 * mm, F.END_VZ, 500 * mm), F.PT > 400 * MeV, ), ) def _make_dstars_tight(dzeros, pions, descriptor): """Returns maker for D*+- -> D0 pi+- with a tighter mass cut.""" return ParticleCombiner( [dzeros, pions], DecayDescriptor=descriptor, name='Charm_D0ToKsKs_DstarsTight_{hash}', CombinationCut=F.MASS - F.CHILD(1, F.MASS) < 160 * MeV, CompositeCut=F.require_all( F.MASS - F.CHILD(1, F.MASS) < 150 * MeV, F.CHI2DOF < 25, # fix due to control channel ), ) ######################### ### Lines definition ### ######################### all_lines = {} @register_line_builder(all_lines) def dst_to_d0pi_d0toksks_ll_tightline( name="Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLL_Tight"): pvs = make_pvs() kshorts = _make_ll_ks_tight() dzeros = ParticleCombiner( [kshorts, kshorts], DecayDescriptor="D0 -> KS0 KS0", name="Charm_D0ToKsKs_D0ToKsKs_LLLL_Tight", CombinationCut=F.require_all( in_range(1730 * MeV, F.MASS, 2000 * MeV), F.SUM(F.PT) > 1500 * MeV, ), CompositeCut=F.require_all( in_range(1775 * MeV, F.MASS, 1955 * MeV), F.BPVFDCHI2(pvs) > 5, F.CHI2DOF < 10, # fix F.BPVDIRA(pvs) > 0.9994, ), ) pitag = make_tagging_pions() dstarp = _make_dstars_tight(dzeros, pitag, "D*(2010)+ -> D0 pi+") dstarm = _make_dstars_tight(dzeros, pitag, "D*(2010)- -> D0 pi-") dstars = ParticleContainersMerger([dstarp, dstarm]) pisoft_pt = Monitor__ParticleRange( Input=pitag, Variable=F.PT, HistogramName=f"/{name}/pisoft_PT", Bins=50, Range=(0 * MeV, 1000 * MeV), ) delta_m = Monitor__ParticleRange( Input=dstars, Variable=F.MASS - F.CHILD(1, F.MASS), HistogramName=f"/{name}/delta_m", Bins=200, Range=(100 * MeV, 200 * MeV), ) pi1 = Monitor__ParticleRange( Input=dzeros, Variable=F.CHILD(1, F.CHILD(1, F.PT)), HistogramName=f"/{name}/pi_l1", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi2 = Monitor__ParticleRange( Input=dzeros, Variable=F.CHILD(1, F.CHILD(2, F.PT)), HistogramName=f"/{name}/pi_l2", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi3 = Monitor__ParticleRange( Input=dzeros, Variable=F.CHILD(2, F.CHILD(1, F.PT)), HistogramName=f"/{name}/pi_l3", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi4 = Monitor__ParticleRange( Input=dzeros, Variable=F.CHILD(2, F.CHILD(2, F.PT)), HistogramName=f"/{name}/pi_l4", Bins=200, Range=(0 * MeV, 3000 * MeV), ) return Hlt2Line( name=name, algs=charm_prefilters() + [kshorts, dzeros, dstars, pisoft_pt, delta_m, pi1, pi2, pi3, pi4]) @register_line_builder(all_lines) def dst_to_d0pi_d0toksks_ld_tightline( name="Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLDD_Tight"): pvs = make_pvs() dd_kshorts = _make_dd_ks_tight("KS0 -> pi+ pi-") ll_kshorts = _make_ll_ks_tight() dzeros = ParticleCombiner( [dd_kshorts, ll_kshorts], DecayDescriptor="D0 -> KS0 KS0", AllowDiffInputsForSameIDChildren=True, name="Charm_D0ToKsKs_D0ToKsKs_LLDD_Tight", CombinationCut=F.require_all( in_range(1730 * MeV, F.MASS, 2000 * MeV), F.SUM(F.PT) > 1500 * MeV, ), CompositeCut=F.require_all( in_range(1775 * MeV, F.MASS, 1955 * MeV), F.CHI2DOF < 10, F.BPVDIRA(pvs) > 0.9994, ), ) pitag = make_tagging_pions() dstarp = _make_dstars_tight(dzeros, pitag, "D*(2010)+ -> D0 pi+") dstarm = _make_dstars_tight(dzeros, pitag, "D*(2010)- -> D0 pi-") dstars = ParticleContainersMerger([dstarp, dstarm]) pisoft_pt = Monitor__ParticleRange( Input=pitag, Variable=F.PT, HistogramName=f"/{name}/pisoft_PT", Bins=50, Range=(0 * MeV, 1000 * MeV), ) delta_m = Monitor__ParticleRange( Input=dstars, Variable=F.MASS - F.CHILD(1, F.MASS), HistogramName=f"/{name}/delta_m", Bins=200, Range=(100 * MeV, 200 * MeV), ) pi1 = Monitor__ParticleRange( Input=ll_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_l1", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi2 = Monitor__ParticleRange( Input=ll_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_l2", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi3 = Monitor__ParticleRange( Input=dd_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_d1", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi4 = Monitor__ParticleRange( Input=dd_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_d2", Bins=200, Range=(0 * MeV, 3000 * MeV), ) return Hlt2Line( name=name, algs=charm_prefilters() + [dd_kshorts, dzeros, dstars, pisoft_pt, delta_m, pi1, pi2, pi3, pi4]) @register_line_builder(all_lines) def dst_to_d0pi_d0toksks_dd_tightline( name="Hlt2Charm_DstpToD0Pip_D0ToKsKs_DDDD_Tight"): pvs = make_pvs() dd_kshorts = _make_dd_ks_tight() dzeros = ParticleCombiner( [dd_kshorts, dd_kshorts], DecayDescriptor="D0 -> KS0 KS0", name="Charm_D0ToKsKs_D0ToKsKs_DDDD_Tight", CombinationCut=F.require_all( in_range(1730 * MeV, F.MASS, 2000 * MeV), F.SUM(F.PT) > 1500 * MeV, ), CompositeCut=F.require_all( in_range(1775 * MeV, F.MASS, 1955 * MeV), F.CHI2DOF < 10, F.BPVDIRA(pvs) > 0.9994, ), ) pitag = make_tagging_pions() dstarp = _make_dstars_tight(dzeros, pitag, "D*(2010)+ -> D0 pi+") dstarm = _make_dstars_tight(dzeros, pitag, "D*(2010)- -> D0 pi-") dstars = ParticleContainersMerger([dstarp, dstarm]) pisoft_pt = Monitor__ParticleRange( Input=pitag, Variable=F.PT, HistogramName=f"/{name}/pisoft_PT", Bins=50, Range=(0 * MeV, 1000 * MeV), ) delta_m = Monitor__ParticleRange( Input=dstars, Variable=F.MASS - F.CHILD(1, F.MASS), HistogramName=f"/{name}/delta_m", Bins=200, Range=(100 * MeV, 200 * MeV), ) pi1 = Monitor__ParticleRange( Input=dzeros, Variable=F.CHILD(1, F.CHILD(1, F.PT)), HistogramName=f"/{name}/pi_d1", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi2 = Monitor__ParticleRange( Input=dzeros, Variable=F.CHILD(1, F.CHILD(2, F.PT)), HistogramName=f"/{name}/pi_d2", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi3 = Monitor__ParticleRange( Input=dzeros, Variable=F.CHILD(2, F.CHILD(1, F.PT)), HistogramName=f"/{name}/pi_d3", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi4 = Monitor__ParticleRange( Input=dzeros, Variable=F.CHILD(2, F.CHILD(2, F.PT)), HistogramName=f"/{name}/pi_d4", Bins=200, Range=(0 * MeV, 3000 * MeV), ) return Hlt2Line( name=name, algs=charm_prefilters() + [dd_kshorts, dzeros, dstars, pisoft_pt, delta_m, pi1, pi2, pi3, pi4]) @register_line_builder(all_lines) def dst_to_d0pi_d0toksks_ulll_tightline( name="Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULLL_Tight"): pvs = make_pvs() ll_kshorts = _make_ll_ks_tight_ULLL() ul_kshorts = _make_ul_ks_tight() dzeros = ParticleCombiner( [ll_kshorts, ul_kshorts], DecayDescriptor="D0 -> KS0 KS0", name="Charm_D0ToKsKs_D0ToKsKs_ULLL_Tight", AllowDiffInputsForSameIDChildren=True, CombinationCut=F.require_all( in_range(1730 * MeV, F.MASS, 2000 * MeV), F.SUM(F.PT) > 1500 * MeV, ), CompositeCut=F.require_all( in_range(1775 * MeV, F.MASS, 1955 * MeV), F.CHI2DOF < 10, F.BPVDIRA(pvs) > 0.9994, ), ) pitag = make_tagging_pions() dstarp = _make_dstars_tight(dzeros, make_tagging_pions(), "D*(2010)+ -> D0 pi+") dstarm = _make_dstars_tight(dzeros, make_tagging_pions(), "D*(2010)- -> D0 pi-") dstars = ParticleContainersMerger([dstarp, dstarm]) pisoft_pt = Monitor__ParticleRange( Input=pitag, Variable=F.PT, HistogramName=f"/{name}/pisoft_PT", Bins=50, Range=(0 * MeV, 1000 * MeV), ) delta_m = Monitor__ParticleRange( Input=dstars, Variable=F.MASS - F.CHILD(1, F.MASS), HistogramName=f"/{name}/delta_m", Bins=200, Range=(100 * MeV, 200 * MeV), ) pi1 = Monitor__ParticleRange( Input=ul_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_u", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi2 = Monitor__ParticleRange( Input=ul_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_l1", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi3 = Monitor__ParticleRange( Input=ll_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_l2", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi4 = Monitor__ParticleRange( Input=ll_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_l3", Bins=200, Range=(0 * MeV, 3000 * MeV), ) return Hlt2Line( name=name, algs=charm_prefilters() + [ul_kshorts, dzeros, dstars, pisoft_pt, delta_m, pi1, pi2, pi3, pi4]) @register_line_builder(all_lines) def dst_to_d0pi_d0toksks_uldd_tightline( name="Hlt2Charm_DstpToD0Pip_D0ToKsKs_ULDD_Tight"): pvs = make_pvs() dd_kshorts = _make_dd_ks_tight() ul_kshorts = _make_ul_ks_tight() dzeros = ParticleCombiner( [dd_kshorts, ul_kshorts], DecayDescriptor="D0 -> KS0 KS0", name="Charm_D0ToKsKs_D0ToKsKs_ULDD_Tight", AllowDiffInputsForSameIDChildren=True, CombinationCut=F.require_all( in_range(1730 * MeV, F.MASS, 2000 * MeV), F.SUM(F.PT) > 1500 * MeV, ), CompositeCut=F.require_all( in_range(1775 * MeV, F.MASS, 1955 * MeV), F.CHI2DOF < 10, F.BPVDIRA(pvs) > 0.9994, ), ) pitag = make_tagging_pions() dstarp = _make_dstars_tight(dzeros, pitag, "D*(2010)+ -> D0 pi+") dstarm = _make_dstars_tight(dzeros, pitag, "D*(2010)- -> D0 pi-") dstars = ParticleContainersMerger([dstarp, dstarm]) pisoft_pt = Monitor__ParticleRange( Input=pitag, Variable=F.PT, HistogramName=f"/{name}/pisoft_PT", Bins=50, Range=(0 * MeV, 1000 * MeV), ) delta_m = Monitor__ParticleRange( Input=dstars, Variable=F.MASS - F.CHILD(1, F.MASS), HistogramName=f"/{name}/delta_m", Bins=200, Range=(100 * MeV, 200 * MeV), ) pi1 = Monitor__ParticleRange( Input=ul_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_u", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi2 = Monitor__ParticleRange( Input=ul_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_l", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi3 = Monitor__ParticleRange( Input=dd_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_d1", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi4 = Monitor__ParticleRange( Input=dd_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_d2", Bins=200, Range=(0 * MeV, 3000 * MeV), ) return Hlt2Line( name=name, algs=charm_prefilters() + [ul_kshorts, dzeros, dstars, pisoft_pt, delta_m, pi1, pi2, pi3, pi4]) @register_line_builder(all_lines) def dst_to_d0pi_d0toksks_lddd_tightline( name="Hlt2Charm_DstpToD0Pip_D0ToKsKs_LDDD_Tight"): pvs = make_pvs() dd_kshorts = _make_dd_ks_tight() ld_kshorts = _make_ld_ks_tight() dzeros = ParticleCombiner( [dd_kshorts, ld_kshorts], DecayDescriptor="D0 -> KS0 KS0", name="Charm_D0ToKsKs_D0ToKsKs_LDDD_Tight", AllowDiffInputsForSameIDChildren=True, CombinationCut=F.require_all( in_range(1730 * MeV, F.MASS, 2000 * MeV), F.SUM(F.PT) > 1500 * MeV, ), CompositeCut=F.require_all( in_range(1775 * MeV, F.MASS, 1955 * MeV), F.CHI2DOF < 10, F.BPVDIRA(pvs) > 0.9994, ), ) pitag = make_tagging_pions() dstarp = _make_dstars_tight(dzeros, pitag, "D*(2010)+ -> D0 pi+") dstarm = _make_dstars_tight(dzeros, pitag, "D*(2010)- -> D0 pi-") dstars = ParticleContainersMerger([dstarp, dstarm]) pisoft_pt = Monitor__ParticleRange( Input=pitag, Variable=F.PT, HistogramName=f"/{name}/pisoft_PT", Bins=50, Range=(0 * MeV, 1000 * MeV), ) delta_m = Monitor__ParticleRange( Input=dstars, Variable=F.MASS - F.CHILD(1, F.MASS), HistogramName=f"/{name}/delta_m", Bins=200, Range=(100 * MeV, 200 * MeV), ) pi1 = Monitor__ParticleRange( Input=ld_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_l", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi2 = Monitor__ParticleRange( Input=ld_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_d", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi3 = Monitor__ParticleRange( Input=dd_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_d2", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi4 = Monitor__ParticleRange( Input=dd_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_d3", Bins=200, Range=(0 * MeV, 3000 * MeV), ) return Hlt2Line( name=name, algs=charm_prefilters() + [ld_kshorts, dzeros, dstars, pisoft_pt, delta_m, pi1, pi2, pi3, pi4]) @register_line_builder(all_lines) def dst_to_d0pi_d0toksks_llld_tightline( name="Hlt2Charm_DstpToD0Pip_D0ToKsKs_LLLD_Tight"): pvs = make_pvs() ll_kshorts = _make_ll_ks_tight() ld_kshorts = _make_ld_ks_tight() dzeros = ParticleCombiner( [ll_kshorts, ld_kshorts], DecayDescriptor="D0 -> KS0 KS0", name="Charm_D0ToKsKs_D0ToKsKs_LLLD_Tight", AllowDiffInputsForSameIDChildren=True, CombinationCut=F.require_all( in_range(1730 * MeV, F.MASS, 2000 * MeV), F.SUM(F.PT) > 1500 * MeV, ), CompositeCut=F.require_all( in_range(1775 * MeV, F.MASS, 1955 * MeV), F.CHI2DOF < 10, F.BPVDIRA(pvs) > 0.9994, ), ) pitag = make_tagging_pions() dstarp = _make_dstars_tight(dzeros, pitag, "D*(2010)+ -> D0 pi+") dstarm = _make_dstars_tight(dzeros, pitag, "D*(2010)- -> D0 pi-") dstars = ParticleContainersMerger([dstarp, dstarm]) pisoft_pt = Monitor__ParticleRange( Input=pitag, Variable=F.PT, HistogramName=f"/{name}/pisoft_PT", Bins=50, Range=(0 * MeV, 1000 * MeV), ) delta_m = Monitor__ParticleRange( Input=dstars, Variable=F.MASS - F.CHILD(1, F.MASS), HistogramName=f"/{name}/delta_m", Bins=200, Range=(100 * MeV, 200 * MeV), ) pi1 = Monitor__ParticleRange( Input=ll_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_l1", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi2 = Monitor__ParticleRange( Input=ll_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_l2", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi3 = Monitor__ParticleRange( Input=ld_kshorts, Variable=F.CHILD(1, F.PT), HistogramName=f"/{name}/pi_l3", Bins=200, Range=(0 * MeV, 3000 * MeV), ) pi4 = Monitor__ParticleRange( Input=ld_kshorts, Variable=F.CHILD(2, F.PT), HistogramName=f"/{name}/pi_d", Bins=200, Range=(0 * MeV, 3000 * MeV), ) return Hlt2Line( name=name, algs=charm_prefilters() + [ld_kshorts, dzeros, dstars, pisoft_pt, delta_m, pi1, pi2, pi3, pi4])