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