CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TobTecStep_cff.py
Go to the documentation of this file.
2 
3 #######################################################################
4 # Very large impact parameter tracking using TOB + TEC ring 5 seeding #
5 #######################################################################
6 
8 tobTecStepClusters = trackClusterRemover.clone(
9  maxChi2 = cms.double(9.0),
10  trajectories = cms.InputTag("pixelLessStepTracks"),
11  pixelClusters = cms.InputTag("siPixelClusters"),
12  stripClusters = cms.InputTag("siStripClusters"),
13  oldClusterRemovalInfo = cms.InputTag("pixelLessStepClusters"),
14  overrideTrkQuals = cms.InputTag('pixelLessStep'),
15  TrackQuality = cms.string('highPurity'),
16  minNumberOfLayersWithMeasBeforeFiltering = cms.int32(0),
17 )
18 
19 # TRIPLET SEEDING LAYERS
21 tobTecStepSeedLayersTripl = cms.EDProducer("SeedingLayersEDProducer",
22  layerList = cms.vstring(
23  #TOB
24  'TOB1+TOB2+MTOB3',
25  #TOB+MTEC
26  'TOB1+TOB2+MTEC1_pos','TOB1+TOB2+MTEC1_neg',
27  ),
28  TOB = cms.PSet(
29  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
30  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
31  skipClusters = cms.InputTag('tobTecStepClusters')
32  ),
33  MTOB = cms.PSet(
34  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
35  skipClusters = cms.InputTag('tobTecStepClusters'),
36  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit")
37  ),
38  MTEC = cms.PSet(
39  rphiRecHits = cms.InputTag("siStripMatchedRecHits","rphiRecHit"),
40  skipClusters = cms.InputTag('tobTecStepClusters'),
41  useRingSlector = cms.bool(True),
42  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
43  minRing = cms.int32(6),
44  maxRing = cms.int32(7)
45  )
46 )
47 # TRIPLET SEEDS
49 tobTecStepSeedsTripl = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone()
50 #OrderedHitsFactory
51 tobTecStepSeedsTripl.OrderedHitsFactoryPSet.SeedingLayers = 'tobTecStepSeedLayersTripl'
52 tobTecStepSeedsTripl.OrderedHitsFactoryPSet.ComponentName = 'StandardMultiHitGenerator'
53 import RecoTracker.TkSeedGenerator.MultiHitGeneratorFromChi2_cfi
54 tobTecStepSeedsTripl.OrderedHitsFactoryPSet.GeneratorPSet = RecoTracker.TkSeedGenerator.MultiHitGeneratorFromChi2_cfi.MultiHitGeneratorFromChi2.clone(
55  extraPhiKDBox = 0.01
56  )
57 #RegionFactory
58 tobTecStepSeedsTripl.RegionFactoryPSet.RegionPSet.ptMin = 0.55
59 tobTecStepSeedsTripl.RegionFactoryPSet.RegionPSet.originHalfLength = 20.0
60 tobTecStepSeedsTripl.RegionFactoryPSet.RegionPSet.originRadius = 3.5
61 #SeedCreator
62 tobTecStepSeedsTripl.SeedCreatorPSet.ComponentName = 'SeedFromConsecutiveHitsCreator' #empirically better than 'SeedFromConsecutiveHitsTripletOnlyCreator'
63 tobTecStepSeedsTripl.SeedCreatorPSet.OriginTransverseErrorMultiplier = 1.0
64 #SeedComparitor
65 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi
66 
67 tobTecStepSeedsTripl.SeedComparitorPSet = cms.PSet(
68  ComponentName = cms.string('CombinedSeedComparitor'),
69  mode = cms.string("and"),
70  comparitors = cms.VPSet(
71  cms.PSet(
72  ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
73  FilterAtHelixStage = cms.bool(True),
74  FilterPixelHits = cms.bool(False),
75  FilterStripHits = cms.bool(True),
76  ClusterShapeHitFilterName = cms.string('tobTecStepClusterShapeHitFilter'),
77  ClusterShapeCacheSrc = cms.InputTag("siPixelClusterShapeCache") # not really needed here since FilterPixelHits=False
78  ),
79  RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi.StripSubClusterShapeSeedFilter.clone()
80  )
81 )
82 # PAIR SEEDING LAYERS
83 tobTecStepSeedLayersPair = cms.EDProducer("SeedingLayersEDProducer",
84  layerList = cms.vstring('TOB1+TEC1_pos','TOB1+TEC1_neg',
85  'TEC1_pos+TEC2_pos','TEC1_neg+TEC2_neg',
86  'TEC2_pos+TEC3_pos','TEC2_neg+TEC3_neg',
87  'TEC3_pos+TEC4_pos','TEC3_neg+TEC4_neg',
88  'TEC4_pos+TEC5_pos','TEC4_neg+TEC5_neg',
89  'TEC5_pos+TEC6_pos','TEC5_neg+TEC6_neg',
90  'TEC6_pos+TEC7_pos','TEC6_neg+TEC7_neg'),
91  TOB = cms.PSet(
92  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
93  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
94  skipClusters = cms.InputTag('tobTecStepClusters')
95  ),
96  TEC = cms.PSet(
97  matchedRecHits = cms.InputTag("siStripMatchedRecHits","matchedRecHit"),
98  skipClusters = cms.InputTag('tobTecStepClusters'),
99  useRingSlector = cms.bool(True),
100  TTRHBuilder = cms.string('WithTrackAngle'), clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
101  minRing = cms.int32(5),
102  maxRing = cms.int32(5)
103  )
104 )
105 # PAIR SEEDS
107 tobTecStepClusterShapeHitFilter = RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeHitFilterESProducer_cfi.ClusterShapeHitFilterESProducer.clone(
108  ComponentName = cms.string('tobTecStepClusterShapeHitFilter'),
109  PixelShapeFile= cms.string('RecoPixelVertexing/PixelLowPtUtilities/data/pixelShape.par'),
110  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight')),
111  doStripShapeCut = cms.bool(False)
112  )
113 
115 tobTecStepSeedsPair = RecoTracker.TkSeedGenerator.GlobalMixedSeeds_cff.globalMixedSeeds.clone()
116 #OrderedHitsFactory
117 tobTecStepSeedsPair.OrderedHitsFactoryPSet.ComponentName = cms.string('StandardHitPairGenerator')
118 tobTecStepSeedsPair.OrderedHitsFactoryPSet.SeedingLayers = 'tobTecStepSeedLayersPair'
119 #RegionFactory
120 tobTecStepSeedsPair.RegionFactoryPSet.RegionPSet.ptMin = 0.6
121 tobTecStepSeedsPair.RegionFactoryPSet.RegionPSet.originHalfLength = 30.0
122 tobTecStepSeedsPair.RegionFactoryPSet.RegionPSet.originRadius = 6.0
123 #SeedCreator
124 tobTecStepSeedsPair.SeedCreatorPSet.OriginTransverseErrorMultiplier = 1.0
125 #SeedComparitor
126 tobTecStepSeedsPair.SeedComparitorPSet = cms.PSet(
127  ComponentName = cms.string('CombinedSeedComparitor'),
128  mode = cms.string("and"),
129  comparitors = cms.VPSet(
130  cms.PSet(
131  ComponentName = cms.string('PixelClusterShapeSeedComparitor'),
132  FilterAtHelixStage = cms.bool(True),
133  FilterPixelHits = cms.bool(False),
134  FilterStripHits = cms.bool(True),
135  ClusterShapeHitFilterName = cms.string('tobTecStepClusterShapeHitFilter'),
136  ClusterShapeCacheSrc = cms.InputTag("siPixelClusterShapeCache") # not really needed here since FilterPixelHits=False
137  ),
138  RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi.StripSubClusterShapeSeedFilter.clone()
139  )
140 )
142 tobTecStepSeeds = RecoTracker.TkSeedGenerator.GlobalCombinedSeeds_cfi.globalCombinedSeeds.clone()
143 tobTecStepSeeds.seedCollections = cms.VInputTag(cms.InputTag('tobTecStepSeedsTripl'),cms.InputTag('tobTecStepSeedsPair'))
144 
145 # QUALITY CUTS DURING TRACK BUILDING (for inwardss and outwards track building steps)
147 
148 tobTecStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
149  maxLostHits = 0,
150  minimumNumberOfHits = 6,
151  minPt = 0.1,
152  minHitsMinPt = 3
153  )
154 
155 tobTecStepInOutTrajectoryFilter = tobTecStepTrajectoryFilter.clone(
156  maxLostHits = 0,
157  minimumNumberOfHits = 4,
158  minPt = 0.1,
159  minHitsMinPt = 3
160  )
161 
162 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimatorESProducer_cfi
163 tobTecStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimatorESProducer_cfi.Chi2ChargeMeasurementEstimator.clone(
164  ComponentName = cms.string('tobTecStepChi2Est'),
165  nSigma = cms.double(3.0),
166  MaxChi2 = cms.double(16.0),
167  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
168 )
169 
170 # TRACK BUILDING
172 tobTecStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
173  MeasurementTrackerName = '',
174  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('tobTecStepTrajectoryFilter')),
175  inOutTrajectoryFilter = cms.PSet(refToPSet_ = cms.string('tobTecStepInOutTrajectoryFilter')),
176  useSameTrajFilter = False,
177  minNrOfHitsForRebuild = 4,
178  alwaysUseInvalidHits = False,
179  maxCand = 2,
180  estimator = cms.string('tobTecStepChi2Est'),
181  #startSeedHitsInRebuild = True
182  maxDPhiForLooperReconstruction = cms.double(2.0),
183  maxPtForLooperReconstruction = cms.double(0.7)
184  )
185 
186 # MAKING OF TRACK CANDIDATES
188 tobTecStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
189  src = cms.InputTag('tobTecStepSeeds'),
190  clustersToSkip = cms.InputTag('tobTecStepClusters'),
191  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
192  numHitsForSeedCleaner = cms.int32(50),
193  onlyPixelHitsForSeedCleaner = cms.bool(True),
194 
195  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('tobTecStepTrajectoryBuilder')),
196  doSeedingRegionRebuilding = True,
197  useHitsSplitting = True,
198  cleanTrajectoryAfterInOut = True
199 )
200 
201 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
202 tobTecStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
203  ComponentName = cms.string('tobTecStepTrajectoryCleanerBySharedHits'),
204  fractionShared = cms.double(0.09),
205  allowSharedFirstHit = cms.bool(True)
206  )
207 tobTecStepTrackCandidates.TrajectoryCleaner = 'tobTecStepTrajectoryCleanerBySharedHits'
208 
209 # TRACK FITTING AND SMOOTHING OPTIONS
211 tobTecStepFitterSmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.KFFittingSmootherWithOutliersRejectionAndRK.clone(
212  ComponentName = 'tobTecStepFitterSmoother',
213  EstimateCut = 30,
214  MinNumberOfHits = 8,
215  Fitter = cms.string('tobTecStepRKFitter'),
216  Smoother = cms.string('tobTecStepRKSmoother')
217  )
218 
219 tobTecStepFitterSmootherForLoopers = tobTecStepFitterSmoother.clone(
220  ComponentName = 'tobTecStepFitterSmootherForLoopers',
221  Fitter = cms.string('tobTecStepRKFitterForLoopers'),
222  Smoother = cms.string('tobTecStepRKSmootherForLoopers')
223 )
224 
225 # Also necessary to specify minimum number of hits after final track fit
226 tobTecStepRKTrajectoryFitter = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectoryFitter.clone(
227  ComponentName = cms.string('tobTecStepRKFitter'),
228  minHits = 8
229 )
230 tobTecStepRKTrajectoryFitterForLoopers = tobTecStepRKTrajectoryFitter.clone(
231  ComponentName = cms.string('tobTecStepRKFitterForLoopers'),
232  Propagator = cms.string('PropagatorWithMaterialForLoopers'),
233 )
234 
235 tobTecStepRKTrajectorySmoother = TrackingTools.TrackFitters.RungeKuttaFitters_cff.RKTrajectorySmoother.clone(
236  ComponentName = cms.string('tobTecStepRKSmoother'),
237  errorRescaling = 10.0,
238  minHits = 8
239 )
240 tobTecStepRKTrajectorySmootherForLoopers = tobTecStepRKTrajectorySmoother.clone(
241  ComponentName = cms.string('tobTecStepRKSmootherForLoopers'),
242  Propagator = cms.string('PropagatorWithMaterialForLoopers'),
243 )
244 
246 tobTecFlexibleKFFittingSmoother = TrackingTools.TrackFitters.FlexibleKFFittingSmoother_cfi.FlexibleKFFittingSmoother.clone(
247  ComponentName = cms.string('tobTecFlexibleKFFittingSmoother'),
248  standardFitter = cms.string('tobTecStepFitterSmoother'),
249  looperFitter = cms.string('tobTecStepFitterSmootherForLoopers'),
250 )
251 
252 
253 # TRACK FITTING
255 tobTecStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
256  src = 'tobTecStepTrackCandidates',
257  AlgorithmName = cms.string('tobTecStep'),
258  #Fitter = 'tobTecStepFitterSmoother',
259  Fitter = 'tobTecFlexibleKFFittingSmoother',
260  )
261 
262 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
263 tobTecStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
264  src='tobTecStepTracks',
265  useAnyMVA = cms.bool(True),
266  GBRForestLabel = cms.string('MVASelectorIter6_13TeV_v0'),
267  trackSelectors= cms.VPSet(
268  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
269  name = 'tobTecStepLoose',
270  chi2n_par = 9999,
271  useMVA = cms.bool(True),
272  minMVA = cms.double(-0.6),
273  #chi2n_par = 0.4,
274  #res_par = ( 0.003, 0.001 ),
275  #minNumberLayers = 5,
276  #maxNumberLostLayers = 1,
277  #minNumber3DLayers = 2,
278  d0_par1 = ( 2.0, 4.0 ),
279  dz_par1 = ( 1.8, 4.0 ),
280  d0_par2 = ( 2.0, 4.0 ),
281  dz_par2 = ( 1.8, 4.0 )
282  ),
283  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
284  name = 'tobTecStepTight',
285  preFilterName = 'tobTecStepLoose',
286  chi2n_par = 0.3,
287  res_par = ( 0.003, 0.001 ),
288  minNumberLayers = 5,
289  maxNumberLostLayers = 0,
290  minNumber3DLayers = 2,
291  d0_par1 = ( 1.5, 4.0 ),
292  dz_par1 = ( 1.4, 4.0 ),
293  d0_par2 = ( 1.5, 4.0 ),
294  dz_par2 = ( 1.4, 4.0 )
295  ),
296  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
297  name = 'tobTecStep',
298  preFilterName = 'tobTecStepLoose',
299  chi2n_par = cms.double(9999),
300  useMVA = cms.bool(True),
301  minMVA = cms.double(0.6),
302  qualityBit = cms.string('highPurity'),
303  keepAllTracks = cms.bool(True),
304  #chi2n_par = 0.2,
305  #res_par = ( 0.003, 0.001 ),
306  #minNumberLayers = 5,
307  #maxNumberLostLayers = 0,
308  #minNumber3DLayers = 2,
309  #max_minMissHitOutOrIn = 1,
310  #max_lostHitFraction = 1.0,
311  d0_par1 = ( 1.2, 4.0 ),
312  dz_par1 = ( 1.1, 4.0 ),
313  d0_par2 = ( 1.2, 4.0 ),
314  dz_par2 = ( 1.1, 4.0 )
315  ),
316  ) #end of vpset
317  ) #end of clone
318 
319 
320 TobTecStep = cms.Sequence(tobTecStepClusters*
321  tobTecStepSeedLayersTripl*
322  tobTecStepSeedsTripl*
323  tobTecStepSeedLayersPair*
324  tobTecStepSeedsPair*
325  tobTecStepSeeds*
326  tobTecStepTrackCandidates*
327  tobTecStepTracks*
328  tobTecStepSelector)
329