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