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