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