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 
265 # TRACKER DATA CONTROL
266 
267 # QUALITY CUTS DURING TRACK BUILDING
269 convCkfTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
270  maxLostHits = 1,
271  minimumNumberOfHits = 3,
272  minPt = 0.1
273  )
274 
275 
276 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
277 convStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
278  ComponentName = cms.string('convStepChi2Est'),
279  nSigma = cms.double(3.0),
280  MaxChi2 = cms.double(30.0),
281  MaxDisplacement = cms.double(100),
282  MaxSagitta = cms.double(-1.),
283  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
284 )
285 
286 
287 # TRACK BUILDING
289 _convCkfTrajectoryBuilderBase = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
290  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('convCkfTrajectoryFilter')),
291  minNrOfHitsForRebuild = 3,
292  maxCand = 1,
293 )
294 convCkfTrajectoryBuilder = _convCkfTrajectoryBuilderBase.clone(
295  estimator = cms.string('convStepChi2Est')
296  )
297 trackingPhase2PU140.toReplaceWith(convCkfTrajectoryBuilder, _convCkfTrajectoryBuilderBase.clone(
298  maxCand = 2,
299 ))
300 
301 # MAKING OF TRACK CANDIDATES
303 convTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
304  src = cms.InputTag('photonConvTrajSeedFromSingleLeg:convSeedCandidates'),
305  clustersToSkip = cms.InputTag('convClusters'),
306  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('convCkfTrajectoryBuilder'))
307 )
308 trackingPhase2PU140.toModify(convTrackCandidates,
309  clustersToSkip = None,
310  phase2clustersToSkip = cms.InputTag("convClusters")
311 )
312 
314 convStepFitterSmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
315  ComponentName = 'convStepFitterSmoother',
316  EstimateCut = 30,
317  Smoother = cms.string('convStepRKSmoother')
318  )
319 
320 convStepRKTrajectorySmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectorySmoother.clone(
321  ComponentName = cms.string('convStepRKSmoother'),
322  errorRescaling = 10.0
323  )
324 
325 
326 # TRACK FITTING
328 convStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
329  src = 'convTrackCandidates',
330  AlgorithmName = cms.string('conversionStep'),
331  Fitter = 'convStepFitterSmoother',
332  )
333 
334 
335 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
336 convStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
337  src='convStepTracks',
338  trackSelectors= cms.VPSet(
339  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
340  name = 'convStepLoose',
341  applyAdaptedPVCuts = False,
342  chi2n_par = 3.0,
343  res_par = ( 0.003, 0.001 ),
344  minNumberLayers = 3,
345  maxNumberLostLayers = 1,
346  minNumber3DLayers = 1,
347  d0_par1 = ( 5., 8.0 ), # not sure these values are sane....
348  dz_par1 = ( 5., 8.0 ),
349  d0_par2 = ( 5., 8.0 ),
350  dz_par2 = ( 5., 8.0 )
351  ),
352  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
353  name = 'convStepTight',
354  preFilterName = 'convStepLoose',
355  chi2n_par = 2.5,
356  res_par = ( 0.003, 0.001 ),
357  minNumberLayers = 3,
358  maxNumberLostLayers = 1,
359  minNumber3DLayers = 1,
360  d0_par1 = ( 5., 8.0 ),
361  dz_par1 = ( 5., 8.0 ),
362  d0_par2 = ( 5., 8.0 ),
363  dz_par2 = ( 5., 8.0 )
364  ),
365  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
366  name = 'convStep',
367  preFilterName = 'convStepTight',
368  chi2n_par = 2.0,
369  res_par = ( 0.003, 0.001 ),
370  minNumberLayers = 3,
371  maxNumberLostLayers = 1,
372  minNumber3DLayers = 1,
373  d0_par1 = ( 5., 8.0 ),
374  dz_par1 = ( 5., 8.0 ),
375  d0_par2 = ( 5., 8.0 ),
376  dz_par2 = ( 5., 8.0 )
377  ),
378  ) #end of vpset
379  ) #end of clone
380 
381 ConvStep = cms.Sequence( convClusters
382  + convLayerPairs
383  + photonConvTrajSeedFromSingleLeg
384  + convTrackCandidates
385  + convStepTracks
386  + convStepSelector
387  #+ Conv2Step #full quad-seeding sequence
388  )
389 
390 
391 ### Quad-seeding sequence disabled (#+ Conv2Step)
392 # if enabled, the quad-seeded tracks have to be merged with the single-leg seeded tracks
393 # in RecoTracker.FinalTrackSelectors.MergeTrackCollections_cff change:
394 ###
395 #conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
396 # TrackProducers = cms.VInputTag(cms.InputTag('convStepTracks')),
397 # hasSelector=cms.vint32(1),
398 # selectedTrackQuals = cms.VInputTag(cms.InputTag("convStepSelector","convStep")
399 # ),
400 # setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(1), pQual=cms.bool(True) )
401 # ),
402 # copyExtras = True,
403 # makeReKeyedSeeds = cms.untracked.bool(False)
404 # )
405 ###
406 # TO this:
407 ###
408 #conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
409 # TrackProducers = cms.VInputTag(
410 # cms.InputTag('convStepTracks'),
411 # cms.InputTag('conv2StepTracks')
412 # ),
413 # hasSelector=cms.vint32(1,1),
414 # selectedTrackQuals = cms.VInputTag(
415 # cms.InputTag("convStepSelector","convStep"),
416 # cms.InputTag("conv2StepSelector","conv2Step")
417 # ),
418 # setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )
419 # ),
420 # copyExtras = True,
421 # makeReKeyedSeeds = cms.untracked.bool(False)
422 # )
423 ###