CMS 3D CMS Logo

PixelLessStep_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
3 
4 from Configuration.Eras.Modifier_fastSim_cff import fastSim
5 ##########################################################################
6 # Large impact parameter tracking using TIB/TID/TEC stereo layer seeding #
7 ##########################################################################
8 
9 pixelLessStepClusters = _cfg.clusterRemoverForIter("PixelLessStep")
10 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
11  _era.toReplaceWith(pixelLessStepClusters, _cfg.clusterRemoverForIter("PixelLessStep", _eraName, _postfix))
12 
13 
14 
15 # SEEDING LAYERS
17 pixelLessStepSeedLayers = cms.EDProducer("SeedingLayersEDProducer",
18  layerList = cms.vstring(
19  #TIB
20  'TIB1+TIB2+MTIB3','TIB1+TIB2+MTIB4',
21  #TIB+TID
22  'TIB1+TIB2+MTID1_pos','TIB1+TIB2+MTID1_neg',
23  #TID
24  'TID1_pos+TID2_pos+TID3_pos','TID1_neg+TID2_neg+TID3_neg',#ring 1-2 (matched)
25  'TID1_pos+TID2_pos+MTID3_pos','TID1_neg+TID2_neg+MTID3_neg',#ring 3 (mono)
26  'TID1_pos+TID2_pos+MTEC1_pos','TID1_neg+TID2_neg+MTEC1_neg',
27  #TID+TEC RING 1-3
28  'TID2_pos+TID3_pos+TEC1_pos','TID2_neg+TID3_neg+TEC1_neg',#ring 1-2 (matched)
29  'TID2_pos+TID3_pos+MTEC1_pos','TID2_neg+TID3_neg+MTEC1_neg',#ring 3 (mono)
30  #TEC RING 1-3
31  'TEC1_pos+TEC2_pos+TEC3_pos', 'TEC1_neg+TEC2_neg+TEC3_neg',
32  'TEC1_pos+TEC2_pos+MTEC3_pos','TEC1_neg+TEC2_neg+MTEC3_neg',
33  'TEC1_pos+TEC2_pos+TEC4_pos', 'TEC1_neg+TEC2_neg+TEC4_neg',
34  'TEC1_pos+TEC2_pos+MTEC4_pos','TEC1_neg+TEC2_neg+MTEC4_neg',
35  'TEC2_pos+TEC3_pos+TEC4_pos', 'TEC2_neg+TEC3_neg+TEC4_neg',
36  'TEC2_pos+TEC3_pos+MTEC4_pos','TEC2_neg+TEC3_neg+MTEC4_neg',
37  'TEC2_pos+TEC3_pos+TEC5_pos', 'TEC2_neg+TEC3_neg+TEC5_neg',
38  'TEC2_pos+TEC3_pos+TEC6_pos', 'TEC2_neg+TEC3_neg+TEC6_neg',
39  'TEC3_pos+TEC4_pos+TEC5_pos', 'TEC3_neg+TEC4_neg+TEC5_neg',
40  'TEC3_pos+TEC4_pos+MTEC5_pos','TEC3_neg+TEC4_neg+MTEC5_neg',
41  'TEC3_pos+TEC5_pos+TEC6_pos', 'TEC3_neg+TEC5_neg+TEC6_neg',
42  'TEC4_pos+TEC5_pos+TEC6_pos', 'TEC4_neg+TEC5_neg+TEC6_neg'
43  ),
44  TIB = cms.PSet(
45  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
46  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
47  skipClusters = cms.InputTag('pixelLessStepClusters')
48  ),
49  MTIB = cms.PSet(
50  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
51  skipClusters = cms.InputTag('pixelLessStepClusters'),
52  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit")
53  ),
54  TID = cms.PSet(
55  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
56  skipClusters = cms.InputTag('pixelLessStepClusters'),
57  useRingSlector = cms.bool(True),
58  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
59  minRing = cms.int32(1),
60  maxRing = cms.int32(2)
61  ),
62  MTID = cms.PSet(
63  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
64  skipClusters = cms.InputTag('pixelLessStepClusters'),
65  useRingSlector = cms.bool(True),
66  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
67  minRing = cms.int32(3),
68  maxRing = cms.int32(3)
69  ),
70  TEC = cms.PSet(
71  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
72  skipClusters = cms.InputTag('pixelLessStepClusters'),
73  useRingSlector = cms.bool(True),
74  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
75  minRing = cms.int32(1),
76  maxRing = cms.int32(2)
77  ),
78  MTEC = cms.PSet(
79  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
80  skipClusters = cms.InputTag('pixelLessStepClusters'),
81  useRingSlector = cms.bool(True),
82  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
83  minRing = cms.int32(3),
84  maxRing = cms.int32(3)
85  )
86 )
87 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
88 trackingLowPU.toModify(pixelLessStepSeedLayers,
89  layerList = [
90  'TIB1+TIB2',
91  'TID1_pos+TID2_pos','TID2_pos+TID3_pos',
92  'TEC1_pos+TEC2_pos','TEC2_pos+TEC3_pos','TEC3_pos+TEC4_pos','TEC3_pos+TEC5_pos','TEC4_pos+TEC5_pos',
93  'TID1_neg+TID2_neg','TID2_neg+TID3_neg',
94  'TEC1_neg+TEC2_neg','TEC2_neg+TEC3_neg','TEC3_neg+TEC4_neg','TEC3_neg+TEC5_neg','TEC4_neg+TEC5_neg'
95  ],
96  TIB = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
97  TID = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
98  TEC = dict(clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')),
99  MTIB = None,
100  MTID = None,
101  MTEC = None,
102 )
103 
104 # TrackingRegion
105 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi import globalTrackingRegionFromBeamSpotFixedZ as _globalTrackingRegionFromBeamSpotFixedZ
106 pixelLessStepTrackingRegions = _globalTrackingRegionFromBeamSpotFixedZ.clone(RegionPSet = dict(
107  ptMin = 0.4,
108  originHalfLength = 12.0,
109  originRadius = 1.0
110 ))
111 trackingLowPU.toModify(pixelLessStepTrackingRegions, RegionPSet = dict(
112  ptMin = 0.7,
113  originHalfLength = 10.0,
114  originRadius = 2.0,
115 ))
116 
117 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
118 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
119 pp_on_XeXe_2017.toReplaceWith(pixelLessStepTrackingRegions,
120  _globalTrackingRegionWithVertices.clone(RegionPSet=dict(
121  fixedError = 3.0,
122  ptMin = 2.0,
123  originRadius = 1.0
124  ) )
125 )
126 
127 # seeding
128 from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi import ClusterShapeHitFilterESProducer as _ClusterShapeHitFilterESProducer
129 pixelLessStepClusterShapeHitFilter = _ClusterShapeHitFilterESProducer.clone(
130  ComponentName = 'pixelLessStepClusterShapeHitFilter',
131  doStripShapeCut = cms.bool(False),
132  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight')
133 )
134 
135 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
136 pixelLessStepHitDoublets = _hitPairEDProducer.clone(
137  seedingLayers = "pixelLessStepSeedLayers",
138  trackingRegions = "pixelLessStepTrackingRegions",
139  maxElement = 0,
140  produceIntermediateHitDoublets = True,
141 )
142 from RecoTracker.TkSeedGenerator.multiHitFromChi2EDProducer_cfi import multiHitFromChi2EDProducer as _multiHitFromChi2EDProducer
143 pixelLessStepHitTriplets = _multiHitFromChi2EDProducer.clone(
144  doublets = "pixelLessStepHitDoublets",
145 )
146 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
147 from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter
148 pixelLessStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
149  seedingHitSets = "pixelLessStepHitTriplets",
150  SeedComparitorPSet = dict(
151  ComponentName = 'CombinedSeedComparitor',
152  mode = cms.string("and"),
153  comparitors = cms.VPSet(
154  cms.PSet(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
155  ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
156  FilterAtHelixStage = cms.bool(True),
157  FilterPixelHits = cms.bool(False),
158  FilterStripHits = cms.bool(True),
159  ClusterShapeHitFilterName = cms.string('pixelLessStepClusterShapeHitFilter'),
160  ClusterShapeCacheSrc = cms.InputTag("siPixelClusterShapeCache") # not really needed here since FilterPixelHits=False
161  ),
162  _StripSubClusterShapeSeedFilter.clone()
163  )
164  )
165 )
166 trackingLowPU.toModify(pixelLessStepHitDoublets, produceSeedingHitSets=True, produceIntermediateHitDoublets=False)
167 trackingLowPU.toModify(pixelLessStepSeeds,
168  seedingHitSets = "pixelLessStepHitDoublets",
169  SeedComparitorPSet = dict(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
170  ComponentName = 'PixelClusterShapeSeedComparitor',
171  FilterAtHelixStage = cms.bool(True),
172  FilterPixelHits = cms.bool(False),
173  FilterStripHits = cms.bool(True),
174  ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
175  ClusterShapeCacheSrc = cms.InputTag("siPixelClusterShapeCache") # not really needed here since FilterPixelHits=False
176  )
177 )
178 #fastsim
179 import FastSimulation.Tracking.TrajectorySeedProducer_cfi
180 _fastSim_pixelLessStepSeeds = FastSimulation.Tracking.TrajectorySeedProducer_cfi.trajectorySeedProducer.clone(
181  trackingRegions = "pixelLessStepTrackingRegions",
182  hitMasks = cms.InputTag("pixelLessStepMasks"),
183 )
184 from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet
185 _fastSim_pixelLessStepSeeds.seedFinderSelector.MultiHitGeneratorFactory = _hitSetProducerToFactoryPSet(pixelLessStepHitTriplets)
186 _fastSim_pixelLessStepSeeds.seedFinderSelector.MultiHitGeneratorFactory.refitHits = False
187 _fastSim_pixelLessStepSeeds.seedFinderSelector.layerList = pixelLessStepSeedLayers.layerList.value()
188 fastSim.toReplaceWith(pixelLessStepSeeds,_fastSim_pixelLessStepSeeds)
189 
190 # QUALITY CUTS DURING TRACK BUILDING
192 _pixelLessStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
193  maxLostHits = 0,
194  minimumNumberOfHits = 4,
195  minPt = 0.1
196  )
197 pixelLessStepTrajectoryFilter = _pixelLessStepTrajectoryFilterBase.clone(
198  seedPairPenalty = 1,
199 )
200 trackingLowPU.toReplaceWith(pixelLessStepTrajectoryFilter, _pixelLessStepTrajectoryFilterBase)
201 pp_on_XeXe_2017.toModify(pixelLessStepTrajectoryFilter, minPt=2.0)
202 
203 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
204 pixelLessStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
205  ComponentName = cms.string('pixelLessStepChi2Est'),
206  nSigma = cms.double(3.0),
207  MaxChi2 = cms.double(16.0),
208  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
209 )
210 trackingLowPU.toModify(pixelLessStepChi2Est,
211  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
212 )
213 
214 # TRACK BUILDING
216 pixelLessStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
217  MeasurementTrackerName = '',
218  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('pixelLessStepTrajectoryFilter')),
219  minNrOfHitsForRebuild = 4,
220  maxCand = 2,
221  alwaysUseInvalidHits = False,
222  estimator = cms.string('pixelLessStepChi2Est'),
223  maxDPhiForLooperReconstruction = cms.double(2.0),
224  maxPtForLooperReconstruction = cms.double(0.7)
225  )
226 
227 # MAKING OF TRACK CANDIDATES
229 pixelLessStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
230  src = cms.InputTag('pixelLessStepSeeds'),
231  clustersToSkip = cms.InputTag('pixelLessStepClusters'),
232  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
233  numHitsForSeedCleaner = cms.int32(50),
234  #onlyPixelHitsForSeedCleaner = cms.bool(True),
235  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('pixelLessStepTrajectoryBuilder')),
236  TrajectoryCleaner = 'pixelLessStepTrajectoryCleanerBySharedHits'
237 )
238 import FastSimulation.Tracking.TrackCandidateProducer_cfi
239 fastSim.toReplaceWith(pixelLessStepTrackCandidates,
240  FastSimulation.Tracking.TrackCandidateProducer_cfi.trackCandidateProducer.clone(
241  src = cms.InputTag("pixelLessStepSeeds"),
242  MinNumberOfCrossedLayers = 6, # ?
243  hitMasks = cms.InputTag("pixelLessStepMasks")
244  )
245 )
246 
247 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
248 pixelLessStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
249  ComponentName = cms.string('pixelLessStepTrajectoryCleanerBySharedHits'),
250  fractionShared = cms.double(0.11),
251  allowSharedFirstHit = cms.bool(True)
252  )
253 trackingLowPU.toModify(pixelLessStepTrajectoryCleanerBySharedHits, fractionShared = 0.19)
254 
255 
256 # TRACK FITTING
258 pixelLessStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
259  src = 'pixelLessStepTrackCandidates',
260  AlgorithmName = cms.string('pixelLessStep'),
261  Fitter = cms.string('FlexibleKFFittingSmoother')
262  )
263 fastSim.toModify(pixelLessStepTracks, TTRHBuilder = 'WithoutRefit')
264 
265 
266 # TRACK SELECTION AND QUALITY FLAG SETTING.
269 pixelLessStepClassifier1 = TrackMVAClassifierPrompt.clone()
270 pixelLessStepClassifier1.src = 'pixelLessStepTracks'
271 pixelLessStepClassifier1.mva.GBRForestLabel = 'MVASelectorIter5_13TeV'
272 pixelLessStepClassifier1.qualityCuts = [-0.4,0.0,0.4]
273 fastSim.toModify(pixelLessStepClassifier1, vertices = "firstStepPrimaryVerticesBeforeMixing" )
274 
275 pixelLessStepClassifier2 = TrackMVAClassifierPrompt.clone()
276 pixelLessStepClassifier2.src = 'pixelLessStepTracks'
277 pixelLessStepClassifier2.mva.GBRForestLabel = 'MVASelectorIter0_13TeV'
278 pixelLessStepClassifier2.qualityCuts = [-0.0,0.0,0.0]
279 fastSim.toModify(pixelLessStepClassifier2, vertices = "firstStepPrimaryVerticesBeforeMixing" )
280 
282 pixelLessStep = ClassifierMerger.clone()
283 pixelLessStep.inputClassifiers=['pixelLessStepClassifier1','pixelLessStepClassifier2']
284 
285 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
286 from Configuration.Eras.Modifier_trackingPhase1QuadProp_cff import trackingPhase1QuadProp
287 trackingPhase1.toReplaceWith(pixelLessStep, pixelLessStepClassifier1.clone(
288  mva = dict(GBRForestLabel = 'MVASelectorPixelLessStep_Phase1'),
289  qualityCuts = [-0.4,0.0,0.4],
290 ))
291 trackingPhase1QuadProp.toReplaceWith(pixelLessStep, pixelLessStepClassifier1.clone(
292  mva = dict(GBRForestLabel = 'MVASelectorPixelLessStep_Phase1'),
293  qualityCuts = [-0.4,0.0,0.4],
294 ))
295 
296 # For LowPU
297 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
298 pixelLessStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
299  src='pixelLessStepTracks',
300  useAnyMVA = cms.bool(False),
301  GBRForestLabel = cms.string('MVASelectorIter5'),
302  trackSelectors= cms.VPSet(
303  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
304  name = 'pixelLessStepLoose',
305  chi2n_par = 0.5,
306  res_par = ( 0.003, 0.001 ),
307  minNumberLayers = 4,
308  maxNumberLostLayers = 1,
309  minNumber3DLayers = 3,
310  d0_par1 = ( 1.3, 4.0 ),
311  dz_par1 = ( 1.3, 4.0 ),
312  d0_par2 = ( 1.3, 4.0 ),
313  dz_par2 = ( 1.3, 4.0 )
314  ),
315  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
316  name = 'pixelLessStepTight',
317  preFilterName = 'pixelLessStepLoose',
318  chi2n_par = 0.35,
319  res_par = ( 0.003, 0.001 ),
320  minNumberLayers = 4,
321  maxNumberLostLayers = 0,
322  minNumber3DLayers = 3,
323  d0_par1 = ( 1.1, 4.0 ),
324  dz_par1 = ( 1.1, 4.0 ),
325  d0_par2 = ( 1.1, 4.0 ),
326  dz_par2 = ( 1.1, 4.0 )
327  ),
328  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
329  name = 'QualityMasks',
330  preFilterName = 'pixelLessStepTight',
331  chi2n_par = 0.2,
332  res_par = ( 0.003, 0.001 ),
333  minNumberLayers = 4,
334  maxNumberLostLayers = 0,
335  minNumber3DLayers = 3,
336  d0_par1 = ( 0.9, 4.0 ),
337  dz_par1 = ( 0.9, 4.0 ),
338  d0_par2 = ( 0.9, 4.0 ),
339  dz_par2 = ( 0.9, 4.0 )
340  ),
341  ),
342  vertices = cms.InputTag("pixelVertices")#end of vpset
343 ) #end of clone
344 
345 PixelLessStep = cms.Sequence(pixelLessStepClusters*
346  pixelLessStepSeedLayers*
347  pixelLessStepTrackingRegions*
348  pixelLessStepHitDoublets*
349  pixelLessStepHitTriplets*
350  pixelLessStepSeeds*
351  pixelLessStepTrackCandidates*
352  pixelLessStepTracks*
353  pixelLessStepClassifier1*pixelLessStepClassifier2*
354  pixelLessStep)
355 _PixelLessStep_LowPU = PixelLessStep.copyAndExclude([pixelLessStepHitTriplets, pixelLessStepClassifier1, pixelLessStepClassifier2])
356 _PixelLessStep_LowPU.replace(pixelLessStep, pixelLessStepSelector)
357 trackingLowPU.toReplaceWith(PixelLessStep, _PixelLessStep_LowPU)
358 
359 #fastsim
360 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi import maskProducerFromClusterRemover
361 pixelLessStepMasks = maskProducerFromClusterRemover(pixelLessStepClusters)
362 fastSim.toReplaceWith(PixelLessStep,
363  cms.Sequence(pixelLessStepMasks
364  +pixelLessStepTrackingRegions
365  +pixelLessStepSeeds
366  +pixelLessStepTrackCandidates
367  +pixelLessStepTracks
368  +pixelLessStepClassifier1*pixelLessStepClassifier2
369  +pixelLessStep
370  )
371 )
def _hitSetProducerToFactoryPSet(producer)