CMS 3D CMS Logo

PixelPairStep_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016 as _tracker_apv_vfp30_2016
3 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
4 from Configuration.Eras.Modifier_fastSim_cff import fastSim
5 
6 # for dnn classifier
7 from Configuration.ProcessModifiers.trackdnn_cff import trackdnn
8 from RecoTracker.IterativeTracking.dnnQualityCuts import qualityCutDictionary
9 
10 # for no-loopers
11 from Configuration.ProcessModifiers.trackingNoLoopers_cff import trackingNoLoopers
12 
13 # NEW CLUSTERS (remove previously used clusters)
14 pixelPairStepClusters = _cfg.clusterRemoverForIter('PixelPairStep')
15 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
16  _era.toReplaceWith(pixelPairStepClusters, _cfg.clusterRemoverForIter('PixelPairStep', _eraName, _postfix))
17 
19 
20 # SEEDING LAYERS
21 pixelPairStepSeedLayers = _mod.seedingLayersEDProducer.clone(
22  layerList = ['BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3',
23  'BPix1+FPix1_pos', 'BPix1+FPix1_neg',
24  'BPix2+FPix1_pos', 'BPix2+FPix1_neg',
25  'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg'],
26  BPix = dict(
27  TTRHBuilder = cms.string('WithTrackAngle'),
28  HitProducer = cms.string('siPixelRecHits'),
29  skipClusters = cms.InputTag('pixelPairStepClusters')
30  ),
31  FPix = dict(
32  TTRHBuilder = cms.string('WithTrackAngle'),
33  HitProducer = cms.string('siPixelRecHits'),
34  skipClusters = cms.InputTag('pixelPairStepClusters')
35  )
36 )
37 # layers covering the region not covered by quadruplets (so it is
38 # just acting as backup of triplets)
39 _layerListForPhase1 = [
40  'BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3',
41  'BPix1+FPix1_pos', 'BPix1+FPix1_neg',
42  'BPix2+FPix1_pos', 'BPix2+FPix1_neg',
43 ]
44 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
45 trackingPhase1.toModify(pixelPairStepSeedLayers, layerList = _layerListForPhase1)
46 
47 # only layers covering the region not covered by quadruplets
48 # (so it is just acting as backup of triplets)
49 _layerListForPhase2 = [
50  'BPix1+BPix2', 'BPix1+BPix3', 'BPix2+BPix3',
51  'BPix1+FPix1_pos', 'BPix1+FPix1_neg',
52  'BPix2+FPix1_pos', 'BPix2+FPix1_neg'
53 ]
54 # modifing these errors seems to make no difference
55 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
56 trackingPhase2PU140.toModify(pixelPairStepSeedLayers,
57  layerList = _layerListForPhase2,
58  BPix = dict(
59  useErrorsFromParam = cms.bool(True),
60  hitErrorRPhi = cms.double(0.0016),
61  hitErrorRZ = cms.double(0.0035),
62  TTRHBuilder = 'TTRHBuilderWithoutAngle4PixelPairs',
63  ),
64  FPix = dict(
65  useErrorsFromParam = cms.bool(True),
66  hitErrorRPhi = cms.double(0.0030),
67  hitErrorRZ = cms.double(0.0020),
68  TTRHBuilder = 'TTRHBuilderWithoutAngle4PixelPairs',
69  )
70 )
71 
72 # TrackingRegion
73 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
74 pixelPairStepTrackingRegions = _globalTrackingRegionWithVertices.clone(
75  RegionPSet = dict(
76  ptMin = 0.6,
77  originRadius = 0.015,
78  fixedError = 0.03,
79  useMultipleScattering = True)
80 )
81 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
82 trackingLowPU.toModify(pixelPairStepTrackingRegions, RegionPSet=dict(useMultipleScattering=False))
83 _region_Phase1 = dict(
84  useMultipleScattering = False,
85  maxNVertices = 5,
86 )
87 trackingPhase1.toModify(pixelPairStepTrackingRegions, RegionPSet=_region_Phase1)
88 trackingPhase2PU140.toModify(pixelPairStepTrackingRegions, RegionPSet=_region_Phase1)
89 from Configuration.Eras.Modifier_highBetaStar_cff import highBetaStar
90 highBetaStar.toModify(pixelPairStepTrackingRegions,RegionPSet = dict(
91  ptMin = 0.05,
92  originRadius = 0.2,
93  fixedError = 4.
94 ))
95 from Configuration.Eras.Modifier_run3_upc_cff import run3_upc
96 (highBetaStar & run3_upc).toModify(pixelPairStepTrackingRegions,RegionPSet = dict(originRadius = 0.015))
97 fastSim.toModify(pixelPairStepTrackingRegions, RegionPSet=dict(VertexCollection = 'firstStepPrimaryVerticesBeforeMixing'))
98 
99 # SEEDS
100 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
101 pixelPairStepHitDoublets = _hitPairEDProducer.clone(
102  seedingLayers = 'pixelPairStepSeedLayers',
103  trackingRegions = 'pixelPairStepTrackingRegions',
104  produceSeedingHitSets = True,
105  maxElementTotal = 12000000,
106 )
107 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
108 pixelPairStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
109  seedingHitSets = 'pixelPairStepHitDoublets',
110  SeedComparitorPSet = dict(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
111  ComponentName = 'PixelClusterShapeSeedComparitor',
112  FilterAtHelixStage = cms.bool(True),
113  FilterPixelHits = cms.bool(True),
114  FilterStripHits = cms.bool(False),
115  ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
116  ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache'),
117  )
118 )
119 
120 # Clone for the phase1 recovery mode
121 pixelPairStepSeedsA = pixelPairStepSeeds.clone()
122 
123 #have to do it after making pixelPairStepSeedsA since pixelPairStepSeedsB clones A
124 # and then modifies it
125 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
126 fastSim.toReplaceWith(pixelPairStepSeeds,
127  FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
128  trackingRegions = 'pixelPairStepTrackingRegions',
129  hitMasks = cms.InputTag('pixelPairStepMasks'),
130  seedFinderSelector = dict(layerList = pixelPairStepSeedLayers.layerList.value())
131  )
132 )
133 
134 # Recovery for regions with 2 inactive layers
135 from RecoTracker.TkTrackingRegions.pixelInactiveAreaTrackingRegionsAndSeedingLayers_cfi import pixelInactiveAreaTrackingRegionsAndSeedingLayers as _pixelInactiveAreaTrackingRegionsAndSeedingLayers
136 pixelPairStepTrackingRegionsSeedLayersB = _pixelInactiveAreaTrackingRegionsAndSeedingLayers.clone(
137  layerList = [
138 # Commented ones are already included in the global seeds (A), but are
139 # included below for completenees
140 #
141 # 'BPix1+BPix2',
142 # 'BPix1+BPix3',
143  'BPix1+BPix4',
144 # 'BPix2+BPix3',
145  'BPix2+BPix4',
146  'BPix3+BPix4',
147 # 'BPix1+FPix1_pos' , 'BPix1+FPix1_neg',
148  'BPix1+FPix2_pos' , 'BPix1+FPix2_neg',
149  'BPix1+FPix3_pos' , 'BPix1+FPix3_neg',
150 # 'BPix2+FPix1_pos' , 'BPix2+FPix1_neg',
151  'BPix2+FPix2_pos' , 'BPix2+FPix2_neg',
152  'BPix3+FPix1_pos' , 'BPix3+FPix1_neg',
153  'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg',
154  'FPix1_pos+FPix3_pos', 'FPix1_neg+FPix3_neg',
155  'FPix2_pos+FPix3_pos', 'FPix2_neg+FPix3_neg',
156  ],
157  BPix = dict(
158  TTRHBuilder = cms.string('WithTrackAngle'),
159  HitProducer = cms.string('siPixelRecHits'),
160  skipClusters = cms.InputTag('pixelPairStepClusters')
161  ),
162  FPix = dict(
163  TTRHBuilder = cms.string('WithTrackAngle'),
164  HitProducer = cms.string('siPixelRecHits'),
165  skipClusters = cms.InputTag('pixelPairStepClusters')
166  ),
167  RegionPSet = dict(
168  ptMin = 0.6,
169  originRadius = 0.015,
170  operationMode = 'VerticesFixed',
171  zErrorVertex = 0.03,
172  maxNVertices = 5,
173  ),
174  ignoreSingleFPixPanelModules = True,
175 )
176 highBetaStar.toModify(pixelPairStepTrackingRegionsSeedLayersB,RegionPSet = dict(
177  ptMin = 0.05,
178  originRadius = 0.2,
179 ))
180 #include commented lines from above in pp_on_XY eras; global seeds (A) are not used in this era b/c timing
181 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
182 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
183 (pp_on_XeXe_2017 | pp_on_AA).toModify(pixelPairStepTrackingRegionsSeedLayersB, layerList = [
184  'BPix1+BPix2', 'BPix1+BPix3', 'BPix1+BPix4', 'BPix2+BPix3', 'BPix2+BPix4','BPix3+BPix4',
185  'BPix1+FPix1_pos' , 'BPix1+FPix1_neg',
186  'BPix1+FPix2_pos' , 'BPix1+FPix2_neg',
187  'BPix1+FPix3_pos' , 'BPix1+FPix3_neg',
188  'BPix2+FPix1_pos' , 'BPix2+FPix1_neg',
189  'BPix2+FPix2_pos' , 'BPix2+FPix2_neg',
190  'BPix3+FPix1_pos' , 'BPix3+FPix1_neg',
191  'FPix1_pos+FPix2_pos', 'FPix1_neg+FPix2_neg',
192  'FPix1_pos+FPix3_pos', 'FPix1_neg+FPix3_neg',
193  'FPix2_pos+FPix3_pos', 'FPix2_neg+FPix3_neg'
194  ])
195 
196 pixelPairStepHitDoubletsB = pixelPairStepHitDoublets.clone(
197  seedingLayers = '',
198  trackingRegions = '',
199  trackingRegionsSeedingLayers = 'pixelPairStepTrackingRegionsSeedLayersB',
200 )
201 pixelPairStepSeedsB = pixelPairStepSeedsA.clone(seedingHitSets = 'pixelPairStepHitDoubletsB')
202 
203 
204 # Merge
205 from RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi import globalCombinedSeeds as _globalCombinedSeeds
206 _pixelPairStepSeedsMerged = _globalCombinedSeeds.clone(
207  seedCollections = ['pixelPairStepSeedsA', 'pixelPairStepSeedsB'],
208 )
209 (trackingPhase1 & ~fastSim).toReplaceWith(pixelPairStepSeeds, _pixelPairStepSeedsMerged)
210 
211 #only use region B for pp_on_XY era for timing reasons
212 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(pixelPairStepSeeds, pixelPairStepSeedsB)
213 
214 # QUALITY CUTS DURING TRACK BUILDING
216 _pixelPairStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
217  minimumNumberOfHits = 3,
218  minPt = 0.1,
219 )
220 pixelPairStepTrajectoryFilterBase = _pixelPairStepTrajectoryFilterBase.clone(
221  seedPairPenalty = 0,
222  maxCCCLostHits = 0,
223  minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
224 )
225 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
226 _tracker_apv_vfp30_2016.toModify(pixelPairStepTrajectoryFilterBase, maxCCCLostHits = 2)
227 trackingLowPU.toReplaceWith(pixelPairStepTrajectoryFilterBase, _pixelPairStepTrajectoryFilterBase)
228 trackingPhase1.toModify(pixelPairStepTrajectoryFilterBase, minimumNumberOfHits = 4)
229 trackingPhase2PU140.toReplaceWith(pixelPairStepTrajectoryFilterBase, _pixelPairStepTrajectoryFilterBase.clone(
230  minimumNumberOfHits = 4,
231  maxLostHitsFraction = 1./10.,
232  constantValueForLostHitsFractionFilter = 0.701,
233 ))
234 highBetaStar.toModify(pixelPairStepTrajectoryFilterBase, minPt = 0.05)
235 
236 import RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
237 pixelPairStepTrajectoryFilterShape = RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
238 pixelPairStepTrajectoryFilter = cms.PSet(
239  ComponentType = cms.string('CompositeTrajectoryFilter'),
240  filters = cms.VPSet(
241  cms.PSet( refToPSet_ = cms.string('pixelPairStepTrajectoryFilterBase')),
242  # cms.PSet( refToPSet_ = cms.string('pixelPairStepTrajectoryFilterShape'))
243  ),
244 )
246 trackingPhase2PU140.toModify(pixelPairStepTrajectoryFilter,
247  filters = pixelPairStepTrajectoryFilter.filters + [cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
248 )
249 
250 
251 
252 pixelPairStepTrajectoryFilterInOut = pixelPairStepTrajectoryFilterBase.clone(
253  minimumNumberOfHits = 4,
254  seedExtension = 1,
255  strictSeedExtension = False, # allow inactive
256  pixelSeedExtension = False,
257 )
258 
259 
260 
261 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
262 pixelPairStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
263  ComponentName = 'pixelPairStepChi2Est',
264  nSigma = 3.0,
265  MaxChi2 = 9.0,
266  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutLoose'),
267  pTChargeCutThreshold = 15.
268 )
269 _tracker_apv_vfp30_2016.toModify(pixelPairStepChi2Est,
270  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
271 )
272 trackingLowPU.toModify(pixelPairStepChi2Est,
273  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny'),
274 )
275 highBetaStar.toModify(pixelPairStepChi2Est, MaxChi2 = 30)
276 
277 # TRACK BUILDING
279 pixelPairStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
280  trajectoryFilter = dict(refToPSet_ = 'pixelPairStepTrajectoryFilter'),
281  maxCand = 3,
282  estimator = 'pixelPairStepChi2Est',
283  maxDPhiForLooperReconstruction = 2.0,
284  maxPtForLooperReconstruction = 0.7,
285 )
286 trackingNoLoopers.toModify(pixelPairStepTrajectoryBuilder,
287  maxPtForLooperReconstruction = 0.0)
288 trackingLowPU.toModify(pixelPairStepTrajectoryBuilder, maxCand = 2)
289 _seedExtension = dict(
290  inOutTrajectoryFilter = dict(refToPSet_ = 'pixelPairStepTrajectoryFilterInOut'),
291  useSameTrajFilter = False,
292 )
293 trackingPhase1.toModify(pixelPairStepTrajectoryBuilder, **_seedExtension)
294 trackingPhase2PU140.toModify(pixelPairStepTrajectoryBuilder, **_seedExtension)
295 
296 
297 
298 
299 # MAKING OF TRACK CANDIDATES
301 # Give handle for CKF for HI
302 _pixelPairStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
303  src = 'pixelPairStepSeeds',
304  clustersToSkip = 'pixelPairStepClusters',
305  TrajectoryBuilderPSet = dict(refToPSet_ = 'pixelPairStepTrajectoryBuilder'),
306 
307  numHitsForSeedCleaner = 50,
308  onlyPixelHitsForSeedCleaner = True,
309 )
310 pixelPairStepTrackCandidates = _pixelPairStepTrackCandidatesCkf.clone()
311 
312 from Configuration.ProcessModifiers.trackingMkFitPixelPairStep_cff import trackingMkFitPixelPairStep
313 import RecoTracker.MkFit.mkFitSeedConverter_cfi as _mkFitSeedConverter_cfi
314 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as _mkFitIterationConfigESProducer_cfi
315 import RecoTracker.MkFit.mkFitProducer_cfi as _mkFitProducer_cfi
316 import RecoTracker.MkFit.mkFitOutputConverter_cfi as _mkFitOutputConverter_cfi
317 pixelPairStepTrackCandidatesMkFitSeeds = _mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
318  seeds = 'pixelPairStepSeeds',
319 )
320 pixelPairStepTrackCandidatesMkFitConfig = _mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
321  ComponentName = 'pixelPairStepTrackCandidatesMkFitConfig',
322  config = 'RecoTracker/MkFit/data/mkfit-phase1-pixelPairStep.json',
323 )
324 pixelPairStepTrackCandidatesMkFit = _mkFitProducer_cfi.mkFitProducer.clone(
325  seeds = 'pixelPairStepTrackCandidatesMkFitSeeds',
326  config = ('', 'pixelPairStepTrackCandidatesMkFitConfig'),
327  clustersToSkip = 'pixelPairStepClusters',
328 )
329 trackingMkFitPixelPairStep.toReplaceWith(pixelPairStepTrackCandidates, _mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
330  seeds = 'pixelPairStepSeeds',
331  mkFitSeeds = 'pixelPairStepTrackCandidatesMkFitSeeds',
332  tracks = 'pixelPairStepTrackCandidatesMkFit',
333 ))
334 
335 trackingPhase2PU140.toModify(pixelPairStepTrackCandidates,
336  clustersToSkip = '',
337  phase2clustersToSkip = 'pixelPairStepClusters',
338  TrajectoryCleaner = 'pixelPairStepTrajectoryCleanerBySharedHits'
339 )
340 import FastSimulation.Tracking.TrackCandidateProducer_cfi
341 fastSim.toReplaceWith(pixelPairStepTrackCandidates,
342  FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
343  src = 'pixelPairStepSeeds',
344  MinNumberOfCrossedLayers = 2, # ?
345  hitMasks = cms.InputTag('pixelPairStepMasks')
346  )
347 )
348 
349 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits as _trajectoryCleanerBySharedHits
350 pixelPairStepTrajectoryCleanerBySharedHits = _trajectoryCleanerBySharedHits.clone(
351  ComponentName = 'pixelPairStepTrajectoryCleanerBySharedHits',
352  fractionShared = 0.095,
353  allowSharedFirstHit = True
354 )
355 trackingPhase2PU140.toModify(pixelPairStepTrajectoryCleanerBySharedHits, fractionShared = 0.09)
356 
357 # TRACK FITTING
358 import RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi
359 pixelPairStepTracks = RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi.TrackProducerIterativeDefault.clone(
360  AlgorithmName = 'pixelPairStep',
361  src = 'pixelPairStepTrackCandidates',
362  Fitter = 'FlexibleKFFittingSmoother'
363 )
364 fastSim.toModify(pixelPairStepTracks, TTRHBuilder = 'WithoutRefit')
365 
366 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
367 phase2_timing_layer.toModify(pixelPairStepTracks, TrajectoryInEvent = True)
368 
369 # Final selection
371 pixelPairStep = TrackMVAClassifierPrompt.clone(
372  src = 'pixelPairStepTracks',
373  mva = dict(GBRForestLabel = 'MVASelectorIter2_13TeV'),
374  qualityCuts = [-0.2,0.0,0.3]
375 )
376 trackingPhase1.toModify(pixelPairStep, mva=dict(GBRForestLabel = 'MVASelectorPixelPairStep_Phase1'))
377 
381 trackdnn.toReplaceWith(pixelPairStep, trackTfClassifier.clone(
382  src='pixelPairStepTracks',
383  qualityCuts=qualityCutDictionary.PixelPairStep.value()
384 ))
385 
386 highBetaStar.toModify(pixelPairStep,qualityCuts = [-0.95,0.0,0.3])
387 pp_on_AA.toModify(pixelPairStep, qualityCuts = [0.85, 0.95, 0.98])
388 fastSim.toModify(pixelPairStep, vertices = 'firstStepPrimaryVerticesBeforeMixing')
389 
390 # For LowPU and Phase2PU140
392 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
393 pixelPairStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
394  src = 'pixelPairStepTracks',
395  useAnyMVA = cms.bool(True),
396  GBRForestLabel = cms.string('MVASelectorIter2'),
397  trackSelectors = cms.VPSet(
398  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
399  name = 'pixelPairStepLoose',
400  ), #end of pset
401  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
402  name = 'pixelPairStepTight',
403  preFilterName = 'pixelPairStepLoose',
404  ),
405  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
406  name = 'QualityMasks',
407  preFilterName = 'pixelPairStepTight',
408  ),
409  ),
410  vertices = 'pixelVertices' #end of vpset
411 ) #end of clone
412 trackingPhase2PU140.toModify(pixelPairStepSelector,
413  useAnyMVA = None,
414  GBRForestLabel = None,
415  trackSelectors = cms.VPSet(
416  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
417  name = 'pixelPairStepLoose',
418  chi2n_par = 0.7,
419  res_par = ( 0.003, 0.002 ),
420  minNumberLayers = 3,
421  maxNumberLostLayers = 2,
422  minNumber3DLayers = 3,
423  d0_par1 = ( 0.4, 4.0 ),
424  dz_par1 = ( 0.4, 4.0 ),
425  d0_par2 = ( 0.6, 4.0 ),
426  dz_par2 = ( 0.45, 4.0 )
427  ), #end of pset
428  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
429  name = 'pixelPairStepTight',
430  preFilterName = 'pixelPairStepLoose',
431  chi2n_par = 0.6,
432  res_par = ( 0.003, 0.002 ),
433  minNumberLayers = 4,
434  maxNumberLostLayers = 2,
435  minNumber3DLayers = 3,
436  d0_par1 = ( 0.35, 4.0 ),
437  dz_par1 = ( 0.35, 4.0 ),
438  d0_par2 = ( 0.5, 4.0 ),
439  dz_par2 = ( 0.4, 4.0 )
440  ),
441  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
442  name = 'pixelPairStep',
443  preFilterName = 'pixelPairStepTight',
444 # min_eta = -4.0, # useless, the eta distribution does not even reach |eta| = 3 (!)
445 # max_eta = 4.0,
446  chi2n_par = 0.5,
447  res_par = ( 0.003, 0.001 ),
448  minNumberLayers = 5,
449  maxNumberLostLayers = 2,
450  minNumber3DLayers = 4,
451  d0_par1 = ( 0.3, 4.0 ),
452  dz_par1 = ( 0.3, 4.0 ),
453  d0_par2 = ( 0.45, 4.0 ),
454  dz_par2 = ( 0.35, 4.0 )
455  ),
456  ), #end of vpset
457  vertices = 'firstStepPrimaryVertices'
458 ) #end of clone
459 
460 from Configuration.ProcessModifiers.vectorHits_cff import vectorHits
461 vectorHits.toModify(pixelPairStepSelector.trackSelectors[2], minNumberLayers = 3, minNumber3DLayers = 3)
462 
463 # Final sequence
464 PixelPairStepTask = cms.Task(pixelPairStepClusters,
465  pixelPairStepSeedLayers,
466  pixelPairStepTrackingRegions,
467  pixelPairStepHitDoublets,
468  pixelPairStepSeeds,
469  pixelPairStepTrackCandidates,
470  pixelPairStepTracks,
471  pixelPairStep)
472 PixelPairStep = cms.Sequence(PixelPairStepTask)
473 
474 _PixelPairStepTask_trackingMkFit = PixelPairStepTask.copy()
475 _PixelPairStepTask_trackingMkFit.add(pixelPairStepTrackCandidatesMkFitSeeds, pixelPairStepTrackCandidatesMkFit, pixelPairStepTrackCandidatesMkFit)
476 trackingMkFitPixelPairStep.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_trackingMkFit)
477 
478 _PixelPairStepTask_LowPU_Phase2PU140 = PixelPairStepTask.copy()
479 _PixelPairStepTask_LowPU_Phase2PU140.replace(pixelPairStep, pixelPairStepSelector)
480 trackingLowPU.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_LowPU_Phase2PU140)
481 trackingPhase2PU140.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_LowPU_Phase2PU140)
482 
483 _PixelPairStepTask_Phase1 = PixelPairStepTask.copy()
484 _PixelPairStepTask_pp_on_AA = PixelPairStepTask.copy()
485 _PixelPairStepTask_Phase1.replace(pixelPairStepSeeds,cms.Task(
486  pixelPairStepSeedsA ,
487  pixelPairStepTrackingRegionsSeedLayersB,pixelPairStepHitDoubletsB,pixelPairStepSeedsB,
488  pixelPairStepSeeds))
489 trackingPhase1.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_Phase1)
490 
491 _PixelPairStepTask_pp_on_AA.replace(pixelPairStepHitDoublets, cms.Task(pixelPairStepTrackingRegionsSeedLayersB,pixelPairStepHitDoubletsB))
492 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(PixelPairStepTask, _PixelPairStepTask_pp_on_AA)
493 
494 #fastSim
495 import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
496 pixelPairStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(pixelPairStepClusters)
497 fastSim.toReplaceWith(PixelPairStepTask,
498  cms.Task(pixelPairStepMasks
499  ,pixelPairStepTrackingRegions
500  ,pixelPairStepSeeds
501  ,pixelPairStepTrackCandidates
502  ,pixelPairStepTracks
503  ,pixelPairStep
504  )
505 )