Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the Patatrack pixel local reconstruction running on CPU #35915

Merged
merged 1 commit into from
Nov 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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