1 import FWCore.ParameterSet.Config
as cms
2 from HeterogeneousCore.CUDACore.SwitchProducerCUDA
import SwitchProducerCUDA
6 siPixelRecHits = cms.EDProducer(
"SiPixelRecHitConverter",
7 src = cms.InputTag(
"siPixelClusters"),
8 CPE = cms.string(
'PixelCPEGeneric'),
9 VerboseLevel = cms.untracked.int32(0)
14 cpu = siPixelRecHits.clone(
15 src =
'siPixelClustersPreSplitting' 20 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromLegacy_cfi
import siPixelRecHitSoAFromLegacy
as _siPixelRecHitsPreSplittingSoA
21 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromCUDA_cfi
import siPixelRecHitSoAFromCUDA
as _siPixelRecHitSoAFromCUDA
23 siPixelRecHitsPreSplittingCPU = _siPixelRecHitsPreSplittingSoA.clone(convertToLegacy=
True)
26 from Configuration.Eras.Modifier_phase2_tracker_cff
import phase2_tracker
27 phase2_tracker.toModify(siPixelRecHitsPreSplittingCPU,
31 from Configuration.ProcessModifiers.pixelNtupletFit_cff
import pixelNtupletFit
32 pixelNtupletFit.toModify(siPixelRecHitsPreSplitting,
34 siPixelRecHitsPreSplittingCPU = cms.VPSet(
35 cms.PSet(type = cms.string(
"SiPixelRecHitedmNewDetSetVector")),
36 cms.PSet(type = cms.string(
"uintAsHostProduct"))
41 siPixelRecHitsPreSplittingTask = cms.Task(
43 siPixelRecHitsPreSplitting
47 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitCUDA_cfi
import siPixelRecHitCUDA
as _siPixelRecHitCUDA
48 siPixelRecHitsPreSplittingCUDA = _siPixelRecHitCUDA.clone(
49 beamSpot =
"offlineBeamSpotToCUDA" 53 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDA_cfi
import siPixelRecHitFromCUDA
as _siPixelRecHitFromCUDA
58 siPixelRecHitsPreSplittingCPU = cms.VPSet(
59 cms.PSet(type = cms.string(
"cmscudacompatCPUTraitsTrackingRecHit2DHeterogeneous")),
60 cms.PSet(type = cms.string(
"uintAsHostProduct"))
64 (gpu & pixelNtupletFit).toModify(siPixelRecHitsPreSplittingSoA,cuda = _siPixelRecHitSoAFromCUDA.clone())
66 (gpu & pixelNtupletFit).toModify(siPixelRecHitsPreSplitting, cuda = _siPixelRecHitFromCUDA.clone())
68 pixelNtupletFit.toReplaceWith(siPixelRecHitsPreSplittingTask, cms.Task(
71 siPixelRecHitsPreSplittingCPU,
73 siPixelRecHitsPreSplittingTask.copy(),
75 siPixelRecHitsPreSplittingSoA)
79 (gpu & pixelNtupletFit).toReplaceWith(siPixelRecHitsPreSplittingTask, cms.Task(
82 siPixelRecHitsPreSplittingCUDA,
83 siPixelRecHitsPreSplittingCPU,
85 siPixelRecHitsPreSplittingTask.copy(),
87 siPixelRecHitsPreSplittingSoA