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
17 detachedTripletStepClusters = _cfg.clusterRemoverForIter(
"DetachedTripletStep")
18 for _eraName, _postfix, _era
in _cfg.nonDefaultEras():
19 _era.toReplaceWith(detachedTripletStepClusters, _cfg.clusterRemoverForIter(
"DetachedTripletStep", _eraName, _postfix))
23 detachedTripletStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone()
24 detachedTripletStepSeedLayers.BPix.skipClusters = cms.InputTag(
'detachedTripletStepClusters')
25 detachedTripletStepSeedLayers.FPix.skipClusters = cms.InputTag(
'detachedTripletStepClusters')
31 'BPix2+BPix3+FPix1_pos',
'BPix2+BPix3+FPix1_neg',
34 'BPix2+FPix1_pos+FPix2_pos',
'BPix2+FPix1_neg+FPix2_neg',
37 'FPix1_pos+FPix2_pos+FPix3_pos',
'FPix1_neg+FPix2_neg+FPix3_neg',
41 from Configuration.Eras.Modifier_trackingPhase1_cff
import trackingPhase1
42 trackingPhase1.toModify(detachedTripletStepSeedLayers, layerList=_phase1LayerList)
45 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi
import globalTrackingRegionFromBeamSpotFixedZ
as _globalTrackingRegionFromBeamSpotFixedZ
46 detachedTripletStepTrackingRegions = _globalTrackingRegionFromBeamSpotFixedZ.clone(RegionPSet =
dict(
48 originHalfLength = 15.0,
51 trackingPhase1.toModify(detachedTripletStepTrackingRegions, RegionPSet =
dict(ptMin = 0.25))
53 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff
import pp_on_XeXe_2017
54 from Configuration.Eras.Modifier_pp_on_AA_2018_cff
import pp_on_AA_2018
56 (pp_on_XeXe_2017 | pp_on_AA_2018).toReplaceWith(detachedTripletStepTrackingRegions,
57 _globalTrackingRegionWithVertices.clone(RegionPSet=
dict(
64 from Configuration.Eras.Modifier_highBetaStar_2018_cff
import highBetaStar_2018
65 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",
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 for e
in [pp_on_XeXe_2017, pp_on_AA_2018]:
156 e.toModify(detachedTripletStepTrajectoryFilterBase, minPt=0.9)
158 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
159 detachedTripletStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
160 detachedTripletStepTrajectoryFilter = cms.PSet(
161 ComponentType = cms.string(
'CompositeTrajectoryFilter'),
163 cms.PSet( refToPSet_ = cms.string(
'detachedTripletStepTrajectoryFilterBase')),
169 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
170 detachedTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
171 ComponentName = cms.string(
'detachedTripletStepChi2Est'),
172 nSigma = cms.double(3.0),
173 MaxChi2 = cms.double(9.0),
174 clusterChargeCut = cms.PSet(refToPSet_ = cms.string(
'SiStripClusterChargeCutTight')),
176 _tracker_apv_vfp30_2016.toModify(detachedTripletStepChi2Est,
177 clusterChargeCut =
dict(refToPSet_ =
"SiStripClusterChargeCutTiny")
182 detachedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
183 MeasurementTrackerName =
'',
184 trajectoryFilter = cms.PSet(refToPSet_ = cms.string(
'detachedTripletStepTrajectoryFilter')),
186 alwaysUseInvalidHits =
True,
187 estimator = cms.string(
'detachedTripletStepChi2Est'),
188 maxDPhiForLooperReconstruction = cms.double(2.0),
189 maxPtForLooperReconstruction = cms.double(0.7)
191 trackingLowPU.toModify(detachedTripletStepTrajectoryBuilder,
193 alwaysUseInvalidHits =
False,
198 detachedTripletStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
199 src = cms.InputTag(
'detachedTripletStepSeeds'),
200 clustersToSkip = cms.InputTag(
'detachedTripletStepClusters'),
202 numHitsForSeedCleaner = cms.int32(50),
203 onlyPixelHitsForSeedCleaner = cms.bool(
True),
204 TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string(
'detachedTripletStepTrajectoryBuilder')),
205 doSeedingRegionRebuilding =
True,
206 useHitsSplitting =
True 210 detachedTripletStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
211 ComponentName = cms.string(
'detachedTripletStepTrajectoryCleanerBySharedHits'),
212 fractionShared = cms.double(0.13),
213 allowSharedFirstHit = cms.bool(
True)
215 detachedTripletStepTrackCandidates.TrajectoryCleaner =
'detachedTripletStepTrajectoryCleanerBySharedHits' 216 trackingLowPU.toModify(detachedTripletStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
218 import FastSimulation.Tracking.TrackCandidateProducer_cfi
219 _fastSim_detachedTripletStepTrackCandidates = FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
220 src = cms.InputTag(
"detachedTripletStepSeeds"),
221 MinNumberOfCrossedLayers = 3,
222 hitMasks = cms.InputTag(
"detachedTripletStepMasks")
224 fastSim.toReplaceWith(detachedTripletStepTrackCandidates,_fastSim_detachedTripletStepTrackCandidates)
229 detachedTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
230 AlgorithmName = cms.string(
'detachedTripletStep'),
231 src =
'detachedTripletStepTrackCandidates',
232 Fitter = cms.string(
'FlexibleKFFittingSmoother')
234 fastSim.toModify(detachedTripletStepTracks,TTRHBuilder =
'WithoutRefit')
241 detachedTripletStepClassifier1 = TrackMVAClassifierDetached.clone()
242 detachedTripletStepClassifier1.src =
'detachedTripletStepTracks' 243 detachedTripletStepClassifier1.mva.GBRForestLabel =
'MVASelectorIter3_13TeV' 244 detachedTripletStepClassifier1.qualityCuts = [-0.5,0.0,0.5]
245 fastSim.toModify(detachedTripletStepClassifier1,vertices =
"firstStepPrimaryVerticesBeforeMixing")
247 detachedTripletStepClassifier2 = TrackMVAClassifierPrompt.clone()
248 detachedTripletStepClassifier2.src =
'detachedTripletStepTracks' 249 detachedTripletStepClassifier2.mva.GBRForestLabel =
'MVASelectorIter0_13TeV' 250 detachedTripletStepClassifier2.qualityCuts = [-0.2,0.0,0.4]
251 fastSim.toModify(detachedTripletStepClassifier2,vertices =
"firstStepPrimaryVerticesBeforeMixing")
254 detachedTripletStep = ClassifierMerger.clone()
255 detachedTripletStep.inputClassifiers=[
'detachedTripletStepClassifier1',
'detachedTripletStepClassifier2']
257 trackingPhase1.toReplaceWith(detachedTripletStep, detachedTripletStepClassifier1.clone(
258 mva =
dict(GBRForestLabel =
'MVASelectorDetachedTripletStep_Phase1'),
259 qualityCuts = [-0.2,0.3,0.8]
264 trackdnn.toReplaceWith(detachedTripletStep, TrackLwtnnClassifier.clone(
265 src =
'detachedTripletStepTracks',
266 qualityCuts = [0.0, 0.4, 0.8],
268 (trackdnn & fastSim).toModify(detachedTripletStep,vertices =
"firstStepPrimaryVerticesBeforeMixing")
270 highBetaStar_2018.toModify(detachedTripletStep,qualityCuts = [-0.5,0.0,0.5])
271 pp_on_AA_2018.toModify(detachedTripletStep,
272 mva =
dict(GBRForestLabel =
'HIMVASelectorDetachedTripletStep_Phase1'),
273 qualityCuts = [-0.2, 0.4, 0.85],
277 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
278 detachedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
279 src =
'detachedTripletStepTracks',
280 useAnyMVA = cms.bool(
False),
281 GBRForestLabel = cms.string(
'MVASelectorIter3'),
283 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
284 name =
'detachedTripletStepVtxLoose',
286 res_par = ( 0.003, 0.001 ),
288 d0_par1 = ( 1.2, 3.0 ),
289 dz_par1 = ( 1.2, 3.0 ),
290 d0_par2 = ( 1.3, 3.0 ),
291 dz_par2 = ( 1.3, 3.0 )
293 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
294 name =
'detachedTripletStepTrkLoose',
296 res_par = ( 0.003, 0.001 ),
298 d0_par1 = ( 1.6, 4.0 ),
299 dz_par1 = ( 1.6, 4.0 ),
300 d0_par2 = ( 1.6, 4.0 ),
301 dz_par2 = ( 1.6, 4.0 )
303 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
304 name =
'detachedTripletStepVtxTight',
305 preFilterName =
'detachedTripletStepVtxLoose',
307 res_par = ( 0.003, 0.001 ),
309 maxNumberLostLayers = 1,
310 minNumber3DLayers = 3,
311 d0_par1 = ( 0.95, 3.0 ),
312 dz_par1 = ( 0.9, 3.0 ),
313 d0_par2 = ( 1.0, 3.0 ),
314 dz_par2 = ( 1.0, 3.0 )
316 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
317 name =
'detachedTripletStepTrkTight',
318 preFilterName =
'detachedTripletStepTrkLoose',
320 res_par = ( 0.003, 0.001 ),
322 maxNumberLostLayers = 1,
323 minNumber3DLayers = 3,
324 d0_par1 = ( 1.1, 4.0 ),
325 dz_par1 = ( 1.1, 4.0 ),
326 d0_par2 = ( 1.1, 4.0 ),
327 dz_par2 = ( 1.1, 4.0 )
329 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
330 name =
'detachedTripletStepVtx',
331 preFilterName =
'detachedTripletStepVtxTight',
333 res_par = ( 0.003, 0.001 ),
335 maxNumberLostLayers = 1,
336 minNumber3DLayers = 3,
337 d0_par1 = ( 0.85, 3.0 ),
338 dz_par1 = ( 0.8, 3.0 ),
339 d0_par2 = ( 0.9, 3.0 ),
340 dz_par2 = ( 0.9, 3.0 )
342 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
343 name =
'detachedTripletStepTrk',
344 preFilterName =
'detachedTripletStepTrkTight',
346 res_par = ( 0.003, 0.001 ),
348 maxNumberLostLayers = 1,
349 minNumber3DLayers = 4,
350 d0_par1 = ( 1.0, 4.0 ),
351 dz_par1 = ( 1.0, 4.0 ),
352 d0_par2 = ( 1.0, 4.0 ),
353 dz_par2 = ( 1.0, 4.0 )
358 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi
import trackAlgoPriorityOrder
360 trackingLowPU.toReplaceWith(detachedTripletStep, RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
362 'detachedTripletStepTracks',
363 'detachedTripletStepTracks',
366 selectedTrackQuals = [
367 cms.InputTag(
"detachedTripletStepSelector",
"detachedTripletStepVtx"),
368 cms.InputTag(
"detachedTripletStepSelector",
"detachedTripletStepTrk")
370 setsToMerge = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(
True) )],
371 writeOnlyTrkQuals =
True 374 DetachedTripletStepTask = cms.Task(detachedTripletStepClusters,
375 detachedTripletStepSeedLayers,
376 detachedTripletStepTrackingRegions,
377 detachedTripletStepHitDoublets,
378 detachedTripletStepHitTriplets,
379 detachedTripletStepSeeds,
380 detachedTripletStepTrackCandidates,
381 detachedTripletStepTracks,
382 detachedTripletStepClassifier1,detachedTripletStepClassifier2,
384 DetachedTripletStep = cms.Sequence(DetachedTripletStepTask)
385 _DetachedTripletStepTask_LowPU = DetachedTripletStepTask.copyAndExclude([detachedTripletStepClassifier2])
386 _DetachedTripletStepTask_LowPU.replace(detachedTripletStepClassifier1, detachedTripletStepSelector)
387 trackingLowPU.toReplaceWith(DetachedTripletStepTask, _DetachedTripletStepTask_LowPU)
390 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
import maskProducerFromClusterRemover
392 fastSim.toReplaceWith(DetachedTripletStepTask,
393 cms.Task(detachedTripletStepMasks
394 ,detachedTripletStepTrackingRegions
395 ,detachedTripletStepSeeds
396 ,detachedTripletStepTrackCandidates
397 ,detachedTripletStepTracks
398 ,detachedTripletStepClassifier1,detachedTripletStepClassifier2
def _hitSetProducerToFactoryPSet(producer)
def maskProducerFromClusterRemover(clusterRemover)