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