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)
12 from Configuration.Eras.Modifier_phase2_brickedPixels_cff
import phase2_brickedPixels
13 phase2_brickedPixels.toModify(siPixelRecHits,
14 CPE =
'PixelCPEGenericForBricked'
19 cpu = siPixelRecHits.clone(
20 src =
'siPixelClustersPreSplitting'
25 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromLegacy_cfi
import siPixelRecHitSoAFromLegacy
as _siPixelRecHitsPreSplittingSoA
26 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitSoAFromCUDA_cfi
import siPixelRecHitSoAFromCUDA
as _siPixelRecHitSoAFromCUDA
28 siPixelRecHitsPreSplittingCPU = _siPixelRecHitsPreSplittingSoA.clone(convertToLegacy=
True)
31 from Configuration.Eras.Modifier_phase2_tracker_cff
import phase2_tracker
32 phase2_tracker.toModify(siPixelRecHitsPreSplittingCPU,
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.siPixelRecHitCUDA_cfi
import siPixelRecHitCUDA
as _siPixelRecHitCUDA
53 siPixelRecHitsPreSplittingCUDA = _siPixelRecHitCUDA.clone(
54 beamSpot =
"offlineBeamSpotToCUDA"
58 from RecoLocalTracker.SiPixelRecHits.siPixelRecHitFromCUDA_cfi
import siPixelRecHitFromCUDA
as _siPixelRecHitFromCUDA
63 siPixelRecHitsPreSplittingCPU = cms.VPSet(
64 cms.PSet(type = cms.string(
"cmscudacompatCPUTraitsTrackingRecHit2DHeterogeneous")),
65 cms.PSet(type = cms.string(
"uintAsHostProduct"))
69 (gpu & pixelNtupletFit).toModify(siPixelRecHitsPreSplittingSoA,cuda = _siPixelRecHitSoAFromCUDA.clone())
71 (gpu & pixelNtupletFit).toModify(siPixelRecHitsPreSplitting, cuda = _siPixelRecHitFromCUDA.clone())
73 pixelNtupletFit.toReplaceWith(siPixelRecHitsPreSplittingTask, cms.Task(
76 siPixelRecHitsPreSplittingCPU,
78 siPixelRecHitsPreSplittingTask.copy(),
80 siPixelRecHitsPreSplittingSoA)
84 (gpu & pixelNtupletFit).toReplaceWith(siPixelRecHitsPreSplittingTask, cms.Task(
87 siPixelRecHitsPreSplittingCUDA,
88 siPixelRecHitsPreSplittingCPU,
90 siPixelRecHitsPreSplittingTask.copy(),
92 siPixelRecHitsPreSplittingSoA