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 = 30.0,
11  trajectories = 'tobTecStepTracks',
12  pixelClusters = 'siPixelClusters',
13  stripClusters = 'siStripClusters',
14  oldClusterRemovalInfo = 'tobTecStepClusters',
15  TrackQuality = 'highPurity'
16 )
17 
18 convClusters = _convClustersBase.clone(
19  trackClassifier = 'tobTecStep:QualityMasks',
20 )
21 
22 
23 #Phase2 : configuring the phase2 track Cluster Remover
24 from RecoLocalTracker.SubCollectionProducers.phase2trackClusterRemover_cfi import phase2trackClusterRemover as _phase2trackClusterRemover
25 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
26 trackingPhase2PU140.toReplaceWith(convClusters, _phase2trackClusterRemover.clone(
27  maxChi2 = 30.0,
28  phase2pixelClusters = 'siPixelClusters',
29  phase2OTClusters = 'siPhase2Clusters',
30  TrackQuality = 'highPurity',
31  minNumberOfLayersWithMeasBeforeFiltering = 0,
32  trajectories = 'detachedQuadStepTracks',
33  oldClusterRemovalInfo = 'detachedQuadStepClusters',
34  overrideTrkQuals = 'detachedQuadStepSelector:detachedQuadStepTrk'
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 
124 
125 convLayerPairs = _mod.seedingLayersEDProducer.clone(
126  layerList = _convLayerPairsLayerList,
127  BPix = cms.PSet(
128  TTRHBuilder = cms.string('WithTrackAngle'),
129  HitProducer = cms.string('siPixelRecHits'),
130  skipClusters = cms.InputTag('convClusters'),
131  ),
132  FPix = cms.PSet(
133  TTRHBuilder = cms.string('WithTrackAngle'),
134  HitProducer = cms.string('siPixelRecHits'),
135  skipClusters = cms.InputTag('convClusters'),
136  ),
137  TIB = 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  MTIB = 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  TID = cms.PSet(
148  useSimpleRphiHitsCleaner = cms.bool(False),
149  matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
150  useRingSlector = cms.bool(True),
151  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
152  maxRing = cms.int32(2),
153  minRing = cms.int32(1),
154  skipClusters = cms.InputTag('convClusters'),
155  ),
156  TEC = cms.PSet(
157  useSimpleRphiHitsCleaner = cms.bool(False),
158  minRing = cms.int32(1),
159  matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
160  useRingSlector = cms.bool(True),
161  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
162  rphiRecHits = cms.InputTag('siStripMatchedRecHits','rphiRecHitUnmatched'),
163  maxRing = cms.int32(7),
164  stereoRecHits = cms.InputTag('siStripMatchedRecHits','stereoRecHitUnmatched'),
165  skipClusters = cms.InputTag('convClusters'),
166  ),
167  TOB = cms.PSet(
168  matchedRecHits = cms.InputTag('siStripMatchedRecHits','matchedRecHit'),
169  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
170  skipClusters = cms.InputTag('convClusters'),
171  ),
172  MTOB = cms.PSet(
173  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
174  rphiRecHits = cms.InputTag('siStripMatchedRecHits','rphiRecHit'),
175  skipClusters = cms.InputTag('convClusters'),
176  ),
177  )
178 
179 #this was done by Sam Harper (Aug 2017) and is a best guess (and I do guess wrong sometimes)
180 #in general I kept all the old layer pairs and added sensible phaseI combinations
181 #most pairs are adjacent layers (with some small exceptions) so I stuck to that
182 _convLayerPairsLayerListPhaseI = ['BPix1+BPix2',
183 
184  'BPix2+BPix3',
185  'BPix3+BPix4',#added for PhaseI
186 
187  'BPix2+FPix1_pos',
188  'BPix2+FPix1_neg',
189  'BPix2+FPix2_pos',
190  'BPix2+FPix2_neg',
191  'BPix3+FPix1_pos', #added for phaseI
192  'BPix3+FPix1_neg', #added for phaseI
193 
194  'FPix1_pos+FPix2_pos',
195  'FPix1_neg+FPix2_neg',
196 
197  'FPix2_pos+FPix3_pos', #added for phaseI
198  'FPix2_neg+FPix3_neg',#added for phaseI
199 
200  'BPix3+TIB1',
201  #'BPix3+TIB2' #removed for phaseI
202  'BPix4+TIB1', #added for phase I
203  'BPix4+TIB2', #added for phase I
204  ]
205 _convLayerPairsLayerListPhaseI.extend(_convLayerPairsStripOnlyLayers)
206 
207 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
208 trackingPhase1.toModify(convLayerPairs, layerList = _convLayerPairsLayerListPhaseI)
209 
210 
211 trackingPhase2PU140.toReplaceWith(convLayerPairs, cms.EDProducer('SeedingLayersEDProducer',
212  layerList = cms.vstring('BPix1+BPix2',
213  'BPix2+BPix3',
214  'BPix3+BPix4',
215 
216  'BPix1+FPix1_pos',
217  'BPix1+FPix1_neg',
218  'BPix2+FPix1_pos',
219  'BPix2+FPix1_neg',
220  'BPix3+FPix1_pos',
221  'BPix3+FPix1_neg',
222 
223  'FPix1_pos+FPix2_pos',
224  'FPix1_neg+FPix2_neg',
225  'FPix2_pos+FPix3_pos',
226  'FPix2_neg+FPix3_neg'
227  ),
228 
229  BPix = cms.PSet(
230  hitErrorRZ = cms.double(0.006),
231  hitErrorRPhi = cms.double(0.0027),
232  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
233  HitProducer = cms.string('siPixelRecHits'),
234  useErrorsFromParam = cms.bool(True),
235  skipClusters = cms.InputTag('convClusters'),
236  ),
237  FPix = cms.PSet(
238  hitErrorRZ = cms.double(0.0036),
239  hitErrorRPhi = cms.double(0.0051),
240  TTRHBuilder = cms.string('TTRHBuilderWithoutAngle4PixelPairs'),
241  HitProducer = cms.string('siPixelRecHits'),
242  useErrorsFromParam = cms.bool(True),
243  skipClusters = cms.InputTag('convClusters'),
244  )
245  )
246 )
247 
248 photonConvTrajSeedFromSingleLeg.TrackRefitter = 'generalTracks'
249 photonConvTrajSeedFromSingleLeg.primaryVerticesTag = 'firstStepPrimaryVertices'
250 #photonConvTrajSeedFromQuadruplets.TrackRefitter = 'generalTracks'
251 #photonConvTrajSeedFromQuadruplets.primaryVerticesTag = 'pixelVertices'
252 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
253 trackingLowPU.toModify(photonConvTrajSeedFromSingleLeg, primaryVerticesTag = 'pixelVertices')
254 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
255 pp_on_AA.toModify(photonConvTrajSeedFromSingleLeg, vtxMinDoF = 999999.)
256 
257 # TRACKER DATA CONTROL
258 
259 # QUALITY CUTS DURING TRACK BUILDING
261 convCkfTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
262  maxLostHits = 1,
263  minimumNumberOfHits = 3,
264  minPt = 0.1
265 )
266 
267 
268 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
269 convStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
270  ComponentName = 'convStepChi2Est',
271  nSigma = 3.0,
272  MaxChi2 = 30.0,
273  MaxDisplacement = 100,
274  MaxSagitta = -1.,
275  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight')
276 )
277 
278 
279 # TRACK BUILDING
281 _convCkfTrajectoryBuilderBase = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
282  trajectoryFilter = dict(refToPSet_ = 'convCkfTrajectoryFilter'),
283  minNrOfHitsForRebuild = 3,
284  maxCand = 1
285 )
286 
287 convCkfTrajectoryBuilder = _convCkfTrajectoryBuilderBase.clone(
288  estimator = 'convStepChi2Est'
289 )
290 
291 trackingPhase2PU140.toReplaceWith(convCkfTrajectoryBuilder, _convCkfTrajectoryBuilderBase.clone(
292  maxCand = 2
293 ))
294 
295 # MAKING OF TRACK CANDIDATES
297 convTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
298  src = 'photonConvTrajSeedFromSingleLeg:convSeedCandidates',
299  clustersToSkip = cms.InputTag('convClusters'),
300  TrajectoryBuilderPSet = dict(refToPSet_ = 'convCkfTrajectoryBuilder')
301 )
302 
303 trackingPhase2PU140.toModify(convTrackCandidates,
304  clustersToSkip = None,
305  phase2clustersToSkip = cms.InputTag('convClusters')
306 )
307 
309 convStepFitterSmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
310  ComponentName = 'convStepFitterSmoother',
311  EstimateCut = 30,
312  Smoother = 'convStepRKSmoother'
313 )
314 
315 convStepRKTrajectorySmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectorySmoother.clone(
316  ComponentName = 'convStepRKSmoother',
317  errorRescaling = 10.0
318 )
319 
320 
321 # TRACK FITTING
323 convStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
324  src = 'convTrackCandidates',
325  AlgorithmName = 'conversionStep',
326  Fitter = 'convStepFitterSmoother'
327 )
328 
329 
330 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
331 convStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
332  src='convStepTracks',
333  trackSelectors= cms.VPSet(
334  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
335  name = 'convStepLoose',
336  applyAdaptedPVCuts = False,
337  chi2n_par = 3.0,
338  res_par = ( 0.003, 0.001 ),
339  minNumberLayers = 3,
340  maxNumberLostLayers = 1,
341  minNumber3DLayers = 1,
342  d0_par1 = ( 5., 8.0 ), # not sure these values are sane....
343  dz_par1 = ( 5., 8.0 ),
344  d0_par2 = ( 5., 8.0 ),
345  dz_par2 = ( 5., 8.0 )
346  ),
347  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
348  name = 'convStepTight',
349  preFilterName = 'convStepLoose',
350  chi2n_par = 2.5,
351  res_par = ( 0.003, 0.001 ),
352  minNumberLayers = 3,
353  maxNumberLostLayers = 1,
354  minNumber3DLayers = 1,
355  d0_par1 = ( 5., 8.0 ),
356  dz_par1 = ( 5., 8.0 ),
357  d0_par2 = ( 5., 8.0 ),
358  dz_par2 = ( 5., 8.0 )
359  ),
360  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
361  name = 'convStep',
362  preFilterName = 'convStepTight',
363  chi2n_par = 2.0,
364  res_par = ( 0.003, 0.001 ),
365  minNumberLayers = 3,
366  maxNumberLostLayers = 1,
367  minNumber3DLayers = 1,
368  d0_par1 = ( 5., 8.0 ),
369  dz_par1 = ( 5., 8.0 ),
370  d0_par2 = ( 5., 8.0 ),
371  dz_par2 = ( 5., 8.0 )
372  ),
373  ) #end of vpset
374 ) #end of clone
375 
376 ConvStepTask = cms.Task( convClusters
377  , convLayerPairs
378  , photonConvTrajSeedFromSingleLeg
379  , convTrackCandidates
380  , convStepTracks
381  , convStepSelector
382  #+ Conv2Step #full quad-seeding sequence
383  )
384 ConvStep = cms.Sequence( ConvStepTask )
385 
386 
387 
TrajectoryFilter_cff
GroupedCkfTrajectoryBuilder_cfi
PhotonConversionTrajectorySeedProducerFromSingleLeg_cfi
TrackProducer_cfi
RungeKuttaFitters_cff
CkfTrackCandidates_cfi
trackClusterRemover_cfi
ConversionStep2_cff
seedingLayersEDProducer_cfi