CMS 3D CMS Logo

HighPtTripletStep_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 import RecoTracker.IterativeTracking.iterativeTkConfig as _cfg
3 
4 ### high-pT triplets ###
5 
6 # NEW CLUSTERS (remove previously used clusters)
7 highPtTripletStepClusters = _cfg.clusterRemoverForIter("HighPtTripletStep")
8 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
9  _era.toReplaceWith(highPtTripletStepClusters, _cfg.clusterRemoverForIter("HighPtTripletStep", _eraName, _postfix))
10 
11 
12 # SEEDING LAYERS
13 import RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi as _PixelLayerTriplets_cfi
14 highPtTripletStepSeedLayers = _PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
15  layerList = [
16  'BPix1+BPix2+BPix3',
17  'BPix2+BPix3+BPix4',
18  'BPix1+BPix3+BPix4',
19  'BPix1+BPix2+BPix4',
20  'BPix2+BPix3+FPix1_pos', 'BPix2+BPix3+FPix1_neg',
21  'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
22  'BPix1+BPix3+FPix1_pos', 'BPix1+BPix3+FPix1_neg',
23  'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
24  'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
25  'BPix1+BPix2+FPix2_pos', 'BPix1+BPix2+FPix2_neg',
26  'FPix1_pos+FPix2_pos+FPix3_pos', 'FPix1_neg+FPix2_neg+FPix3_neg',
27  'BPix1+FPix2_pos+FPix3_pos', 'BPix1+FPix2_neg+FPix3_neg',
28  'BPix1+FPix1_pos+FPix3_pos', 'BPix1+FPix1_neg+FPix3_neg'
29  ],
30  BPix = dict(skipClusters = cms.InputTag('highPtTripletStepClusters')),
31  FPix = dict(skipClusters = cms.InputTag('highPtTripletStepClusters'))
32 )
33 
34 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
35 trackingPhase2PU140.toModify(highPtTripletStepSeedLayers,
36 # combination with gap removed as only source of fakes in current geometry (kept for doc)
37  layerList = ['BPix1+BPix2+BPix3', 'BPix2+BPix3+BPix4',
38  'BPix1+BPix3+BPix4', 'BPix1+BPix2+BPix4',
39  'BPix2+BPix3+FPix1_pos', 'BPix2+BPix3+FPix1_neg',
40  'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
41  'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
42  'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
43 # 'BPix1+BPix2+FPix2_pos', 'BPix1+BPix2+FPix2_neg',
44  'FPix1_pos+FPix2_pos+FPix3_pos', 'FPix1_neg+FPix2_neg+FPix3_neg',
45  'BPix1+FPix2_pos+FPix3_pos', 'BPix1+FPix2_neg+FPix3_neg',
46 # 'BPix1+FPix1_pos+FPix3_pos', 'BPix1+FPix1_neg+FPix3_neg',
47  'FPix2_pos+FPix3_pos+FPix4_pos', 'FPix2_neg+FPix3_neg+FPix4_neg',
48  'FPix3_pos+FPix4_pos+FPix5_pos', 'FPix3_neg+FPix4_neg+FPix5_neg',
49  'FPix4_pos+FPix5_pos+FPix6_pos', 'FPix4_neg+FPix5_neg+FPix6_neg',
50  'FPix5_pos+FPix6_pos+FPix7_pos', 'FPix5_neg+FPix6_neg+FPix7_neg',
51  'FPix6_pos+FPix7_pos+FPix8_pos', 'FPix6_neg+FPix7_neg+FPix8_neg',
52 # removed as redunant and covering effectively only eta>4 (here for documentation, to be optimized after TDR)
53 # 'FPix6_pos+FPix7_pos+FPix9_pos', 'FPix6_neg+FPix7_neg+FPix9_neg']
54  ]
55 )
56 # TrackingRegion
57 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
58 highPtTripletStepTrackingRegions = _globalTrackingRegionFromBeamSpot.clone(RegionPSet = dict(
59  ptMin = 0.6,
60  originRadius = 0.02,
61  nSigmaZ = 4.0
62 ))
63 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
64 trackingPhase1.toModify(highPtTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.55))
65 from Configuration.Eras.Modifier_trackingPhase1PU70_cff import trackingPhase1PU70
66 trackingPhase1PU70.toModify(highPtTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.7))
67 trackingPhase2PU140.toModify(highPtTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.9, originRadius = 0.03))
68 
69 # seeding
70 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
71 highPtTripletStepHitDoublets = _hitPairEDProducer.clone(
72  seedingLayers = "highPtTripletStepSeedLayers",
73  trackingRegions = "highPtTripletStepTrackingRegions",
74  maxElement = 0,
75  produceIntermediateHitDoublets = True,
76 )
77 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
79 import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
80 highPtTripletStepHitTriplets = _pixelTripletHLTEDProducer.clone(
81  doublets = "highPtTripletStepHitDoublets",
82  produceSeedingHitSets = True,
83  SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone()
84 )
85 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
86 highPtTripletStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
87  seedingHitSets = "highPtTripletStepHitTriplets",
88 )
89 
90 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer
91 trackingPhase1.toModify(highPtTripletStepHitDoublets, layerPairs = [0,1]) # layer pairs (0,1), (1,2)
92 trackingPhase1.toReplaceWith(highPtTripletStepHitTriplets, _caHitTripletEDProducer.clone(
93  doublets = "highPtTripletStepHitDoublets",
94  extraHitRPhitolerance = highPtTripletStepHitTriplets.extraHitRPhitolerance,
95  SeedComparitorPSet = highPtTripletStepHitTriplets.SeedComparitorPSet,
96  maxChi2 = dict(
97  pt1 = 0.8, pt2 = 8,
98  value1 = 100, value2 = 6,
99  ),
100  useBendingCorrection = True,
101  CAThetaCut = 0.004,
102  CAPhiCut = 0.07,
103  CAHardPtCut = 0.3,
104 ))
105 
106 # QUALITY CUTS DURING TRACK BUILDING
107 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
108 _highPtTripletStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
109  minimumNumberOfHits = 3,
110  minPt = 0.2,
111 )
112 highPtTripletStepTrajectoryFilterBase = _highPtTripletStepTrajectoryFilterBase.clone(
113  maxCCCLostHits = 0,
114  minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
115 )
116 trackingPhase1PU70.toReplaceWith(highPtTripletStepTrajectoryFilterBase, _highPtTripletStepTrajectoryFilterBase)
117 trackingPhase2PU140.toReplaceWith(highPtTripletStepTrajectoryFilterBase, _highPtTripletStepTrajectoryFilterBase)
118 highPtTripletStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
119  filters = [cms.PSet(refToPSet_ = cms.string('highPtTripletStepTrajectoryFilterBase'))]
120 )
121 
122 highPtTripletStepTrajectoryFilterInOut = highPtTripletStepTrajectoryFilterBase.clone(
123  minimumNumberOfHits = 4,
124  seedExtension = 1,
125  strictSeedExtension = False, # allow inactive
126  pixelSeedExtension = False,
127 )
128 
129 
130 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
131 highPtTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
132  ComponentName = 'highPtTripletStepChi2Est',
133  nSigma = 3.0,
134  MaxChi2 = 30.0,
135  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutLoose'),
136  pTChargeCutThreshold = 15.
137 )
138 trackingPhase1PU70.toModify(highPtTripletStepChi2Est,
139  clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")
140 )
141 trackingPhase2PU140.toModify(highPtTripletStepChi2Est,
142  clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone"),
143  MaxChi2 = cms.double(25.0)
144 )
145 
146 
147 # TRACK BUILDING
148 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi as _GroupedCkfTrajectoryBuilder_cfi
149 highPtTripletStepTrajectoryBuilder = _GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
150  trajectoryFilter = dict(refToPSet_ = 'highPtTripletStepTrajectoryFilter'),
151  alwaysUseInvalidHits = True,
152  maxCand = 3,
153  estimator = 'highPtTripletStepChi2Est',
154  maxDPhiForLooperReconstruction = cms.double(2.0),
155  # 0.63 GeV is the maximum pT for a charged particle to loop within the 1.1m radius
156  # of the outermost Tracker barrel layer (with B=3.8T)
157  maxPtForLooperReconstruction = cms.double(0.7)
158 )
159 trackingPhase1PU70.toModify(highPtTripletStepTrajectoryBuilder,
160  MeasurementTrackerName = '',
161  maxCand = 3,
162 )
163 trackingPhase2PU140.toModify(highPtTripletStepTrajectoryBuilder,
164  inOutTrajectoryFilter = dict(refToPSet_ = "highPtTripletStepTrajectoryFilterInOut"),
165  useSameTrajFilter = False,
166  maxCand = 3,
167 )
168 
169 # MAKING OF TRACK CANDIDATES
170 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi as _CkfTrackCandidates_cfi
171 highPtTripletStepTrackCandidates = _CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
172  src = 'highPtTripletStepSeeds',
173  clustersToSkip = cms.InputTag('highPtTripletStepClusters'),
174  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
175  numHitsForSeedCleaner = cms.int32(50),
176  onlyPixelHitsForSeedCleaner = cms.bool(True),
177  TrajectoryBuilderPSet = dict(refToPSet_ = 'highPtTripletStepTrajectoryBuilder'),
178  doSeedingRegionRebuilding = True,
179  useHitsSplitting = True
180 )
181 
182 # For Phase1PU70 & Phase2PU140
183 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits as _trajectoryCleanerBySharedHits
184 highPtTripletStepTrajectoryCleanerBySharedHits = _trajectoryCleanerBySharedHits.clone(
185  ComponentName = 'highPtTripletStepTrajectoryCleanerBySharedHits',
186  fractionShared = 0.16,
187  allowSharedFirstHit = True
188 )
189 trackingPhase1PU70.toModify(highPtTripletStepTrackCandidates, TrajectoryCleaner = 'highPtTripletStepTrajectoryCleanerBySharedHits')
190 trackingPhase2PU140.toModify(highPtTripletStepTrackCandidates,
191  TrajectoryCleaner = 'highPtTripletStepTrajectoryCleanerBySharedHits',
192  clustersToSkip = None,
193  phase2clustersToSkip = cms.InputTag("highPtTripletStepClusters")
194 )
195 
196 # TRACK FITTING
198 highPtTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
199  src = 'highPtTripletStepTrackCandidates',
200  AlgorithmName = 'highPtTripletStep',
201  Fitter = 'FlexibleKFFittingSmoother',
202 )
203 
204 
205 # Final selection
207 from RecoTracker.FinalTrackSelectors.TrackCutClassifier_cfi import TrackCutClassifier
208 highPtTripletStep = TrackCutClassifier.clone(
209  src = "highPtTripletStepTracks",
210  vertices = "firstStepPrimaryVertices",
211  mva = dict(
212  minPixelHits = [1,1,1],
213  maxChi2 = [9999.,9999.,9999.],
214  maxChi2n = [2.0,1.0,0.7],
215  minLayers = [3,3,3],
216  min3DLayers = [3,3,3],
217  maxLostLayers = [3,2,2],
218  dz_par = dict(
219  dz_par1 = [0.8,0.7,0.7],
220  dz_par2 = [0.6,0.5,0.4],
221  dz_exp = [4,4,4]
222  ),
223  dr_par = dict(
224  dr_par1 = [0.7,0.6,0.5],
225  dr_par2 = [0.4,0.35,0.25],
226  dr_exp = [4,4,4],
227  d0err_par = [0.002,0.002,0.001]
228  )
229  )
230 )
231 
232 trackingPhase1.toReplaceWith(highPtTripletStep, TrackMVAClassifierPrompt.clone(
233  src = 'highPtTripletStepTracks',
234  GBRForestLabel = 'MVASelectorHighPtTripletStep_Phase1',
235  qualityCuts = [0.2,0.3,0.4],
236 ))
237 from Configuration.Eras.Modifier_trackingPhase1QuadProp_cff import trackingPhase1QuadProp
238 trackingPhase1QuadProp.toReplaceWith(highPtTripletStep, TrackMVAClassifierPrompt.clone(
239  src = 'highPtTripletStepTracks',
240  GBRForestLabel = 'MVASelectorHighPtTripletStep_Phase1',
241  qualityCuts = [0.2,0.3,0.4],
242 ))
243 
244 
245 # For Phase1PU70
246 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
247 highPtTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
248  src = 'highPtTripletStepTracks',
249  trackSelectors = [
250  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
251  name = 'highPtTripletStepLoose',
252  chi2n_par = 2.0,
253  res_par = ( 0.003, 0.002 ),
254  minNumberLayers = 3,
255  maxNumberLostLayers = 3,
256  minNumber3DLayers = 3,
257  d0_par1 = ( 0.7, 4.0 ),
258  dz_par1 = ( 0.8, 4.0 ),
259  d0_par2 = ( 0.4, 4.0 ),
260  dz_par2 = ( 0.6, 4.0 )
261  ), #end of pset
262  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
263  name = 'highPtTripletStepTight',
264  preFilterName = 'highPtTripletStepLoose',
265  chi2n_par = 1.0,
266  res_par = ( 0.003, 0.002 ),
267  minNumberLayers = 3,
268  maxNumberLostLayers = 2,
269  minNumber3DLayers = 3,
270  d0_par1 = ( 0.6, 4.0 ),
271  dz_par1 = ( 0.7, 4.0 ),
272  d0_par2 = ( 0.35, 4.0 ),
273  dz_par2 = ( 0.5, 4.0 )
274  ),
275  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
276  name = 'highPtTripletStep',
277  preFilterName = 'highPtTripletStepTight',
278  chi2n_par = 0.7,
279  res_par = ( 0.003, 0.001 ),
280  minNumberLayers = 3,
281  maxNumberLostLayers = 2,
282  minNumber3DLayers = 3,
283  d0_par1 = ( 0.5, 4.0 ),
284  dz_par1 = ( 0.7, 4.0 ),
285  d0_par2 = ( 0.25, 4.0 ),
286  dz_par2 = ( 0.4, 4.0 )
287  ),
288  ]
289 ) #end of clone
290 
291 trackingPhase2PU140.toModify(highPtTripletStepSelector,
292  trackSelectors= cms.VPSet(
293  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
294  name = 'highPtTripletStepLoose',
295  chi2n_par = 2.0,
296  res_par = ( 0.003, 0.002 ),
297  minNumberLayers = 3,
298  maxNumberLostLayers = 3,
299  minNumber3DLayers = 3,
300  d0_par1 = ( 0.7, 4.0 ),
301  dz_par1 = ( 0.8, 4.0 ),
302  d0_par2 = ( 0.6, 4.0 ),
303  dz_par2 = ( 0.6, 4.0 )
304  ), #end of pset
305  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
306  name = 'highPtTripletStepTight',
307  preFilterName = 'highPtTripletStepLoose',
308  chi2n_par = 1.0,
309  res_par = ( 0.003, 0.002 ),
310  minNumberLayers = 3,
311  maxNumberLostLayers = 2,
312  minNumber3DLayers = 3,
313  d0_par1 = ( 0.6, 4.0 ),
314  dz_par1 = ( 0.7, 4.0 ),
315  d0_par2 = ( 0.5, 4.0 ),
316  dz_par2 = ( 0.5, 4.0 )
317  ),
318  #FIXME: the cuts on min_nhits and minNumber*Layers are introduced to mitigate
319  #the cluster shape filter cut not working properly yet. To be remove in the future.
320  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
321  name = 'highPtTripletStep',
322  preFilterName = 'highPtTripletStepTight',
323  chi2n_par = 0.6,
324  res_par = ( 0.003, 0.001 ),
325  min_nhits = 5,
326  minNumberLayers = 5,
327  maxNumberLostLayers = 2,
328  minNumber3DLayers = 5,
329  d0_par1 = ( 0.5, 4.0 ),
330  dz_par1 = ( 0.6, 4.0 ),
331  d0_par2 = ( 0.45, 4.0 ),
332  dz_par2 = ( 0.45, 4.0 )
333  ),
334  ), #end of vpset
335  vertices = "pixelVertices"
336 ) #end of clone
337 
338 # Final sequence
339 HighPtTripletStep = cms.Sequence(highPtTripletStepClusters*
340  highPtTripletStepSeedLayers*
341  highPtTripletStepTrackingRegions*
342  highPtTripletStepHitDoublets*
343  highPtTripletStepHitTriplets*
344  highPtTripletStepSeeds*
345  highPtTripletStepTrackCandidates*
346  highPtTripletStepTracks*
347 # highPtTripletStepClassifier1*highPtTripletStepClassifier2*highPtTripletStepClassifier3*
348  highPtTripletStep)
349 _HighPtTripletStep_Phase1PU70 = HighPtTripletStep.copy()
350 _HighPtTripletStep_Phase1PU70.replace(highPtTripletStep, highPtTripletStepSelector)
351 trackingPhase1PU70.toReplaceWith(HighPtTripletStep, _HighPtTripletStep_Phase1PU70)
352 trackingPhase2PU140.toReplaceWith(HighPtTripletStep, _HighPtTripletStep_Phase1PU70)