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
18 detachedTripletStepClusters = _cfg.clusterRemoverForIter(
'DetachedTripletStep')
19 for _eraName, _postfix, _era
in _cfg.nonDefaultEras():
20 _era.toReplaceWith(detachedTripletStepClusters, _cfg.clusterRemoverForIter(
'DetachedTripletStep', _eraName, _postfix))
24 detachedTripletStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
25 BPix = dict(skipClusters = cms.InputTag(
'detachedTripletStepClusters')),
26 FPix = dict(skipClusters = cms.InputTag(
'detachedTripletStepClusters'))
33 'BPix2+BPix3+FPix1_pos',
'BPix2+BPix3+FPix1_neg',
36 'BPix2+FPix1_pos+FPix2_pos',
'BPix2+FPix1_neg+FPix2_neg',
39 'FPix1_pos+FPix2_pos+FPix3_pos',
'FPix1_neg+FPix2_neg+FPix3_neg',
43 from Configuration.Eras.Modifier_trackingPhase1_cff
import trackingPhase1
44 trackingPhase1.toModify(detachedTripletStepSeedLayers, layerList=_phase1LayerList)
47 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi
import globalTrackingRegionFromBeamSpotFixedZ
as _globalTrackingRegionFromBeamSpotFixedZ
48 detachedTripletStepTrackingRegions = _globalTrackingRegionFromBeamSpotFixedZ.clone(RegionPSet = dict(
50 originHalfLength = 15.0,
53 trackingPhase1.toModify(detachedTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.25))
55 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff
import pp_on_XeXe_2017
56 from Configuration.ProcessModifiers.pp_on_AA_cff
import pp_on_AA
58 (pp_on_XeXe_2017 | pp_on_AA).toReplaceWith(detachedTripletStepTrackingRegions,
59 _globalTrackingRegionWithVertices.clone(RegionPSet=dict(
65 from Configuration.Eras.Modifier_highBetaStar_2018_cff
import highBetaStar_2018
66 highBetaStar_2018.toModify(detachedTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.05))
69 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi
import hitPairEDProducer
as _hitPairEDProducer
70 detachedTripletStepHitDoublets = _hitPairEDProducer.clone(
71 seedingLayers =
'detachedTripletStepSeedLayers',
72 trackingRegions =
'detachedTripletStepTrackingRegions',
73 maxElement = 50000000,
74 produceIntermediateHitDoublets =
True,
76 from RecoPixelVertexing.PixelTriplets.pixelTripletLargeTipEDProducer_cfi
import pixelTripletLargeTipEDProducer
as _pixelTripletLargeTipEDProducer
78 detachedTripletStepHitTriplets = _pixelTripletLargeTipEDProducer.clone(
79 doublets =
'detachedTripletStepHitDoublets',
80 produceSeedingHitSets =
True,
82 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff
import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
83 detachedTripletStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
84 seedingHitSets =
'detachedTripletStepHitTriplets',
85 SeedComparitorPSet = dict(
86 ComponentName =
'PixelClusterShapeSeedComparitor',
87 FilterAtHelixStage = cms.bool(
False),
88 FilterPixelHits = cms.bool(
True),
89 FilterStripHits = cms.bool(
False),
90 ClusterShapeHitFilterName = cms.string(
'ClusterShapeHitFilter'),
91 ClusterShapeCacheSrc = cms.InputTag(
'siPixelClusterShapeCache')
95 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi
import caHitTripletEDProducer
as _caHitTripletEDProducer
96 trackingPhase1.toModify(detachedTripletStepHitDoublets, layerPairs = [0,1])
97 trackingPhase1.toReplaceWith(detachedTripletStepHitTriplets, _caHitTripletEDProducer.clone(
98 doublets =
'detachedTripletStepHitDoublets',
99 extraHitRPhitolerance = detachedTripletStepHitTriplets.extraHitRPhitolerance,
102 value1 = 300, value2 = 10,
104 useBendingCorrection =
True,
109 highBetaStar_2018.toModify(detachedTripletStepHitTriplets,CAThetaCut = 0.002,CAPhiCut = 0.1,CAHardPtCut = 0)
111 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
112 _fastSim_detachedTripletStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
113 trackingRegions =
'detachedTripletStepTrackingRegions',
114 hitMasks = cms.InputTag(
'detachedTripletStepMasks'),
116 layerList = detachedTripletStepSeedLayers.layerList.value())
118 trackingPhase1.toModify(_fastSim_detachedTripletStepSeeds, seedFinderSelector = dict(
119 pixelTripletGeneratorFactory =
None,
123 TTRHBuilder =
'WithoutRefit',
124 HitProducer =
'TrackingRecHitProducer',
127 TTRHBuilder =
'WithoutRefit',
128 HitProducer =
'TrackingRecHitProducer',
130 layerPairs = detachedTripletStepHitDoublets.layerPairs.value()
133 fastSim.toReplaceWith(detachedTripletStepSeeds,_fastSim_detachedTripletStepSeeds)
137 _detachedTripletStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
140 minimumNumberOfHits = 3,
143 detachedTripletStepTrajectoryFilterBase = _detachedTripletStepTrajectoryFilterBase.clone(
145 minGoodStripCharge = cms.PSet(refToPSet_ = cms.string(
'SiStripClusterChargeCutLoose'))
147 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff
import tracker_apv_vfp30_2016
148 _tracker_apv_vfp30_2016.toModify(detachedTripletStepTrajectoryFilterBase, maxCCCLostHits = 2)
149 from Configuration.Eras.Modifier_trackingLowPU_cff
import trackingLowPU
150 trackingLowPU.toReplaceWith(detachedTripletStepTrajectoryFilterBase, _detachedTripletStepTrajectoryFilterBase.clone(
151 maxLostHitsFraction = 1./10.,
152 constantValueForLostHitsFractionFilter = 0.701,
155 (pp_on_XeXe_2017 | pp_on_AA).toModify(detachedTripletStepTrajectoryFilterBase, minPt=0.9)
157 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
158 detachedTripletStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
159 detachedTripletStepTrajectoryFilter = cms.PSet(
160 ComponentType = cms.string(
'CompositeTrajectoryFilter'),
162 cms.PSet( refToPSet_ = cms.string(
'detachedTripletStepTrajectoryFilterBase')),
168 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
169 detachedTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
170 ComponentName =
'detachedTripletStepChi2Est',
173 clusterChargeCut = cms.PSet(refToPSet_ = cms.string(
'SiStripClusterChargeCutTight')),
175 _tracker_apv_vfp30_2016.toModify(detachedTripletStepChi2Est,
176 clusterChargeCut = dict(refToPSet_ =
'SiStripClusterChargeCutTiny')
181 detachedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
182 MeasurementTrackerName =
'',
183 trajectoryFilter = cms.PSet(refToPSet_ = cms.string(
'detachedTripletStepTrajectoryFilter')),
185 alwaysUseInvalidHits =
True,
186 estimator =
'detachedTripletStepChi2Est',
187 maxDPhiForLooperReconstruction = cms.double(2.0),
188 maxPtForLooperReconstruction = cms.double(0.7)
190 trackingLowPU.toModify(detachedTripletStepTrajectoryBuilder,
192 alwaysUseInvalidHits =
False,
197 detachedTripletStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
198 src =
'detachedTripletStepSeeds',
199 clustersToSkip = cms.InputTag(
'detachedTripletStepClusters'),
201 numHitsForSeedCleaner = cms.int32(50),
202 onlyPixelHitsForSeedCleaner = cms.bool(
True),
203 TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string(
'detachedTripletStepTrajectoryBuilder')),
204 doSeedingRegionRebuilding =
True,
205 useHitsSplitting =
True
209 detachedTripletStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
210 ComponentName =
'detachedTripletStepTrajectoryCleanerBySharedHits',
211 fractionShared = 0.13,
212 allowSharedFirstHit =
True
214 detachedTripletStepTrackCandidates.TrajectoryCleaner =
'detachedTripletStepTrajectoryCleanerBySharedHits'
215 trackingLowPU.toModify(detachedTripletStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
217 import FastSimulation.Tracking.TrackCandidateProducer_cfi
218 _fastSim_detachedTripletStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
219 src =
'detachedTripletStepSeeds',
220 MinNumberOfCrossedLayers = 3,
221 hitMasks = cms.InputTag(
'detachedTripletStepMasks')
223 fastSim.toReplaceWith(detachedTripletStepTrackCandidates,_fastSim_detachedTripletStepTrackCandidates)
228 detachedTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
229 AlgorithmName =
'detachedTripletStep',
230 src =
'detachedTripletStepTrackCandidates',
231 Fitter =
'FlexibleKFFittingSmoother'
233 fastSim.toModify(detachedTripletStepTracks,TTRHBuilder =
'WithoutRefit')
240 detachedTripletStepClassifier1 = TrackMVAClassifierDetached.clone(
241 src =
'detachedTripletStepTracks',
242 mva = dict(GBRForestLabel =
'MVASelectorIter3_13TeV'),
243 qualityCuts = [-0.5,0.0,0.5]
245 fastSim.toModify(detachedTripletStepClassifier1,vertices =
'firstStepPrimaryVerticesBeforeMixing')
247 detachedTripletStepClassifier2 = TrackMVAClassifierPrompt.clone(
248 src =
'detachedTripletStepTracks',
249 mva = dict(GBRForestLabel =
'MVASelectorIter0_13TeV'),
250 qualityCuts = [-0.2,0.0,0.4]
252 fastSim.toModify(detachedTripletStepClassifier2,vertices =
'firstStepPrimaryVerticesBeforeMixing')
255 detachedTripletStep = ClassifierMerger.clone(
256 inputClassifiers=[
'detachedTripletStepClassifier1',
'detachedTripletStepClassifier2']
258 trackingPhase1.toReplaceWith(detachedTripletStep, detachedTripletStepClassifier1.clone(
259 mva = dict(GBRForestLabel =
'MVASelectorDetachedTripletStep_Phase1'),
260 qualityCuts = [-0.2,0.3,0.8]
265 trackdnn.toReplaceWith(detachedTripletStep, TrackTfClassifier.clone(
266 src =
'detachedTripletStepTracks',
267 qualityCuts = qualityCutDictionary[
'DetachedTripletStep'],
269 (trackdnn & fastSim).toModify(detachedTripletStep,vertices =
'firstStepPrimaryVerticesBeforeMixing')
271 highBetaStar_2018.toModify(detachedTripletStep,qualityCuts = [-0.5,0.0,0.5])
272 pp_on_AA.toModify(detachedTripletStep,
273 mva = dict(GBRForestLabel =
'HIMVASelectorDetachedTripletStep_Phase1'),
274 qualityCuts = [-0.2, 0.4, 0.85],
278 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
279 detachedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
280 src =
'detachedTripletStepTracks',
281 useAnyMVA = cms.bool(
False),
282 GBRForestLabel = cms.string(
'MVASelectorIter3'),
284 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
285 name =
'detachedTripletStepVtxLoose',
287 res_par = ( 0.003, 0.001 ),
289 d0_par1 = ( 1.2, 3.0 ),
290 dz_par1 = ( 1.2, 3.0 ),
291 d0_par2 = ( 1.3, 3.0 ),
292 dz_par2 = ( 1.3, 3.0 )
294 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
295 name =
'detachedTripletStepTrkLoose',
297 res_par = ( 0.003, 0.001 ),
299 d0_par1 = ( 1.6, 4.0 ),
300 dz_par1 = ( 1.6, 4.0 ),
301 d0_par2 = ( 1.6, 4.0 ),
302 dz_par2 = ( 1.6, 4.0 )
304 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
305 name =
'detachedTripletStepVtxTight',
306 preFilterName =
'detachedTripletStepVtxLoose',
308 res_par = ( 0.003, 0.001 ),
310 maxNumberLostLayers = 1,
311 minNumber3DLayers = 3,
312 d0_par1 = ( 0.95, 3.0 ),
313 dz_par1 = ( 0.9, 3.0 ),
314 d0_par2 = ( 1.0, 3.0 ),
315 dz_par2 = ( 1.0, 3.0 )
317 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
318 name =
'detachedTripletStepTrkTight',
319 preFilterName =
'detachedTripletStepTrkLoose',
321 res_par = ( 0.003, 0.001 ),
323 maxNumberLostLayers = 1,
324 minNumber3DLayers = 3,
325 d0_par1 = ( 1.1, 4.0 ),
326 dz_par1 = ( 1.1, 4.0 ),
327 d0_par2 = ( 1.1, 4.0 ),
328 dz_par2 = ( 1.1, 4.0 )
330 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
331 name =
'detachedTripletStepVtx',
332 preFilterName =
'detachedTripletStepVtxTight',
334 res_par = ( 0.003, 0.001 ),
336 maxNumberLostLayers = 1,
337 minNumber3DLayers = 3,
338 d0_par1 = ( 0.85, 3.0 ),
339 dz_par1 = ( 0.8, 3.0 ),
340 d0_par2 = ( 0.9, 3.0 ),
341 dz_par2 = ( 0.9, 3.0 )
343 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
344 name =
'detachedTripletStepTrk',
345 preFilterName =
'detachedTripletStepTrkTight',
347 res_par = ( 0.003, 0.001 ),
349 maxNumberLostLayers = 1,
350 minNumber3DLayers = 4,
351 d0_par1 = ( 1.0, 4.0 ),
352 dz_par1 = ( 1.0, 4.0 ),
353 d0_par2 = ( 1.0, 4.0 ),
354 dz_par2 = ( 1.0, 4.0 )
359 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi
import trackAlgoPriorityOrder
361 trackingLowPU.toReplaceWith(detachedTripletStep, RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
362 TrackProducers = [
'detachedTripletStepTracks',
363 'detachedTripletStepTracks'],
365 selectedTrackQuals = [
'detachedTripletStepSelector:detachedTripletStepVtx',
366 'detachedTripletStepSelector:detachedTripletStepTrk'],
367 setsToMerge = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(
True) )],
368 writeOnlyTrkQuals =
True
371 DetachedTripletStepTask = cms.Task(detachedTripletStepClusters,
372 detachedTripletStepSeedLayers,
373 detachedTripletStepTrackingRegions,
374 detachedTripletStepHitDoublets,
375 detachedTripletStepHitTriplets,
376 detachedTripletStepSeeds,
377 detachedTripletStepTrackCandidates,
378 detachedTripletStepTracks,
379 detachedTripletStepClassifier1,detachedTripletStepClassifier2,
381 DetachedTripletStep = cms.Sequence(DetachedTripletStepTask)
382 _DetachedTripletStepTask_LowPU = DetachedTripletStepTask.copyAndExclude([detachedTripletStepClassifier2])
383 _DetachedTripletStepTask_LowPU.replace(detachedTripletStepClassifier1, detachedTripletStepSelector)
384 trackingLowPU.toReplaceWith(DetachedTripletStepTask, _DetachedTripletStepTask_LowPU)
387 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
import maskProducerFromClusterRemover
389 fastSim.toReplaceWith(DetachedTripletStepTask,
390 cms.Task(detachedTripletStepMasks
391 ,detachedTripletStepTrackingRegions
392 ,detachedTripletStepSeeds
393 ,detachedTripletStepTrackCandidates
394 ,detachedTripletStepTracks
395 ,detachedTripletStepClassifier1,detachedTripletStepClassifier2