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