CMS 3D CMS Logo

ConversionStep_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4 
7 
8 from RecoLocalTracker.SubCollectionProducers.trackClusterRemover_cfi import trackClusterRemover as _trackClusterRemover
9 _convClustersBase = _trackClusterRemover.clone(
10  maxChi2 = cms.double(30.0),
11  trajectories = cms.InputTag("tobTecStepTracks"),
12  pixelClusters = cms.InputTag("siPixelClusters"),
13  stripClusters = cms.InputTag("siStripClusters"),
14  oldClusterRemovalInfo = cms.InputTag("tobTecStepClusters"),
15  TrackQuality = cms.string('highPurity'),
16 )
17 convClusters = _convClustersBase.clone(
18  trackClassifier = cms.InputTag('tobTecStep',"QualityMasks"),
19 )
20 
21 
22 #Phase2 : configuring the phase2 track Cluster Remover
23 from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi import phase2trackClusterRemover as _phase2trackClusterRemover
24 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
25 trackingPhase2PU140.toReplaceWith(convClusters, _phase2trackClusterRemover.clone(
26  maxChi2 = 30.0,
27  phase2pixelClusters = "siPixelClusters",
28  phase2OTClusters = "siPhase2Clusters",
29  TrackQuality = 'highPurity',
30  minNumberOfLayersWithMeasBeforeFiltering = 0,
31  trajectories = cms.InputTag("detachedQuadStepTracks"),
32  oldClusterRemovalInfo = cms.InputTag("detachedQuadStepClusters"),
33  overrideTrkQuals = cms.InputTag("detachedQuadStepSelector","detachedQuadStepTrk"),
34  )
35 )
36 
37 _convLayerPairsStripOnlyLayers = ['TIB1+TID1_pos',
38  'TIB1+TID1_neg',
39  'TIB1+TID2_pos',
40  'TIB1+TID2_neg',
41  'TIB1+TIB2',
42  'TIB1+MTIB3',
43 
44  'TIB2+TID1_pos',
45  'TIB2+TID1_neg',
46  'TIB2+TID2_pos',
47  'TIB2+TID2_neg',
48  'TIB2+MTIB3',
49  'TIB2+MTIB4',
50 
51  'MTIB3+MTIB4',
52  'MTIB3+TOB1',
53  'MTIB3+TID1_pos',
54  'MTIB3+TID1_neg',
55 
56  'MTIB4+TOB1',
57  'MTIB4+TOB2',
58 
59  'TOB1+TOB2',
60  'TOB1+MTOB3',
61  'TOB1+TEC1_pos',
62  'TOB1+TEC1_neg',
63 
64  'TOB2+MTOB3',
65  'TOB2+MTOB4',
66  'TOB2+TEC1_pos',
67  'TOB2+TEC1_neg',
68 
69  #NB: re-introduce these combinations when large displaced
70  # tracks, reconstructed only in TOB will be available
71  # For instance think at the OutIn Ecal Seeded tracks
72  #'MTOB3+MTOB4',
73  #'MTOB3+MTOB5',
74  #'MTOB3+TEC1_pos',
75  #'MTOB3+TEC1_neg',
76  #
77  #'MTOB4+MTOB5',
78  #'MTOB4+MTOB6',
79  #
80  #'MTOB5+MTOB6',
81 
82  'TID1_pos+TID2_pos',
83  'TID2_pos+TID3_pos',
84  'TID3_pos+TEC1_pos',
85 
86  'TID1_neg+TID2_neg',
87  'TID2_neg+TID3_neg',
88  'TID3_neg+TEC1_neg',
89 
90  'TEC1_pos+TEC2_pos',
91  'TEC2_pos+TEC3_pos',
92  'TEC3_pos+TEC4_pos',
93  'TEC4_pos+TEC5_pos',
94  'TEC5_pos+TEC6_pos',
95  'TEC6_pos+TEC7_pos',
96  'TEC7_pos+TEC8_pos',
97 
98  'TEC1_neg+TEC2_neg',
99  'TEC2_neg+TEC3_neg',
100  'TEC3_neg+TEC4_neg',
101  'TEC4_neg+TEC5_neg',
102  'TEC5_neg+TEC6_neg',
103  'TEC6_neg+TEC7_neg',
104  'TEC7_neg+TEC8_neg']
105 
106 _convLayerPairsLayerList = _convLayerPairsStripOnlyLayers
107 _convLayerPairsLayerList =['BPix1+BPix2',
108 
109  'BPix2+BPix3',
110  'BPix2+FPix1_pos',
111  'BPix2+FPix1_neg',
112  'BPix2+FPix2_pos',
113  'BPix2+FPix2_neg',
114 
115  'FPix1_pos+FPix2_pos',
116  'FPix1_neg+FPix2_neg',
117 
118  'BPix3+TIB1',
119  'BPix3+TIB2']
120 _convLayerPairsLayerList.extend(_convLayerPairsStripOnlyLayers)
121 
122 
123 
124 convLayerPairs = cms.EDProducer("SeedingLayersEDProducer",
125  layerList = cms.vstring(_convLayerPairsLayerList),
126  BPix = cms.PSet(
127  TTRHBuilder = cms.string('WithTrackAngle'),
128  HitProducer = cms.string('siPixelRecHits'),
129  skipClusters = cms.InputTag('convClusters'),
130  ),
131  FPix = cms.PSet(
132  TTRHBuilder = cms.string('WithTrackAngle'),
133  HitProducer = cms.string('siPixelRecHits'),
134  skipClusters = cms.InputTag('convClusters'),
135  ),
136  TIB = cms.PSet(
137  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
138  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
139  skipClusters = cms.InputTag('convClusters'),
140  ),
141  MTIB = cms.PSet(
142  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
143  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
144  skipClusters = cms.InputTag('convClusters'),
145  ),
146  TID = cms.PSet(
147  useSimpleRphiHitsCleaner = cms.bool(False),
148  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
149  useRingSlector = cms.bool(True),
150  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
151  maxRing = cms.int32(2),
152  minRing = cms.int32(1),
153  skipClusters = cms.InputTag('convClusters'),
154  ),
155  TEC = cms.PSet(
156  useSimpleRphiHitsCleaner = cms.bool(False),
157  minRing = cms.int32(1),
158  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
159  useRingSlector = cms.bool(True),
160  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
161  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHitUnmatched"),
162  maxRing = cms.int32(7),
163  stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHitUnmatched"),
164  skipClusters = cms.InputTag('convClusters'),
165  ),
166  TOB = cms.PSet(
167  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
168  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
169  skipClusters = cms.InputTag('convClusters'),
170  ),
171  MTOB = cms.PSet(
172  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
173  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
174  skipClusters = cms.InputTag('convClusters'),
175  ),
176  )
177 
178 #this was done by Sam Harper (Aug 2017) and is a best guess (and I do guess wrong sometimes)
179 #in general I kept all the old layer pairs and added sensible phaseI combinations
180 #most pairs are adjacent layers (with some small exceptions) so I stuck to that
181 _convLayerPairsLayerListPhaseI = ['BPix1+BPix2',
182 
183  'BPix2+BPix3',
184  'BPix3+BPix4',#added for PhaseI
185 
186  'BPix2+FPix1_pos',
187  'BPix2+FPix1_neg',
188  'BPix2+FPix2_pos',
189  'BPix2+FPix2_neg',
190  'BPix3+FPix1_pos', #added for phaseI
191  'BPix3+FPix1_neg', #added for phaseI
192 
193  'FPix1_pos+FPix2_pos',
194  'FPix1_neg+FPix2_neg',
195 
196  'FPix2_pos+FPix3_pos', #added for phaseI
197  'FPix2_neg+FPix3_neg',#added for phaseI
198 
199  'BPix3+TIB1',
200  #'BPix3+TIB2' #removed for phaseI
201  'BPix4+TIB1', #added for phase I
202  'BPix4+TIB2', #added for phase I
203  ]
204 _convLayerPairsLayerListPhaseI.extend(_convLayerPairsStripOnlyLayers)
205 
206 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
207 trackingPhase1.toModify(convLayerPairs, layerList = cms.vstring(_convLayerPairsLayerListPhaseI))
208 
209 
210 trackingPhase2PU140.toReplaceWith(convLayerPairs, cms.EDProducer("SeedingLayersEDProducer",
211  layerList = cms.vstring('BPix1+BPix2',
212  'BPix2+BPix3',
213  'BPix3+BPix4',
214 
215  'BPix1+FPix1_pos',
216  'BPix1+FPix1_neg',
217  'BPix2+FPix1_pos',
218  'BPix2+FPix1_neg',
219  'BPix3+FPix1_pos',
220  'BPix3+FPix1_neg',
221 
222  'FPix1_pos+FPix2_pos',
223  'FPix1_neg+FPix2_neg',
224  'FPix2_pos+FPix3_pos',
225  'FPix2_neg+FPix3_neg'
226  ),
227 
228  BPix = cms.PSet(
229  hitErrorRZ = cms.double(0.006),
230  hitErrorRPhi = cms.double(0.0027),
231  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
232  HitProducer = cms.string('siPixelRecHits'),
233  useErrorsFromParam = cms.bool(True),
234  skipClusters = cms.InputTag('convClusters'),
235  ),
236  FPix = cms.PSet(
237  hitErrorRZ = cms.double(0.0036),
238  hitErrorRPhi = cms.double(0.0051),
239  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
240  HitProducer = cms.string('siPixelRecHits'),
241  useErrorsFromParam = cms.bool(True),
242  skipClusters = cms.InputTag('convClusters'),
243  )
244  )
245 )
246 
247 photonConvTrajSeedFromSingleLeg.TrackRefitter = cms.InputTag('generalTracks')
248 photonConvTrajSeedFromSingleLeg.primaryVerticesTag = cms.InputTag('firstStepPrimaryVertices')
249 #photonConvTrajSeedFromQuadruplets.TrackRefitter = cms.InputTag('generalTracks')
250 #photonConvTrajSeedFromQuadruplets.primaryVerticesTag = cms.InputTag('pixelVertices')
251 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
252 trackingLowPU.toModify(photonConvTrajSeedFromSingleLeg, primaryVerticesTag = "pixelVertices")
253 from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
254 pp_on_AA_2018.toModify(photonConvTrajSeedFromSingleLeg, vtxMinDoF = 999999.)
255 
256 # TRACKER DATA CONTROL
257 
258 # QUALITY CUTS DURING TRACK BUILDING
260 convCkfTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
261  maxLostHits = 1,
262  minimumNumberOfHits = 3,
263  minPt = 0.1
264  )
265 
266 
267 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
268 convStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
269  ComponentName = cms.string('convStepChi2Est'),
270  nSigma = cms.double(3.0),
271  MaxChi2 = cms.double(30.0),
272  MaxDisplacement = cms.double(100),
273  MaxSagitta = cms.double(-1.),
274  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
275 )
276 
277 
278 # TRACK BUILDING
280 _convCkfTrajectoryBuilderBase = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
281  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('convCkfTrajectoryFilter')),
282  minNrOfHitsForRebuild = 3,
283  maxCand = 1,
284 )
285 convCkfTrajectoryBuilder = _convCkfTrajectoryBuilderBase.clone(
286  estimator = cms.string('convStepChi2Est')
287  )
288 trackingPhase2PU140.toReplaceWith(convCkfTrajectoryBuilder, _convCkfTrajectoryBuilderBase.clone(
289  maxCand = 2,
290 ))
291 
292 # MAKING OF TRACK CANDIDATES
294 convTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
295  src = cms.InputTag('photonConvTrajSeedFromSingleLeg:convSeedCandidates'),
296  clustersToSkip = cms.InputTag('convClusters'),
297  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('convCkfTrajectoryBuilder'))
298 )
299 trackingPhase2PU140.toModify(convTrackCandidates,
300  clustersToSkip = None,
301  phase2clustersToSkip = cms.InputTag("convClusters")
302 )
303 
305 convStepFitterSmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
306  ComponentName = 'convStepFitterSmoother',
307  EstimateCut = 30,
308  Smoother = cms.string('convStepRKSmoother')
309  )
310 
311 convStepRKTrajectorySmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectorySmoother.clone(
312  ComponentName = cms.string('convStepRKSmoother'),
313  errorRescaling = 10.0
314  )
315 
316 
317 # TRACK FITTING
319 convStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
320  src = 'convTrackCandidates',
321  AlgorithmName = cms.string('conversionStep'),
322  Fitter = 'convStepFitterSmoother',
323  )
324 
325 
326 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
327 convStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
328  src='convStepTracks',
329  trackSelectors= cms.VPSet(
330  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
331  name = 'convStepLoose',
332  applyAdaptedPVCuts = False,
333  chi2n_par = 3.0,
334  res_par = ( 0.003, 0.001 ),
335  minNumberLayers = 3,
336  maxNumberLostLayers = 1,
337  minNumber3DLayers = 1,
338  d0_par1 = ( 5., 8.0 ), # not sure these values are sane....
339  dz_par1 = ( 5., 8.0 ),
340  d0_par2 = ( 5., 8.0 ),
341  dz_par2 = ( 5., 8.0 )
342  ),
343  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
344  name = 'convStepTight',
345  preFilterName = 'convStepLoose',
346  chi2n_par = 2.5,
347  res_par = ( 0.003, 0.001 ),
348  minNumberLayers = 3,
349  maxNumberLostLayers = 1,
350  minNumber3DLayers = 1,
351  d0_par1 = ( 5., 8.0 ),
352  dz_par1 = ( 5., 8.0 ),
353  d0_par2 = ( 5., 8.0 ),
354  dz_par2 = ( 5., 8.0 )
355  ),
356  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
357  name = 'convStep',
358  preFilterName = 'convStepTight',
359  chi2n_par = 2.0,
360  res_par = ( 0.003, 0.001 ),
361  minNumberLayers = 3,
362  maxNumberLostLayers = 1,
363  minNumber3DLayers = 1,
364  d0_par1 = ( 5., 8.0 ),
365  dz_par1 = ( 5., 8.0 ),
366  d0_par2 = ( 5., 8.0 ),
367  dz_par2 = ( 5., 8.0 )
368  ),
369  ) #end of vpset
370  ) #end of clone
371 
372 ConvStepTask = cms.Task( convClusters
373  , convLayerPairs
374  , photonConvTrajSeedFromSingleLeg
375  , convTrackCandidates
376  , convStepTracks
377  , convStepSelector
378  #+ Conv2Step #full quad-seeding sequence
379  )
380 ConvStep = cms.Sequence( ConvStepTask )
381 
382 
383 ### Quad-seeding sequence disabled (#+ Conv2Step)
384 # if enabled, the quad-seeded tracks have to be merged with the single-leg seeded tracks
385 # in RecoTracker.FinalTrackSelectors.MergeTrackCollections_cff change:
386 ###
387 #conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
388 # TrackProducers = cms.VInputTag(cms.InputTag('convStepTracks')),
389 # hasSelector=cms.vint32(1),
390 # selectedTrackQuals = cms.VInputTag(cms.InputTag("convStepSelector","convStep")
391 # ),
392 # setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(1), pQual=cms.bool(True) )
393 # ),
394 # copyExtras = True,
395 # makeReKeyedSeeds = cms.untracked.bool(False)
396 # )
397 ###
398 # TO this:
399 ###
400 #conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
401 # TrackProducers = cms.VInputTag(
402 # cms.InputTag('convStepTracks'),
403 # cms.InputTag('conv2StepTracks')
404 # ),
405 # hasSelector=cms.vint32(1,1),
406 # selectedTrackQuals = cms.VInputTag(
407 # cms.InputTag("convStepSelector","convStep"),
408 # cms.InputTag("conv2StepSelector","conv2Step")
409 # ),
410 # setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )
411 # ),
412 # copyExtras = True,
413 # makeReKeyedSeeds = cms.untracked.bool(False)
414 # )
415 ###