CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MixedTripletStep_cff.py
Go to the documentation of this file.
2 
3 ###############################################################
4 # Large impact parameter Tracking using mixed-triplet seeding #
5 ###############################################################
6 
7 #here just for backward compatibility
8 chargeCut2069Clusters = cms.EDProducer("ClusterChargeMasker",
9  oldClusterRemovalInfo = cms.InputTag("pixelPairStepClusters"),
10  pixelClusters = cms.InputTag("siPixelClusters"),
11  stripClusters = cms.InputTag("siStripClusters"),
12  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
13 )
14 
16 mixedTripletStepClusters = trackClusterRemover.clone(
17  maxChi2 = cms.double(9.0),
18  trajectories = cms.InputTag("pixelPairStepTracks"),
19  pixelClusters = cms.InputTag("siPixelClusters"),
20  stripClusters = cms.InputTag("siStripClusters"),
21 # oldClusterRemovalInfo = cms.InputTag("pixelPairStepClusters"),
22  oldClusterRemovalInfo = cms.InputTag("chargeCut2069Clusters"),
23  overrideTrkQuals = cms.InputTag('pixelPairStepSelector','pixelPairStep'),
24  TrackQuality = cms.string('highPurity'),
25  minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0),
26 )
27 
28 # SEEDING LAYERS
30 mixedTripletStepSeedLayersA = cms.EDProducer("SeedingLayersEDProducer",
31  layerList = cms.vstring('BPix1+BPix2+BPix3',
32  'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
33  'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
34  'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg'),
35  BPix = cms.PSet(
36  TTRHBuilder = cms.string('WithTrackAngle'),
37  HitProducer = cms.string('siPixelRecHits'),
38  skipClusters = cms.InputTag('mixedTripletStepClusters')
39  ),
40  FPix = cms.PSet(
41  TTRHBuilder = cms.string('WithTrackAngle'),
42  HitProducer = cms.string('siPixelRecHits'),
43  skipClusters = cms.InputTag('mixedTripletStepClusters')
44  ),
45  TEC = cms.PSet(
46  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
47  useRingSlector = cms.bool(True),
48  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
49  minRing = cms.int32(1),
50  maxRing = cms.int32(1),
51  skipClusters = cms.InputTag('mixedTripletStepClusters')
52  )
53 )
54 
55 # SEEDS
57 PixelTripletLargeTipGenerator.extraHitRZtolerance = 0.0
58 PixelTripletLargeTipGenerator.extraHitRPhitolerance = 0.0
60 mixedTripletStepSeedsA = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone()
61 mixedTripletStepSeedsA.OrderedHitsFactoryPSet.SeedingLayers = 'mixedTripletStepSeedLayersA'
62 mixedTripletStepSeedsA.OrderedHitsFactoryPSet.GeneratorPSet = cms.PSet(PixelTripletLargeTipGenerator)
63 mixedTripletStepSeedsA.SeedCreatorPSet.ComponentName = 'SeedFromConsecutiveHitsTripletOnlyCreator'
64 mixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.ptMin = 0.4
65 mixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originHalfLength = 15.0
66 mixedTripletStepSeedsA.RegionFactoryPSet.RegionPSet.originRadius = 1.5
67 
69 mixedTripletStepClusterShapeHitFilter = RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi.ClusterShapeHitFilterESProducer.clone(
70  ComponentName = cms.string('mixedTripletStepClusterShapeHitFilter'),
71  PixelShapeFile= cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape.par'),
72  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
73  )
74 
75 mixedTripletStepSeedsA.SeedComparitorPSet = cms.PSet(
76  ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
77  FilterAtHelixStage = cms.bool(False),
78  FilterPixelHits = cms.bool(True),
79  FilterStripHits = cms.bool(True),
80  ClusterShapeHitFilterName = cms.string('mixedTripletStepClusterShapeHitFilter'),
81  ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache')
82  )
83 
84 # SEEDING LAYERS
85 mixedTripletStepSeedLayersB = cms.EDProducer("SeedingLayersEDProducer",
86  layerList = cms.vstring('BPix2+BPix3+TIB1'),
87  BPix = cms.PSet(
88  TTRHBuilder = cms.string('WithTrackAngle'),
89  HitProducer = cms.string('siPixelRecHits'),
90  skipClusters = cms.InputTag('mixedTripletStepClusters')
91  ),
92  TIB = cms.PSet(
93  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
94  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
95  skipClusters = cms.InputTag('mixedTripletStepClusters')
96  )
97 )
98 
99 # SEEDS
101 PixelTripletLargeTipGenerator.extraHitRZtolerance = 0.0
102 PixelTripletLargeTipGenerator.extraHitRPhitolerance = 0.0
104 mixedTripletStepSeedsB = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone()
105 mixedTripletStepSeedsB.OrderedHitsFactoryPSet.SeedingLayers = 'mixedTripletStepSeedLayersB'
106 mixedTripletStepSeedsB.OrderedHitsFactoryPSet.GeneratorPSet = cms.PSet(PixelTripletLargeTipGenerator)
107 mixedTripletStepSeedsB.SeedCreatorPSet.ComponentName = 'SeedFromConsecutiveHitsTripletOnlyCreator'
108 mixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.ptMin = 0.6
109 mixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.originHalfLength = 10.0
110 mixedTripletStepSeedsB.RegionFactoryPSet.RegionPSet.originRadius = 1.5
111 
112 mixedTripletStepSeedsB.SeedComparitorPSet = cms.PSet(
113  ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
114  FilterAtHelixStage = cms.bool(False),
115  FilterPixelHits = cms.bool(True),
116  FilterStripHits = cms.bool(True),
117  ClusterShapeHitFilterName = cms.string('mixedTripletStepClusterShapeHitFilter'),
118  ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache')
119  )
120 
122 mixedTripletStepSeeds = RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi.globalCombinedSeeds.clone()
123 mixedTripletStepSeeds.seedCollections = cms.VInputTag(
124  cms.InputTag('mixedTripletStepSeedsA'),
125  cms.InputTag('mixedTripletStepSeedsB'),
126  )
127 
128 # QUALITY CUTS DURING TRACK BUILDING
130 mixedTripletStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
131  maxLostHits = 0,
132  minimumNumberOfHits = 3,
133  minPt = 0.1
134  )
135 
136 # Propagator taking into account momentum uncertainty in multiple scattering calculation.
139 mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagator_cfi.MaterialPropagator.clone(
140 #mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.MaterialPropagatorParabolicMF.clone(
141  ComponentName = 'mixedTripletStepPropagator',
142  ptMin = 0.1
143  )
144 
146 mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.OppositeMaterialPropagator_cfi.OppositeMaterialPropagator.clone(
147 #mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.OppositeMaterialPropagatorParabolicMF.clone(
148  ComponentName = 'mixedTripletStepPropagatorOpposite',
149  ptMin = 0.1
150  )
151 
152 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimatorESProducer_cfi
153 mixedTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimatorESProducer_cfi.Chi2ChargeMeasurementEstimator.clone(
154  ComponentName = cms.string('mixedTripletStepChi2Est'),
155  nSigma = cms.double(3.0),
156  MaxChi2 = cms.double(16.0),
157  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
158 )
159 
160 # TRACK BUILDING
162 mixedTripletStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
163  MeasurementTrackerName = '',
164  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('mixedTripletStepTrajectoryFilter')),
165  propagatorAlong = cms.string('mixedTripletStepPropagator'),
166  propagatorOpposite = cms.string('mixedTripletStepPropagatorOpposite'),
167  maxCand = 2,
168  estimator = cms.string('mixedTripletStepChi2Est'),
169  maxDPhiForLooperReconstruction = cms.double(2.0),
170  maxPtForLooperReconstruction = cms.double(0.7)
171  )
172 
173 # MAKING OF TRACK CANDIDATES
175 mixedTripletStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
176  src = cms.InputTag('mixedTripletStepSeeds'),
177  clustersToSkip = cms.InputTag('mixedTripletStepClusters'),
178  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
179  numHitsForSeedCleaner = cms.int32(50),
180  #onlyPixelHitsForSeedCleaner = cms.bool(True),
181 
182  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('mixedTripletStepTrajectoryBuilder')),
183  doSeedingRegionRebuilding = True,
184  useHitsSplitting = True
185 )
186 
187 
188 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
189 mixedTripletStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
190  ComponentName = cms.string('mixedTripletStepTrajectoryCleanerBySharedHits'),
191  fractionShared = cms.double(0.11),
192  allowSharedFirstHit = cms.bool(True)
193  )
194 mixedTripletStepTrackCandidates.TrajectoryCleaner = 'mixedTripletStepTrajectoryCleanerBySharedHits'
195 
196 
197 # TRACK FITTING
199 mixedTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
200  AlgorithmName = cms.string('mixedTripletStep'),
201  src = 'mixedTripletStepTrackCandidates',
202  Fitter = cms.string('FlexibleKFFittingSmoother')
203 )
204 
205 # TRACK SELECTION AND QUALITY FLAG SETTING.
206 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
207 mixedTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
208  src='mixedTripletStepTracks',
209  useAnyMVA = cms.bool(True),
210  GBRForestLabel = cms.string('MVASelectorIter4_13TeV_v0'),
211  trackSelectors= cms.VPSet(
212  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
213  name = 'mixedTripletStepVtxLoose',
214  useMVA = cms.bool(True),
215  minMVA = cms.double(-0.5),
216  chi2n_par = 9999,
217  #chi2n_par = 1.0,
218  #res_par = ( 0.003, 0.001 ),
219  #minNumberLayers = 3,
220  #maxNumberLostLayers = 1,
221  #minNumber3DLayers = 2,
222  d0_par1 = ( 1.2, 3.0 ),
223  dz_par1 = ( 1.2, 3.0 ),
224  d0_par2 = ( 1.3, 3.0 ),
225  dz_par2 = ( 1.3, 3.0 )
226  ),
227  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
228  name = 'mixedTripletStepTrkLoose',
229  useMVA = cms.bool(True),
230  minMVA = cms.double(-0.5),
231  chi2n_par = 9999,
232  #chi2n_par = 0.6,
233  #res_par = ( 0.003, 0.001 ),
234  #minNumberLayers = 4,
235  #maxNumberLostLayers = 1,
236  #minNumber3DLayers = 3,
237  d0_par1 = ( 1.1, 4.0 ),
238  dz_par1 = ( 1.1, 4.0 ),
239  d0_par2 = ( 1.1, 4.0 ),
240  dz_par2 = ( 1.1, 4.0 )
241  ),
242  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
243  name = 'mixedTripletStepVtxTight',
244  preFilterName = 'mixedTripletStepVtxLoose',
245  chi2n_par = 0.6,
246  res_par = ( 0.003, 0.001 ),
247  minNumberLayers = 3,
248  maxNumberLostLayers = 1,
249  minNumber3DLayers = 3,
250  d0_par1 = ( 1.1, 3.0 ),
251  dz_par1 = ( 1.1, 3.0 ),
252  d0_par2 = ( 1.2, 3.0 ),
253  dz_par2 = ( 1.2, 3.0 )
254  ),
255  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
256  name = 'mixedTripletStepTrkTight',
257  preFilterName = 'mixedTripletStepTrkLoose',
258  chi2n_par = 0.4,
259  res_par = ( 0.003, 0.001 ),
260  minNumberLayers = 5,
261  maxNumberLostLayers = 1,
262  minNumber3DLayers = 4,
263  d0_par1 = ( 1.0, 4.0 ),
264  dz_par1 = ( 1.0, 4.0 ),
265  d0_par2 = ( 1.0, 4.0 ),
266  dz_par2 = ( 1.0, 4.0 )
267  ),
268  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
269  name = 'mixedTripletStepVtx',
270  preFilterName = 'mixedTripletStepVtxLoose',
271  chi2n_par = 9999,
272  useMVA = cms.bool(True),
273  minMVA = cms.double(0.5),
274  qualityBit = cms.string('highPurity'),
275  keepAllTracks = cms.bool(True),
276  #chi2n_par = 0.4,
277  #res_par = ( 0.003, 0.001 ),
278  #minNumberLayers = 3,
279  #maxNumberLostLayers = 1,
280  #minNumber3DLayers = 3,
281  #max_minMissHitOutOrIn = 1,
282  #max_lostHitFraction = 1.0,
283  d0_par1 = ( 1.0, 3.0 ),
284  dz_par1 = ( 1.0, 3.0 ),
285  d0_par2 = ( 1.1, 3.0 ),
286  dz_par2 = ( 1.1, 3.0 )
287  ),
288  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
289  name = 'mixedTripletStepTrk',
290  preFilterName = 'mixedTripletStepTrkLoose',
291  chi2n_par = 9999,
292  useMVA = cms.bool(True),
293  minMVA = cms.double(0.5),
294  qualityBit = cms.string('highPurity'),
295  keepAllTracks = cms.bool(True),
296  #chi2n_par = 0.25,
297  #res_par = ( 0.003, 0.001 ),
298  #minNumberLayers = 5,
299  #maxNumberLostLayers = 0,
300  #minNumber3DLayers = 4,
301  #max_minMissHitOutOrIn = 1,
302  #max_lostHitFraction = 1.0,
303  d0_par1 = ( 0.8, 4.0 ),
304  dz_par1 = ( 0.8, 4.0 ),
305  d0_par2 = ( 0.8, 4.0 ),
306  dz_par2 = ( 0.8, 4.0 )
307  )
308  ) #end of vpset
309  ) #end of clone
310 
311 import RecoTracker.FinalTrackSelectors.trackListMerger_cfi
312 mixedTripletStep = RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
313  TrackProducers = cms.VInputTag(cms.InputTag('mixedTripletStepTracks'),
314  cms.InputTag('mixedTripletStepTracks')),
315  hasSelector=cms.vint32(1,1),
316  shareFrac=cms.double(0.11),
317  indivShareFrac=cms.vdouble(0.11,0.11),
318  selectedTrackQuals = cms.VInputTag(cms.InputTag("mixedTripletStepSelector","mixedTripletStepVtx"),
319  cms.InputTag("mixedTripletStepSelector","mixedTripletStepTrk")),
320  setsToMerge = cms.VPSet( cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )),
321  writeOnlyTrkQuals=cms.bool(True)
322 )
323 
324 
325 MixedTripletStep = cms.Sequence(chargeCut2069Clusters*mixedTripletStepClusters*
326  mixedTripletStepSeedLayersA*
327  mixedTripletStepSeedsA*
328  mixedTripletStepSeedLayersB*
329  mixedTripletStepSeedsB*
330  mixedTripletStepSeeds*
331  mixedTripletStepTrackCandidates*
332  mixedTripletStepTracks*
333  mixedTripletStepSelector*
334  mixedTripletStep)