File indexing completed on 2024-09-13 22:52:46
0001 import FWCore.ParameterSet.Config as cms
0002 from HeterogeneousCore.AlpakaCore.functions import *
0003 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
0004
0005 from RecoTracker.PixelTrackFitting.PixelTracks_cff import *
0006 from RecoVertex.PixelVertexFinding.PixelVertices_cff import *
0007
0008
0009 pixelVerticesTask = cms.Task(
0010 pixelVertices
0011 )
0012
0013
0014 from Configuration.ProcessModifiers.pixelNtupletFit_cff import pixelNtupletFit
0015 from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
0016
0017
0018 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
0019
0020
0021 from RecoVertex.PixelVertexFinding.pixelVertexProducerCUDAPhase1_cfi import pixelVertexProducerCUDAPhase1 as _pixelVerticesCUDA
0022 from RecoVertex.PixelVertexFinding.pixelVertexProducerCUDAPhase2_cfi import pixelVertexProducerCUDAPhase2 as _pixelVerticesCUDAPhase2
0023 from RecoVertex.PixelVertexFinding.pixelVertexProducerCUDAHIonPhase1_cfi import pixelVertexProducerCUDAHIonPhase1 as _pixelVerticesCUDAHIonPhase1
0024
0025 pixelVerticesSoA = SwitchProducerCUDA(
0026 cpu = _pixelVerticesCUDA.clone(
0027 pixelTrackSrc = "pixelTracksSoA",
0028 onGPU = False
0029 )
0030 )
0031
0032 phase2_tracker.toModify(pixelVerticesSoA,cpu = _pixelVerticesCUDAPhase2.clone(
0033 pixelTrackSrc = "pixelTracksSoA",
0034 onGPU = False,
0035 PtMin = 2.0
0036 ))
0037
0038 (pp_on_AA & ~phase2_tracker).toModify(pixelVerticesSoA,cpu = _pixelVerticesCUDAHIonPhase1.clone(
0039 pixelTrackSrc = "pixelTracksSoA",
0040 doSplitting = False,
0041 onGPU = False,
0042 ))
0043
0044
0045 from RecoVertex.PixelVertexFinding.pixelVertexFromSoA_cfi import pixelVertexFromSoA as _pixelVertexFromSoA
0046
0047 (pixelNtupletFit).toReplaceWith(pixelVertices, _pixelVertexFromSoA.clone(
0048 src = "pixelVerticesSoA"
0049 ))
0050
0051 (pixelNtupletFit).toReplaceWith(pixelVerticesTask, cms.Task(
0052
0053 pixelVerticesSoA,
0054
0055 pixelVertices
0056 ))
0057
0058
0059
0060 from Configuration.ProcessModifiers.gpu_cff import gpu
0061
0062
0063 pixelVerticesCUDA = _pixelVerticesCUDA.clone(
0064 pixelTrackSrc = "pixelTracksCUDA",
0065 onGPU = True
0066 )
0067
0068 phase2_tracker.toReplaceWith(pixelVerticesCUDA,_pixelVerticesCUDAPhase2.clone(
0069 pixelTrackSrc = "pixelTracksCUDA",
0070 onGPU = True,
0071 PtMin = 2.0
0072 ))
0073
0074 (pp_on_AA & ~phase2_tracker).toReplaceWith(pixelVerticesCUDA,_pixelVerticesCUDAHIonPhase1.clone(
0075 pixelTrackSrc = "pixelTracksCUDA",
0076 doSplitting = False,
0077 onGPU = True
0078 ))
0079
0080
0081 from RecoVertex.PixelVertexFinding.pixelVerticesSoA_cfi import pixelVerticesSoA as _pixelVerticesSoA
0082 gpu.toModify(pixelVerticesSoA,
0083 cuda = _pixelVerticesSoA.clone(
0084 src = cms.InputTag("pixelVerticesCUDA")
0085 )
0086 )
0087
0088
0089
0090 from Configuration.ProcessModifiers.gpuValidationPixel_cff import gpuValidationPixel
0091 (pixelNtupletFit & gpu & gpuValidationPixel).toModify(pixelVerticesSoA.cpu,
0092 pixelTrackSrc = "pixelTracksSoA@cpu"
0093 )
0094
0095 (pixelNtupletFit & gpu).toReplaceWith(pixelVerticesTask, cms.Task(
0096
0097 pixelVerticesCUDA,
0098
0099 pixelVerticesTask.copy()
0100 ))
0101
0102
0103
0104
0105 from RecoVertex.PixelVertexFinding.pixelVertexProducerAlpakaPhase1_cfi import pixelVertexProducerAlpakaPhase1 as _pixelVerticesAlpakaPhase1
0106 from RecoVertex.PixelVertexFinding.pixelVertexProducerAlpakaPhase2_cfi import pixelVertexProducerAlpakaPhase2 as _pixelVerticesAlpakaPhase2
0107 from RecoVertex.PixelVertexFinding.pixelVertexProducerAlpakaHIonPhase1_cfi import pixelVertexProducerAlpakaHIonPhase1 as _pixelVerticesAlpakaHIonPhase1
0108 pixelVerticesAlpaka = _pixelVerticesAlpakaPhase1.clone()
0109 phase2_tracker.toReplaceWith(pixelVerticesAlpaka,_pixelVerticesAlpakaPhase2.clone( maxVertices = 512))
0110 (pp_on_AA & ~phase2_tracker).toReplaceWith(pixelVerticesAlpaka,_pixelVerticesAlpakaHIonPhase1.clone(doSplitting = False, maxVertices = 32))
0111
0112 from RecoVertex.PixelVertexFinding.pixelVertexFromSoAAlpaka_cfi import pixelVertexFromSoAAlpaka as _pixelVertexFromSoAAlpaka
0113 alpaka.toReplaceWith(pixelVertices, _pixelVertexFromSoAAlpaka.clone())
0114
0115
0116 pixelVerticesAlpakaSerial = makeSerialClone(pixelVerticesAlpaka,
0117 pixelTrackSrc = 'pixelTracksAlpakaSerial'
0118 )
0119
0120 alpaka.toReplaceWith(pixelVerticesTask, cms.Task(
0121
0122 pixelVerticesAlpaka,
0123
0124 pixelVerticesAlpakaSerial,
0125
0126 pixelVertices
0127 ))
0128
0129
0130 recopixelvertexingTask = cms.Task(
0131 pixelTracksTask,
0132 pixelVerticesTask
0133 )
0134 recopixelvertexing = cms.Sequence(recopixelvertexingTask)