From 59bbd1bb2076bd79d0a593e1e9136fccc61fdae5 Mon Sep 17 00:00:00 2001 From: Arthur Hennequin <arthur.hennequin@cern.ch> Date: Fri, 6 Jan 2023 09:33:18 +0100 Subject: [PATCH 1/5] Remove makeZip_ChargedBasics --- .../b_to_charmonia/builders/basic_builder.py | 3 +- .../b_to_open_charm_thor/b_to_dh_thor.py | 63 +++++-------------- .../b_to_open_charm_thor/b_to_dhh_thor.py | 54 ++++------------ .../builders/basic_builder.py | 14 +---- 4 files changed, 30 insertions(+), 104 deletions(-) diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_charmonia/builders/basic_builder.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_charmonia/builders/basic_builder.py index 40811246c44..d24b6ab96e2 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_charmonia/builders/basic_builder.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_charmonia/builders/basic_builder.py @@ -44,8 +44,7 @@ def make_selected_particles( p_min=0 * GeV, pid=None, isMuon=None, - filterAlg=None, - make_zip=False): + filterAlg=None): code = require_all(F.PT > pt_min, F.P > p_min, F.CHI2DOF < tr_chi2pdof_max) if mipchi2_min is not None: diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/b_to_dh_thor.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/b_to_dh_thor.py index 146c66ea06c..08b26a4a3de 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/b_to_dh_thor.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/b_to_dh_thor.py @@ -37,19 +37,14 @@ all_lines = {} def BdToDsmPi_DsmToHHH_line(name='Hlt2B2OC_BdToDsmPi_DsmToHHH_ThOr', prescale=1): functor_backend = 'ThOr' - make_zip = False bachelor = basic_builder.make_bachelor_pions( functor_backend=functor_backend) particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dsplus_to_hhh( particles=particles, @@ -114,19 +109,14 @@ def BdToDsmPi_DsmToHHH_line(name='Hlt2B2OC_BdToDsmPi_DsmToHHH_ThOr', def BdToDsmPi_DsmToHHH_LoKi_line(name='Hlt2B2OC_BdToDsmPi_DsmToHHH_LoKi', prescale=1): functor_backend = 'LoKi' - make_zip = False bachelor = basic_builder.make_bachelor_pions( functor_backend=functor_backend) particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dsplus_to_hhh( particles=particles, @@ -148,17 +138,12 @@ def BdToDsmPi_DsmToHHH_LoKi_line(name='Hlt2B2OC_BdToDsmPi_DsmToHHH_LoKi', @configurable def DsmToHHH_ThOrBest_line(name='Hlt2B2OC_DsmToHHH_ThOrBest'): functor_backend = 'ThOr' - make_zip = False particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dsplus_to_hhh( particles=particles, @@ -173,17 +158,12 @@ def DsmToHHH_ThOrBest_line(name='Hlt2B2OC_DsmToHHH_ThOrBest'): @configurable def DsmToHHH_ThOrScalar_line(name='Hlt2B2OC_DsmToHHH_ThOrScalar'): functor_backend = 'ThOr' - make_zip = False particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dsplus_to_hhh( particles=particles, @@ -198,17 +178,12 @@ def DsmToHHH_ThOrScalar_line(name='Hlt2B2OC_DsmToHHH_ThOrScalar'): @configurable def DsmToHHH_ThOrParticle_line(name='Hlt2B2OC_DsmToHHH_ThOrParticle'): functor_backend = 'ThOr' - make_zip = True particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dsplus_to_hhh( particles=particles, @@ -223,17 +198,12 @@ def DsmToHHH_ThOrParticle_line(name='Hlt2B2OC_DsmToHHH_ThOrParticle'): @configurable def DsmToHHH_ThOrLHCbParticle_line(name='Hlt2B2OC_DsmToHHH_ThOrLHCbParticle'): functor_backend = 'LoKi' - make_zip = False particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dsplus_to_hhh( particles=particles, @@ -247,17 +217,12 @@ def DsmToHHH_ThOrLHCbParticle_line(name='Hlt2B2OC_DsmToHHH_ThOrLHCbParticle'): @configurable def DsmToHHH_LoKi_line(name='Hlt2B2OC_DsmToHHH_LoKi'): functor_backend = 'LoKi' - make_zip = False particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dsplus_to_hhh( particles=particles, diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/b_to_dhh_thor.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/b_to_dhh_thor.py index 28f49cc459b..175ec7ea15c 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/b_to_dhh_thor.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/b_to_dhh_thor.py @@ -36,19 +36,14 @@ all_lines = {} @configurable def BdToD0PiPi_D0ToHH_line(name='Hlt2B2OC_BdToD0PiPi_D0ToHH_ThOr', prescale=1): functor_backend = 'ThOr' - make_zip = False bachelors = basic_builder.make_soft_bachelor_pions( functor_backend=functor_backend) particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dzero_to_hh( particles=particles, @@ -74,19 +69,14 @@ def BdToD0PiPi_D0ToHH_line(name='Hlt2B2OC_BdToD0PiPi_D0ToHH_ThOr', prescale=1): def BdToD0PiPi_D0ToHH_LoKi_line(name='Hlt2B2OC_BdToD0PiPi_D0ToHH_LoKi', prescale=1): functor_backend = 'LoKi' - make_zip = False bachelors = basic_builder.make_soft_bachelor_pions( functor_backend=functor_backend) particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dzero_to_hh( particles=particles, @@ -109,17 +99,12 @@ def BdToD0PiPi_D0ToHH_LoKi_line(name='Hlt2B2OC_BdToD0PiPi_D0ToHH_LoKi', @configurable def D0ToHH_ThOrBest_line(name='Hlt2B2OC_D0ToHH_ThOrBest', prescale=1): functor_backend = 'ThOr' - make_zip = False particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dzero_to_hh( particles=particles, @@ -135,17 +120,12 @@ def D0ToHH_ThOrBest_line(name='Hlt2B2OC_D0ToHH_ThOrBest', prescale=1): @configurable def D0ToHH_Particle_line(name='Hlt2B2OC_D0ToHH_ThOrParticle', prescale=1): functor_backend = 'ThOr' - make_zip = True particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dzero_to_hh( name='B2OCD02HHCombiner_ThOrParticle', @@ -161,17 +141,12 @@ def D0ToHH_Particle_line(name='Hlt2B2OC_D0ToHH_ThOrParticle', prescale=1): def D0ToHH_LHCbParticle_line(name='Hlt2B2OC_D0ToHH_ThOrLHCbParticle', prescale=1): functor_backend = 'LoKi' - make_zip = False particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dzero_to_hh( particles=particles, @@ -186,17 +161,12 @@ def D0ToHH_LHCbParticle_line(name='Hlt2B2OC_D0ToHH_ThOrLHCbParticle', @configurable def D0ToHH_LoKi_line(name='Hlt2B2OC_D0ToHH_LoKi', prescale=1): functor_backend = 'LoKi' - make_zip = False particles = {} particles["pions"] = basic_builder.make_pions( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) particles["kaons"] = basic_builder.make_kaons( - functor_backend=functor_backend, - make_zip=make_zip, - ) + functor_backend=functor_backend, ) d = d_builder.make_dzero_to_hh( particles=particles, diff --git a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/builders/basic_builder.py b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/builders/basic_builder.py index 833685f3292..daebddb1276 100644 --- a/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/builders/basic_builder.py +++ b/Hlt/Hlt2Conf/python/Hlt2Conf/lines/b_to_open_charm_thor/builders/basic_builder.py @@ -29,8 +29,7 @@ from PyConf.Algorithms import ( v2TrackConverter, ThreeBodyCombiner, TwoBodyCombiner, ThOrCombiner__2ChargedBasics, ThOrCombiner__2Particle, ThOrCombinerScalar__2ChargedBasics, ThOrCombiner__3ChargedBasics, - ThOrCombiner__3Particle, ThOrCombinerScalar__3ChargedBasics, - MakeZip__ChargedBasics_as_Particles) + ThOrCombiner__3Particle, ThOrCombinerScalar__3ChargedBasics) from Hlt2Conf.standard_particles import ( make_has_rich_long_cb_pions, make_has_rich_long_cb_kaons, @@ -64,8 +63,7 @@ def make_selected_particles(make_particles=make_has_rich_long_cb_pions, pid=None, name=None, filterAlg=None, - functor_backend='ThOr', - make_zip=False): + functor_backend='ThOr'): """Return maker for particles filtered by thresholds common to charm decay product selections. Parameters @@ -109,13 +107,7 @@ def make_selected_particles(make_particles=make_has_rich_long_cb_pions, code = code & other_cut code = FILTER(code) if filterAlg is None: filterAlg = ChargedBasicsFilter - if make_zip is False: - return filterAlg( - name=name, Input=make_particles(), Cut=code).Output - else: - particles = filterAlg( - name=name, Input=make_particles(), Cut=code).Output - return MakeZip__ChargedBasics_as_Particles(Input1=particles).Output + return filterAlg(name=name, Input=make_particles(), Cut=code).Output else: code = require_all(*cuts) return ParticleFilterWithPVs( -- GitLab From 97681edc6f6f72f209933a5b9e3489713d773a43 Mon Sep 17 00:00:00 2001 From: Arthur Hennequin <arthur.hennequin@cern.ch> Date: Fri, 10 Feb 2023 13:41:31 +0100 Subject: [PATCH 2/5] Replace fitted tracks with track_v3 --- Hlt/Moore/python/Moore/selreports.py | 19 +++++++------------ Hlt/RecoConf/python/RecoConf/hlt1_tracking.py | 7 +++---- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/Hlt/Moore/python/Moore/selreports.py b/Hlt/Moore/python/Moore/selreports.py index 79dc5db0007..1147731162a 100644 --- a/Hlt/Moore/python/Moore/selreports.py +++ b/Hlt/Moore/python/Moore/selreports.py @@ -28,12 +28,8 @@ import logging from functools import partial from PyConf.Algorithms import ( - LHCb__Converters__Track__v1__fromV2TrackV1TrackVector as - trackV1FromV2TrackV1TrackVector, - LHCb__Converters__Track__v2__fromPrFittedForwardTrackWithMuonID as - trackV2FromPrFittedForwardTrackWithMuonID, - LHCb__Converters__Track__v2__fromPrFittedForwardTrackWithPVs as - trackV2FromPrFittedForwardTrackWithPVs, + fromV3TrackWithMuonIDV1TrackVector, + fromV3TrackWithPVsV1TrackVector, LHCb__Converters__Composites__TracksWithPVsToVectorOfRecVertex, LHCb__Converters__Composites__TracksWithMuonIDToVectorOfRecVertex, SelReportsMaker, @@ -57,8 +53,7 @@ class AmbiguousVeloHitsError(Exception): def convert_pr_fitted_tracks(alg, converter_alg_type): - v2_tracks = converter_alg_type(FittedTracks=alg.outputs["Output"]) - v1_tracks = trackV1FromV2TrackV1TrackVector(InputTracksName=v2_tracks) + v1_tracks = converter_alg_type(InputTracks=alg.outputs["Output"]) return v1_tracks @@ -103,11 +98,11 @@ CONVERTERS_BY_TYPES = { get_type_key(alg_type, property_names): partial( function, converter_alg_type=alg_type) for alg_type, property_names, function in - [(trackV2FromPrFittedForwardTrackWithPVs, { - 'Tracks': 'FittedTracks' + [(fromV3TrackWithPVsV1TrackVector, { + 'Tracks': 'InputTracks' }, convert_pr_fitted_tracks), - (trackV2FromPrFittedForwardTrackWithMuonID, { - 'Tracks': 'FittedTracks' + (fromV3TrackWithMuonIDV1TrackVector, { + 'Tracks': 'InputTracks' }, convert_pr_fitted_tracks), (LHCb__Converters__Composites__TracksWithPVsToVectorOfRecVertex, { 'Composites': 'InputComposites', diff --git a/Hlt/RecoConf/python/RecoConf/hlt1_tracking.py b/Hlt/RecoConf/python/RecoConf/hlt1_tracking.py index 3d88f7d19f6..b75510e367a 100644 --- a/Hlt/RecoConf/python/RecoConf/hlt1_tracking.py +++ b/Hlt/RecoConf/python/RecoConf/hlt1_tracking.py @@ -17,7 +17,7 @@ from PyConf.packing import persisted_location from PyConf.Algorithms import ( fromPrUpstreamTracksV1Tracks, fromPrForwardTracksFromVeloUTV1Tracks, - fromPrFittedForwardTracksV1Tracks, + fromV3TrackV1Track, fromPrVeloTracksV1TracksMerger, FTRawBankDecoder, VPClus, @@ -598,9 +598,8 @@ def make_VeloKalman_fitted_tracks( TracksFTLocation=tracks["Forward"]["Pr"], UniqueIDGenerator=make_unique_id_generator()).OutputTracksLocation - fitted_tracks_v1 = fromPrFittedForwardTracksV1Tracks( - InputTracksLocation=fitted_tracks, - ForwardTracksLocation=tracks["Forward"]["v1"]).OutputTracksLocation + fitted_tracks_v1 = fromV3TrackV1Track( + InputTracks=fitted_tracks).OutputTracks return { "Pr": fitted_tracks, -- GitLab From fcf892ce0ab293ce09ad8ae74e2dae17542c7e96 Mon Sep 17 00:00:00 2001 From: Arthur Hennequin <arthur.hennequin@cern.ch> Date: Tue, 14 Feb 2023 10:21:46 +0100 Subject: [PATCH 3/5] Replace PrFittedTracks with SOATracks --- Hlt/Hlt1Conf/python/Hlt1Conf/algorithms.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Hlt/Hlt1Conf/python/Hlt1Conf/algorithms.py b/Hlt/Hlt1Conf/python/Hlt1Conf/algorithms.py index 684601ec633..b0abb80daf6 100644 --- a/Hlt/Hlt1Conf/python/Hlt1Conf/algorithms.py +++ b/Hlt/Hlt1Conf/python/Hlt1Conf/algorithms.py @@ -19,7 +19,7 @@ from PyConf.Algorithms import ( CombineTracksSIMD__2Body__PrFittedForwardTracksWithMuonID_Scalar, CombineTracksSIMD__3Body__PrFittedForwardTracksWithPVs_Scalar, CombineTracksSIMD__3Body__PrFittedForwardTracksWithMuonID_Scalar, - DumpContainer__PrFittedForwardTracks, + DumpContainer__SOATracks, PrFilter__PrVeloTracks, PrFilter__PrFittedForwardTracksWithPVs, PrFilter__PrFittedForwardTracksWithMuonID, @@ -160,7 +160,7 @@ def DumpContainer(container, # possible algorithms, indexed by string representing the C++ input type candidate_configurables = { alg.getDefaultProperties()['Input'].type(): alg - for alg in [DumpContainer__PrFittedForwardTracks] + for alg in [DumpContainer__SOATracks] } return candidate_configurables[container.type]( -- GitLab From e5730822e31757eebcfea23fc7338554d8b6faf5 Mon Sep 17 00:00:00 2001 From: Arthur Hennequin <arthur.hennequin@cern.ch> Date: Wed, 15 Feb 2023 16:11:07 +0100 Subject: [PATCH 4/5] Adapt configuration to removed algorithms --- Hlt/RecoConf/options/hlt1_dump_tracks.py | 6 +++--- Hlt/RecoConf/python/RecoConf/hlt1_muonid.py | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Hlt/RecoConf/options/hlt1_dump_tracks.py b/Hlt/RecoConf/options/hlt1_dump_tracks.py index 7f91fb94a8c..5d7c4082a9c 100644 --- a/Hlt/RecoConf/options/hlt1_dump_tracks.py +++ b/Hlt/RecoConf/options/hlt1_dump_tracks.py @@ -13,7 +13,7 @@ from PyConf.application import configure_input, configure from Hlt1Conf.algorithms import DumpContainer from PyConf.control_flow import CompositeNode, NodeLogic from RecoConf.hlt1_tracking import (make_hlt1_tracks, make_hlt1_fitted_tracks) -from PyConf.Algorithms import (ProducePrFittedForwardTracks) +from PyConf.Algorithms import (ProduceSOATracks) from Functors import (P, PT, ETA, PHI, POSITION_X, POSITION_Y, POSITION_Z, TX, TY, COV, CHI2DOF, CLOSESTTOBEAM, NDOF, QOVERP) @@ -28,7 +28,7 @@ def dump_hlt1_reco(dump_dummies=False): ---------- dump_dummies : bool Write a second TTree/ROOT file containing fake "VeloKalman fitted" - tracks produced by the ProducePrFittedForwardTracks algorithm. This is + tracks produced by the ProduceSOATracks algorithm. This is useful for checking the accuracy of the fake track generation. """ hlt1_tracks = make_hlt1_tracks() @@ -66,7 +66,7 @@ def dump_hlt1_reco(dump_dummies=False): # If requested, also dump the fake PrFittedForwardTracks generated by # the dummy producer fake_dumper = DumpContainer( - ProducePrFittedForwardTracks().Output, + ProduceSOATracks().Output, Branches, dump_filename='PrFittedForwardTracks_Fake.root') nodes.append(fake_dumper) diff --git a/Hlt/RecoConf/python/RecoConf/hlt1_muonid.py b/Hlt/RecoConf/python/RecoConf/hlt1_muonid.py index c5ce5b4aef5..a4fcfa87f13 100644 --- a/Hlt/RecoConf/python/RecoConf/hlt1_muonid.py +++ b/Hlt/RecoConf/python/RecoConf/hlt1_muonid.py @@ -14,7 +14,7 @@ from PyConf.Algorithms import ( MuonRawToHits, MuonRawInUpgradeToHits, MuonIDHlt1Alg, - MakeZip__PrFittedForwardTracks__MuonPIDs__v2, + MakeZip__BestTracks__MuonPIDs__v2, ) from RecoConf.hlt1_tracking import make_hlt1_fitted_tracks, make_hlt1_tracks @@ -38,7 +38,7 @@ def make_muon_id(tracks, make_muon_hits=make_muon_hits): def make_tracks_with_muon_id(tracks, muon_ids): - return MakeZip__PrFittedForwardTracks__MuonPIDs__v2( + return MakeZip__BestTracks__MuonPIDs__v2( Input1=tracks["Pr"], Input2=muon_ids).Output -- GitLab From 6243f35ee7d2a73b129b850444ce82f0bd111be8 Mon Sep 17 00:00:00 2001 From: Arthur Hennequin <arthur.hennequin@cern.ch> Date: Tue, 21 Feb 2023 13:42:24 +0100 Subject: [PATCH 5/5] Adapt converters --- .../options/hlt1_reco_muonid_efficiency.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Hlt/RecoConf/options/hlt1_reco_muonid_efficiency.py b/Hlt/RecoConf/options/hlt1_reco_muonid_efficiency.py index 75214a162f7..abf9cdb0e67 100644 --- a/Hlt/RecoConf/options/hlt1_reco_muonid_efficiency.py +++ b/Hlt/RecoConf/options/hlt1_reco_muonid_efficiency.py @@ -20,11 +20,7 @@ from Hlt1Conf.algorithms import Filter from Functors import ISMUON -from PyConf.Algorithms import ( - LHCb__Converters__Track__v1__fromV2TrackV1Track as - trackV1FromV2TrackV1Track, - LHCb__Converters__Track__v2__fromPrFittedForwardTrackWithMuonID as - trackV2FromPrFittedForwardTrackWithMuonID) +from PyConf.Algorithms import fromV3TrackWithMuonIDV1Track def hlt1_reco_muonid_efficiency(): @@ -37,22 +33,19 @@ def hlt1_reco_muonid_efficiency(): full_sel)['PrFittedForwardWithMuonID'] # convert result to v1 (which is what the PrChecker needs) - v2_tracks = trackV2FromPrFittedForwardTrackWithMuonID( - FittedTracks=track_filter) - v1_tracks = trackV1FromV2TrackV1Track(InputTracksName=v2_tracks, ) + v1_tracks = fromV3TrackWithMuonIDV1Track(InputTracks=track_filter) # make links to lhcb id for mc matching links_to_lhcbids = make_links_lhcbids_mcparticles_tracking_system() # make links between tracks and mcparticles for mc matching links_to_tracks_muon_id = make_links_tracks_mcparticles( - InputTracks={"v1": v1_tracks.OutputTracksName}, + InputTracks={"v1": v1_tracks.OutputTracks}, LinksToLHCbIDs=links_to_lhcbids) # build the PrChecker algorihm for muon_id track pr_checker_for_muon_id = check_tracking_efficiency( TrackType="MuonMatch", - InputTracks={"v1": v1_tracks.OutputTracksName}, - #InputTracks={"v1": v1_tracks.OutputTracksName}, + InputTracks={"v1": v1_tracks.OutputTracks}, LinksToTracks=links_to_tracks_muon_id, LinksToLHCbIDs=links_to_lhcbids, MCCategories=get_mc_categories("MuonMatch"), -- GitLab