CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ConversionStep_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from Configuration.StandardSequences.Eras import eras
3 
5 
8 
10 convClusters = trackClusterRemover.clone(
11  maxChi2 = cms.double(30.0),
12  trajectories = cms.InputTag("tobTecStepTracks"),
13  pixelClusters = cms.InputTag("siPixelClusters"),
14  stripClusters = cms.InputTag("siStripClusters"),
15  oldClusterRemovalInfo = cms.InputTag("tobTecStepClusters"),
16  trackClassifier = cms.InputTag('tobTecStep',"QualityMasks"),
17  TrackQuality = cms.string('highPurity'),
18 )
19 
20 convLayerPairs = cms.EDProducer("SeedingLayersEDProducer",
21  layerList = cms.vstring('BPix1+BPix2',
22 
23  'BPix2+BPix3',
24  'BPix2+FPix1_pos',
25  'BPix2+FPix1_neg',
26  'BPix2+FPix2_pos',
27  'BPix2+FPix2_neg',
28 
29  'FPix1_pos+FPix2_pos',
30  'FPix1_neg+FPix2_neg',
31 
32  'BPix3+TIB1',
33  'BPix3+TIB2',
34 
35  'TIB1+TID1_pos',
36  'TIB1+TID1_neg',
37  'TIB1+TID2_pos',
38  'TIB1+TID2_neg',
39  'TIB1+TIB2',
40  'TIB1+TIB3',
41 
42  'TIB2+TID1_pos',
43  'TIB2+TID1_neg',
44  'TIB2+TID2_pos',
45  'TIB2+TID2_neg',
46  'TIB2+TIB3',
47  'TIB2+TIB4',
48 
49  'TIB3+TIB4',
50  'TIB3+TOB1',
51  'TIB3+TID1_pos',
52  'TIB3+TID1_neg',
53 
54  'TIB4+TOB1',
55  'TIB4+TOB2',
56 
57  'TOB1+TOB2',
58  'TOB1+TOB3',
59  'TOB1+TEC1_pos',
60  'TOB1+TEC1_neg',
61 
62  'TOB2+TOB3',
63  'TOB2+TOB4',
64  'TOB2+TEC1_pos',
65  'TOB2+TEC1_neg',
66 
67  #NB: re-introduce these combinations when large displaced
68  # tracks, reconstructed only in TOB will be available
69  # For instance think at the OutIn Ecal Seeded tracks
70  #'TOB3+TOB4',
71  #'TOB3+TOB5',
72  #'TOB3+TEC1_pos',
73  #'TOB3+TEC1_neg',
74  #
75  #'TOB4+TOB5',
76  #'TOB4+TOB6',
77  #
78  #'TOB5+TOB6',
79 
80  'TID1_pos+TID2_pos',
81  'TID2_pos+TID3_pos',
82  'TID3_pos+TEC1_pos',
83 
84  'TID1_neg+TID2_neg',
85  'TID2_neg+TID3_neg',
86  'TID3_neg+TEC1_neg',
87 
88  'TEC1_pos+TEC2_pos',
89  'TEC2_pos+TEC3_pos',
90  'TEC3_pos+TEC4_pos',
91  'TEC4_pos+TEC5_pos',
92  'TEC5_pos+TEC6_pos',
93  'TEC6_pos+TEC7_pos',
94  'TEC7_pos+TEC8_pos',
95 
96  'TEC1_neg+TEC2_neg',
97  'TEC2_neg+TEC3_neg',
98  'TEC3_neg+TEC4_neg',
99  'TEC4_neg+TEC5_neg',
100  'TEC5_neg+TEC6_neg',
101  'TEC6_neg+TEC7_neg',
102  'TEC7_neg+TEC8_neg'
103  #other combinations could be added
104  ),
105 
106  BPix = cms.PSet(
107  TTRHBuilder = cms.string('WithTrackAngle'),
108  HitProducer = cms.string('siPixelRecHits'),
109  skipClusters = cms.InputTag('convClusters'),
110  ),
111  FPix = cms.PSet(
112  TTRHBuilder = cms.string('WithTrackAngle'),
113  HitProducer = cms.string('siPixelRecHits'),
114  skipClusters = cms.InputTag('convClusters'),
115  ),
116  TIB1 = cms.PSet(
117  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
118  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
119  skipClusters = cms.InputTag('convClusters'),
120  ),
121  TIB2 = cms.PSet(
122  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
123  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
124  skipClusters = cms.InputTag('convClusters'),
125  ),
126  TIB3 = cms.PSet(
127  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
128  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
129  skipClusters = cms.InputTag('convClusters'),
130  ),
131  TIB4 = cms.PSet(
132  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
133  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
134  skipClusters = cms.InputTag('convClusters'),
135  ),
136  TID1 = cms.PSet(
137  useSimpleRphiHitsCleaner = cms.bool(False),
138  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
139  useRingSlector = cms.bool(True),
140  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
141  maxRing = cms.int32(2),
142  minRing = cms.int32(1),
143  skipClusters = cms.InputTag('convClusters'),
144  ),
145  TID2 = cms.PSet(
146  useSimpleRphiHitsCleaner = cms.bool(False),
147  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
148  useRingSlector = cms.bool(True),
149  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
150  maxRing = cms.int32(2),
151  minRing = cms.int32(1),
152  skipClusters = cms.InputTag('convClusters'),
153  ),
154  TID3 = cms.PSet(
155  useSimpleRphiHitsCleaner = cms.bool(False),
156  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
157  useRingSlector = cms.bool(True),
158  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
159  maxRing = cms.int32(2),
160  minRing = cms.int32(1),
161  skipClusters = cms.InputTag('convClusters'),
162  ),
163  TEC = cms.PSet(
164  useSimpleRphiHitsCleaner = cms.bool(False),
165  minRing = cms.int32(1),
166  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
167  useRingSlector = cms.bool(True),
168  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
169  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHitUnmatched"),
170  maxRing = cms.int32(7),
171  stereoRecHits = cms.InputTag("siStripMatchedRecHits","stereoRecHitUnmatched"),
172  skipClusters = cms.InputTag('convClusters'),
173  ),
174  TOB1 = cms.PSet(
175  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
176  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
177  skipClusters = cms.InputTag('convClusters'),
178  ),
179  TOB2 = cms.PSet(
180  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
181  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
182  skipClusters = cms.InputTag('convClusters'),
183  ),
184  TOB3 = cms.PSet(
185  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
186  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
187  skipClusters = cms.InputTag('convClusters'),
188  ),
189  TOB4 = cms.PSet(
190  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
191  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
192  skipClusters = cms.InputTag('convClusters'),
193  ),
194  TOB5 = cms.PSet(
195  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
196  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
197  skipClusters = cms.InputTag('convClusters'),
198  ),
199  TOB6 = cms.PSet(
200  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
201  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
202  skipClusters = cms.InputTag('convClusters'),
203  )
204  )
205 
206 
207 photonConvTrajSeedFromSingleLeg.TrackRefitter = cms.InputTag('generalTracks')
208 photonConvTrajSeedFromSingleLeg.primaryVerticesTag = cms.InputTag('firstStepPrimaryVertices')
209 #photonConvTrajSeedFromQuadruplets.TrackRefitter = cms.InputTag('generalTracks')
210 #photonConvTrajSeedFromQuadruplets.primaryVerticesTag = cms.InputTag('pixelVertices')
211 eras.trackingLowPU.toModify(photonConvTrajSeedFromSingleLeg, primaryVerticesTag = "pixelVertices")
212 
213 
214 # TRACKER DATA CONTROL
215 
216 # QUALITY CUTS DURING TRACK BUILDING
218 convCkfTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
219  maxLostHits = 1,
220  minimumNumberOfHits = 3,
221  minPt = 0.1
222  )
223 
224 
225 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
226 convStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
227  ComponentName = cms.string('convStepChi2Est'),
228  nSigma = cms.double(3.0),
229  MaxChi2 = cms.double(30.0),
230  MaxDisplacement = cms.double(100),
231  MaxSagitta = cms.double(-1.),
232  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
233 )
234 
235 
236 # TRACK BUILDING
238 convCkfTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
239  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('convCkfTrajectoryFilter')),
240  minNrOfHitsForRebuild = 3,
241  maxCand = 1,
242  estimator = cms.string('convStepChi2Est')
243  )
244 
245 # MAKING OF TRACK CANDIDATES
247 convTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
248  src = cms.InputTag('photonConvTrajSeedFromSingleLeg:convSeedCandidates'),
249  clustersToSkip = cms.InputTag('convClusters'),
250  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('convCkfTrajectoryBuilder'))
251 )
252 
254 convStepFitterSmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
255  ComponentName = 'convStepFitterSmoother',
256  EstimateCut = 30,
257  Smoother = cms.string('convStepRKSmoother')
258  )
259 
260 convStepRKTrajectorySmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectorySmoother.clone(
261  ComponentName = cms.string('convStepRKSmoother'),
262  errorRescaling = 10.0
263  )
264 
265 
266 # TRACK FITTING
268 convStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
269  src = 'convTrackCandidates',
270  AlgorithmName = cms.string('conversionStep'),
271  Fitter = 'convStepFitterSmoother',
272  )
273 
274 
275 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
276 convStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
277  src='convStepTracks',
278  trackSelectors= cms.VPSet(
279  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
280  name = 'convStepLoose',
281  applyAdaptedPVCuts = False,
282  chi2n_par = 3.0,
283  res_par = ( 0.003, 0.001 ),
284  minNumberLayers = 3,
285  maxNumberLostLayers = 1,
286  minNumber3DLayers = 1,
287  d0_par1 = ( 5., 8.0 ), # not sure these values are sane....
288  dz_par1 = ( 5., 8.0 ),
289  d0_par2 = ( 5., 8.0 ),
290  dz_par2 = ( 5., 8.0 )
291  ),
292  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
293  name = 'convStepTight',
294  preFilterName = 'convStepLoose',
295  chi2n_par = 2.5,
296  res_par = ( 0.003, 0.001 ),
297  minNumberLayers = 3,
298  maxNumberLostLayers = 1,
299  minNumber3DLayers = 1,
300  d0_par1 = ( 5., 8.0 ),
301  dz_par1 = ( 5., 8.0 ),
302  d0_par2 = ( 5., 8.0 ),
303  dz_par2 = ( 5., 8.0 )
304  ),
305  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
306  name = 'convStep',
307  preFilterName = 'convStepTight',
308  chi2n_par = 2.0,
309  res_par = ( 0.003, 0.001 ),
310  minNumberLayers = 3,
311  maxNumberLostLayers = 1,
312  minNumber3DLayers = 1,
313  d0_par1 = ( 5., 8.0 ),
314  dz_par1 = ( 5., 8.0 ),
315  d0_par2 = ( 5., 8.0 ),
316  dz_par2 = ( 5., 8.0 )
317  ),
318  ) #end of vpset
319  ) #end of clone
320 
321 ConvStep = cms.Sequence( convClusters
322  + convLayerPairs
323  + photonConvTrajSeedFromSingleLeg
324  + convTrackCandidates
325  + convStepTracks
326  + convStepSelector
327  #+ Conv2Step #full quad-seeding sequence
328  )
329 
330 
331 ### Quad-seeding sequence disabled (#+ Conv2Step)
332 # if enabled, the quad-seeded tracks have to be merged with the single-leg seeded tracks
333 # in RecoTracker.FinalTrackSelectors.MergeTrackCollections_cff change:
334 ###
335 #conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
336 # TrackProducers = cms.VInputTag(cms.InputTag('convStepTracks')),
337 # hasSelector=cms.vint32(1),
338 # selectedTrackQuals = cms.VInputTag(cms.InputTag("convStepSelector","convStep")
339 # ),
340 # setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(1), pQual=cms.bool(True) )
341 # ),
342 # copyExtras = True,
343 # makeReKeyedSeeds = cms.untracked.bool(False)
344 # )
345 ###
346 # TO this:
347 ###
348 #conversionStepTracks = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
349 # TrackProducers = cms.VInputTag(
350 # cms.InputTag('convStepTracks'),
351 # cms.InputTag('conv2StepTracks')
352 # ),
353 # hasSelector=cms.vint32(1,1),
354 # selectedTrackQuals = cms.VInputTag(
355 # cms.InputTag("convStepSelector","convStep"),
356 # cms.InputTag("conv2StepSelector","conv2Step")
357 # ),
358 # setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )
359 # ),
360 # copyExtras = True,
361 # makeReKeyedSeeds = cms.untracked.bool(False)
362 # )
363 ###