diff --git a/Hlt/Hlt2Conf/options/hlt2_pp_thor_without_UT.py b/Hlt/Hlt2Conf/options/hlt2_pp_thor_without_UT.py index a5617cc68d6799bdea602a58c4eca469932e2858..cf015138a8eb90e95b37de7e25685a35b189752b 100644 --- a/Hlt/Hlt2Conf/options/hlt2_pp_thor_without_UT.py +++ b/Hlt/Hlt2Conf/options/hlt2_pp_thor_without_UT.py @@ -32,6 +32,7 @@ to_remove = [ "Hlt2CalibMon_DiMuon.*", "Hlt2CalibMon_KshortVelo.*", "Hlt2TrackEff_SMOG2DiMuon.*", + "Hlt2TurboDownstream2Long.*", ] public_tools = [ diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/KSVeloLong.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/KSVeloLong.py index f08a3bebf66fa604ee92a1c88e78eb9635bbd4dc..d9ed401cf97a14afc31145fdb8f501d4507b30a8 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/KSVeloLong.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/KSVeloLong.py @@ -222,8 +222,8 @@ def construct_hlt2_line( filtered_kshorts = KSLongVeloFilter( InputParticle=kshorts, InputPVs=pvs, - PVConstrainedMassMin=365.0, - PVConstrainedMassMax=625.0, + PVConstrainedMassMin=340.0, + PVConstrainedMassMax=648.0, PVConstrainedProbePtMin=pt_min, PVConstrainedProbePtMax=pt_max, PVConstrainedProbePMin=p_min, diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/Velo2Long_Ds2PhiPi_KaonProbe.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/Velo2Long_Ds2PhiPi_KaonProbe.py index 11e0e7ca88d574ce8f325968133523a263f93580..8d015e99bd42bbc6391c0c4dd06c16e32723737f 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/Velo2Long_Ds2PhiPi_KaonProbe.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/Velo2Long_Ds2PhiPi_KaonProbe.py @@ -10,12 +10,13 @@ ############################################################################### """ HLT2 line using Ds -> Phi Pi (phi -> KK) decays, where one of the kaons -is a VELO track (the probe). +is a VELO track or a downstream track (the probe). Contact: Laurent Dufour """ import Functors as F +import Functors.math as fmath from Functors.math import abs as functor_abs from Functors.math import in_range from GaudiKernel.SystemOfUnits import GeV, MeV, mm @@ -30,7 +31,7 @@ from PyConf.Algorithms import ( ) from RecoConf.algorithms_thor import ParticleCombiner, ParticleFilter from RecoConf.event_filters import require_pvs -from RecoConf.hlt2_probetracks import make_charged_velo +from RecoConf.hlt2_probetracks import make_charged_downstream, make_charged_velo from RecoConf.reconstruction_objects import make_pvs from RecoConf.standard_particles import ( _make_particles, @@ -55,6 +56,7 @@ def filter_tag_kaons( min_pt=0.5 * GeV, min_ipchi2=12.0, min_pid=6.0, + min_pid_wrt_proton=1.0, min_eta=2.0, max_eta=4.9, ): @@ -62,6 +64,7 @@ def filter_tag_kaons( F.PT > min_pt, F.MINIPCHI2(pvs) > min_ipchi2, F.PID_K > min_pid, + (F.PID_K - F.PID_P) > min_pid_wrt_proton, F.ETA > min_eta, F.ETA < max_eta, F.P > min_p, @@ -76,10 +79,11 @@ def filter_tag_kaons( def filter_tag_pions( particles, pvs, - min_p=6.5 * GeV, - min_pt=0.45 * GeV, + min_p=6.0 * GeV, + min_pt=0.5 * GeV, min_ipchi2=12.0, max_pid_k=-1.0, + max_pid_mu=2.0, min_eta=2.0, max_eta=4.9, ): @@ -87,6 +91,7 @@ def filter_tag_pions( F.PT > min_pt, F.MINIPCHI2(pvs) > min_ipchi2, F.PID_K < max_pid_k, + F.PID_MU < max_pid_mu, F.ETA > min_eta, F.ETA < max_eta, F.P > min_p, @@ -102,14 +107,15 @@ def make_tag_combination( particles, pvs, min_Tag_mass=700.0 * MeV, - max_Tag_mass=1650.0 * MeV, + max_Tag_mass=1750.0 * MeV, min_maxpt=1500.0 * MeV, min_maxipchi2=15, - doca_max=0.13 * mm, - min_fd_z=2.5 * mm, + doca_max=0.1 * mm, + min_fd_z=2.2 * mm, max_ownpv_rho=5.0 * mm, - max_corrected_mass=2.2 * GeV, - max_vchi2dof=9, + min_ownpv_rho=0.03 * mm, + max_corrected_mass=2.4 * GeV, + max_vchi2dof=25, ): combination_code = F.require_all( F.MAXSDOCACUT(doca_max), @@ -123,7 +129,7 @@ def make_tag_combination( F.MASS < max_Tag_mass, F.CHI2DOF < max_vchi2dof, F.OWNPVCORRM() < max_corrected_mass, - F.OWNPVVDRHO < max_ownpv_rho, + in_range(min_ownpv_rho, F.OWNPVVDRHO, max_ownpv_rho), F.OWNPVVDZ > min_fd_z, ) @@ -141,7 +147,9 @@ def filter_hlt1(tag_particles): ) -def make_tag_and_probe_combination( +# Tag+probe combination safe for when the momentum of the probe track +# is not known +def make_tag_and_probe_combination_velo( particles, pvs, mass_max=2500 * MeV, @@ -169,6 +177,53 @@ def make_tag_and_probe_combination( ) +# Tag + probe combination in case the momentum of the track +# *is* known (downstream or upstream only) +def make_tag_and_probe_combination_downstream( + particles, + pvs, + doca_max=1.5 * mm, + min_end_vz=-300 * mm, # kill SMOG events + max_vchi2=10, + mass_min=1900 * MeV, + mass_max=2055 * MeV, + vertex_compatibility=3 * mm, + max_kk_mass_squared=1100.0 * 1100.0 * MeV * MeV, +): + combination_code = F.require_all( + in_range(mass_min, F.MASS, mass_max), + F.MAXDOCACUT(doca_max), + (F.CHILD(1, F.CHILD(1, F.CHARGE)) + F.CHILD(2, F.CHARGE)) == 0, + ( + fmath.pow(F.CHILD(1, F.CHILD(1, F.ENERGY)) + F.CHILD(2, F.ENERGY), 2) + - fmath.pow( + F.MAGNITUDE + @ ( + F.CHILD(1, F.CHILD(1, F.THREEMOMENTUM)) + + F.CHILD(2, F.THREEMOMENTUM) + ), + 2, + ) + ) + < max_kk_mass_squared, + ) + + # some additional cuts + vertex_code = F.require_all( + F.CHI2DOF < max_vchi2, + F.END_VZ > min_end_vz, + functor_abs(F.END_VZ - F.CHILD(1, F.END_VZ)) < vertex_compatibility, + ) + + return ParticleCombiner( + particles, + name="TagProbeCombiner_Ds2PhiPi_Downstream2Long", + DecayDescriptor="[D_s+ -> phi(1020) K+]cc", + CombinationCut=combination_code, + CompositeCut=vertex_code, + ) + + def make_velo_track_kaon_particles(): return _make_particles( species="kaon", @@ -177,7 +232,17 @@ def make_velo_track_kaon_particles(): ) -def filter_probe_kaons( +def make_downstream_track_kaon_particles(): + return _make_particles( + species="kaon", + make_protoparticles=make_charged_downstream, + get_track_selector=get_all_track_selector, + ) + + +# includes cuts on IP & angle, while excluding cuts on momenta +# (function safe to be used for velo tracks) +def filter_probe_kaons_for_velo( particles, pvs, min_ip=0.1 * mm, @@ -195,9 +260,26 @@ def filter_probe_kaons( ) +# includes cuts on momenta, while excluding cuts on IP +# (function safe to be used for downstream tracks) +def filter_probe_kaons_for_downstream( + particles, + pvs, + min_eta=2.0, + max_eta=5.0, + min_pt=400.0, + min_p=4000.0, +): + code = F.require_all(F.P > min_p, F.PT > min_pt, in_range(min_eta, F.ETA, max_eta)) + + return ParticleFilter( + particles, F.FILTER(code), name="DownstreamProbeFilter_for_kaons_{hash}" + ) + + @register_line_builder(all_lines) def trackeff_velo2long_ds2phipi( - name="Hlt2TurboVelo2Long_Ds2PhiPi_KaonProbe", prescale=0.5 + name="Hlt2TurboVelo2Long_Ds2PhiPi_KaonProbe", prescale=0.33 ): pvs = make_pvs() @@ -209,10 +291,12 @@ def trackeff_velo2long_ds2phipi( ) hlt1_filtered_tag_combination = filter_hlt1(my_tag_combinations) - probe_kaons = filter_probe_kaons(particles=make_long_kaons(), pvs=pvs) + probe_kaons = filter_probe_kaons_for_velo( + particles=make_velo_track_kaon_particles(), pvs=pvs + ) - ds = make_tag_and_probe_combination( - particles=[my_tag_combinations, probe_kaons], pvs=pvs + ds = make_tag_and_probe_combination_velo( + particles=[hlt1_filtered_tag_combination, probe_kaons], pvs=pvs ) TrackEffFilter = Velo2Long_Ds2PhiPi_TrackEffFilter( @@ -267,15 +351,87 @@ def trackeff_velo2long_ds2phipi( ).OutputLocation extra_outputs = [ - ("MatchedLongPions", matched_long_pions), - ("MatchedUpstreamPions", matched_upstream_pions), + ("MatchedLong", matched_long_pions), + ("MatchedUpstream", matched_upstream_pions), ] return Hlt2Line( name=name, algs=[require_pvs(pvs), hlt1_filtered_tag_combination, TrackEffFilter], prescale=prescale, + stream="trackeff", + extra_outputs=extra_outputs, + persistreco=False, + hlt1_filter_code="Hlt1.*Track.*MVADecision", + ) + + +@register_line_builder(all_lines) +def trackeff_downstream2long_ds2phipi( + name="Hlt2TurboDownstream2Long_Ds2PhiPi_KaonProbe", prescale=0.25 +): + pvs = make_pvs() + + tag_kaons = filter_tag_kaons(particles=make_long_kaons(), pvs=pvs) + tag_pions = filter_tag_pions(particles=make_long_pions(), pvs=pvs) + + my_tag_combinations = make_tag_combination( + particles=[tag_kaons, tag_pions], pvs=pvs + ) + hlt1_filtered_tag_combination = filter_hlt1(my_tag_combinations) + + probe_kaons = filter_probe_kaons_for_downstream( + particles=make_downstream_track_kaon_particles(), pvs=pvs + ) + + ds = make_tag_and_probe_combination_downstream( + particles=[hlt1_filtered_tag_combination, probe_kaons], pvs=pvs + ) + + """ Selective persistence""" + flat_tree = FlattenDecayTree(InputParticles=ds, name=f"FlattenDs_{name}") + Ds_flat_daughters = ParticleFilter( + flat_tree.OutputParticles, + F.FILTER(F.require_all(F.ISBASICPARTICLE, (F.TRACKISDOWNSTREAM @ F.TRACK))), + ) + + relation_table_match_by_lhcbid_long = LHCbIDOverlapRelationTable( + MatchFrom=Ds_flat_daughters, + MatchTo=make_long_kaons(), + IncludeVP=False, + IncludeFT=True, + IncludeUT=False, + MinMatchFraction=0.2, + ).OutputRelations + + relation_table_match_by_lhcbid_upstream = LHCbIDOverlapRelationTable( + MatchFrom=Ds_flat_daughters, + MatchTo=make_up_kaons(), + IncludeVP=False, + IncludeFT=False, + IncludeUT=True, + MinMatchFraction=0.2, + ).OutputRelations + + matched_long_pions = SelectionFromWeightedRelationTable( + InputRelations=relation_table_match_by_lhcbid_long + ).OutputLocation + matched_upstream_pions = SelectionFromWeightedRelationTable( + InputRelations=relation_table_match_by_lhcbid_upstream + ).OutputLocation + + extra_outputs = [ + ("MatchedLong", matched_long_pions), + ("MatchedUpstream", matched_upstream_pions), + ] + + return Hlt2Line( + name=name, + algs=[require_pvs(pvs), hlt1_filtered_tag_combination, ds], + prescale=prescale, extra_outputs=extra_outputs, persistreco=False, + stream="trackeff", + raw_banks=["VP"], hlt1_filter_code="Hlt1.*Track.*MVADecision", ) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/Velo2Long_L2PPi_ProtonProbe.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/Velo2Long_L2PPi_ProtonProbe.py new file mode 100644 index 0000000000000000000000000000000000000000..0342de678d30a13473d82344fdf8a8d3df32f7fc --- /dev/null +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/Velo2Long_L2PPi_ProtonProbe.py @@ -0,0 +1,325 @@ +############################################################################### +# (c) Copyright 2024 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. # +############################################################################### +import Functors as F +from Functors.math import in_range +from GaudiKernel.SystemOfUnits import GeV, MeV, mm +from Moore.config import register_line_builder +from Moore.lines import Hlt2Line +from PyConf.Algorithms import ( + FlattenDecayTree, + LHCbIDOverlapRelationTable, + SelectionFromWeightedRelationTable, + Velo2Long_L2ProtonPi_TrackEffFilter, +) +from PyConf.tonic import configurable +from RecoConf.algorithms_thor import ( + ParticleCombiner, + ParticleContainersMerger, + ParticleFilter, +) +from RecoConf.event_filters import require_pvs +from RecoConf.reconstruction_objects import ( + make_pvs, + upfront_reconstruction, +) +from RecoConf.standard_particles import ( + make_long_pions, + make_long_protons, + make_up_protons, +) + +from Hlt2Conf.hlt1_tistos import hlt1_tis_on_any_filter +from Hlt2Conf.lines.ift.builders.smog2_builders import ( + bpv_in_smog2, + make_smog2_prefilters, +) + +turbo_lines = {} +turcal_lines = {} +monitoring_lines = {} + +hlt1_tis_lines = [ + "Hlt1TrackMuonMVADecision", + "Hlt1TrackMVADecision", + "Hlt1TwoTrackMVADecision", + "Hlt1OneMuonTrackLineDecision", + "Hlt1DiMuonHighMassDecision", + "Hlt1DiMuonNoIPDecision", + "Hlt1PassthroughDecision", + "Hlt1GECPassthroughDecision", + "Hlt1D2KPiDecision", + "Hlt1Dst2D0PiDecision", + "Hlt1SingleHighPtMuonNoMuIDDecision", + "Hlt1DetJpsiToMuMuPosTagLineDecision", + "Hlt1DetJpsiToMuMuNegTagLineDecision", + "Hlt1SingleHighPtMuonDecision", + "Hlt1DisplacedDiMuonDecision", + "Hlt1TrackElectronMVADecision", + "Hlt1SingleHighPtElectronDecision", + "Hlt1DisplacedDielectronDecision", + "Hlt1SingleHighEtDecision", +] + +hlt1_tis_lines_smog2 = [ + "Hlt1SMOG22BodyGenericDecision", + "Hlt1SMOG22BodyGenericPromptDecision", + "Hlt1SMOG2SingleTrackHighPtDecision", + "Hlt1SMOG2SingleTrackVeryHighPtDecision", + "Hlt1PassthroughPVinSMOG2Decision", + "Hlt1SMOG2MinimumBiasDecision", + "Hlt1SMOG2BENoBiasDecision", + "Hlt1SMOG2etacToppDecision", + "Hlt1SMOG2D2KpiDecision", + "Hlt1SMOG2KsTopipiDecision", + "Hlt1SMOG2L0ToppiDecision", + "Hlt1SMOG2SingleMuonDecision", + "Hlt1SMOG2DiMuonHighMassDecision", + "Hlt1SMOG2JPsiToMuMuTaP_PosTagDecision", + "Hlt1SMOG2JPsiToMuMuTaP_NegTagDecision", + "Hlt1SMOG2DisplacedDiMuonDecision", + "Hlt1SMOG2BELowMultElectronsDecision", + "Hlt1SMOG2PassThroughLowMult5Decision", +] + +from RecoConf.hlt2_probetracks import make_charged_velo +from RecoConf.standard_particles import ( + _make_particles, + get_all_track_selector, + standard_protoparticle_filter, +) + + +@configurable +def filter_pions(particles, pvs=None, pt_min=0.4 * GeV, fromSMOG2=False): + cut = F.require_all( + F.PT > pt_min, + F.ETA < 5.0, + F.ETA > 1.5, + ) + if fromSMOG2: + cut &= F.P > 2000 + else: + cut &= F.P > 5000 + cut &= F.PID_P < 5 + cut &= F.MINIP(pvs) > 0.4 * mm + return ParticleFilter(particles, F.FILTER(cut)) + + +def make_velo_protons(): + """creates LHCb::Particles from LHCb::ProtoParticles of VELO tracks""" + return _make_particles( + species="proton", + get_track_selector=get_all_track_selector, + make_protoparticles=make_charged_velo, + ) + + +@configurable +def filter_particles_velo(particles, pvs, fromSMOG2=False): + cut = F.require_all(F.ETA > 1.7) + if fromSMOG2: + cut &= F.ETA < 5.2 + else: + cut &= F.ETA < 4.7 + cut &= F.MINIP(pvs) > 0.5 * mm + return ParticleFilter(particles, F.FILTER(cut)) + + +@configurable +def filter_particles_tis_velo(particles, pvs, fromSMOG2=False): + pre_filtered_particles = filter_particles_velo(particles, pvs, fromSMOG2=fromSMOG2) + + hlt1_filter_lines = hlt1_tis_lines[:] + if fromSMOG2: + hlt1_filter_lines += hlt1_tis_lines_smog2 + + return hlt1_tis_on_any_filter( + hlt1_trigger_lines=hlt1_filter_lines, + data=pre_filtered_particles, + name="Hlt1TISFilter_Velo2Long_{hash}", + advanced_tistos_arguments={ + "TOSFracFT": 0.0, + "TISFracUT": 0.0, + "TOSFracVP": 1.0, + }, + ) + + +@configurable +def make_l0_pion_proton_specific_charge( + probe_tracks, + pions, + decay_descriptor, + pvs, + comb_m_min=0 * MeV, + comb_m_max=2650 * MeV, + comb_maxdoca=0.15 * mm, + fromSMOG2=False, + name="Velo2Long_L2PiPCombiner_{hash}", +): + combination_code = F.require_all( + in_range(comb_m_min, F.MASS, comb_m_max), + F.MAXDOCACUT(comb_maxdoca), + ) + vertex_code = F.require_all( + F.END_VRHO < 100 * mm, + F.END_VZ < 600 * mm, + ) + if fromSMOG2: + vertex_code &= F.END_VZ > -550 * mm + vertex_code &= bpv_in_smog2(make_pvs) + else: + vertex_code &= F.END_VZ > 18 * mm + + vertex_code &= F.OWNPVFD > 5 * mm + vertex_code &= F.OWNPVVDRHO > 2 * mm + + return ParticleCombiner( + [pions, probe_tracks], + name=name, + DecayDescriptor=decay_descriptor, + CombinationCut=combination_code, + CompositeCut=vertex_code, + ) + + +def make_lambda_to_pion_proton(tag_pions, probe_protons, **kwargs): + l0_particle_combinations = [ + make_l0_pion_proton_specific_charge( + probe_protons, tag_pions, "Lambda0 -> pi- p+", **kwargs + ), + make_l0_pion_proton_specific_charge( + probe_protons, tag_pions, "Lambda0 -> pi- p~-", **kwargs + ), + make_l0_pion_proton_specific_charge( + probe_protons, tag_pions, "Lambda0 -> pi+ p~-", **kwargs + ), + make_l0_pion_proton_specific_charge( + probe_protons, tag_pions, "Lambda0 -> pi+ p+", **kwargs + ), + ] + + return ParticleContainersMerger( + l0_particle_combinations, name="L0_velo2long_combinations_{hash}" + ) + + +def construct_hlt2_line( + *, + name, + prescale, + pt_min, + pt_max, + p_min=5000.0, + filter_tis=False, + apply_lambda_veto=False, + fromSMOG2=False, +): + pvs = make_pvs() + + pions = filter_pions(make_long_pions(), pvs, pt_min=0.4 * GeV, fromSMOG2=fromSMOG2) + turbo_line = name.find("Hlt2Turbo") != -1 + + if filter_tis: + probe_protons_velo = filter_particles_tis_velo( + make_velo_protons(), pvs, fromSMOG2=fromSMOG2 + ) + else: + probe_protons_velo = filter_particles_velo( + make_velo_protons(), pvs, fromSMOG2=fromSMOG2 + ) + + lambdas = make_lambda_to_pion_proton( + tag_pions=pions, + probe_protons=probe_protons_velo, + pvs=pvs, + comb_m_max=1500, + comb_m_min=0, + fromSMOG2=fromSMOG2, + ) # probe should be on index 1 + + filtered_lambdas = Velo2Long_L2ProtonPi_TrackEffFilter( + InputParticle=lambdas, + InputPVs=pvs, + PVConstrainedMassMin=1000.0, # 1115.683 + PVConstrainedMassMax=1220.0, + PVConstrainedProbePtMin=pt_min, + PVConstrainedProbePtMax=pt_max, + PVConstrainedProbePMin=p_min, + IPperpendicularMax=0.01, + IPMax=0.5, + name=f"Velo2Long_L0_TrackEffFilter_{name}", + ).OutputParticles + if turbo_line: + """ Selective persistence""" + flat_tree = FlattenDecayTree( + InputParticles=filtered_lambdas, name=f"FlattenL0_{name}" + ) + flat_daughters = ParticleFilter( + flat_tree.OutputParticles, + F.FILTER(F.require_all(F.ISBASICPARTICLE, (F.TRACKISVELO @ F.TRACK))), + ) + + relation_table_match_by_lhcbid_long = LHCbIDOverlapRelationTable( + MatchFrom=flat_daughters, + MatchTo=make_long_protons(), + IncludeVP=True, + IncludeFT=False, + IncludeUT=False, + MinMatchFraction=0.2, + ).OutputRelations + + relation_table_match_by_lhcbid_upstream = LHCbIDOverlapRelationTable( + MatchFrom=flat_daughters, + MatchTo=make_up_protons(), + IncludeVP=True, + IncludeFT=False, + IncludeUT=False, + MinMatchFraction=0.2, + ).OutputRelations + + matched_long_pions = SelectionFromWeightedRelationTable( + InputRelations=relation_table_match_by_lhcbid_long + ).OutputLocation + matched_upstream_pions = SelectionFromWeightedRelationTable( + InputRelations=relation_table_match_by_lhcbid_upstream + ).OutputLocation + + particles_to_match = [ + ("MatchedLong", matched_long_pions), + ("MatchedUpstream", matched_upstream_pions), + ] + else: + particles_to_match = None + + algs_list = [require_pvs(pvs), filtered_lambdas] + if fromSMOG2: + algs_list = make_smog2_prefilters(pvs=make_pvs) + [filtered_lambdas] + + return Hlt2Line( + name=name, + algs=algs_list, + stream="trackeff" if turbo_line else None, + prescale=prescale, + monitoring_variables=["m"], + extra_outputs=particles_to_match, + persistreco=not turbo_line, + ) + + +@register_line_builder(turbo_lines) +@configurable +def turbo_lambda_velo_long_line_nominal( + name="Hlt2TurboVelo2Long_Lambda_ProtonProbe", prescale=0.2 +): + return construct_hlt2_line( + name=name, prescale=prescale, pt_min=1200.0, pt_max=15000.0, filter_tis=True + ) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/__init__.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/__init__.py index aa8d17f5806e3d8a638b9b0128d8f5832fb24b20..aaa813315f196de32f3894652a0362ff9d7c576c 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/__init__.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/trackeff/__init__.py @@ -20,6 +20,7 @@ from . import ( Velo2Long_B2JpsiK_ElectronProbe, Velo2Long_B2JpsiK_MuonProbe, Velo2Long_Ds2PhiPi_KaonProbe, + Velo2Long_L2PPi_ProtonProbe, ZTrackEfficiency, ZUpsilonFullEvent, ) @@ -36,6 +37,7 @@ turcal_lines.update(JpsiToMuMu_PVTracks.all_lines) turbo_lines = {} turbo_lines.update(KSVeloLong.turbo_lines) turbo_lines.update(Velo2Long_Ds2PhiPi_KaonProbe.all_lines) +turbo_lines.update(Velo2Long_L2PPi_ProtonProbe.turbo_lines) turbo_lines.update(ZUpsilonFullEvent.turbo_lines) turbo_lines.update(SMOG2_Ks_trackeff.all_lines) diff --git a/Hlt/RecoConf/python/RecoConf/hlt2_probetracks.py b/Hlt/RecoConf/python/RecoConf/hlt2_probetracks.py index a7b74c9cabfc6183e55c5109bd2751bad6d9eaa5..e79ac44187a71d325cd08e9a5577154087606d9b 100644 --- a/Hlt/RecoConf/python/RecoConf/hlt2_probetracks.py +++ b/Hlt/RecoConf/python/RecoConf/hlt2_probetracks.py @@ -28,7 +28,9 @@ from PyConf.Algorithms import ( VeloMuonBuilder, ) from PyConf.Tools import ( + ChargedProtoParticleAddCombineDLLs, ChargedProtoParticleAddMuonInfo, + ChargedProtoParticleAddRichInfo, MuonMeasurementProvider, PrAddUTHitsTool, TrackMasterExtrapolator, @@ -57,6 +59,7 @@ from RecoConf.legacy_rec_hlt1_tracking import ( from RecoConf.muon_reconstruction import make_all_muon_pids, make_conv_muon_pids from RecoConf.muonid import make_muon_hits from RecoConf.reconstruction_objects import reconstruction +from RecoConf.rich_reconstruction import default_rich_reco_options, make_rich_pids @configurable @@ -86,12 +89,12 @@ def make_charged_seed(): @configurable -def make_charged_downstream(): +def make_charged_downstream(skipRich=False): """Downstream tracks without clone killer for tracking efficiency study""" scifi_tracks = make_seeding_tracks() down_tracks = make_PrLongLivedTracking_tracks(scifi_tracks) kf_down = PrKalmanFilter_Downstream( - name="PrKalmanFilter_Downstream", + name="PrKalmanFilter_Downstream_{hash}", MaxChi2=2.8, ## copy from the default PrKalman fit MaxChi2PreOutlierRemoval=20, Input=down_tracks["Pr"], @@ -106,7 +109,7 @@ def make_charged_downstream(): best_tracks = {} best_tracks["v1"] = TrackBestTrackCreator( - name="BestTrackCreator_Downstream", + name="BestTrackCreator_Downstream_{hash}", TracksInContainers=[kf_down], MaxChi2DoF=2.8, GhostProbTools=[ @@ -121,18 +124,36 @@ def make_charged_downstream(): {"Downstream": best_tracks["v1"]} ) + addInfo = [] + muonRecConfs = make_all_muon_pids( tracks=tracks_v3, muon_pid_track_types=["Downstream"] ) muon_pids, muon_tracks = make_conv_muon_pids( muonRecConfs, tracks_rels, track_types=["Downstream"] ) - addInfo = [ + addInfo += [ ChargedProtoParticleAddMuonInfo( name="addMuonInfo", InputMuonPIDLocation=muon_pids["Downstream"] ) ] + if not skipRich: + rich_options = default_rich_reco_options() + rich_pids = make_rich_pids("Downstream", best_tracks["v1"], rich_options)[ + "RichPIDs" + ] + + addInfo += [ + ChargedProtoParticleAddRichInfo( + name="AddRich_{hash}", InputRichPIDLocation=rich_pids + ) + ] + + addInfo += [ChargedProtoParticleAddCombineDLLs()] + + # Is there a good reason to keep this here, instead of + # using RecoConf.protoparticles? charged_protos = FunctionalChargedProtoParticleMaker( Inputs=[best_tracks["v1"]], AddInfo=addInfo )