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