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
6 from Configuration.Eras.Modifier_fastSim_cff
import fastSim
7 from FastSimulation.Tracking.SeedingMigration
import _hitSetProducerToFactoryPSet
10 from Configuration.ProcessModifiers.trackdnn_cff
import trackdnn
11 from RecoTracker.IterativeTracking.dnnQualityCuts
import qualityCutDictionary
14 from Configuration.ProcessModifiers.trackingNoLoopers_cff
import trackingNoLoopers
21 detachedTripletStepClusters = _cfg.clusterRemoverForIter(
'DetachedTripletStep')
22 for _eraName, _postfix, _era
in _cfg.nonDefaultEras():
23 _era.toReplaceWith(detachedTripletStepClusters, _cfg.clusterRemoverForIter(
'DetachedTripletStep', _eraName, _postfix))
27 detachedTripletStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
28 BPix = dict(skipClusters = cms.InputTag(
'detachedTripletStepClusters')),
29 FPix = dict(skipClusters = cms.InputTag(
'detachedTripletStepClusters'))
36 'BPix2+BPix3+FPix1_pos',
'BPix2+BPix3+FPix1_neg',
39 'BPix2+FPix1_pos+FPix2_pos',
'BPix2+FPix1_neg+FPix2_neg',
42 'FPix1_pos+FPix2_pos+FPix3_pos',
'FPix1_neg+FPix2_neg+FPix3_neg',
46 from Configuration.Eras.Modifier_trackingPhase1_cff
import trackingPhase1
47 trackingPhase1.toModify(detachedTripletStepSeedLayers, layerList=_phase1LayerList)
50 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi
import globalTrackingRegionFromBeamSpotFixedZ
as _globalTrackingRegionFromBeamSpotFixedZ
51 detachedTripletStepTrackingRegions = _globalTrackingRegionFromBeamSpotFixedZ.clone(RegionPSet = dict(
53 originHalfLength = 15.0,
56 trackingPhase1.toModify(detachedTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.25))
58 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff
import pp_on_XeXe_2017
59 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
61 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(detachedTripletStepTrackingRegions,
62 _globalTrackingRegionWithVertices.clone(RegionPSet=dict(
68 from Configuration.Eras.Modifier_highBetaStar_2018_cff
import highBetaStar_2018
69 highBetaStar_2018.toModify(detachedTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.05))
72 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi
import hitPairEDProducer
as _hitPairEDProducer
73 detachedTripletStepHitDoublets = _hitPairEDProducer.clone(
74 seedingLayers =
'detachedTripletStepSeedLayers',
75 trackingRegions =
'detachedTripletStepTrackingRegions',
76 maxElement = 50000000,
77 produceIntermediateHitDoublets =
True,
79 from RecoPixelVertexing.PixelTriplets.pixelTripletLargeTipEDProducer_cfi
import pixelTripletLargeTipEDProducer
as _pixelTripletLargeTipEDProducer
81 detachedTripletStepHitTriplets = _pixelTripletLargeTipEDProducer.clone(
82 doublets =
'detachedTripletStepHitDoublets',
83 produceSeedingHitSets =
True,
85 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff
import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
86 detachedTripletStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
87 seedingHitSets =
'detachedTripletStepHitTriplets',
88 SeedComparitorPSet = dict(
89 ComponentName =
'PixelClusterShapeSeedComparitor',
90 FilterAtHelixStage = cms.bool(
False),
91 FilterPixelHits = cms.bool(
True),
92 FilterStripHits = cms.bool(
False),
93 ClusterShapeHitFilterName = cms.string(
'ClusterShapeHitFilter'),
94 ClusterShapeCacheSrc = cms.InputTag(
'siPixelClusterShapeCache')
98 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi
import caHitTripletEDProducer
as _caHitTripletEDProducer
99 trackingPhase1.toModify(detachedTripletStepHitDoublets, layerPairs = [0,1])
100 trackingPhase1.toReplaceWith(detachedTripletStepHitTriplets, _caHitTripletEDProducer.clone(
101 doublets =
'detachedTripletStepHitDoublets',
102 extraHitRPhitolerance = detachedTripletStepHitTriplets.extraHitRPhitolerance,
105 value1 = 300, value2 = 10,
107 useBendingCorrection =
True,
112 highBetaStar_2018.toModify(detachedTripletStepHitTriplets,CAThetaCut = 0.002,CAPhiCut = 0.1,CAHardPtCut = 0)
114 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
115 _fastSim_detachedTripletStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
116 trackingRegions =
'detachedTripletStepTrackingRegions',
117 hitMasks = cms.InputTag(
'detachedTripletStepMasks'),
119 layerList = detachedTripletStepSeedLayers.layerList.value())
121 trackingPhase1.toModify(_fastSim_detachedTripletStepSeeds, seedFinderSelector = dict(
122 pixelTripletGeneratorFactory =
None,
126 TTRHBuilder =
'WithoutRefit',
127 HitProducer =
'TrackingRecHitProducer',
130 TTRHBuilder =
'WithoutRefit',
131 HitProducer =
'TrackingRecHitProducer',
133 layerPairs = detachedTripletStepHitDoublets.layerPairs.value()
136 fastSim.toReplaceWith(detachedTripletStepSeeds,_fastSim_detachedTripletStepSeeds)
140 _detachedTripletStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
143 minimumNumberOfHits = 3,
146 detachedTripletStepTrajectoryFilterBase = _detachedTripletStepTrajectoryFilterBase.clone(
148 minGoodStripCharge = cms.PSet(refToPSet_ = cms.string(
'SiStripClusterChargeCutLoose'))
150 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff
import tracker_apv_vfp30_2016
151 _tracker_apv_vfp30_2016.toModify(detachedTripletStepTrajectoryFilterBase, maxCCCLostHits = 2)
152 from Configuration.Eras.Modifier_trackingLowPU_cff
import trackingLowPU
153 trackingLowPU.toReplaceWith(detachedTripletStepTrajectoryFilterBase, _detachedTripletStepTrajectoryFilterBase.clone(
154 maxLostHitsFraction = 1./10.,
155 constantValueForLostHitsFractionFilter = 0.701,
158 (pp_on_XeXe_2017 | pp_on_AA).toModify(detachedTripletStepTrajectoryFilterBase, minPt=0.9)
160 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
161 detachedTripletStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
162 detachedTripletStepTrajectoryFilter = cms.PSet(
163 ComponentType = cms.string(
'CompositeTrajectoryFilter'),
165 cms.PSet( refToPSet_ = cms.string(
'detachedTripletStepTrajectoryFilterBase')),
171 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
172 detachedTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
173 ComponentName =
'detachedTripletStepChi2Est',
176 clusterChargeCut = cms.PSet(refToPSet_ = cms.string(
'SiStripClusterChargeCutTight')),
178 _tracker_apv_vfp30_2016.toModify(detachedTripletStepChi2Est,
179 clusterChargeCut = dict(refToPSet_ =
'SiStripClusterChargeCutTiny')
184 detachedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
185 trajectoryFilter = dict(refToPSet_ =
'detachedTripletStepTrajectoryFilter'),
187 alwaysUseInvalidHits =
True,
188 estimator =
'detachedTripletStepChi2Est',
189 maxDPhiForLooperReconstruction = 2.0,
190 maxPtForLooperReconstruction = 0.7,
192 trackingNoLoopers.toModify(detachedTripletStepTrajectoryBuilder,
193 maxPtForLooperReconstruction = 0.0)
194 trackingLowPU.toModify(detachedTripletStepTrajectoryBuilder,
196 alwaysUseInvalidHits =
False,
202 _detachedTripletStepTrackCandidatesCkf = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
203 src =
'detachedTripletStepSeeds',
204 clustersToSkip =
'detachedTripletStepClusters',
206 numHitsForSeedCleaner = 50,
207 onlyPixelHitsForSeedCleaner =
True,
208 TrajectoryBuilderPSet = dict(refToPSet_ =
'detachedTripletStepTrajectoryBuilder'),
209 doSeedingRegionRebuilding =
True,
210 useHitsSplitting =
True
212 detachedTripletStepTrackCandidates = _detachedTripletStepTrackCandidatesCkf.clone()
215 detachedTripletStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
216 ComponentName =
'detachedTripletStepTrajectoryCleanerBySharedHits',
217 fractionShared = 0.13,
218 allowSharedFirstHit =
True
220 detachedTripletStepTrackCandidates.TrajectoryCleaner =
'detachedTripletStepTrajectoryCleanerBySharedHits'
221 trackingLowPU.toModify(detachedTripletStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
224 import RecoTracker.MkFit.mkFitSeedConverter_cfi
as mkFitSeedConverter_cfi
225 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi
as mkFitIterationConfigESProducer_cfi
226 import RecoTracker.MkFit.mkFitProducer_cfi
as mkFitProducer_cfi
227 import RecoTracker.MkFit.mkFitOutputConverter_cfi
as mkFitOutputConverter_cfi
228 detachedTripletStepTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
229 seeds =
'detachedTripletStepSeeds',
231 detachedTripletStepTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
232 ComponentName =
'detachedTripletStepTrackCandidatesMkFitConfig',
233 config =
'RecoTracker/MkFit/data/mkfit-phase1-detachedTripletStep.json',
235 detachedTripletStepTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
236 seeds =
'detachedTripletStepTrackCandidatesMkFitSeeds',
237 config = (
'',
'detachedTripletStepTrackCandidatesMkFitConfig'),
238 clustersToSkip =
'detachedTripletStepClusters',
240 trackingMkFitDetachedTripletStep.toReplaceWith(detachedTripletStepTrackCandidates, mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
241 seeds =
'detachedTripletStepSeeds',
242 mkFitSeeds =
'detachedTripletStepTrackCandidatesMkFitSeeds',
243 tracks =
'detachedTripletStepTrackCandidatesMkFit',
246 import FastSimulation.Tracking.TrackCandidateProducer_cfi
247 _fastSim_detachedTripletStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
248 src =
'detachedTripletStepSeeds',
249 MinNumberOfCrossedLayers = 3,
250 hitMasks = cms.InputTag(
'detachedTripletStepMasks')
252 fastSim.toReplaceWith(detachedTripletStepTrackCandidates,_fastSim_detachedTripletStepTrackCandidates)
257 detachedTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
258 AlgorithmName =
'detachedTripletStep',
259 src =
'detachedTripletStepTrackCandidates',
260 Fitter =
'FlexibleKFFittingSmoother'
262 fastSim.toModify(detachedTripletStepTracks,TTRHBuilder =
'WithoutRefit')
269 detachedTripletStepClassifier1 = TrackMVAClassifierDetached.clone(
270 src =
'detachedTripletStepTracks',
271 mva = dict(GBRForestLabel =
'MVASelectorIter3_13TeV'),
272 qualityCuts = [-0.5,0.0,0.5]
274 fastSim.toModify(detachedTripletStepClassifier1,vertices =
'firstStepPrimaryVerticesBeforeMixing')
276 detachedTripletStepClassifier2 = TrackMVAClassifierPrompt.clone(
277 src =
'detachedTripletStepTracks',
278 mva = dict(GBRForestLabel =
'MVASelectorIter0_13TeV'),
279 qualityCuts = [-0.2,0.0,0.4]
281 fastSim.toModify(detachedTripletStepClassifier2,vertices =
'firstStepPrimaryVerticesBeforeMixing')
284 detachedTripletStep = ClassifierMerger.clone(
285 inputClassifiers=[
'detachedTripletStepClassifier1',
'detachedTripletStepClassifier2']
287 trackingPhase1.toReplaceWith(detachedTripletStep, detachedTripletStepClassifier1.clone(
288 mva = dict(GBRForestLabel =
'MVASelectorDetachedTripletStep_Phase1'),
289 qualityCuts = [-0.2,0.3,0.8]
295 trackdnn.toReplaceWith(detachedTripletStep, trackTfClassifier.clone(
296 src =
'detachedTripletStepTracks',
297 qualityCuts = qualityCutDictionary.DetachedTripletStep.value()
299 (trackdnn & fastSim).toModify(detachedTripletStep,vertices =
'firstStepPrimaryVerticesBeforeMixing')
301 highBetaStar_2018.toModify(detachedTripletStep,qualityCuts = [-0.5,0.0,0.5])
302 pp_on_AA.toModify(detachedTripletStep,
303 mva = dict(GBRForestLabel =
'HIMVASelectorDetachedTripletStep_Phase1'),
304 qualityCuts = [-0.2, 0.4, 0.85],
308 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
309 detachedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
310 src =
'detachedTripletStepTracks',
311 useAnyMVA = cms.bool(
False),
312 GBRForestLabel = cms.string(
'MVASelectorIter3'),
314 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
315 name =
'detachedTripletStepVtxLoose',
317 res_par = ( 0.003, 0.001 ),
319 d0_par1 = ( 1.2, 3.0 ),
320 dz_par1 = ( 1.2, 3.0 ),
321 d0_par2 = ( 1.3, 3.0 ),
322 dz_par2 = ( 1.3, 3.0 )
324 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
325 name =
'detachedTripletStepTrkLoose',
327 res_par = ( 0.003, 0.001 ),
329 d0_par1 = ( 1.6, 4.0 ),
330 dz_par1 = ( 1.6, 4.0 ),
331 d0_par2 = ( 1.6, 4.0 ),
332 dz_par2 = ( 1.6, 4.0 )
334 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
335 name =
'detachedTripletStepVtxTight',
336 preFilterName =
'detachedTripletStepVtxLoose',
338 res_par = ( 0.003, 0.001 ),
340 maxNumberLostLayers = 1,
341 minNumber3DLayers = 3,
342 d0_par1 = ( 0.95, 3.0 ),
343 dz_par1 = ( 0.9, 3.0 ),
344 d0_par2 = ( 1.0, 3.0 ),
345 dz_par2 = ( 1.0, 3.0 )
347 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
348 name =
'detachedTripletStepTrkTight',
349 preFilterName =
'detachedTripletStepTrkLoose',
351 res_par = ( 0.003, 0.001 ),
353 maxNumberLostLayers = 1,
354 minNumber3DLayers = 3,
355 d0_par1 = ( 1.1, 4.0 ),
356 dz_par1 = ( 1.1, 4.0 ),
357 d0_par2 = ( 1.1, 4.0 ),
358 dz_par2 = ( 1.1, 4.0 )
360 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
361 name =
'detachedTripletStepVtx',
362 preFilterName =
'detachedTripletStepVtxTight',
364 res_par = ( 0.003, 0.001 ),
366 maxNumberLostLayers = 1,
367 minNumber3DLayers = 3,
368 d0_par1 = ( 0.85, 3.0 ),
369 dz_par1 = ( 0.8, 3.0 ),
370 d0_par2 = ( 0.9, 3.0 ),
371 dz_par2 = ( 0.9, 3.0 )
373 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
374 name =
'detachedTripletStepTrk',
375 preFilterName =
'detachedTripletStepTrkTight',
377 res_par = ( 0.003, 0.001 ),
379 maxNumberLostLayers = 1,
380 minNumber3DLayers = 4,
381 d0_par1 = ( 1.0, 4.0 ),
382 dz_par1 = ( 1.0, 4.0 ),
383 d0_par2 = ( 1.0, 4.0 ),
384 dz_par2 = ( 1.0, 4.0 )
389 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi
import trackAlgoPriorityOrder
391 trackingLowPU.toReplaceWith(detachedTripletStep, RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
392 TrackProducers = [
'detachedTripletStepTracks',
393 'detachedTripletStepTracks'],
395 selectedTrackQuals = [
'detachedTripletStepSelector:detachedTripletStepVtx',
396 'detachedTripletStepSelector:detachedTripletStepTrk'],
397 setsToMerge = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(
True) )],
398 writeOnlyTrkQuals =
True
401 DetachedTripletStepTask = cms.Task(detachedTripletStepClusters,
402 detachedTripletStepSeedLayers,
403 detachedTripletStepTrackingRegions,
404 detachedTripletStepHitDoublets,
405 detachedTripletStepHitTriplets,
406 detachedTripletStepSeeds,
407 detachedTripletStepTrackCandidates,
408 detachedTripletStepTracks,
409 detachedTripletStepClassifier1,detachedTripletStepClassifier2,
411 DetachedTripletStep = cms.Sequence(DetachedTripletStepTask)
413 _DetachedTripletStepTask_trackingMkFit = DetachedTripletStepTask.copy()
414 _DetachedTripletStepTask_trackingMkFit.add(detachedTripletStepTrackCandidatesMkFitSeeds, detachedTripletStepTrackCandidatesMkFit, detachedTripletStepTrackCandidatesMkFitConfig)
415 trackingMkFitDetachedTripletStep.toReplaceWith(DetachedTripletStepTask, _DetachedTripletStepTask_trackingMkFit)
417 _DetachedTripletStepTask_LowPU = DetachedTripletStepTask.copyAndExclude([detachedTripletStepClassifier2])
418 _DetachedTripletStepTask_LowPU.replace(detachedTripletStepClassifier1, detachedTripletStepSelector)
419 trackingLowPU.toReplaceWith(DetachedTripletStepTask, _DetachedTripletStepTask_LowPU)
422 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
import maskProducerFromClusterRemover
424 fastSim.toReplaceWith(DetachedTripletStepTask,
425 cms.Task(detachedTripletStepMasks
426 ,detachedTripletStepTrackingRegions
427 ,detachedTripletStepSeeds
428 ,detachedTripletStepTrackCandidates
429 ,detachedTripletStepTracks
430 ,detachedTripletStepClassifier1,detachedTripletStepClassifier2
def maskProducerFromClusterRemover
def _hitSetProducerToFactoryPSet