From 9d4710127a2ecf7001ada94068ec8f25abec7714 Mon Sep 17 00:00:00 2001 From: Vincenzo Innocente Date: Fri, 29 Oct 2021 18:27:08 +0200 Subject: [PATCH] Fix the Patatrack pixel local reconstruction running on CPU Use the hltSiPixelRecHitSoA producer for the pixel rechits in legacy and SoA format, instead of running the legacy producer. --- .../python/customizeHLTforPatatrack.py | 25 +++++++++++-------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/HLTrigger/Configuration/python/customizeHLTforPatatrack.py b/HLTrigger/Configuration/python/customizeHLTforPatatrack.py index db2e4a52ad54e..72246335dd53d 100644 --- a/HLTrigger/Configuration/python/customizeHLTforPatatrack.py +++ b/HLTrigger/Configuration/python/customizeHLTforPatatrack.py @@ -196,11 +196,24 @@ def customisePixelLocalReconstruction(process): beamSpot = "hltOnlineBeamSpotToCUDA" ) + # cpu only: produce the pixel rechits in SoA and legacy format, from the legacy clusters + from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromLegacy_cfi import siPixelRecHitSoAFromLegacy as _siPixelRecHitSoAFromLegacy + process.hltSiPixelRecHitSoA = _siPixelRecHitSoAFromLegacy.clone( + src = "hltSiPixelClusters", + beamSpot = "hltOnlineBeamSpot", + convertToLegacy = True + ) + # SwitchProducer wrapping the legacy pixel rechit producer or the transfer of the pixel rechits to the host and the conversion from SoA from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDA_cfi import siPixelRecHitFromCUDA as _siPixelRecHitFromCUDA process.hltSiPixelRecHits = SwitchProducerCUDA( # legacy producer - cpu = process.hltSiPixelRecHits, + cpu = cms.EDAlias( + hltSiPixelRecHitSoA = cms.VPSet( + cms.PSet(type = cms.string("SiPixelRecHitedmNewDetSetVector")), + cms.PSet(type = cms.string("uintAsHostProduct")) + ) + ), # conversion from SoA to legacy format cuda = _siPixelRecHitFromCUDA.clone( pixelRecHitSrc = "hltSiPixelRecHitsCUDA", @@ -222,6 +235,7 @@ def customisePixelLocalReconstruction(process): process.hltSiPixelClustersLegacy, # legacy pixel cluster producer process.hltSiPixelClusters, # SwitchProducer wrapping a subset of the legacy pixel cluster producer, or the conversion of the pixel digis (except errors) and clusters from SoA process.hltSiPixelClustersCache, # legacy module, used by the legacy pixel quadruplet producer + process.hltSiPixelRecHitSoA, # pixel rechits on cpu, in SoA & legacy format process.hltSiPixelRecHits) # SwitchProducer wrapping the legacy pixel rechit producer or the transfer of the pixel rechits to the host and the conversion from SoA process.HLTDoLocalPixelSequence = cms.Sequence(process.HLTDoLocalPixelTask) @@ -286,14 +300,6 @@ def customisePixelTrackReconstruction(process): # referenced in process.HLTRecoPixelTracksTask - # cpu only: convert the pixel rechits from legacy to SoA format - from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromLegacy_cfi import siPixelRecHitSoAFromLegacy as _siPixelRecHitSoAFromLegacy - process.hltSiPixelRecHitSoA = _siPixelRecHitSoAFromLegacy.clone( - src = "hltSiPixelClusters", - beamSpot = "hltOnlineBeamSpot", - convertToLegacy = True - ) - # build pixel ntuplets and pixel tracks in SoA format on gpu from RecoPixelVertexing.PixelTriplets.pixelTracksCUDA_cfi import pixelTracksCUDA as _pixelTracksCUDA process.hltPixelTracksCUDA = _pixelTracksCUDA.clone( @@ -367,7 +373,6 @@ def customisePixelTrackReconstruction(process): process.HLTRecoPixelTracksTask = cms.Task( process.hltPixelTracksTrackingRegions, # from the original sequence - process.hltSiPixelRecHitSoA, # pixel rechits on cpu, converted to SoA process.hltPixelTracksCUDA, # pixel ntuplets on gpu, in SoA format process.hltPixelTracksSoA, # pixel ntuplets on cpu, in SoA format process.hltPixelTracks) # pixel tracks on cpu, in legacy format