From 0a5669207f865fccbaa2ccd84d614afc5947f083 Mon Sep 17 00:00:00 2001 From: Wahid Redjeb Date: Fri, 16 Feb 2024 16:03:37 +0100 Subject: [PATCH 1/2] remove CPU serial and add it to DQM_HcalReconstruction_v6 --- .../python/customizeHLTforAlpaka.py | 27 ++++++++++++------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/HLTrigger/Configuration/python/customizeHLTforAlpaka.py b/HLTrigger/Configuration/python/customizeHLTforAlpaka.py index caaccb77abd89..1f3c3f42f3ada 100644 --- a/HLTrigger/Configuration/python/customizeHLTforAlpaka.py +++ b/HLTrigger/Configuration/python/customizeHLTforAlpaka.py @@ -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), @@ -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"), @@ -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): @@ -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 From e6e2d97fdb5f84702bb3708e9e2b2aeb691884c5 Mon Sep 17 00:00:00 2001 From: Wahid Redjeb Date: Wed, 21 Feb 2024 19:23:21 +0100 Subject: [PATCH 2/2] include CPU serial to DQM_HcalReconstruction_v path only if it exists --- .../python/customizeHLTforAlpaka.py | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/HLTrigger/Configuration/python/customizeHLTforAlpaka.py b/HLTrigger/Configuration/python/customizeHLTforAlpaka.py index 1f3c3f42f3ada..d1ca276fb3e4d 100644 --- a/HLTrigger/Configuration/python/customizeHLTforAlpaka.py +++ b/HLTrigger/Configuration/python/customizeHLTforAlpaka.py @@ -245,12 +245,6 @@ def replaceItemsInSequence(process, itemsToReplace, replacingSequence): 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([ @@ -258,6 +252,20 @@ def replaceItemsInSequence(process, itemsToReplace, replacingSequence): 'keep *_hltPFClusterSoAProducerCPUSerial_*_*', ]) + # Add CPUSerial sequences to DQM_HcalReconstruction_v Path + dqmHcalRecoPathName = None + for pathName in process.paths_(): + if pathName.startswith('DQM_HcalReconstruction_v'): + dqmHcalRecoPathName = pathName + break + + if dqmHcalRecoPathName == None: + return process + + dqmHcalPath = getattr(process, dqmHcalRecoPathName) + dqmHcalRecoPathIndex = dqmHcalPath.index(process.hltHcalConsumerGPU) + 1 + dqmHcalPath.insert(dqmHcalRecoPathIndex , process.HLTPFClusterHBHECPUSerial) + return process ## Pixel HLT in Alpaka