Skip to content

Commit

Permalink
Merge pull request #35915 from fwyzard/fix_hltSiPixelRecHitSoA_121x
Browse files Browse the repository at this point in the history
Fix the Patatrack pixel local reconstruction running on CPU
  • Loading branch information
cmsbuild authored Nov 1, 2021
2 parents 6681a5f + 9d47101 commit 9f13336
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions HLTrigger/Configuration/python/customizeHLTforPatatrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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)
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9f13336

Please sign in to comment.