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_cff import highBetaStar
79 highBetaStar.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.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.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.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.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.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 & trackingPhase1).toModify(mixedTripletStep,qualityCuts = [-0.7,0.0,0.5])
392 (highBetaStar & ~trackingPhase1).toModify(mixedTripletStepClassifier1,qualityCuts = [-0.7,0.0,0.5])
393 pp_on_AA.toModify(mixedTripletStep, qualityCuts = [-0.5,0.0,0.9])
394 
395 # For LowPU
396 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
397 mixedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
398  src = 'mixedTripletStepTracks',
399  useAnyMVA = cms.bool(False),
400  GBRForestLabel = cms.string('MVASelectorIter4'),
401  trackSelectors = [
402  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
403  name = 'mixedTripletStepVtxLoose',
404  chi2n_par = 1.2,
405  res_par = ( 0.003, 0.001 ),
406  minNumberLayers = 3,
407  maxNumberLostLayers = 1,
408  minNumber3DLayers = 2,
409  d0_par1 = ( 1.2, 3.0 ),
410  dz_par1 = ( 1.2, 3.0 ),
411  d0_par2 = ( 1.3, 3.0 ),
412  dz_par2 = ( 1.3, 3.0 )
413  ),
414  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
415  name = 'mixedTripletStepTrkLoose',
416  chi2n_par = 0.6,
417  res_par = ( 0.003, 0.001 ),
418  minNumberLayers = 4,
419  maxNumberLostLayers = 1,
420  minNumber3DLayers = 3,
421  d0_par1 = ( 1.2, 4.0 ),
422  dz_par1 = ( 1.2, 4.0 ),
423  d0_par2 = ( 1.2, 4.0 ),
424  dz_par2 = ( 1.2, 4.0 )
425  ),
426  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
427  name = 'mixedTripletStepVtxTight',
428  preFilterName = 'mixedTripletStepVtxLoose',
429  chi2n_par = 0.6,
430  res_par = ( 0.003, 0.001 ),
431  minNumberLayers = 3,
432  maxNumberLostLayers = 1,
433  minNumber3DLayers = 3,
434  d0_par1 = ( 1.1, 3.0 ),
435  dz_par1 = ( 1.1, 3.0 ),
436  d0_par2 = ( 1.2, 3.0 ),
437  dz_par2 = ( 1.2, 3.0 )
438  ),
439  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
440  name = 'mixedTripletStepTrkTight',
441  preFilterName = 'mixedTripletStepTrkLoose',
442  chi2n_par = 0.4,
443  res_par = ( 0.003, 0.001 ),
444  minNumberLayers = 5,
445  maxNumberLostLayers = 1,
446  minNumber3DLayers = 4,
447  d0_par1 = ( 1.1, 4.0 ),
448  dz_par1 = ( 1.1, 4.0 ),
449  d0_par2 = ( 1.1, 4.0 ),
450  dz_par2 = ( 1.1, 4.0 )
451  ),
452  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
453  name = 'mixedTripletStepVtx',
454  preFilterName = 'mixedTripletStepVtxTight',
455  chi2n_par = 0.4,
456  res_par = ( 0.003, 0.001 ),
457  minNumberLayers = 3,
458  maxNumberLostLayers = 1,
459  minNumber3DLayers = 3,
460  d0_par1 = ( 1.1, 3.0 ),
461  dz_par1 = ( 1.1, 3.0 ),
462  d0_par2 = ( 1.2, 3.0 ),
463  dz_par2 = ( 1.2, 3.0 )
464  ),
465  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
466  name = 'mixedTripletStepTrk',
467  preFilterName = 'mixedTripletStepTrkTight',
468  chi2n_par = 0.3,
469  res_par = ( 0.003, 0.001 ),
470  minNumberLayers = 5,
471  maxNumberLostLayers = 0,
472  minNumber3DLayers = 4,
473  d0_par1 = ( 0.9, 4.0 ),
474  dz_par1 = ( 0.9, 4.0 ),
475  d0_par2 = ( 0.9, 4.0 ),
476  dz_par2 = ( 0.9, 4.0 )
477  )
478  ] #end of vpset
479 ) #end of clone
480 
481 
482 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder
484 _trackListMergerBase = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
485  TrackProducers = ['mixedTripletStepTracks',
486  'mixedTripletStepTracks'],
487  hasSelector = [1,1],
488  selectedTrackQuals = ['mixedTripletStepSelector:mixedTripletStepVtx',
489  'mixedTripletStepSelector:mixedTripletStepTrk'],
490  setsToMerge = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )],
491  writeOnlyTrkQuals = True
492 )
493 trackingLowPU.toReplaceWith(mixedTripletStep, _trackListMergerBase)
494 
495 
496 
497 MixedTripletStepTask = cms.Task(chargeCut2069Clusters,mixedTripletStepClusters,
498  mixedTripletStepSeedLayersA,
499  mixedTripletStepTrackingRegionsA,
500  mixedTripletStepHitDoubletsA,
501  mixedTripletStepHitTripletsA,
502  mixedTripletStepSeedsA,
503  mixedTripletStepSeedLayersB,
504  mixedTripletStepTrackingRegionsB,
505  mixedTripletStepHitDoubletsB,
506  mixedTripletStepHitTripletsB,
507  mixedTripletStepSeedsB,
508  mixedTripletStepSeeds,
509  mixedTripletStepTrackCandidates,
510  mixedTripletStepTracks,
511  mixedTripletStepClassifier1,mixedTripletStepClassifier2,
512  mixedTripletStep)
513 MixedTripletStep = cms.Sequence(MixedTripletStepTask)
514 
515 _MixedTripletStepTask_trackingMkFit = MixedTripletStepTask.copy()
516 _MixedTripletStepTask_trackingMkFit.add(mixedTripletStepTrackCandidatesMkFitSeeds, mixedTripletStepTrackCandidatesMkFit, mixedTripletStepTrackCandidatesMkFitConfig)
517 trackingMkFitMixedTripletStep.toReplaceWith(MixedTripletStepTask, _MixedTripletStepTask_trackingMkFit)
518 
519 _MixedTripletStepTask_LowPU = MixedTripletStepTask.copyAndExclude([chargeCut2069Clusters, mixedTripletStepClassifier1])
520 _MixedTripletStepTask_LowPU.replace(mixedTripletStepClassifier2, mixedTripletStepSelector)
521 trackingLowPU.toReplaceWith(MixedTripletStepTask, _MixedTripletStepTask_LowPU)
522 
523 #fastsim
524 import FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
525 mixedTripletStepMasks = FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi.maskProducerFromClusterRemover(mixedTripletStepClusters)
526 mixedTripletStepMasks.oldHitRemovalInfo = cms.InputTag('pixelPairStepMasks')
527 
528 fastSim.toReplaceWith(MixedTripletStepTask,
529  cms.Task(mixedTripletStepMasks
530  ,mixedTripletStepTrackingRegionsA
531  ,mixedTripletStepSeedsA
532  ,mixedTripletStepTrackingRegionsB
533  ,mixedTripletStepSeedsB
534  ,mixedTripletStepSeeds
535  ,mixedTripletStepTrackCandidates
536  ,mixedTripletStepTracks
537  ,mixedTripletStepClassifier1,mixedTripletStepClassifier2
538  ,mixedTripletStep
539  )
540 )
def _hitSetProducerToFactoryPSet(producer)