CMS 3D CMS Logo

PixelTracks_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
3 
8 myTTRHBuilderWithoutAngle = RecoTracker.TransientTrackingRecHit.TransientTrackingRecHitBuilder_cfi.ttrhbwr.clone(
9  StripCPE = 'Fake',
10  ComponentName = 'PixelTTRHBuilderWithoutAngle'
11 )
14 from RecoPixelVertexing.PixelTrackFitting.pixelFitterByHelixProjections_cfi import pixelFitterByHelixProjections
15 from RecoPixelVertexing.PixelTrackFitting.pixelNtupletsFitter_cfi import pixelNtupletsFitter
16 from RecoPixelVertexing.PixelTrackFitting.pixelTrackFilterByKinematics_cfi import pixelTrackFilterByKinematics
17 from RecoPixelVertexing.PixelTrackFitting.pixelTrackCleanerBySharedHits_cfi import pixelTrackCleanerBySharedHits
18 from RecoPixelVertexing.PixelTrackFitting.pixelTracks_cfi import pixelTracks as _pixelTracks
19 from RecoTracker.TkTrackingRegions.globalTrackingRegion_cfi import globalTrackingRegion as _globalTrackingRegion
20 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
21 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
22 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
24 import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
25 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder
26 
27 # Eras
28 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
29 from Configuration.Eras.Modifier_run3_common_cff import run3_common
30 
31 # seeding layers
32 from RecoTracker.IterativeTracking.InitialStep_cff import initialStepSeedLayers, initialStepHitDoublets, _initialStepCAHitQuadruplets
33 
34 # TrackingRegion
35 pixelTracksTrackingRegions = _globalTrackingRegion.clone()
36 trackingLowPU.toReplaceWith(pixelTracksTrackingRegions, _globalTrackingRegionFromBeamSpot.clone())
37 
38 
39 # Pixel quadruplets tracking
40 pixelTracksSeedLayers = initialStepSeedLayers.clone(
41  BPix = dict(HitProducer = "siPixelRecHitsPreSplitting"),
42  FPix = dict(HitProducer = "siPixelRecHitsPreSplitting")
43 )
44 
45 pixelTracksHitDoublets = initialStepHitDoublets.clone(
46  clusterCheck = "",
47  seedingLayers = "pixelTracksSeedLayers",
48  trackingRegions = "pixelTracksTrackingRegions"
49 )
50 
51 pixelTracksHitQuadruplets = _initialStepCAHitQuadruplets.clone(
52  doublets = "pixelTracksHitDoublets",
53  SeedComparitorPSet = dict(clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting')
54 )
55 
56 pixelTracks = _pixelTracks.clone(
57  SeedingHitSets = "pixelTracksHitQuadruplets"
58 )
59 
60 pixelTracksTask = cms.Task(
61  pixelTracksTrackingRegions,
62  pixelFitterByHelixProjections,
63  pixelTrackFilterByKinematics,
64  pixelTracksSeedLayers,
65  pixelTracksHitDoublets,
66  pixelTracksHitQuadruplets,
67  pixelTracks
68 )
69 
70 pixelTracksSequence = cms.Sequence(pixelTracksTask)
71 
72 
73 # Pixel triplets for trackingLowPU
74 pixelTracksHitTriplets = _pixelTripletHLTEDProducer.clone(
75  doublets = "pixelTracksHitDoublets",
76  produceSeedingHitSets = True,
77  SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(
78  clusterShapeCacheSrc = "siPixelClusterShapeCachePreSplitting"
79  )
80 )
81 
82 trackingLowPU.toModify(pixelTracks,
83  SeedingHitSets = "pixelTracksHitTriplets"
84 )
85 
86 _pixelTracksTask_lowPU = pixelTracksTask.copy()
87 _pixelTracksTask_lowPU.replace(pixelTracksHitQuadruplets, pixelTracksHitTriplets)
88 trackingLowPU.toReplaceWith(pixelTracksTask, _pixelTracksTask_lowPU)
89 
90 
91 # "Patatrack" pixel ntuplets, fishbone cleaning, Broken Line fit, and density-based vertex reconstruction
92 from Configuration.ProcessModifiers.pixelNtupletFit_cff import pixelNtupletFit
93 
94 from RecoPixelVertexing.PixelTriplets.pixelTracksCUDA_cfi import pixelTracksCUDA as _pixelTracksCUDA
95 
96 # SwitchProducer providing the pixel tracks in SoA format on the CPU
97 pixelTracksSoA = SwitchProducerCUDA(
98  # build pixel ntuplets and pixel tracks in SoA format on the CPU
99  cpu = _pixelTracksCUDA.clone(
100  pixelRecHitSrc = "siPixelRecHitsPreSplittingSoA",
101  idealConditions = False,
102  onGPU = False
103  )
104 )
105 # use quality cuts tuned for Run 2 ideal conditions for all Run 3 workflows
106 run3_common.toModify(pixelTracksSoA.cpu,
107  idealConditions = True
108 )
109 
110 # convert the pixel tracks from SoA to legacy format
111 from RecoPixelVertexing.PixelTrackFitting.pixelTrackProducerFromSoA_cfi import pixelTrackProducerFromSoA as _pixelTrackProducerFromSoA
112 pixelNtupletFit.toReplaceWith(pixelTracks, _pixelTrackProducerFromSoA.clone(
113  pixelRecHitLegacySrc = "siPixelRecHitsPreSplitting",
114 ))
115 
116 pixelNtupletFit.toReplaceWith(pixelTracksTask, cms.Task(
117  #pixelTracksTrackingRegions,
118  #pixelFitterByHelixProjections,
119  #pixelTrackFilterByKinematics,
120  #pixelTracksSeedLayers,
121  #pixelTracksHitDoublets,
122  #pixelTracksHitQuadruplets,
123  # build the pixel ntuplets and the pixel tracks in SoA format on the GPU
124  pixelTracksSoA,
125  # convert the pixel tracks from SoA to legacy format
126  pixelTracks
127 ))
128 
129 
130 # "Patatrack" sequence running on GPU
131 from Configuration.ProcessModifiers.gpu_cff import gpu
132 
133 # build the pixel ntuplets and pixel tracks in SoA format on the GPU
134 pixelTracksCUDA = _pixelTracksCUDA.clone(
135  pixelRecHitSrc = "siPixelRecHitsPreSplittingCUDA",
136  idealConditions = False,
137  onGPU = True
138 )
139 # use quality cuts tuned for Run 2 ideal conditions for all Run 3 workflows
140 run3_common.toModify(pixelTracksCUDA,
141  idealConditions = True
142 )
143 
144 # SwitchProducer providing the pixel tracks in SoA format on the CPU
145 from RecoPixelVertexing.PixelTrackFitting.pixelTracksSoA_cfi import pixelTracksSoA as _pixelTracksSoA
146 gpu.toModify(pixelTracksSoA,
147  # transfer the pixel tracks in SoA format to the host
148  cuda = _pixelTracksSoA.clone()
149 )
150 
151 (pixelNtupletFit & gpu).toReplaceWith(pixelTracksTask, cms.Task(
152  # build the pixel ntuplets and pixel tracks in SoA format on the GPU
153  pixelTracksCUDA,
154  # transfer the pixel tracks in SoA format to the CPU, and convert them to legacy format
155  pixelTracksTask.copy()
156 ))
SiStripRecHitMatcher_cfi
ClusterShapeHitFilterESProducer_cfi
pixelTrackCleanerBySharedHits_cfi
InitialStep_cff
TTRHBuilderWithoutAngle4PixelTriplets_cfi
PixelLayerTriplets_cfi
TRIGGER SELECTION #####.
TransientTrackingRecHitBuilder_cfi
StripCPEfromTrackAngle_cfi
pixelFitterByHelixProjections_cfi
SwitchProducerCUDA
Definition: SwitchProducerCUDA.py:1