CMS 3D CMS Logo

HILowPtConformalPixelTracks_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
4 from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
10 
11 # Hit ntuplets
12 hiConformalPixelTracksHitDoublets = _hitPairEDProducer.clone(
13  clusterCheck = "",
14  seedingLayers = "PixelLayerTriplets",
15  trackingRegions = "hiTrackingRegionWithVertex",
16  maxElement = 50000000,
17  produceIntermediateHitDoublets = True,
18 )
19 
20 hiConformalPixelTracksHitTriplets = _pixelTripletHLTEDProducer.clone(
21  doublets = "hiConformalPixelTracksHitDoublets",
22  maxElement = 5000000, # increase threshold for triplets in generation step (default: 100000)
23  produceSeedingHitSets = True,
24 )
25 
26 import RecoTracker.PixelTrackFitting.pixelTracks_cfi as _mod
27 # Pixel tracks
28 hiConformalPixelTracks = _mod.pixelTracks.clone(
29  #passLabel = 'Pixel triplet low-pt tracks with vertex constraint',
30  # Ordered Hits
31  SeedingHitSets = "hiConformalPixelTracksHitTriplets",
32  # Fitter
33  Fitter = 'pixelFitterByConformalMappingAndLine',
34  # Filter
35  Filter = "hiConformalPixelFilter",
36  # Cleaner
37  Cleaner = "trackCleaner"
38 )
39 
40 
41 
42 #Tracking regions - use PV from pp tracking
43 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import globalTrackingRegionWithVertices
44 hiConformalPixelTracksPhase1TrackingRegions = globalTrackingRegionWithVertices.clone(
45  RegionPSet = dict(
46  precise = True,
47  useMultipleScattering = False,
48  useFakeVertices = False,
49  beamSpot = "offlineBeamSpot",
50  useFixedError = True,
51  nSigmaZ = 3.0,
52  sigmaZVertex = 3.0,
53  fixedError = 0.2,
54  VertexCollection = "offlinePrimaryVertices",
55  ptMin = 0.3,
56  useFoundVertices = True,
57  originRadius = 0.2
58  )
59 )
60 
61 # SEEDING LAYERS
62 # Using 4 layers layerlist
63 from RecoTracker.IterativeTracking.LowPtQuadStep_cff import lowPtQuadStepSeedLayers
64 hiConformalPixelTracksPhase1SeedLayers = lowPtQuadStepSeedLayers.clone(
65  BPix = cms.PSet(
66  HitProducer = cms.string('siPixelRecHits'),
67  TTRHBuilder = cms.string('WithTrackAngle'),
68  ),
69  FPix = cms.PSet(
70  HitProducer = cms.string('siPixelRecHits'),
71  TTRHBuilder = cms.string('WithTrackAngle'),
72  )
73 )
74 
75 
76 # Hit ntuplets
77 from RecoTracker.IterativeTracking.LowPtQuadStep_cff import lowPtQuadStepHitDoublets
78 hiConformalPixelTracksPhase1HitDoubletsCA = lowPtQuadStepHitDoublets.clone(
79  seedingLayers = "hiConformalPixelTracksPhase1SeedLayers",
80  trackingRegions = "hiConformalPixelTracksPhase1TrackingRegions"
81 )
82 
83 
84 from RecoTracker.IterativeTracking.LowPtQuadStep_cff import lowPtQuadStepHitQuadruplets
85 hiConformalPixelTracksPhase1HitQuadrupletsCA = lowPtQuadStepHitQuadruplets.clone(
86  doublets = "hiConformalPixelTracksPhase1HitDoubletsCA",
87  CAPhiCut = 0.2,
88  CAThetaCut = 0.0012,
89  SeedComparitorPSet = dict(
90  ComponentName = 'none'
91  ),
92  extraHitRPhitolerance = 0.032,
93  maxChi2 = dict(
94  enabled = True,
95  pt1 = 0.7,
96  pt2 = 2,
97  value1 = 200,
98  value2 = 50
99  )
100 )
101 
102 #Filter
103 hiConformalPixelTracksPhase1Filter = hiConformalPixelFilter.clone(
104  VertexCollection = "offlinePrimaryVertices",
105  chi2 = 30.0,
106  lipMax = 999.0,
107  nSigmaLipMaxTolerance = 3.0,
108  nSigmaTipMaxTolerance = 3.0,
109  ptMax = 999999,
110  ptMin = 0.30,
111  tipMax = 999.0
112 )
113 
114 from RecoTracker.PixelTrackFitting.pixelNtupletsFitter_cfi import pixelNtupletsFitter
115 
116 from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
117 phase1Pixel.toModify(hiConformalPixelTracks,
118  Cleaner = 'pixelTrackCleanerBySharedHits',
119  Filter = "hiConformalPixelTracksPhase1Filter",
120  Fitter = "pixelNtupletsFitter",
121  SeedingHitSets = "hiConformalPixelTracksPhase1HitQuadrupletsCA",
122 )
123 
124 hiConformalPixelTracksTask = cms.Task(
125  hiTrackingRegionWithVertex ,
126  hiConformalPixelTracksHitDoublets ,
127  hiConformalPixelTracksHitTriplets ,
128  pixelFitterByConformalMappingAndLine ,
129  hiConformalPixelFilter ,
130  hiConformalPixelTracks
131 )
132 
134 from Configuration.ProcessModifiers.pixelNtupletFit_cff import pixelNtupletFit
135 from RecoTracker.PixelTrackFitting.pixelTrackSoAFromCUDAHIonPhase1_cfi import pixelTrackSoAFromCUDAHIonPhase1 as _pixelTracksSoA
136 from RecoTracker.PixelSeeding.caHitNtupletCUDAHIonPhase1_cfi import caHitNtupletCUDAHIonPhase1 as _pixelTracksCUDA
137 from RecoTracker.PixelTrackFitting.pixelTrackProducerFromSoAHIonPhase1_cfi import pixelTrackProducerFromSoAHIonPhase1 as _pixelTrackProducerFromSoA
138 
139 from HeterogeneousCore.CUDACore.SwitchProducerCUDA import SwitchProducerCUDA
140 
141 hiPixelTracksCUDA = _pixelTracksCUDA.clone(pixelRecHitSrc="siPixelRecHitsPreSplittingCUDA", idealConditions = False,
142  ptmin = 0.25, z0Cut = 8.0, hardCurvCut = 0.0756, doPtCut = False,
143  onGPU = True,
144  dcaCutInnerTriplet = 0.05, dcaCutOuterTriplet = 0.10,
145  CAThetaCutForward = 0.002, CAThetaCutBarrel = 0.001,
146  phiCuts = cms.vint32(19*[900]), #19 pairs
147  trackQualityCuts = dict(
148  chi2MaxPt = 10,
149  chi2Coeff = [0.9,1.8],
150  chi2Scale = 1.8,
151  tripletMinPt = 0.1,
152  tripletMaxTip = 0.3,
153  tripletMaxZip = 12,
154  quadrupletMinPt = 0.1,
155  quadrupletMaxTip = 0.5,
156  quadrupletMaxZip = 12
157  ))
158 
159 # SwitchProducer providing the pixel tracks in SoA format on the CPU
160 hiPixelTracksSoA = SwitchProducerCUDA(
161  # build pixel ntuplets and pixel tracks in SoA format on the CPU
162  cpu = _pixelTracksCUDA.clone(
163  pixelRecHitSrc = "siPixelRecHitsPreSplittingCPU",
164  idealConditions = False,
165  doPtCut = False,
166  ptmin = 0.25,
167  hardCurvCut = 0.0756,
168  onGPU = False,
169  phiCuts = cms.vint32(19*[900]), #19 pairs
170  trackQualityCuts = dict(
171  chi2MaxPt = 10,
172  chi2Coeff = [0.9,1.8],
173  chi2Scale = 8,
174  tripletMinPt = 0.5,
175  tripletMaxTip = 0.3,
176  tripletMaxZip = 12,
177  quadrupletMinPt = 0.3,
178  quadrupletMaxTip = 0.5,
179  quadrupletMaxZip = 12
180  ))
181 )
182 
183 gpu.toModify(hiPixelTracksSoA,
184  # transfer the pixel tracks in SoA format to the host
185  cuda = _pixelTracksSoA.clone(src="hiPixelTracksCUDA")
186 )
187 
188 pixelNtupletFit.toReplaceWith(hiConformalPixelTracks,_pixelTrackProducerFromSoA.clone(
189  pixelRecHitLegacySrc = "siPixelRecHitsPreSplitting",
190  trackSrc = "hiPixelTracksSoA",
191  minQuality = "highPurity"
192 ))
193 
194 
195 hiConformalPixelTracksTaskPhase1 = cms.Task(
196  hiConformalPixelTracksPhase1TrackingRegions ,
197  hiConformalPixelTracksPhase1SeedLayers ,
198  hiConformalPixelTracksPhase1HitDoubletsCA ,
199  hiConformalPixelTracksPhase1HitQuadrupletsCA ,
200  pixelNtupletsFitter ,
201  hiConformalPixelTracksPhase1Filter ,
202  hiConformalPixelTracks
203 )
204 
205 pixelNtupletFit.toReplaceWith(hiConformalPixelTracksTaskPhase1, cms.Task(
206  # build the pixel ntuplets and the pixel tracks in SoA format on the CPU
207  hiPixelTracksSoA,
208  # convert the pixel tracks from SoA to legacy format
209  hiConformalPixelTracks
210 ))
211 
212 (gpu & pixelNtupletFit).toReplaceWith(hiConformalPixelTracksTaskPhase1, cms.Task(
213  # build the pixel ntuplets and the pixel tracks in SoA format on the GPU
214  hiPixelTracksCUDA,
215  # just copying the task above
216  hiConformalPixelTracksTaskPhase1.copy()
217 ))
218 
219 hiConformalPixelTracksSequencePhase1 = cms.Sequence(hiConformalPixelTracksTaskPhase1)
220 
221 from Configuration.Eras.Modifier_run3_upc_cff import run3_upc
222 run3_upc.toModify(hiConformalPixelTracksPhase1TrackingRegions.RegionPSet, ptMin = 0.05)
223 run3_upc.toModify(hiConformalPixelTracksPhase1Filter, ptMin = 0.05)