CMS 3D CMS Logo

MixedTripletStep_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
3 
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 # for parabolic magnetic field
14 from Configuration.ProcessModifiers.trackingParabolicMf_cff import trackingParabolicMf
15 
16 
19 
20 #here just for backward compatibility
21 chargeCut2069Clusters = cms.EDProducer('ClusterChargeMasker',
22  oldClusterRemovalInfo = cms.InputTag(''), # to be set below
23  pixelClusters = cms.InputTag('siPixelClusters'),
24  stripClusters = cms.InputTag('siStripClusters'),
25  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
26 )
27 
28 mixedTripletStepClusters = _cfg.clusterRemoverForIter('MixedTripletStep')
29 chargeCut2069Clusters.oldClusterRemovalInfo = mixedTripletStepClusters.oldClusterRemovalInfo.value()
30 mixedTripletStepClusters.oldClusterRemovalInfo = 'chargeCut2069Clusters'
31 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
32  _era.toReplaceWith(mixedTripletStepClusters, _cfg.clusterRemoverForIter('MixedTripletStep', _eraName, _postfix))
33 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
34 trackingPhase1.toModify(chargeCut2069Clusters, oldClusterRemovalInfo = mixedTripletStepClusters.oldClusterRemovalInfo.value())
35 trackingPhase1.toModify(mixedTripletStepClusters, oldClusterRemovalInfo='chargeCut2069Clusters')
36 
37 # SEEDING LAYERS
39 from RecoTracker.IterativeTracking.DetachedTripletStep_cff import detachedTripletStepSeedLayers
41 mixedTripletStepSeedLayersA = _mod.seedingLayersEDProducer.clone(
42  layerList = ['BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg'],
43 # layerList = ['BPix1+BPix2+BPix3',
44 # 'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
45 # 'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
46 # 'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg'],
47  BPix = dict(
48  TTRHBuilder = cms.string('WithTrackAngle'),
49  HitProducer = cms.string('siPixelRecHits'),
50  skipClusters = cms.InputTag('mixedTripletStepClusters')
51  ),
52  FPix = dict(
53  TTRHBuilder = cms.string('WithTrackAngle'),
54  HitProducer = cms.string('siPixelRecHits'),
55  skipClusters = cms.InputTag('mixedTripletStepClusters')
56  ),
57  TEC = dict(
58  matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
59  useRingSlector = cms.bool(True),
60  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
61  minRing = cms.int32(1),
62  maxRing = cms.int32(1),
63  skipClusters = cms.InputTag('mixedTripletStepClusters')
64  )
65 )
66 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
67 trackingLowPU.toModify(mixedTripletStepSeedLayersA,
68  layerList = [
69  'BPix1+BPix2+BPix3',
70  'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
71  'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
72  'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
73  'FPix1_pos+FPix2_pos+TEC1_pos', 'FPix1_neg+FPix2_neg+TEC1_neg',
74  'FPix2_pos+TEC2_pos+TEC3_pos', 'FPix2_neg+TEC2_neg+TEC3_neg'
75  ],
76  TEC = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
77 )
78 from Configuration.Eras.Modifier_highBetaStar_2018_cff import highBetaStar_2018
79 highBetaStar_2018.toModify(mixedTripletStepSeedLayersA,
80  layerList = [
81  'BPix1+BPix2+BPix3',
82  'BPix1+FPix1_pos+FPix2_pos','BPix1+FPix1_neg+FPix2_neg',
83  'BPix2+FPix1_pos+FPix2_pos','BPix2+FPix1_neg+FPix2_neg',
84  'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
85  'BPix1+BPix2+FPix2_pos', 'BPix1+BPix2+FPix2_neg'
86  ]
87 )
88 
89 
90 # TrackingRegion
91 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi import globalTrackingRegionFromBeamSpotFixedZ as _globalTrackingRegionFromBeamSpotFixedZ
92 _mixedTripletStepTrackingRegionsCommon = _globalTrackingRegionFromBeamSpotFixedZ.clone(RegionPSet = dict(
93  ptMin = 0.4,
94  originHalfLength = 15.0,
95  originRadius = 1.5
96 ))
97 trackingLowPU.toModify(_mixedTripletStepTrackingRegionsCommon, RegionPSet = dict(originHalfLength = 10.0))
98 highBetaStar_2018.toModify(_mixedTripletStepTrackingRegionsCommon,RegionPSet = dict(
99  ptMin = 0.05,
100  originRadius = 0.2
101 ))
102 
103 mixedTripletStepTrackingRegionsA = _mixedTripletStepTrackingRegionsCommon.clone()
104 
105 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
106 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
107 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
108 _mixedTripletStepTrackingRegionsCommon_pp_on_HI = _globalTrackingRegionWithVertices.clone(
109  RegionPSet=dict(
110  fixedError = 3.75,
111  ptMin = 0.4,
112  originRadius = 1.5,
113  originRScaling4BigEvts = True,
114  ptMinScaling4BigEvts = True,
115  minOriginR = 0.,
116  maxPtMin = 0.7,
117  scalingStartNPix = 20000,
118  scalingEndNPix = 35000
119  )
120 )
121 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(mixedTripletStepTrackingRegionsA,_mixedTripletStepTrackingRegionsCommon_pp_on_HI)
122 
123 
124 # seeding
125 from RecoTracker.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer
126 mixedTripletStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone(
127  ComponentName = 'mixedTripletStepClusterShapeHitFilter',
128  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight')
129 )
130 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
131 mixedTripletStepHitDoubletsA = _hitPairEDProducer.clone(
132  seedingLayers = 'mixedTripletStepSeedLayersA',
133  trackingRegions = 'mixedTripletStepTrackingRegionsA',
134  maxElement = 50000000,
135  produceIntermediateHitDoublets = True,
136 )
137 from RecoTracker.PixelSeeding.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer
139 mixedTripletStepHitTripletsA = _pixelTripletLargeTipEDProducer.clone(
140  doublets = 'mixedTripletStepHitDoubletsA',
141  produceSeedingHitSets = True,
142 )
143 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
144 _mixedTripletStepSeedsACommon = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
145  seedingHitSets = 'mixedTripletStepHitTripletsA',
146  SeedComparitorPSet = dict(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
147  ComponentName = 'PixelClusterShapeSeedComparitor',
148  FilterAtHelixStage = cms.bool(False),
149  FilterPixelHits = cms.bool(True),
150  FilterStripHits = cms.bool(True),
151  ClusterShapeHitFilterName = cms.string('mixedTripletStepClusterShapeHitFilter'),
152  ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache')
153  ),
154 )
155 trackingLowPU.toModify(_mixedTripletStepSeedsACommon,
156  SeedComparitorPSet = dict(ClusterShapeHitFilterName = 'ClusterShapeHitFilter')
157 )
158 mixedTripletStepSeedsA = _mixedTripletStepSeedsACommon.clone()
159 
160 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
161 from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet
162 _fastSim_mixedTripletStepSeedsA = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
163  trackingRegions = 'mixedTripletStepTrackingRegionsA',
164  hitMasks = cms.InputTag('mixedTripletStepMasks'),
165  seedFinderSelector = dict(pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(mixedTripletStepHitTripletsA),
166  layerList = mixedTripletStepSeedLayersA.layerList.value())
167 )
168 fastSim.toReplaceWith(mixedTripletStepSeedsA,_fastSim_mixedTripletStepSeedsA)
169 
170 # SEEDING LAYERS
171 mixedTripletStepSeedLayersB = _mod.seedingLayersEDProducer.clone(
172  layerList = ['BPix2+BPix3+TIB1'],
173  BPix = dict(
174  TTRHBuilder = cms.string('WithTrackAngle'),
175  HitProducer = cms.string('siPixelRecHits'),
176  skipClusters = cms.InputTag('mixedTripletStepClusters')
177  ),
178  TIB = dict(
179  matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
180  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
181  skipClusters = cms.InputTag('mixedTripletStepClusters')
182  )
183 )
184 trackingLowPU.toModify(mixedTripletStepSeedLayersB,
185  layerList = ['BPix2+BPix3+TIB1', 'BPix2+BPix3+TIB2'],
186  TIB = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
187 )
188 trackingPhase1.toModify(mixedTripletStepSeedLayersB, layerList = ['BPix3+BPix4+TIB1'])
189 
190 # TrackingRegion
191 mixedTripletStepTrackingRegionsB = _mixedTripletStepTrackingRegionsCommon.clone(RegionPSet = dict(ptMin=0.6, originHalfLength=10.0))
192 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(mixedTripletStepTrackingRegionsB,
193  _mixedTripletStepTrackingRegionsCommon_pp_on_HI.clone(RegionPSet=dict(
194  fixedError = 2.5,
195  ptMin = 0.6,)
196  )
197 )
198 highBetaStar_2018.toReplaceWith(mixedTripletStepTrackingRegionsB, _mixedTripletStepTrackingRegionsCommon.clone())
199 
200 # seeding
201 mixedTripletStepHitDoubletsB = mixedTripletStepHitDoubletsA.clone(
202  seedingLayers = 'mixedTripletStepSeedLayersB',
203  trackingRegions = 'mixedTripletStepTrackingRegionsB',
204 )
205 mixedTripletStepHitTripletsB = mixedTripletStepHitTripletsA.clone(doublets = 'mixedTripletStepHitDoubletsB')
206 mixedTripletStepSeedsB = _mixedTripletStepSeedsACommon.clone(seedingHitSets = 'mixedTripletStepHitTripletsB')
207 #fastsim
208 _fastSim_mixedTripletStepSeedsB = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
209  trackingRegions = 'mixedTripletStepTrackingRegionsB',
210  hitMasks = cms.InputTag('mixedTripletStepMasks'),
211  seedFinderSelector = dict(pixelTripletGeneratorFactory = _hitSetProducerToFactoryPSet(mixedTripletStepHitTripletsB),
212  layerList = mixedTripletStepSeedLayersB.layerList.value())
213 )
214 fastSim.toReplaceWith(mixedTripletStepSeedsB,_fastSim_mixedTripletStepSeedsB)
215 
216 
218 mixedTripletStepSeeds = RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi.globalCombinedSeeds.clone(
219  seedCollections = ['mixedTripletStepSeedsA',
220  'mixedTripletStepSeedsB']
221 )
222 # QUALITY CUTS DURING TRACK BUILDING
224 _mixedTripletStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
225 # maxLostHits = 0,
226  minimumNumberOfHits = 3,
227  minPt = 0.1
228 )
229 highBetaStar_2018.toModify(_mixedTripletStepTrajectoryFilterBase,minPt = 0.05)
230 
231 mixedTripletStepTrajectoryFilter = _mixedTripletStepTrajectoryFilterBase.clone(
232  constantValueForLostHitsFractionFilter = 1.4,
233 )
234 trackingLowPU.toReplaceWith(mixedTripletStepTrajectoryFilter, _mixedTripletStepTrajectoryFilterBase.clone(
235  maxLostHits = 0,
236 ))
237 
238 (pp_on_XeXe_2017 | pp_on_AA).toModify(mixedTripletStepTrajectoryFilter, minPt=0.4)
239 
240 # Propagator taking into account momentum uncertainty in multiple scattering calculation.
243 mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagator_cfi.MaterialPropagator.clone(
244 #mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.MaterialPropagatorParabolicMF.clone(
245  ComponentName = 'mixedTripletStepPropagator',
246  ptMin = 0.1
247 )
248 trackingParabolicMf.toModify(mixedTripletStepPropagator, SimpleMagneticField = 'ParabolicMf')
249 for e in [pp_on_XeXe_2017, pp_on_AA]:
250  e.toModify(mixedTripletStepPropagator, ptMin=0.4)
251 highBetaStar_2018.toModify(mixedTripletStepPropagator,ptMin = 0.05)
252 
254 mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.OppositeMaterialPropagator_cfi.OppositeMaterialPropagator.clone(
255 #mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.OppositeMaterialPropagatorParabolicMF.clone(
256  ComponentName = 'mixedTripletStepPropagatorOpposite',
257  ptMin = 0.1
258 )
259 trackingParabolicMf.toModify(mixedTripletStepPropagatorOpposite, SimpleMagneticField = 'ParabolicMf')
260 for e in [pp_on_XeXe_2017, pp_on_AA]:
261  e.toModify(mixedTripletStepPropagatorOpposite, ptMin=0.4)
262 highBetaStar_2018.toModify(mixedTripletStepPropagatorOpposite,ptMin = 0.05)
263 
264 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
265 mixedTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
266  ComponentName = 'mixedTripletStepChi2Est',
267  nSigma = 3.0,
268  MaxChi2 = 16.0,
269  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
270 )
271 trackingLowPU.toModify(mixedTripletStepChi2Est,
272  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
273 )
274 
275 # TRACK BUILDING
277 mixedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
278  trajectoryFilter = dict(refToPSet_ = 'mixedTripletStepTrajectoryFilter'),
279  propagatorAlong = 'mixedTripletStepPropagator',
280  propagatorOpposite = 'mixedTripletStepPropagatorOpposite',
281  maxCand = 2,
282  estimator = 'mixedTripletStepChi2Est',
283  maxDPhiForLooperReconstruction = 2.0,
284  maxPtForLooperReconstruction = 0.7,
285 )
286 trackingNoLoopers.toModify(mixedTripletStepTrajectoryBuilder,
287  maxPtForLooperReconstruction = 0.0)
288 # MAKING OF TRACK CANDIDATES
290 # Give handle for CKF for HI
291 _mixedTripletStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
292  src = 'mixedTripletStepSeeds',
293  clustersToSkip = 'mixedTripletStepClusters',
294 
295  numHitsForSeedCleaner = 50,
296  #onlyPixelHitsForSeedCleaner = True,
297  TrajectoryBuilderPSet = dict(refToPSet_ = 'mixedTripletStepTrajectoryBuilder'),
298  doSeedingRegionRebuilding = True,
299  useHitsSplitting = True,
300  TrajectoryCleaner = 'mixedTripletStepTrajectoryCleanerBySharedHits',
301 )
302 mixedTripletStepTrackCandidates = _mixedTripletStepTrackCandidatesCkf.clone()
303 
304 from Configuration.ProcessModifiers.trackingMkFitMixedTripletStep_cff import trackingMkFitMixedTripletStep
305 import RecoTracker.MkFit.mkFitSeedConverter_cfi as mkFitSeedConverter_cfi
306 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as mkFitIterationConfigESProducer_cfi
307 import RecoTracker.MkFit.mkFitProducer_cfi as mkFitProducer_cfi
308 import RecoTracker.MkFit.mkFitOutputConverter_cfi as mkFitOutputConverter_cfi
309 mixedTripletStepTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
310  seeds = 'mixedTripletStepSeeds',
311 )
312 mixedTripletStepTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
313  ComponentName = 'mixedTripletStepTrackCandidatesMkFitConfig',
314  config = 'RecoTracker/MkFit/data/mkfit-phase1-mixedTripletStep.json',
315 )
316 mixedTripletStepTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
317  seeds = 'mixedTripletStepTrackCandidatesMkFitSeeds',
318  config = ('', 'mixedTripletStepTrackCandidatesMkFitConfig'),
319  clustersToSkip = 'mixedTripletStepClusters',
320 )
321 trackingMkFitMixedTripletStep.toReplaceWith(mixedTripletStepTrackCandidates, mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
322  seeds = 'mixedTripletStepSeeds',
323  mkFitSeeds = 'mixedTripletStepTrackCandidatesMkFitSeeds',
324  tracks = 'mixedTripletStepTrackCandidatesMkFit',
325 ))
326 (pp_on_XeXe_2017 | pp_on_AA).toModify(mixedTripletStepTrackCandidatesMkFitConfig, minPt=0.4)
327 
328 import FastSimulation.Tracking.TrackCandidateProducer_cfi
329 fastSim.toReplaceWith(mixedTripletStepTrackCandidates,
330  FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
331  src = 'mixedTripletStepSeeds',
332  MinNumberOfCrossedLayers = 3,
333  hitMasks = cms.InputTag('mixedTripletStepMasks'),
334  )
335 )
336 
337 
338 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
339 mixedTripletStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
340  ComponentName = 'mixedTripletStepTrajectoryCleanerBySharedHits',
341  fractionShared = 0.11,
342  allowSharedFirstHit = True
343 )
344 trackingLowPU.toModify(mixedTripletStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
345 
346 
347 # TRACK FITTING
348 import RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi
349 mixedTripletStepTracks = RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi.TrackProducerIterativeDefault.clone(
350  AlgorithmName = 'mixedTripletStep',
351  src = 'mixedTripletStepTrackCandidates',
352  Fitter = 'FlexibleKFFittingSmoother'
353 )
354 fastSim.toModify(mixedTripletStepTracks, TTRHBuilder = 'WithoutRefit')
355 
356 # TRACK SELECTION AND QUALITY FLAG SETTING.
359 mixedTripletStepClassifier1 = TrackMVAClassifierDetached.clone(
360  src = 'mixedTripletStepTracks',
361  mva = dict(GBRForestLabel = 'MVASelectorIter4_13TeV'),
362  qualityCuts = [-0.5,0.0,0.5]
363 )
364 fastSim.toModify(mixedTripletStepClassifier1, vertices = 'firstStepPrimaryVerticesBeforeMixing')
365 
366 mixedTripletStepClassifier2 = TrackMVAClassifierPrompt.clone(
367  src = 'mixedTripletStepTracks',
368  mva = dict(GBRForestLabel = 'MVASelectorIter0_13TeV'),
369  qualityCuts = [-0.2,-0.2,-0.2]
370 )
371 fastSim.toModify(mixedTripletStepClassifier2,vertices = 'firstStepPrimaryVerticesBeforeMixing')
372 
374 mixedTripletStep = ClassifierMerger.clone(
375  inputClassifiers=['mixedTripletStepClassifier1','mixedTripletStepClassifier2']
376 )
377 trackingPhase1.toReplaceWith(mixedTripletStep, mixedTripletStepClassifier1.clone(
378  mva = dict(GBRForestLabel = 'MVASelectorMixedTripletStep_Phase1'),
379  qualityCuts = [-0.5,0.0,0.5]
380 ))
381 
385 trackdnn.toReplaceWith(mixedTripletStep, trackTfClassifier.clone(
386  src = 'mixedTripletStepTracks',
387  qualityCuts = qualityCutDictionary.MixedTripletStep.value()
388 ))
389 (trackdnn & fastSim).toModify(mixedTripletStep,vertices = 'firstStepPrimaryVerticesBeforeMixing')
390 
391 highBetaStar_2018.toModify(mixedTripletStep,qualityCuts = [-0.7,0.0,0.5])
392 pp_on_AA.toModify(mixedTripletStep, qualityCuts = [-0.5,0.0,0.9])
393 
394 # For LowPU
395 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
396 mixedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
397  src = 'mixedTripletStepTracks',
398  useAnyMVA = cms.bool(False),
399  GBRForestLabel = cms.string('MVASelectorIter4'),
400  trackSelectors = [
401  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
402  name = 'mixedTripletStepVtxLoose',
403  chi2n_par = 1.2,
404  res_par = ( 0.003, 0.001 ),
405  minNumberLayers = 3,
406  maxNumberLostLayers = 1,
407  minNumber3DLayers = 2,
408  d0_par1 = ( 1.2, 3.0 ),
409  dz_par1 = ( 1.2, 3.0 ),
410  d0_par2 = ( 1.3, 3.0 ),
411  dz_par2 = ( 1.3, 3.0 )
412  ),
413  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
414  name = 'mixedTripletStepTrkLoose',
415  chi2n_par = 0.6,
416  res_par = ( 0.003, 0.001 ),
417  minNumberLayers = 4,
418  maxNumberLostLayers = 1,
419  minNumber3DLayers = 3,
420  d0_par1 = ( 1.2, 4.0 ),
421  dz_par1 = ( 1.2, 4.0 ),
422  d0_par2 = ( 1.2, 4.0 ),
423  dz_par2 = ( 1.2, 4.0 )
424  ),
425  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
426  name = 'mixedTripletStepVtxTight',
427  preFilterName = 'mixedTripletStepVtxLoose',
428  chi2n_par = 0.6,
429  res_par = ( 0.003, 0.001 ),
430  minNumberLayers = 3,
431  maxNumberLostLayers = 1,
432  minNumber3DLayers = 3,
433  d0_par1 = ( 1.1, 3.0 ),
434  dz_par1 = ( 1.1, 3.0 ),
435  d0_par2 = ( 1.2, 3.0 ),
436  dz_par2 = ( 1.2, 3.0 )
437  ),
438  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
439  name = 'mixedTripletStepTrkTight',
440  preFilterName = 'mixedTripletStepTrkLoose',
441  chi2n_par = 0.4,
442  res_par = ( 0.003, 0.001 ),
443  minNumberLayers = 5,
444  maxNumberLostLayers = 1,
445  minNumber3DLayers = 4,
446  d0_par1 = ( 1.1, 4.0 ),
447  dz_par1 = ( 1.1, 4.0 ),
448  d0_par2 = ( 1.1, 4.0 ),
449  dz_par2 = ( 1.1, 4.0 )
450  ),
451  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
452  name = 'mixedTripletStepVtx',
453  preFilterName = 'mixedTripletStepVtxTight',
454  chi2n_par = 0.4,
455  res_par = ( 0.003, 0.001 ),
456  minNumberLayers = 3,
457  maxNumberLostLayers = 1,
458  minNumber3DLayers = 3,
459  d0_par1 = ( 1.1, 3.0 ),
460  dz_par1 = ( 1.1, 3.0 ),
461  d0_par2 = ( 1.2, 3.0 ),
462  dz_par2 = ( 1.2, 3.0 )
463  ),
464  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
465  name = 'mixedTripletStepTrk',
466  preFilterName = 'mixedTripletStepTrkTight',
467  chi2n_par = 0.3,
468  res_par = ( 0.003, 0.001 ),
469  minNumberLayers = 5,
470  maxNumberLostLayers = 0,
471  minNumber3DLayers = 4,
472  d0_par1 = ( 0.9, 4.0 ),
473  dz_par1 = ( 0.9, 4.0 ),
474  d0_par2 = ( 0.9, 4.0 ),
475  dz_par2 = ( 0.9, 4.0 )
476  )
477  ] #end of vpset
478 ) #end of clone
479 
480 
481 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder
483 _trackListMergerBase = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
484  TrackProducers = ['mixedTripletStepTracks',
485  'mixedTripletStepTracks'],
486  hasSelector = [1,1],
487  selectedTrackQuals = ['mixedTripletStepSelector:mixedTripletStepVtx',
488  'mixedTripletStepSelector:mixedTripletStepTrk'],
489  setsToMerge = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )],
490  writeOnlyTrkQuals = True
491 )
492 trackingLowPU.toReplaceWith(mixedTripletStep, _trackListMergerBase)
493 
494 
495 
496 MixedTripletStepTask = cms.Task(chargeCut2069Clusters,mixedTripletStepClusters,
497  mixedTripletStepSeedLayersA,
498  mixedTripletStepTrackingRegionsA,
499  mixedTripletStepHitDoubletsA,
500  mixedTripletStepHitTripletsA,
501  mixedTripletStepSeedsA,
502  mixedTripletStepSeedLayersB,
503  mixedTripletStepTrackingRegionsB,
504  mixedTripletStepHitDoubletsB,
505  mixedTripletStepHitTripletsB,
506  mixedTripletStepSeedsB,
507  mixedTripletStepSeeds,
508  mixedTripletStepTrackCandidates,
509  mixedTripletStepTracks,
510  mixedTripletStepClassifier1,mixedTripletStepClassifier2,
511  mixedTripletStep)
512 MixedTripletStep = cms.Sequence(MixedTripletStepTask)
513 
514 _MixedTripletStepTask_trackingMkFit = MixedTripletStepTask.copy()
515 _MixedTripletStepTask_trackingMkFit.add(mixedTripletStepTrackCandidatesMkFitSeeds, mixedTripletStepTrackCandidatesMkFit, mixedTripletStepTrackCandidatesMkFitConfig)
516 trackingMkFitMixedTripletStep.toReplaceWith(MixedTripletStepTask, _MixedTripletStepTask_trackingMkFit)
517 
518 _MixedTripletStepTask_LowPU = MixedTripletStepTask.copyAndExclude([chargeCut2069Clusters, mixedTripletStepClassifier1])
519 _MixedTripletStepTask_LowPU.replace(mixedTripletStepClassifier2, mixedTripletStepSelector)
520 trackingLowPU.toReplaceWith(MixedTripletStepTask, _MixedTripletStepTask_LowPU)
521 
522 #fastsim
523 import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
524 mixedTripletStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(mixedTripletStepClusters)
525 mixedTripletStepMasks.oldHitRemovalInfo = cms.InputTag('pixelPairStepMasks')
526 
527 fastSim.toReplaceWith(MixedTripletStepTask,
528  cms.Task(mixedTripletStepMasks
529  ,mixedTripletStepTrackingRegionsA
530  ,mixedTripletStepSeedsA
531  ,mixedTripletStepTrackingRegionsB
532  ,mixedTripletStepSeedsB
533  ,mixedTripletStepSeeds
534  ,mixedTripletStepTrackCandidates
535  ,mixedTripletStepTracks
536  ,mixedTripletStepClassifier1,mixedTripletStepClassifier2
537  ,mixedTripletStep
538  )
539 )
def _hitSetProducerToFactoryPSet(producer)