Skip to content

Commit

Permalink
Merge pull request #43999 from waredjeb/fix_integratePFAlpakaClusteri…
Browse files Browse the repository at this point in the history
…ngAtHLT_14_0_0_pre3

Fix HLT customization for alpaka PF
  • Loading branch information
cmsbuild authored Feb 19, 2024
2 parents 1cfa1e5 + 0a56692 commit c1bc0fc
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions HLTrigger/Configuration/python/customizeHLTforAlpaka.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,10 @@ def customizeHLTforAlpakaParticleFlowClustering(process):

process.hltPFRecHitSoAProducerHCALCPUSerial = makeSerialClone(process.hltPFRecHitSoAProducerHCAL)


process.hltLegacyPFRecHitProducer = cms.EDProducer("LegacyPFRecHitProducer",
src = cms.InputTag("hltPFRecHitSoAProducerHCAL")
)

process.hltLegacyPFRecHitProducerCPUSerial = process.hltLegacyPFRecHitProducer.clone(
src = cms.InputTag("hltPFRecHitSoAProducerHCALCPUSerial")
)

process.hltPFClusterParamsESProducer = cms.ESProducer("PFClusterParamsESProducer@alpaka",
seedFinder = cms.PSet(
nNeighbours = cms.int32(4),
Expand Down Expand Up @@ -204,6 +199,7 @@ def customizeHLTforAlpakaParticleFlowClustering(process):
PFRecHitsLabelIn = cms.InputTag("hltPFRecHitSoAProducerHCAL")
)


#Same as default except change the clusterSource
process.hltParticleFlowClusterHCAL = cms.EDProducer("PFMultiDepthClusterProducer",
clustersSource = cms.InputTag("hltLegacyPFClusterProducer"),
Expand All @@ -217,19 +213,17 @@ def customizeHLTforAlpakaParticleFlowClustering(process):
process.HLTPFHcalRecHits = cms.Sequence(
process.hltHBHERecHitToSoA+
process.hltPFRecHitSoAProducerHCAL+
process.hltPFRecHitSoAProducerHCALCPUSerial+
process.hltLegacyPFRecHitProducer+
process.hltLegacyPFRecHitProducerCPUSerial
process.hltLegacyPFRecHitProducer
)

process.HLTPFHcalClustering = cms.Sequence(
process.HLTPFHcalRecHits+
process.hltPFClusterSoAProducer+
process.hltPFClusterSoAProducerCPUSerial+
process.hltLegacyPFClusterProducer+
process.hltParticleFlowClusterHCAL
)


#Some Sequences contain all the modules of process.HLTPFHcalClustering Sequence instead of the Sequence itself
#find these Sequences and replace all the modules with the Sequence
def replaceItemsInSequence(process, itemsToReplace, replacingSequence):
Expand All @@ -249,6 +243,21 @@ def replaceItemsInSequence(process, itemsToReplace, replacingSequence):
itemsList = [process.hltParticleFlowRecHitHBHE, process.hltParticleFlowClusterHBHE,process.hltParticleFlowClusterHCAL]
process = replaceItemsInSequence(process, itemsList, process.HLTPFHcalClustering)

process.HLTPFClusterHBHECPUSerial = cms.Sequence(process.hltHBHERecHitToSoA+process.hltPFRecHitSoAProducerHCALCPUSerial+process.hltPFClusterSoAProducerCPUSerial)

# Add CPUSerial sequences to DQM_HcalReconstruction_v6 Path
dqmHcalRecoPathName = "DQM_HcalReconstruction_v6"
dqmHcalPath= getattr(process, dqmHcalRecoPathName)
dqmHcalRecoPathIndex = dqmHcalPath.index(process.hltHcalConsumerGPU) + 1
dqmHcalPath.insert(dqmHcalRecoPathIndex , process.HLTPFClusterHBHECPUSerial)

# modify EventContent of DQMGPUvsCPU stream
if hasattr(process, 'hltOutputDQMGPUvsCPU'):
process.hltOutputDQMGPUvsCPU.outputCommands.extend([
'keep *_hltPFClusterSoAProducer_*_*',
'keep *_hltPFClusterSoAProducerCPUSerial_*_*',
])

return process

## Pixel HLT in Alpaka
Expand Down

0 comments on commit c1bc0fc

Please sign in to comment.