1 import FWCore.ParameterSet.Config
as cms
3 from Configuration.ProcessModifiers.alpaka_cff
import alpaka
5 from RecoParticleFlow.PFRecHitProducer.hcalRecHitSoAProducer_cfi
import hcalRecHitSoAProducer
as _hcalRecHitSoAProducer
6 from RecoParticleFlow.PFRecHitProducer.pfRecHitHCALParamsESProducer_cfi
import pfRecHitHCALParamsESProducer
as _pfRecHitHCALParamsESProducer
7 from RecoParticleFlow.PFRecHitProducer.pfRecHitHCALTopologyESProducer_cfi
import pfRecHitHCALTopologyESProducer
as _pfRecHitHCALTopologyESProducer
8 from RecoParticleFlow.PFRecHitProducer.pfRecHitSoAProducerHCAL_cfi
import pfRecHitSoAProducerHCAL
as _pfRecHitSoAProducerHCAL
9 from RecoParticleFlow.PFRecHitProducer.legacyPFRecHitProducer_cfi
import legacyPFRecHitProducer
as _legacyPFRecHitProducer
10 from RecoParticleFlow.PFClusterProducer.pfClusterParamsESProducer_cfi
import pfClusterParamsESProducer
as _pfClusterParamsESProducer
11 from RecoParticleFlow.PFClusterProducer.pfClusterSoAProducer_cfi
import pfClusterSoAProducer
as _pfClusterSoAProducer
12 from RecoParticleFlow.PFClusterProducer.legacyPFClusterProducer_cfi
import legacyPFClusterProducer
as _legacyPFClusterProducer
16 _alpaka_pfClusteringHBHEHFTask = pfClusteringHBHEHFTask.copy()
18 pfRecHitHCALParamsRecordSource = cms.ESSource(
'EmptyESSource',
19 recordName = cms.string(
'PFRecHitHCALParamsRecord'),
20 iovIsRunNotTime = cms.bool(
True),
21 firstValid = cms.vuint32(1)
24 pfRecHitHCALTopologyRecordSource = cms.ESSource(
'EmptyESSource',
25 recordName = cms.string(
'PFRecHitHCALTopologyRecord'),
26 iovIsRunNotTime = cms.bool(
True),
27 firstValid = cms.vuint32(1)
30 pfClusterParamsRecordSource = cms.ESSource(
'EmptyESSource',
31 recordName = cms.string(
'JobConfigurationGPURecord'),
32 iovIsRunNotTime = cms.bool(
True),
33 firstValid = cms.vuint32(1)
36 hbheRecHitToSoA = _hcalRecHitSoAProducer.clone(
40 pfRecHitHCALParamsESProducer = _pfRecHitHCALParamsESProducer.clone(
41 energyThresholdsHB = cms.vdouble( 0.1, 0.2, 0.3, 0.3 ),
42 energyThresholdsHE = cms.vdouble( 0.1, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2 )
45 pfRecHitHCALTopologyESProducer = _pfRecHitHCALTopologyESProducer.clone()
46 pfRecHitSoAProducerHCAL = _pfRecHitSoAProducerHCAL.clone(
47 producers = cms.VPSet(
49 src = cms.InputTag(
"hbheRecHitToSoA"),
50 params = cms.ESInputTag(
"pfRecHitHCALParamsESProducer:"),
53 topology =
"pfRecHitHCALTopologyESProducer:",
54 synchronise = cms.untracked.bool(
False)
57 legacyPFRecHitProducer = _legacyPFRecHitProducer.clone(
58 src =
"pfRecHitSoAProducerHCAL" 61 pfClusterParamsESProducer = _pfClusterParamsESProducer.clone()
62 pfClusterSoAProducer = _pfClusterSoAProducer.clone(
63 pfRecHits =
'pfRecHitSoAProducerHCAL',
64 topology =
"pfRecHitHCALTopologyESProducer:",
65 pfClusterParams =
'pfClusterParamsESProducer:',
66 synchronise = cms.bool(
False)
70 legacyPFClusterProducer = _legacyPFClusterProducer.clone(
71 src =
'pfClusterSoAProducer',
72 pfClusterParams =
'pfClusterParamsESProducer:',
73 pfClusterBuilder = particleFlowClusterHBHE.pfClusterBuilder,
74 recHitsSource =
'legacyPFRecHitProducer',
75 PFRecHitsLabelIn =
'pfRecHitSoAProducerHCAL' 79 _alpaka_pfClusteringHBHEHFTask.add(pfRecHitHCALParamsRecordSource)
80 _alpaka_pfClusteringHBHEHFTask.add(pfRecHitHCALTopologyRecordSource)
81 _alpaka_pfClusteringHBHEHFTask.add(pfClusterParamsRecordSource)
82 _alpaka_pfClusteringHBHEHFTask.add(hbheRecHitToSoA)
83 _alpaka_pfClusteringHBHEHFTask.add(pfRecHitHCALParamsESProducer)
84 _alpaka_pfClusteringHBHEHFTask.add(pfRecHitSoAProducerHCAL)
85 _alpaka_pfClusteringHBHEHFTask.add(legacyPFRecHitProducer)
86 _alpaka_pfClusteringHBHEHFTask.add(pfClusterParamsESProducer)
87 _alpaka_pfClusteringHBHEHFTask.add(pfClusterSoAProducer)
89 _alpaka_pfClusteringHBHEHFTask.remove(particleFlowRecHitHBHE)
90 _alpaka_pfClusteringHBHEHFTask.remove(particleFlowClusterHBHE)
91 _alpaka_pfClusteringHBHEHFTask.remove(particleFlowClusterHCAL)
92 _alpaka_pfClusteringHBHEHFTask.add(particleFlowClusterHBHE)
93 _alpaka_pfClusteringHBHEHFTask.add(particleFlowClusterHCAL)
95 alpaka.toReplaceWith(particleFlowClusterHBHE, legacyPFClusterProducer)
97 alpaka.toReplaceWith(pfClusteringHBHEHFTask, _alpaka_pfClusteringHBHEHFTask)