From 9d5eb0a588bf792759857ee3add295156801fdfb Mon Sep 17 00:00:00 2001 From: Maarten Van Veghel Date: Wed, 15 May 2024 15:27:06 +0200 Subject: [PATCH 1/2] update recsummary with ut and muon hits --- .../python/RecoConf/hlt2_global_reco.py | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Hlt/RecoConf/python/RecoConf/hlt2_global_reco.py b/Hlt/RecoConf/python/RecoConf/hlt2_global_reco.py index 579e0491241..58754adf38f 100644 --- a/Hlt/RecoConf/python/RecoConf/hlt2_global_reco.py +++ b/Hlt/RecoConf/python/RecoConf/hlt2_global_reco.py @@ -13,11 +13,12 @@ The 'global' reconstruction is that which produces the final output of the 'full' HLT2 reconstruction: charged and neutral ProtoParticle containers. """ -from .legacy_rec_hlt1_tracking import make_reco_pvs, make_FTRawBankDecoder_clusters, make_VeloClusterTrackingSIMD_hits +from .legacy_rec_hlt1_tracking import make_reco_pvs, make_FTRawBankDecoder_clusters, make_VeloClusterTrackingSIMD_hits, make_PrStorePrUTHits_hits, make_PrStorePrUTHits_empty_hits from .hlt2_tracking import make_hlt2_tracks, make_hlt2_tracks_without_UT, convert_tracks_to_v3_from_v1, get_persistable_tracks_per_type from .rich_reconstruction import make_rich_pids, default_rich_reco_options, make_rich_pixels from .calorimeter_reconstruction import make_calo from .muon_reconstruction import make_all_muon_pids, make_conv_muon_pids +from .muonid import make_muon_hits from .protoparticles import ( make_charged_protoparticles as make_charged_protoparticles_from, @@ -143,6 +144,8 @@ def make_reconstruction(light_reco=True, if "SeedDeclonedFitted" in hlt2_tracks: output["FittedTtracks"] = hlt2_tracks["SeedDeclonedFitted"]["v1"] + # reconstruction summary + output["RecSummary"] = make_rec_summary(output, skipUT=skipUT) return output @@ -167,7 +170,7 @@ def make_calo_only_reconstruction(): neutral_protos = make_neutral_protoparticles_from( calo_pids=calo, location_PIDs=None) - return { + output = { "AllCaloHandles": calo, "NeutralProtos": neutral_protos['ProtoParticleLocation'], "LongTracks": tracks['Long'], @@ -185,6 +188,10 @@ def make_calo_only_reconstruction(): "CaloSplitPhotons": calo["v1_splitPhotons"], } + # reconstruction summary + output["RecSummary"] = make_rec_summary(output, skipUT=True) + return output + @configurable def make_legacy_reconstruction(skipUT=False, @@ -255,29 +262,25 @@ def make_fastest_reconstruction(skipUT=False): return make_light_reconstruction(skipUT=skipUT, fastReco=True) -def make_rec_summary(reco): +def make_rec_summary(reco, skipUT=False): calo = reco['AllCaloHandles'] - - # FIXME for now quick fix to not handle upstream tracks as not to trigger them in the scheduler - # needs proper handling with optional existance? - tracks_up = TracksEmptyProducer( - name="TracksEmptyProducer_Upstream_ForRecSummary_{hash}", - allow_duplicate_instances_with_distinct_names=True).Output - return RecSummaryMaker( LongTracks=reco["LongTracks"], DownstreamTracks=reco["DownstreamTracks"], VeloTracks=reco["VeloTracks"], - UpstreamTracks=tracks_up, + UpstreamTracks=reco["UpstreamTracks"], Ttracks=reco["Ttracks"], PVs=reco["PVs"], SciFiClusters=make_FTRawBankDecoder_clusters(), VeloClusters=make_VeloClusterTrackingSIMD_hits(), + UTClusters=make_PrStorePrUTHits_hits() + if not skipUT else make_PrStorePrUTHits_empty_hits(), eCalClusters=calo['ecalClusters'], EDigits=calo['digitsEcal'], HDigits=calo['digitsHcal'], RichPixels=make_rich_pixels( default_rich_reco_options())['RichDecodedData'], + MuonHits=make_muon_hits(), outputs={ "Output": persistable_location('RecSummary') }).Output @@ -292,10 +295,7 @@ def reconstruction(make_reconstruction=make_light_reco_pr_kf_without_UT): Note it is advised to use this function if more than one object is needed, rather than the accessors below as it makes the configuration slower. """ - reco_output = make_reconstruction() - # Create the summary of the reconstruction - reco_output["RecSummary"] = make_rec_summary(reco_output) - return reco_output + return make_reconstruction() def make_charged_protoparticles(track_type): -- GitLab From 81551c70230cc99ca9f81a890aade056f30e6240 Mon Sep 17 00:00:00 2001 From: Maarten Van Veghel Date: Wed, 5 Jun 2024 12:11:44 +0200 Subject: [PATCH 2/2] minor fix --- Hlt/RecoConf/python/RecoConf/hlt2_global_reco.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Hlt/RecoConf/python/RecoConf/hlt2_global_reco.py b/Hlt/RecoConf/python/RecoConf/hlt2_global_reco.py index 58754adf38f..420a5b36a15 100644 --- a/Hlt/RecoConf/python/RecoConf/hlt2_global_reco.py +++ b/Hlt/RecoConf/python/RecoConf/hlt2_global_reco.py @@ -175,6 +175,7 @@ def make_calo_only_reconstruction(): "NeutralProtos": neutral_protos['ProtoParticleLocation'], "LongTracks": tracks['Long'], "DownstreamTracks": tracks['Downstream'], + "UpstreamTracks": tracks['Upstream'], "Ttracks": tracks['Ttrack'], "VeloTracks": tracks['Velo'], "NeutralPID": neutral_protos['NeutralPID'], -- GitLab