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
15 detachedTripletStepClusters = _cfg.clusterRemoverForIter(
"DetachedTripletStep")
16 for _eraName, _postfix, _era
in _cfg.nonDefaultEras():
17 _era.toReplaceWith(detachedTripletStepClusters, _cfg.clusterRemoverForIter(
"DetachedTripletStep", _eraName, _postfix))
21 detachedTripletStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone()
22 detachedTripletStepSeedLayers.BPix.skipClusters = cms.InputTag(
'detachedTripletStepClusters')
23 detachedTripletStepSeedLayers.FPix.skipClusters = cms.InputTag(
'detachedTripletStepClusters')
29 'BPix2+BPix3+FPix1_pos',
'BPix2+BPix3+FPix1_neg',
32 'BPix2+FPix1_pos+FPix2_pos',
'BPix2+FPix1_neg+FPix2_neg',
35 'FPix1_pos+FPix2_pos+FPix3_pos',
'FPix1_neg+FPix2_neg+FPix3_neg',
39 from Configuration.Eras.Modifier_trackingPhase1_cff
import trackingPhase1
40 trackingPhase1.toModify(detachedTripletStepSeedLayers, layerList=_phase1LayerList)
43 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi
import globalTrackingRegionFromBeamSpotFixedZ
as _globalTrackingRegionFromBeamSpotFixedZ
44 detachedTripletStepTrackingRegions = _globalTrackingRegionFromBeamSpotFixedZ.clone(RegionPSet =
dict(
46 originHalfLength = 15.0,
49 trackingPhase1.toModify(detachedTripletStepTrackingRegions, RegionPSet =
dict(ptMin = 0.25))
51 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff
import pp_on_XeXe_2017
52 from Configuration.Eras.Modifier_pp_on_AA_2018_cff
import pp_on_AA_2018
54 (pp_on_XeXe_2017 | pp_on_AA_2018).toReplaceWith(detachedTripletStepTrackingRegions,
55 _globalTrackingRegionWithVertices.clone(RegionPSet=
dict(
62 from Configuration.Eras.Modifier_highBetaStar_2018_cff
import highBetaStar_2018
63 highBetaStar_2018.toModify(detachedTripletStepTrackingRegions, RegionPSet =
dict(ptMin = 0.05))
67 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi
import hitPairEDProducer
as _hitPairEDProducer
68 detachedTripletStepHitDoublets = _hitPairEDProducer.clone(
69 seedingLayers =
"detachedTripletStepSeedLayers",
70 trackingRegions =
"detachedTripletStepTrackingRegions",
72 produceIntermediateHitDoublets =
True,
74 from RecoPixelVertexing.PixelTriplets.pixelTripletLargeTipEDProducer_cfi
import pixelTripletLargeTipEDProducer
as _pixelTripletLargeTipEDProducer
76 detachedTripletStepHitTriplets = _pixelTripletLargeTipEDProducer.clone(
77 doublets =
"detachedTripletStepHitDoublets",
78 produceSeedingHitSets =
True,
80 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff
import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
81 detachedTripletStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
82 seedingHitSets =
"detachedTripletStepHitTriplets",
84 ComponentName =
'PixelClusterShapeSeedComparitor',
85 FilterAtHelixStage = cms.bool(
False),
86 FilterPixelHits = cms.bool(
True),
87 FilterStripHits = cms.bool(
False),
88 ClusterShapeHitFilterName = cms.string(
'ClusterShapeHitFilter'),
89 ClusterShapeCacheSrc = cms.InputTag(
'siPixelClusterShapeCache')
93 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi
import caHitTripletEDProducer
as _caHitTripletEDProducer
94 trackingPhase1.toModify(detachedTripletStepHitDoublets, layerPairs = [0,1])
95 trackingPhase1.toReplaceWith(detachedTripletStepHitTriplets, _caHitTripletEDProducer.clone(
96 doublets =
"detachedTripletStepHitDoublets",
97 extraHitRPhitolerance = detachedTripletStepHitTriplets.extraHitRPhitolerance,
100 value1 = 300 , value2 = 10,
102 useBendingCorrection =
True,
107 highBetaStar_2018.toModify(detachedTripletStepHitTriplets,CAThetaCut = 0.002,CAPhiCut = 0.1,CAHardPtCut = 0)
109 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
110 _fastSim_detachedTripletStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
111 trackingRegions =
"detachedTripletStepTrackingRegions",
112 hitMasks = cms.InputTag(
"detachedTripletStepMasks"),
114 layerList = detachedTripletStepSeedLayers.layerList.value())
117 trackingPhase1.toModify(_fastSim_detachedTripletStepSeeds, seedFinderSelector =
dict(
118 pixelTripletGeneratorFactory =
None,
122 TTRHBuilder =
'WithoutRefit',
123 HitProducer =
'TrackingRecHitProducer',
126 TTRHBuilder =
'WithoutRefit',
127 HitProducer =
'TrackingRecHitProducer',
129 layerPairs = detachedTripletStepHitDoublets.layerPairs.value()
132 fastSim.toReplaceWith(detachedTripletStepSeeds,_fastSim_detachedTripletStepSeeds)
136 _detachedTripletStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
139 minimumNumberOfHits = 3,
142 detachedTripletStepTrajectoryFilterBase = _detachedTripletStepTrajectoryFilterBase.clone(
144 minGoodStripCharge = cms.PSet(refToPSet_ = cms.string(
'SiStripClusterChargeCutLoose'))
146 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff
import tracker_apv_vfp30_2016
147 _tracker_apv_vfp30_2016.toModify(detachedTripletStepTrajectoryFilterBase, maxCCCLostHits = 2)
148 from Configuration.Eras.Modifier_trackingLowPU_cff
import trackingLowPU
149 trackingLowPU.toReplaceWith(detachedTripletStepTrajectoryFilterBase, _detachedTripletStepTrajectoryFilterBase.clone(
150 maxLostHitsFraction = 1./10.,
151 constantValueForLostHitsFractionFilter = 0.701,
154 for e
in [pp_on_XeXe_2017, pp_on_AA_2018]:
155 e.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 = cms.string(
'detachedTripletStepChi2Est'),
171 nSigma = cms.double(3.0),
172 MaxChi2 = cms.double(9.0),
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 = cms.string(
'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 = cms.InputTag(
'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 = cms.string(
'detachedTripletStepTrajectoryCleanerBySharedHits'),
211 fractionShared = cms.double(0.13),
212 allowSharedFirstHit = cms.bool(
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 = cms.InputTag(
"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 = cms.string(
'detachedTripletStep'),
230 src =
'detachedTripletStepTrackCandidates',
231 Fitter = cms.string(
'FlexibleKFFittingSmoother')
233 fastSim.toModify(detachedTripletStepTracks,TTRHBuilder =
'WithoutRefit')
240 detachedTripletStepClassifier1 = TrackMVAClassifierDetached.clone()
241 detachedTripletStepClassifier1.src =
'detachedTripletStepTracks' 242 detachedTripletStepClassifier1.mva.GBRForestLabel =
'MVASelectorIter3_13TeV' 243 detachedTripletStepClassifier1.qualityCuts = [-0.5,0.0,0.5]
244 fastSim.toModify(detachedTripletStepClassifier1,vertices =
"firstStepPrimaryVerticesBeforeMixing")
246 detachedTripletStepClassifier2 = TrackMVAClassifierPrompt.clone()
247 detachedTripletStepClassifier2.src =
'detachedTripletStepTracks' 248 detachedTripletStepClassifier2.mva.GBRForestLabel =
'MVASelectorIter0_13TeV' 249 detachedTripletStepClassifier2.qualityCuts = [-0.2,0.0,0.4]
250 fastSim.toModify(detachedTripletStepClassifier2,vertices =
"firstStepPrimaryVerticesBeforeMixing")
253 detachedTripletStep = ClassifierMerger.clone()
254 detachedTripletStep.inputClassifiers=[
'detachedTripletStepClassifier1',
'detachedTripletStepClassifier2']
256 trackingPhase1.toReplaceWith(detachedTripletStep, detachedTripletStepClassifier1.clone(
257 mva =
dict(GBRForestLabel =
'MVASelectorDetachedTripletStep_Phase1'),
258 qualityCuts = [-0.2,0.3,0.8],
260 highBetaStar_2018.toModify(detachedTripletStep,qualityCuts = [-0.5,0.0,0.5])
263 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
264 detachedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
265 src =
'detachedTripletStepTracks',
266 useAnyMVA = cms.bool(
False),
267 GBRForestLabel = cms.string(
'MVASelectorIter3'),
269 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
270 name =
'detachedTripletStepVtxLoose',
272 res_par = ( 0.003, 0.001 ),
274 d0_par1 = ( 1.2, 3.0 ),
275 dz_par1 = ( 1.2, 3.0 ),
276 d0_par2 = ( 1.3, 3.0 ),
277 dz_par2 = ( 1.3, 3.0 )
279 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
280 name =
'detachedTripletStepTrkLoose',
282 res_par = ( 0.003, 0.001 ),
284 d0_par1 = ( 1.6, 4.0 ),
285 dz_par1 = ( 1.6, 4.0 ),
286 d0_par2 = ( 1.6, 4.0 ),
287 dz_par2 = ( 1.6, 4.0 )
289 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
290 name =
'detachedTripletStepVtxTight',
291 preFilterName =
'detachedTripletStepVtxLoose',
293 res_par = ( 0.003, 0.001 ),
295 maxNumberLostLayers = 1,
296 minNumber3DLayers = 3,
297 d0_par1 = ( 0.95, 3.0 ),
298 dz_par1 = ( 0.9, 3.0 ),
299 d0_par2 = ( 1.0, 3.0 ),
300 dz_par2 = ( 1.0, 3.0 )
302 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
303 name =
'detachedTripletStepTrkTight',
304 preFilterName =
'detachedTripletStepTrkLoose',
306 res_par = ( 0.003, 0.001 ),
308 maxNumberLostLayers = 1,
309 minNumber3DLayers = 3,
310 d0_par1 = ( 1.1, 4.0 ),
311 dz_par1 = ( 1.1, 4.0 ),
312 d0_par2 = ( 1.1, 4.0 ),
313 dz_par2 = ( 1.1, 4.0 )
315 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
316 name =
'detachedTripletStepVtx',
317 preFilterName =
'detachedTripletStepVtxTight',
319 res_par = ( 0.003, 0.001 ),
321 maxNumberLostLayers = 1,
322 minNumber3DLayers = 3,
323 d0_par1 = ( 0.85, 3.0 ),
324 dz_par1 = ( 0.8, 3.0 ),
325 d0_par2 = ( 0.9, 3.0 ),
326 dz_par2 = ( 0.9, 3.0 )
328 RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
329 name =
'detachedTripletStepTrk',
330 preFilterName =
'detachedTripletStepTrkTight',
332 res_par = ( 0.003, 0.001 ),
334 maxNumberLostLayers = 1,
335 minNumber3DLayers = 4,
336 d0_par1 = ( 1.0, 4.0 ),
337 dz_par1 = ( 1.0, 4.0 ),
338 d0_par2 = ( 1.0, 4.0 ),
339 dz_par2 = ( 1.0, 4.0 )
344 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi
import trackAlgoPriorityOrder
346 trackingLowPU.toReplaceWith(detachedTripletStep, RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
348 'detachedTripletStepTracks',
349 'detachedTripletStepTracks',
352 selectedTrackQuals = [
353 cms.InputTag(
"detachedTripletStepSelector",
"detachedTripletStepVtx"),
354 cms.InputTag(
"detachedTripletStepSelector",
"detachedTripletStepTrk")
356 setsToMerge = [cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(
True) )],
357 writeOnlyTrkQuals =
True 360 DetachedTripletStepTask = cms.Task(detachedTripletStepClusters,
361 detachedTripletStepSeedLayers,
362 detachedTripletStepTrackingRegions,
363 detachedTripletStepHitDoublets,
364 detachedTripletStepHitTriplets,
365 detachedTripletStepSeeds,
366 detachedTripletStepTrackCandidates,
367 detachedTripletStepTracks,
368 detachedTripletStepClassifier1,detachedTripletStepClassifier2,
370 DetachedTripletStep = cms.Sequence(DetachedTripletStepTask)
371 _DetachedTripletStepTask_LowPU = DetachedTripletStepTask.copyAndExclude([detachedTripletStepClassifier2])
372 _DetachedTripletStepTask_LowPU.replace(detachedTripletStepClassifier1, detachedTripletStepSelector)
373 trackingLowPU.toReplaceWith(DetachedTripletStepTask, _DetachedTripletStepTask_LowPU)
376 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi
import maskProducerFromClusterRemover
378 fastSim.toReplaceWith(DetachedTripletStepTask,
379 cms.Task(detachedTripletStepMasks
380 ,detachedTripletStepTrackingRegions
381 ,detachedTripletStepSeeds
382 ,detachedTripletStepTrackCandidates
383 ,detachedTripletStepTracks
384 ,detachedTripletStepClassifier1,detachedTripletStepClassifier2
def _hitSetProducerToFactoryPSet(producer)
def maskProducerFromClusterRemover(clusterRemover)