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)
218 import RecoTracker.MkFit.mkFitSeedConverter_cfi
as mkFitSeedConverter_cfi
219 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi
as mkFitIterationConfigESProducer_cfi
220 import RecoTracker.MkFit.mkFitProducer_cfi
as mkFitProducer_cfi
221 import RecoTracker.MkFit.mkFitOutputConverter_cfi
as mkFitOutputConverter_cfi
222 detachedTripletStepTrackCandidatesMkFitSeeds = mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
223 seeds =
'detachedTripletStepSeeds',
225 detachedTripletStepTrackCandidatesMkFitConfig = mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
226 ComponentName =
'detachedTripletStepTrackCandidatesMkFitConfig',
227 config =
'RecoTracker/MkFit/data/mkfit-phase1-detachedTripletStep.json',
229 detachedTripletStepTrackCandidatesMkFit = mkFitProducer_cfi.mkFitProducer.clone(
230 seeds =
'detachedTripletStepTrackCandidatesMkFitSeeds',
231 config = (
'',
'detachedTripletStepTrackCandidatesMkFitConfig'),
232 clustersToSkip =
'detachedTripletStepClusters',
234 trackingMkFitDetachedTripletStep.toReplaceWith(detachedTripletStepTrackCandidates, mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
235 seeds =
'detachedTripletStepSeeds',
236 mkFitSeeds =
'detachedTripletStepTrackCandidatesMkFitSeeds',
237 tracks =
'detachedTripletStepTrackCandidatesMkFit',
240 import FastSimulation.Tracking.TrackCandidateProducer_cfi
241 _fastSim_detachedTripletStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
242 src =
'detachedTripletStepSeeds',
243 MinNumberOfCrossedLayers = 3,
244 hitMasks = cms.InputTag(
'detachedTripletStepMasks')
246 fastSim.toReplaceWith(detachedTripletStepTrackCandidates,_fastSim_detachedTripletStepTrackCandidates)
251 detachedTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
252 AlgorithmName =
'detachedTripletStep',
253 src =
'detachedTripletStepTrackCandidates',
254 Fitter =
'FlexibleKFFittingSmoother'
256 fastSim.toModify(detachedTripletStepTracks,TTRHBuilder =
'WithoutRefit')
263 detachedTripletStepClassifier1 = TrackMVAClassifierDetached.clone(
264 src =
'detachedTripletStepTracks',
265 mva = dict(GBRForestLabel =
'MVASelectorIter3_13TeV'),
266 qualityCuts = [-0.5,0.0,0.5]
268 fastSim.toModify(detachedTripletStepClassifier1,vertices =
'firstStepPrimaryVerticesBeforeMixing')
270 detachedTripletStepClassifier2 = TrackMVAClassifierPrompt.clone(
271 src =
'detachedTripletStepTracks',
272 mva = dict(GBRForestLabel =
'MVASelectorIter0_13TeV'),
273 qualityCuts = [-0.2,0.0,0.4]
275 fastSim.toModify(detachedTripletStepClassifier2,vertices =
'firstStepPrimaryVerticesBeforeMixing')
278 detachedTripletStep = ClassifierMerger.clone(
279 inputClassifiers=[
'detachedTripletStepClassifier1',
'detachedTripletStepClassifier2']
281 trackingPhase1.toReplaceWith(detachedTripletStep, detachedTripletStepClassifier1.clone(
282 mva = dict(GBRForestLabel =
'MVASelectorDetachedTripletStep_Phase1'),
283 qualityCuts = [-0.2,0.3,0.8]
288 trackdnn.toReplaceWith(detachedTripletStep, TrackTfClassifier.clone(
289 src =
'detachedTripletStepTracks',
290 qualityCuts = qualityCutDictionary[
'DetachedTripletStep'],
292 (trackdnn & fastSim).toModify(detachedTripletStep,vertices =
'firstStepPrimaryVerticesBeforeMixing')
294 highBetaStar_2018.toModify(detachedTripletStep,qualityCuts = [-0.5,0.0,0.5])
295 pp_on_AA.toModify(detachedTripletStep,
296 mva = dict(GBRForestLabel =
'HIMVASelectorDetachedTripletStep_Phase1'),
297 qualityCuts = [-0.2, 0.4, 0.85],
301 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
302 detachedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
303 src =
'detachedTripletStepTracks',
304 useAnyMVA = cms.bool(
False),
305 GBRForestLabel = cms.string(
'MVASelectorIter3'),
307 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
308 name =
'detachedTripletStepVtxLoose',
310 res_par = ( 0.003, 0.001 ),
312 d0_par1 = ( 1.2, 3.0 ),
313 dz_par1 = ( 1.2, 3.0 ),
314 d0_par2 = ( 1.3, 3.0 ),
315 dz_par2 = ( 1.3, 3.0 )
317 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
318 name =
'detachedTripletStepTrkLoose',
320 res_par = ( 0.003, 0.001 ),
322 d0_par1 = ( 1.6, 4.0 ),
323 dz_par1 = ( 1.6, 4.0 ),
324 d0_par2 = ( 1.6, 4.0 ),
325 dz_par2 = ( 1.6, 4.0 )
327 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
328 name =
'detachedTripletStepVtxTight',
329 preFilterName =
'detachedTripletStepVtxLoose',
331 res_par = ( 0.003, 0.001 ),
333 maxNumberLostLayers = 1,
334 minNumber3DLayers = 3,
335 d0_par1 = ( 0.95, 3.0 ),
336 dz_par1 = ( 0.9, 3.0 ),
337 d0_par2 = ( 1.0, 3.0 ),
338 dz_par2 = ( 1.0, 3.0 )
340 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
341 name =
'detachedTripletStepTrkTight',
342 preFilterName =
'detachedTripletStepTrkLoose',
344 res_par = ( 0.003, 0.001 ),
346 maxNumberLostLayers = 1,
347 minNumber3DLayers = 3,
348 d0_par1 = ( 1.1, 4.0 ),
349 dz_par1 = ( 1.1, 4.0 ),
350 d0_par2 = ( 1.1, 4.0 ),
351 dz_par2 = ( 1.1, 4.0 )
353 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
354 name =
'detachedTripletStepVtx',
355 preFilterName =
'detachedTripletStepVtxTight',
357 res_par = ( 0.003, 0.001 ),
359 maxNumberLostLayers = 1,
360 minNumber3DLayers = 3,
361 d0_par1 = ( 0.85, 3.0 ),
362 dz_par1 = ( 0.8, 3.0 ),
363 d0_par2 = ( 0.9, 3.0 ),
364 dz_par2 = ( 0.9, 3.0 )
366 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
367 name =
'detachedTripletStepTrk',
368 preFilterName =
'detachedTripletStepTrkTight',
370 res_par = ( 0.003, 0.001 ),
372 maxNumberLostLayers = 1,
373 minNumber3DLayers = 4,
374 d0_par1 = ( 1.0, 4.0 ),
375 dz_par1 = ( 1.0, 4.0 ),
376 d0_par2 = ( 1.0, 4.0 ),
377 dz_par2 = ( 1.0, 4.0 )
382 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi
import trackAlgoPriorityOrder
384 trackingLowPU.toReplaceWith(detachedTripletStep, RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
385 TrackProducers = [
'detachedTripletStepTracks',
386 'detachedTripletStepTracks'],
388 selectedTrackQuals = [
'detachedTripletStepSelector:detachedTripletStepVtx',
389 'detachedTripletStepSelector:detachedTripletStepTrk'],
390 setsToMerge = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(
True) )],
391 writeOnlyTrkQuals =
True
394 DetachedTripletStepTask = cms.Task(detachedTripletStepClusters,
395 detachedTripletStepSeedLayers,
396 detachedTripletStepTrackingRegions,
397 detachedTripletStepHitDoublets,
398 detachedTripletStepHitTriplets,
399 detachedTripletStepSeeds,
400 detachedTripletStepTrackCandidates,
401 detachedTripletStepTracks,
402 detachedTripletStepClassifier1,detachedTripletStepClassifier2,
404 DetachedTripletStep = cms.Sequence(DetachedTripletStepTask)
406 _DetachedTripletStepTask_trackingMkFit = DetachedTripletStepTask.copy()
407 _DetachedTripletStepTask_trackingMkFit.add(detachedTripletStepTrackCandidatesMkFitSeeds, detachedTripletStepTrackCandidatesMkFit, detachedTripletStepTrackCandidatesMkFitConfig)
408 trackingMkFitDetachedTripletStep.toReplaceWith(DetachedTripletStepTask, _DetachedTripletStepTask_trackingMkFit)
410 _DetachedTripletStepTask_LowPU = DetachedTripletStepTask.copyAndExclude([detachedTripletStepClassifier2])
411 _DetachedTripletStepTask_LowPU.replace(detachedTripletStepClassifier1, detachedTripletStepSelector)
412 trackingLowPU.toReplaceWith(DetachedTripletStepTask, _DetachedTripletStepTask_LowPU)
415 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
import maskProducerFromClusterRemover
417 fastSim.toReplaceWith(DetachedTripletStepTask,
418 cms.Task(detachedTripletStepMasks
419 ,detachedTripletStepTrackingRegions
420 ,detachedTripletStepSeeds
421 ,detachedTripletStepTrackCandidates
422 ,detachedTripletStepTracks
423 ,detachedTripletStepClassifier1,detachedTripletStepClassifier2