CMS 3D CMS Logo

pfClusterHBHEAlpaka_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from Configuration.ProcessModifiers.alpaka_cff import alpaka
4 
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
13 
14 from RecoParticleFlow.PFClusterProducer.particleFlowCluster_cff import pfClusteringHBHEHFTask, particleFlowClusterHBHE, particleFlowRecHitHBHE, particleFlowClusterHCAL
15 
16 _alpaka_pfClusteringHBHEHFTask = pfClusteringHBHEHFTask.copy()
17 
18 pfRecHitHCALParamsRecordSource = cms.ESSource('EmptyESSource',
19  recordName = cms.string('PFRecHitHCALParamsRecord'),
20  iovIsRunNotTime = cms.bool(True),
21  firstValid = cms.vuint32(1)
22  )
23 
24 pfRecHitHCALTopologyRecordSource = cms.ESSource('EmptyESSource',
25  recordName = cms.string('PFRecHitHCALTopologyRecord'),
26  iovIsRunNotTime = cms.bool(True),
27  firstValid = cms.vuint32(1)
28  )
29 
30 pfClusterParamsRecordSource = cms.ESSource('EmptyESSource',
31  recordName = cms.string('JobConfigurationGPURecord'),
32  iovIsRunNotTime = cms.bool(True),
33  firstValid = cms.vuint32(1)
34  )
35 
36 hbheRecHitToSoA = _hcalRecHitSoAProducer.clone(
37  src = "hbhereco"
38  )
39 
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 )
43  )
44 
45 pfRecHitHCALTopologyESProducer = _pfRecHitHCALTopologyESProducer.clone()
46 pfRecHitSoAProducerHCAL = _pfRecHitSoAProducerHCAL.clone(
47  producers = cms.VPSet(
48  cms.PSet(
49  src = cms.InputTag("hbheRecHitToSoA"),
50  params = cms.ESInputTag("pfRecHitHCALParamsESProducer:"),
51  )
52  ),
53  topology = "pfRecHitHCALTopologyESProducer:",
54  synchronise = cms.untracked.bool(False)
55  )
56 
57 legacyPFRecHitProducer = _legacyPFRecHitProducer.clone(
58  src = "pfRecHitSoAProducerHCAL"
59  )
60 
61 pfClusterParamsESProducer = _pfClusterParamsESProducer.clone()
62 pfClusterSoAProducer = _pfClusterSoAProducer.clone(
63  pfRecHits = 'pfRecHitSoAProducerHCAL',
64  topology = "pfRecHitHCALTopologyESProducer:",
65  pfClusterParams = 'pfClusterParamsESProducer:',
66  synchronise = cms.bool(False)
67  )
68 
69 
70 legacyPFClusterProducer = _legacyPFClusterProducer.clone(
71  src = 'pfClusterSoAProducer',
72  pfClusterParams = 'pfClusterParamsESProducer:',
73  pfClusterBuilder = particleFlowClusterHBHE.pfClusterBuilder,
74  recHitsSource = 'legacyPFRecHitProducer',
75  PFRecHitsLabelIn = 'pfRecHitSoAProducerHCAL'
76  )
77 
78 
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)
88 
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)
94 
95 alpaka.toReplaceWith(particleFlowClusterHBHE, legacyPFClusterProducer)
96 
97 alpaka.toReplaceWith(pfClusteringHBHEHFTask, _alpaka_pfClusteringHBHEHFTask)