Skip to content

Commit

Permalink
Merge pull request #44071 from jsamudio/cleanPFAlpaka
Browse files Browse the repository at this point in the history
[14.0.X] Remove unnecessary ESProducer from LegacyPFClusterProducer
  • Loading branch information
cmsbuild authored Feb 29, 2024
2 parents c2b76cc + 6df8b30 commit a0c34ad
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
15 changes: 7 additions & 8 deletions HLTrigger/Configuration/python/customizeHLTforAlpaka.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ def customizeHLTforAlpakaParticleFlowClustering(process):

process.hltLegacyPFClusterProducer = cms.EDProducer("LegacyPFClusterProducer",
src = cms.InputTag("hltPFClusterSoAProducer"),
pfClusterParams = cms.ESInputTag("pfClusterParamsESProducer:"),
pfClusterBuilder = process.hltParticleFlowClusterHBHE.pfClusterBuilder,
usePFThresholdsFromDB = cms.bool(True),
recHitsSource = cms.InputTag("hltLegacyPFRecHitProducer"),
Expand Down Expand Up @@ -413,7 +412,7 @@ def customizeHLTforDQMGPUvsCPUPixel(process):
def customizeHLTforAlpakaPixelRecoLocal(process):
'''Customisation to introduce the Local Pixel Reconstruction in Alpaka
'''
process.hltESPSiPixelCablingSoA = cms.ESProducer('SiPixelCablingSoAESProducer@alpaka',
process.hltESPSiPixelCablingSoA = cms.ESProducer('SiPixelCablingSoAESProducer@alpaka',
CablingMapLabel = cms.string(''),
UseQualityInfo = cms.bool(False),
appendToDataLabel = cms.string(''),
Expand All @@ -429,7 +428,7 @@ def customizeHLTforAlpakaPixelRecoLocal(process):
)
)

process.hltESPPixelCPEFastParamsPhase1 = cms.ESProducer('PixelCPEFastParamsESProducerAlpakaPhase1@alpaka',
process.hltESPPixelCPEFastParamsPhase1 = cms.ESProducer('PixelCPEFastParamsESProducerAlpakaPhase1@alpaka',
appendToDataLabel = cms.string(''),
alpaka = cms.untracked.PSet(
backend = cms.untracked.string('')
Expand Down Expand Up @@ -729,7 +728,7 @@ def customizeHLTforAlpakaPixelRecoVertexing(process):
process.HLTRecoPixelTracksTask,
process.hltPixelVerticesSoA,
process.hltPixelVertices,
process.hltTrimmedPixelVertices
process.hltTrimmedPixelVertices
)

process.HLTRecopixelvertexingCPUSerialTask = cms.ConditionalTask(
Expand Down Expand Up @@ -797,7 +796,7 @@ def customizeHLTforAlpakaPixelRecoTheRest(process):
track_pt_max = cms.double(10.0),
track_pt_min = cms.double(1.0)
)

return process

def customizeHLTforAlpakaPixelReco(process):
Expand All @@ -807,15 +806,15 @@ def customizeHLTforAlpakaPixelReco(process):
process = customizeHLTforAlpakaPixelRecoLocal(process)
process = customizeHLTforAlpakaPixelRecoTracking(process)
process = customizeHLTforAlpakaPixelRecoVertexing(process)
process = customizeHLTforDQMGPUvsCPUPixel(process)
process = customizeHLTforDQMGPUvsCPUPixel(process)
process = customizeHLTforAlpakaPixelRecoTheRest(process)

return process

## ECAL HLT in Alpaka

def customizeHLTforAlpakaEcalLocalReco(process):

if hasattr(process, 'hltEcalDigisGPU'):
process.hltEcalDigisPortable = cms.EDProducer("EcalRawToDigiPortable@alpaka",
FEDs = process.hltEcalDigisGPU.FEDs,
Expand Down Expand Up @@ -913,7 +912,7 @@ def customizeHLTforAlpaka(process):

process.load("HeterogeneousCore.AlpakaCore.ProcessAcceleratorAlpaka_cfi")
process.load('Configuration.StandardSequences.Accelerators_cff')

process = customizeHLTforAlpakaEcalLocalReco(process)
process = customizeHLTforAlpakaPixelReco(process)
process = customizeHLTforAlpakaParticleFlowClustering(process)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,13 @@
#include "DataFormats/ParticleFlowReco/interface/PFRecHitFractionHostCollection.h"
#include "HeterogeneousCore/CUDACore/interface/JobConfigurationGPURecord.h"
#include "RecoParticleFlow/PFClusterProducer/interface/PFCPositionCalculatorBase.h"
#include "RecoParticleFlow/PFClusterProducer/interface/PFClusterParamsHostCollection.h"

class LegacyPFClusterProducer : public edm::stream::EDProducer<> {
public:
LegacyPFClusterProducer(edm::ParameterSet const& config)
: pfClusterSoAToken_(consumes(config.getParameter<edm::InputTag>("src"))),
pfRecHitFractionSoAToken_(consumes(config.getParameter<edm::InputTag>("src"))),
InputPFRecHitSoA_Token_{consumes(config.getParameter<edm::InputTag>("PFRecHitsLabelIn"))},
pfClusParamsToken_(esConsumes(config.getParameter<edm::ESInputTag>("pfClusterParams"))),
legacyPfClustersToken_(produces()),
recHitsLabel_(consumes(config.getParameter<edm::InputTag>("recHitsSource"))),
hcalCutsToken_(esConsumes<HcalPFCuts, HcalPFCutsRcd>(edm::ESInputTag("", "withTopo"))),
Expand All @@ -66,10 +64,9 @@ class LegacyPFClusterProducer : public edm::stream::EDProducer<> {

static void fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
edm::ParameterSetDescription desc;
desc.add<edm::InputTag>("src");
desc.add<edm::InputTag>("PFRecHitsLabelIn");
desc.add<edm::ESInputTag>("pfClusterParams");
desc.add<edm::InputTag>("recHitsSource");
desc.add<edm::InputTag>("src", edm::InputTag("pfClusterSoAProducer"));
desc.add<edm::InputTag>("PFRecHitsLabelIn", edm::InputTag("pfRecHitSoAProducerHCAL"));
desc.add<edm::InputTag>("recHitsSource", edm::InputTag("legacyPFRecHitProducer"));
desc.add<bool>("usePFThresholdsFromDB", true);
{
edm::ParameterSetDescription pfClusterBuilder;
Expand Down Expand Up @@ -183,7 +180,6 @@ class LegacyPFClusterProducer : public edm::stream::EDProducer<> {
const edm::EDGetTokenT<reco::PFClusterHostCollection> pfClusterSoAToken_;
const edm::EDGetTokenT<reco::PFRecHitFractionHostCollection> pfRecHitFractionSoAToken_;
const edm::EDGetTokenT<reco::PFRecHitHostCollection> InputPFRecHitSoA_Token_;
const edm::ESGetToken<reco::PFClusterParamsHostCollection, JobConfigurationGPURecord> pfClusParamsToken_;
const edm::EDPutTokenT<reco::PFClusterCollection> legacyPfClustersToken_;
const edm::EDGetTokenT<reco::PFRecHitCollection> recHitsLabel_;
const edm::ESGetToken<HcalPFCuts, HcalPFCutsRcd> hcalCutsToken_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@

legacyPFClusterProducer = _legacyPFClusterProducer.clone(
src = 'pfClusterSoAProducer',
pfClusterParams = 'pfClusterParamsESProducer:',
pfClusterBuilder = particleFlowClusterHBHE.pfClusterBuilder,
recHitsSource = 'legacyPFRecHitProducer',
PFRecHitsLabelIn = 'pfRecHitSoAProducerHCAL'
Expand Down Expand Up @@ -135,7 +134,6 @@

legacyPFClusterProducerHBHEOnly = _legacyPFClusterProducer.clone(
src = 'pfClusterSoAProducerHBHEOnly',
pfClusterParams = 'pfClusterParamsESProducer:',
pfClusterBuilder = particleFlowClusterHBHE.pfClusterBuilder,
recHitsSource = 'legacyPFRecHitProducerHBHEOnly',
PFRecHitsLabelIn = 'pfRecHitSoAProducerHBHEOnly'
Expand Down

0 comments on commit a0c34ad

Please sign in to comment.