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