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.55,
60  originRadius = 0.02,
61  nSigmaZ = 4.0
62 ))
63 trackingPhase2PU140.toModify(highPtTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.7, originRadius = 0.02))
64 
65 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
66 from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
67 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
68 for e in [pp_on_XeXe_2017, pp_on_AA_2018]:
69  e.toReplaceWith(highPtTripletStepTrackingRegions,
70  _globalTrackingRegionWithVertices.clone(RegionPSet=dict(
71  fixedError = 0.2,
72  ptMin = 0.6,
73  originRadius = 0.02
74  )
75  )
76 )
77 from Configuration.Eras.Modifier_highBetaStar_2018_cff import highBetaStar_2018
78 highBetaStar_2018.toModify(highPtTripletStepTrackingRegions,RegionPSet = dict(
79  ptMin = 0.05,
80  originRadius = 0.2
81 ))
82 
83 
84 # seeding
85 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
86 highPtTripletStepHitDoublets = _hitPairEDProducer.clone(
87  seedingLayers = "highPtTripletStepSeedLayers",
88  trackingRegions = "highPtTripletStepTrackingRegions",
89  layerPairs = [0,1], # layer pairs (0,1), (1,2)
90  maxElement = 0,
91  produceIntermediateHitDoublets = True,
92 )
93 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer
94 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
96 import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
97 highPtTripletStepHitTriplets = _caHitTripletEDProducer.clone(
98  doublets = "highPtTripletStepHitDoublets",
99  extraHitRPhitolerance = _pixelTripletHLTEDProducer.extraHitRPhitolerance,
100  SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(),
101  maxChi2 = dict(
102  pt1 = 0.8, pt2 = 8,
103  value1 = 100, value2 = 6,
104  ),
105  useBendingCorrection = True,
106  CAThetaCut = 0.004,
107  CAPhiCut = 0.07,
108  CAHardPtCut = 0.3,
109 )
110 trackingPhase2PU140.toModify(highPtTripletStepHitTriplets,CAThetaCut = 0.003,CAPhiCut = 0.06,CAHardPtCut = 0.5)
111 highBetaStar_2018.toModify(highPtTripletStepHitTriplets,CAThetaCut = 0.008,CAPhiCut = 0.14,CAHardPtCut = 0)
112 
113 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
114 highPtTripletStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
115  seedingHitSets = "highPtTripletStepHitTriplets",
116 )
117 
118 # QUALITY CUTS DURING TRACK BUILDING
119 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
120 _highPtTripletStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
121  minimumNumberOfHits = 3,
122  minPt = 0.2,
123 )
124 highPtTripletStepTrajectoryFilterBase = _highPtTripletStepTrajectoryFilterBase.clone(
125  maxCCCLostHits = 0,
126  minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
127 )
128 trackingPhase2PU140.toReplaceWith(highPtTripletStepTrajectoryFilterBase, _highPtTripletStepTrajectoryFilterBase)
129 
130 for e in [pp_on_XeXe_2017, pp_on_AA_2018]:
131  e.toModify(highPtTripletStepTrajectoryFilterBase, minPt=0.7)
132 highBetaStar_2018.toModify(highPtTripletStepTrajectoryFilterBase, minPt=0.05)
133 
134 highPtTripletStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
135  filters = [cms.PSet(refToPSet_ = cms.string('highPtTripletStepTrajectoryFilterBase'))]
136 )
137 
138 trackingPhase2PU140.toModify(highPtTripletStepTrajectoryFilter,
139  filters = highPtTripletStepTrajectoryFilter.filters + [cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
140 )
141 
142 
143 highPtTripletStepTrajectoryFilterInOut = highPtTripletStepTrajectoryFilterBase.clone(
144  minPt = 0.4,
145  minimumNumberOfHits = 4,
146  seedExtension = 1,
147  strictSeedExtension = False, # allow inactive
148  pixelSeedExtension = False,
149 )
150 highBetaStar_2018.toModify(highPtTripletStepTrajectoryFilterInOut, minPt=0.05)
151 
152 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
153 highPtTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
154  ComponentName = 'highPtTripletStepChi2Est',
155  nSigma = 3.0,
156  MaxChi2 = 30.0,
157  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutLoose'),
158  pTChargeCutThreshold = 15.
159 )
160 trackingPhase2PU140.toModify(highPtTripletStepChi2Est,
161  clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone"),
162  MaxChi2 = cms.double(20.0)
163 )
164 
165 
166 # TRACK BUILDING
167 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi as _GroupedCkfTrajectoryBuilder_cfi
168 highPtTripletStepTrajectoryBuilder = _GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
169  trajectoryFilter = dict(refToPSet_ = 'highPtTripletStepTrajectoryFilter'),
170  alwaysUseInvalidHits = True,
171  maxCand = 3,
172  estimator = 'highPtTripletStepChi2Est',
173  maxDPhiForLooperReconstruction = cms.double(2.0),
174  # 0.63 GeV is the maximum pT for a charged particle to loop within the 1.1m radius
175  # of the outermost Tracker barrel layer (with B=3.8T)
176  maxPtForLooperReconstruction = cms.double(0.7)
177 )
178 trackingPhase2PU140.toModify(highPtTripletStepTrajectoryBuilder,
179  inOutTrajectoryFilter = dict(refToPSet_ = "highPtTripletStepTrajectoryFilterInOut"),
180  useSameTrajFilter = False,
181  maxCand = 3,
182 )
183 
184 # MAKING OF TRACK CANDIDATES
185 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi as _CkfTrackCandidates_cfi
186 highPtTripletStepTrackCandidates = _CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
187  src = 'highPtTripletStepSeeds',
188  clustersToSkip = cms.InputTag('highPtTripletStepClusters'),
189  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
190  numHitsForSeedCleaner = cms.int32(50),
191  onlyPixelHitsForSeedCleaner = cms.bool(True),
192  TrajectoryBuilderPSet = dict(refToPSet_ = 'highPtTripletStepTrajectoryBuilder'),
193  doSeedingRegionRebuilding = True,
194  useHitsSplitting = True
195 )
196 
197 # For Phase2PU140
198 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits as _trajectoryCleanerBySharedHits
199 highPtTripletStepTrajectoryCleanerBySharedHits = _trajectoryCleanerBySharedHits.clone(
200  ComponentName = 'highPtTripletStepTrajectoryCleanerBySharedHits',
201  fractionShared = 0.16,
202  allowSharedFirstHit = True
203 )
204 trackingPhase2PU140.toModify(highPtTripletStepTrackCandidates,
205  TrajectoryCleaner = 'highPtTripletStepTrajectoryCleanerBySharedHits',
206  clustersToSkip = None,
207  phase2clustersToSkip = cms.InputTag("highPtTripletStepClusters")
208 )
209 
210 # TRACK FITTING
212 highPtTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
213  src = 'highPtTripletStepTrackCandidates',
214  AlgorithmName = 'highPtTripletStep',
215  Fitter = 'FlexibleKFFittingSmoother',
216 )
217 
218 
219 # Final selection
221 highPtTripletStep = TrackMVAClassifierPrompt.clone(
222  src = 'highPtTripletStepTracks',
223  mva = dict(GBRForestLabel = 'MVASelectorHighPtTripletStep_Phase1'),
224  qualityCuts = [0.2,0.3,0.4],
225 )
226 highBetaStar_2018.toModify(highPtTripletStep,qualityCuts = [-0.2,0.3,0.4])
227 
228 # For Phase2PU140
229 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
230 highPtTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
231  src = 'highPtTripletStepTracks',
232  trackSelectors = [
233  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
234  name = 'highPtTripletStepLoose',
235  chi2n_par = 2.0,
236  res_par = ( 0.003, 0.002 ),
237  minNumberLayers = 3,
238  maxNumberLostLayers = 3,
239  minNumber3DLayers = 3,
240  d0_par1 = ( 0.7, 4.0 ),
241  dz_par1 = ( 0.8, 4.0 ),
242  d0_par2 = ( 0.6, 4.0 ),
243  dz_par2 = ( 0.6, 4.0 )
244  ), #end of pset
245  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
246  name = 'highPtTripletStepTight',
247  preFilterName = 'highPtTripletStepLoose',
248  chi2n_par = 1.0,
249  res_par = ( 0.003, 0.002 ),
250  minNumberLayers = 3,
251  maxNumberLostLayers = 2,
252  minNumber3DLayers = 3,
253  d0_par1 = ( 0.6, 4.0 ),
254  dz_par1 = ( 0.7, 4.0 ),
255  d0_par2 = ( 0.5, 4.0 ),
256  dz_par2 = ( 0.6, 4.0 )
257  ),
258  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
259  name = 'highPtTripletStep',
260  preFilterName = 'highPtTripletStepTight',
261  chi2n_par = 0.8,
262  res_par = ( 0.003, 0.001 ),
263  min_nhits = 4,
264  minNumberLayers = 4,
265  maxNumberLostLayers = 2,
266  minNumber3DLayers = 4,
267  d0_par1 = ( 0.6, 4.0 ),
268  dz_par1 = ( 0.7, 4.0 ),
269  d0_par2 = ( 0.45, 4.0 ),
270  dz_par2 = ( 0.55, 4.0 )
271  ),
272  ] #end of vpset
273 ) #end of clone
274 
275 # Final sequence
276 HighPtTripletStepTask = cms.Task(highPtTripletStepClusters,
277  highPtTripletStepSeedLayers,
278  highPtTripletStepTrackingRegions,
279  highPtTripletStepHitDoublets,
280  highPtTripletStepHitTriplets,
281  highPtTripletStepSeeds,
282  highPtTripletStepTrackCandidates,
283  highPtTripletStepTracks,
284 # highPtTripletStepClassifier1,highPtTripletStepClassifier2,highPtTripletStepClassifier3*
285  highPtTripletStep)
286 HighPtTripletStep = cms.Sequence(HighPtTripletStepTask)
287 _HighPtTripletStepTask_Phase2PU140 = HighPtTripletStepTask.copy()
288 _HighPtTripletStepTask_Phase2PU140.replace(highPtTripletStep, highPtTripletStepSelector)
289 _HighPtTripletStep_Phase2PU140 = cms.Sequence(_HighPtTripletStepTask_Phase2PU140)
290 trackingPhase2PU140.toReplaceWith(HighPtTripletStepTask, _HighPtTripletStepTask_Phase2PU140)
COSMIC RUN SETTING.