1 import FWCore.ParameterSet.Config
as cms
3 from HeterogeneousCore.CUDACore.SwitchProducerCUDA
import SwitchProducerCUDA
8 siPixelRecHits = cms.EDProducer(
"SiPixelRecHitConverter",
9 src = cms.InputTag(
"siPixelClusters"),
10 CPE = cms.string(
'PixelCPEGeneric'),
11 VerboseLevel = cms.untracked.int32(0)
16 cpu = siPixelRecHits.clone(
17 src =
'siPixelClustersPreSplitting' 22 from Configuration.Eras.Modifier_phase2_tracker_cff
import phase2_tracker
24 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
27 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromLegacyPhase1_cfi
import siPixelRecHitSoAFromLegacyPhase1
as _siPixelRecHitsPreSplittingSoA
28 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromLegacyPhase2_cfi
import siPixelRecHitSoAFromLegacyPhase2
as _siPixelRecHitsPreSplittingSoAPhase2
29 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromLegacyHIonPhase1_cfi
import siPixelRecHitSoAFromLegacyHIonPhase1
as _siPixelRecHitsPreSplittingSoAHIonPhase1
31 siPixelRecHitsPreSplittingCPU = _siPixelRecHitsPreSplittingSoA.clone(convertToLegacy=
True)
32 (pp_on_AA & ~phase2_tracker).toReplaceWith(siPixelRecHitsPreSplittingCPU, _siPixelRecHitsPreSplittingSoAHIonPhase1.clone(convertToLegacy=
True, CPE = cms.string(
'PixelCPEFastHIonPhase1')))
33 phase2_tracker.toReplaceWith(siPixelRecHitsPreSplittingCPU, _siPixelRecHitsPreSplittingSoAPhase2.clone(convertToLegacy=
True, CPE = cms.string(
'PixelCPEFastPhase2')))
36 from Configuration.ProcessModifiers.pixelNtupletFit_cff
import pixelNtupletFit
37 pixelNtupletFit.toModify(siPixelRecHitsPreSplitting,
39 siPixelRecHitsPreSplittingCPU = cms.VPSet(
40 cms.PSet(type = cms.string(
"SiPixelRecHitedmNewDetSetVector")),
41 cms.PSet(type = cms.string(
"uintAsHostProduct"))
46 siPixelRecHitsPreSplittingTask = cms.Task(
48 siPixelRecHitsPreSplitting
52 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitCUDAPhase1_cfi
import siPixelRecHitCUDAPhase1
as _siPixelRecHitCUDAPhase1
53 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitCUDAPhase2_cfi
import siPixelRecHitCUDAPhase2
as _siPixelRecHitCUDAPhase2
54 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitCUDAHIonPhase1_cfi
import siPixelRecHitCUDAHIonPhase1
as _siPixelRecHitCUDAHIonPhase1
56 siPixelRecHitsPreSplittingCUDA = _siPixelRecHitCUDAPhase1.clone(
57 beamSpot =
"offlineBeamSpotToCUDA" 59 (pp_on_AA & ~phase2_tracker).toReplaceWith(siPixelRecHitsPreSplittingCUDA,_siPixelRecHitCUDAHIonPhase1.clone(
60 beamSpot =
"offlineBeamSpotToCUDA" 62 phase2_tracker.toReplaceWith(siPixelRecHitsPreSplittingCUDA,_siPixelRecHitCUDAPhase2.clone(
63 beamSpot =
"offlineBeamSpotToCUDA" 69 siPixelRecHitsPreSplittingCPU = cms.VPSet(
70 cms.PSet(type = cms.string(
"pixelTopologyPhase1TrackingRecHitSoAHost")),
71 cms.PSet(type = cms.string(
"uintAsHostProduct"))
75 (pp_on_AA & ~phase2_tracker).toModify(siPixelRecHitsPreSplittingSoA,
77 siPixelRecHitsPreSplittingCPU = cms.VPSet(
78 cms.PSet(type = cms.string(
"pixelTopologyHIonPhase1TrackingRecHitSoAHost")),
79 cms.PSet(type = cms.string(
"uintAsHostProduct"))
82 phase2_tracker.toModify(siPixelRecHitsPreSplittingSoA,
84 siPixelRecHitsPreSplittingCPU = cms.VPSet(
85 cms.PSet(type = cms.string(
"pixelTopologyPhase2TrackingRecHitSoAHost")),
86 cms.PSet(type = cms.string(
"uintAsHostProduct"))
89 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromCUDAPhase1_cfi
import siPixelRecHitSoAFromCUDAPhase1
as _siPixelRecHitSoAFromCUDA
90 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromCUDAHIonPhase1_cfi
import siPixelRecHitSoAFromCUDAHIonPhase1
as _siPixelRecHitSoAFromCUDAHIonPhase1
91 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromCUDAPhase2_cfi
import siPixelRecHitSoAFromCUDAPhase2
as _siPixelRecHitSoAFromCUDAPhase2
93 (gpu & pixelNtupletFit).toModify(siPixelRecHitsPreSplittingSoA, cuda = _siPixelRecHitSoAFromCUDA.clone())
94 (gpu & pixelNtupletFit & phase2_tracker).toModify(siPixelRecHitsPreSplittingSoA, cuda = _siPixelRecHitSoAFromCUDAPhase2.clone())
97 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDAPhase1_cfi
import siPixelRecHitFromCUDAPhase1
as _siPixelRecHitFromCUDA
98 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDAHIonPhase1_cfi
import siPixelRecHitFromCUDAHIonPhase1
as _siPixelRecHitFromCUDAHIonPhase1
99 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDAPhase2_cfi
import siPixelRecHitFromCUDAPhase2
as _siPixelRecHitFromCUDAPhase2
101 (gpu & pixelNtupletFit).toModify(siPixelRecHitsPreSplitting, cuda = _siPixelRecHitFromCUDA.clone())
102 (gpu & pixelNtupletFit & pp_on_AA).toModify(siPixelRecHitsPreSplitting, cuda = _siPixelRecHitFromCUDAHIonPhase1.clone())
103 (gpu & pixelNtupletFit & phase2_tracker).toModify(siPixelRecHitsPreSplitting, cuda = _siPixelRecHitFromCUDAPhase2.clone())
106 pixelNtupletFit.toReplaceWith(siPixelRecHitsPreSplittingTask, cms.Task(
109 siPixelRecHitsPreSplittingCPU,
111 siPixelRecHitsPreSplittingTask.copy(),
113 siPixelRecHitsPreSplittingSoA)
117 (gpu & pixelNtupletFit).toReplaceWith(siPixelRecHitsPreSplittingTask, cms.Task(
120 siPixelRecHitsPreSplittingCUDA,
121 siPixelRecHitsPreSplittingCPU,
123 siPixelRecHitsPreSplittingTask.copy(),
125 siPixelRecHitsPreSplittingSoA
131 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitAlpakaPhase1_cfi
import siPixelRecHitAlpakaPhase1
as _siPixelRecHitAlpakaPhase1
132 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitAlpakaPhase2_cfi
import siPixelRecHitAlpakaPhase2
as _siPixelRecHitAlpakaPhase2
135 siPixelRecHitsPreSplittingAlpaka = _siPixelRecHitAlpakaPhase1.clone(
136 src =
"siPixelClustersPreSplittingAlpaka" 138 phase2_tracker.toReplaceWith(siPixelRecHitsPreSplittingAlpaka,_siPixelRecHitAlpakaPhase2.clone(
139 src =
"siPixelClustersPreSplittingAlpaka" 143 siPixelRecHitsPreSplittingAlpakaSerial =
makeSerialClone(siPixelRecHitsPreSplittingAlpaka,
144 src =
"siPixelClustersPreSplittingAlpakaSerial" 147 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromSoAAlpakaPhase1_cfi
import siPixelRecHitFromSoAAlpakaPhase1
as _siPixelRecHitFromSoAAlpakaPhase1
148 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromSoAAlpakaPhase2_cfi
import siPixelRecHitFromSoAAlpakaPhase2
as _siPixelRecHitFromSoAAlpakaPhase2
150 (alpaka & ~phase2_tracker).toModify(siPixelRecHitsPreSplitting,
151 cpu = _siPixelRecHitFromSoAAlpakaPhase1.clone(
152 pixelRecHitSrc = cms.InputTag(
'siPixelRecHitsPreSplittingAlpaka'),
153 src = cms.InputTag(
'siPixelClustersPreSplitting'))
156 (alpaka & phase2_tracker).toModify(siPixelRecHitsPreSplitting,
157 cpu = _siPixelRecHitFromSoAAlpakaPhase2.clone(
158 pixelRecHitSrc = cms.InputTag(
'siPixelRecHitsPreSplittingAlpaka'),
159 src = cms.InputTag(
'siPixelClustersPreSplitting'))
163 alpaka.toReplaceWith(siPixelRecHitsPreSplittingTask, cms.Task(
165 siPixelRecHitsPreSplittingAlpaka,
167 siPixelRecHitsPreSplittingAlpakaSerial,
169 siPixelRecHitsPreSplitting))
def makeSerialClone(module, kwargs)