CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 = cms.PSet(refToPSet_ = cms.string('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 RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
235 pixelPairStepTrajectoryFilterShape = RecoPixelVertexing.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 = cms.PSet(refToPSet_ = cms.string('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.GroupedCkfTrajectoryBuilder.clone(
278  MeasurementTrackerName = '',
279  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('pixelPairStepTrajectoryFilter')),
280  maxCand = 3,
281  estimator = 'pixelPairStepChi2Est',
282  maxDPhiForLooperReconstruction = cms.double(2.0),
283  maxPtForLooperReconstruction = cms.double(0.7)
284 )
285 trackingNoLoopers.toModify(pixelPairStepTrajectoryBuilder,
286  maxPtForLooperReconstruction = 0.0)
287 trackingLowPU.toModify(pixelPairStepTrajectoryBuilder, maxCand = 2)
288 _seedExtension = dict(
289  inOutTrajectoryFilter = dict(refToPSet_ = 'pixelPairStepTrajectoryFilterInOut'),
290  useSameTrajFilter = False,
291 )
292 trackingPhase1.toModify(pixelPairStepTrajectoryBuilder, **_seedExtension)
293 trackingPhase2PU140.toModify(pixelPairStepTrajectoryBuilder, **_seedExtension)
294 
295 
296 
297 
298 # MAKING OF TRACK CANDIDATES
300 # Give handle for CKF for HI
301 _pixelPairStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
302  src = 'pixelPairStepSeeds',
303  clustersToSkip = cms.InputTag('pixelPairStepClusters'),
304  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('pixelPairStepTrajectoryBuilder')),
305  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
306  numHitsForSeedCleaner = cms.int32(50),
307  onlyPixelHitsForSeedCleaner = cms.bool(True),
308 
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 = None,
337  phase2clustersToSkip = cms.InputTag('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
359 pixelPairStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
360  AlgorithmName = 'pixelPairStep',
361  src = 'pixelPairStepTrackCandidates',
362  Fitter = 'FlexibleKFFittingSmoother'
363 )
364 fastSim.toModify(pixelPairStepTracks, TTRHBuilder = 'WithoutRefit')
365 
366 # Final selection
368 pixelPairStep = TrackMVAClassifierPrompt.clone(
369  src = 'pixelPairStepTracks',
370  mva = dict(GBRForestLabel = 'MVASelectorIter2_13TeV'),
371  qualityCuts = [-0.2,0.0,0.3]
372 )
373 trackingPhase1.toModify(pixelPairStep, mva=dict(GBRForestLabel = 'MVASelectorPixelPairStep_Phase1'))
374 
378 trackdnn.toReplaceWith(pixelPairStep, trackTfClassifier.clone(
379  src='pixelPairStepTracks',
380  qualityCuts=qualityCutDictionary.PixelPairStep.value()
381 ))
382 
383 highBetaStar_2018.toModify(pixelPairStep,qualityCuts = [-0.95,0.0,0.3])
384 pp_on_AA.toModify(pixelPairStep, qualityCuts = [-0.2, 0.0, 0.98])
385 fastSim.toModify(pixelPairStep, vertices = 'firstStepPrimaryVerticesBeforeMixing')
386 
387 # For LowPU and Phase2PU140
389 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
390 pixelPairStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
391  src = 'pixelPairStepTracks',
392  useAnyMVA = cms.bool(True),
393  GBRForestLabel = cms.string('MVASelectorIter2'),
394  trackSelectors = cms.VPSet(
395  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
396  name = 'pixelPairStepLoose',
397  ), #end of pset
398  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
399  name = 'pixelPairStepTight',
400  preFilterName = 'pixelPairStepLoose',
401  ),
402  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
403  name = 'QualityMasks',
404  preFilterName = 'pixelPairStepTight',
405  ),
406  ),
407  vertices = 'pixelVertices' #end of vpset
408 ) #end of clone
409 trackingPhase2PU140.toModify(pixelPairStepSelector,
410  useAnyMVA = None,
411  GBRForestLabel = None,
412  trackSelectors = cms.VPSet(
413  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
414  name = 'pixelPairStepLoose',
415  chi2n_par = 0.7,
416  res_par = ( 0.003, 0.002 ),
417  minNumberLayers = 3,
418  maxNumberLostLayers = 2,
419  minNumber3DLayers = 3,
420  d0_par1 = ( 0.4, 4.0 ),
421  dz_par1 = ( 0.4, 4.0 ),
422  d0_par2 = ( 0.6, 4.0 ),
423  dz_par2 = ( 0.45, 4.0 )
424  ), #end of pset
425  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
426  name = 'pixelPairStepTight',
427  preFilterName = 'pixelPairStepLoose',
428  chi2n_par = 0.6,
429  res_par = ( 0.003, 0.002 ),
430  minNumberLayers = 4,
431  maxNumberLostLayers = 2,
432  minNumber3DLayers = 3,
433  d0_par1 = ( 0.35, 4.0 ),
434  dz_par1 = ( 0.35, 4.0 ),
435  d0_par2 = ( 0.5, 4.0 ),
436  dz_par2 = ( 0.4, 4.0 )
437  ),
438  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
439  name = 'pixelPairStep',
440  preFilterName = 'pixelPairStepTight',
441 # min_eta = -4.0, # useless, the eta distribution does not even reach |eta| = 3 (!)
442 # max_eta = 4.0,
443  chi2n_par = 0.5,
444  res_par = ( 0.003, 0.001 ),
445  minNumberLayers = 5,
446  maxNumberLostLayers = 2,
447  minNumber3DLayers = 4,
448  d0_par1 = ( 0.3, 4.0 ),
449  dz_par1 = ( 0.3, 4.0 ),
450  d0_par2 = ( 0.45, 4.0 ),
451  dz_par2 = ( 0.35, 4.0 )
452  ),
453  ), #end of vpset
454  vertices = 'firstStepPrimaryVertices'
455 ) #end of clone
456 
457 from Configuration.ProcessModifiers.vectorHits_cff import vectorHits
458 vectorHits.toModify(pixelPairStepSelector.trackSelectors[2], minNumberLayers = 3, minNumber3DLayers = 3)
459 
460 # Final sequence
461 PixelPairStepTask = cms.Task(pixelPairStepClusters,
462  pixelPairStepSeedLayers,
463  pixelPairStepTrackingRegions,
464  pixelPairStepHitDoublets,
465  pixelPairStepSeeds,
466  pixelPairStepTrackCandidates,
467  pixelPairStepTracks,
468  pixelPairStep)
469 PixelPairStep = cms.Sequence(PixelPairStepTask)
470 
471 _PixelPairStepTask_trackingMkFit = PixelPairStepTask.copy()
472 _PixelPairStepTask_trackingMkFit.add(pixelPairStepTrackCandidatesMkFitSeeds, pixelPairStepTrackCandidatesMkFit, pixelPairStepTrackCandidatesMkFit)
473 trackingMkFitPixelPairStep.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_trackingMkFit)
474 
475 _PixelPairStepTask_LowPU_Phase2PU140 = PixelPairStepTask.copy()
476 _PixelPairStepTask_LowPU_Phase2PU140.replace(pixelPairStep, pixelPairStepSelector)
477 trackingLowPU.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_LowPU_Phase2PU140)
478 trackingPhase2PU140.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_LowPU_Phase2PU140)
479 
480 _PixelPairStepTask_Phase1 = PixelPairStepTask.copy()
481 _PixelPairStepTask_pp_on_AA = PixelPairStepTask.copy()
482 _PixelPairStepTask_Phase1.replace(pixelPairStepSeeds,cms.Task(
483  pixelPairStepSeedsA ,
484  pixelPairStepTrackingRegionsSeedLayersB,pixelPairStepHitDoubletsB,pixelPairStepSeedsB,
485  pixelPairStepSeeds))
486 trackingPhase1.toReplaceWith(PixelPairStepTask, _PixelPairStepTask_Phase1)
487 
488 _PixelPairStepTask_pp_on_AA.replace(pixelPairStepHitDoublets, cms.Task(pixelPairStepTrackingRegionsSeedLayersB,pixelPairStepHitDoubletsB))
489 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(PixelPairStepTask, _PixelPairStepTask_pp_on_AA)
490 
491 #fastSim
492 import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
493 pixelPairStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(pixelPairStepClusters)
494 fastSim.toReplaceWith(PixelPairStepTask,
495  cms.Task(pixelPairStepMasks
496  ,pixelPairStepTrackingRegions
497  ,pixelPairStepSeeds
498  ,pixelPairStepTrackCandidates
499  ,pixelPairStepTracks
500  ,pixelPairStep
501  )
502 )