CMS 3D CMS Logo

DetachedQuadStep_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 ###############################################
5 # Low pT and detached tracks from pixel quadruplets
6 ###############################################
7 
8 # REMOVE HITS ASSIGNED TO GOOD TRACKS FROM PREVIOUS ITERATIONS
9 detachedQuadStepClusters = _cfg.clusterRemoverForIter("DetachedQuadStep")
10 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
11  _era.toReplaceWith(detachedQuadStepClusters, _cfg.clusterRemoverForIter("DetachedQuadStep", _eraName, _postfix))
12 
13 # SEEDING LAYERS
16 detachedQuadStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
17  layerList = RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff.PixelSeedMergerQuadruplets.layerList.value(),
18  BPix = dict(skipClusters = cms.InputTag('detachedQuadStepClusters')),
19  FPix = dict(skipClusters = cms.InputTag('detachedQuadStepClusters'))
20 )
21 
22 # TrackingRegion
23 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpotFixedZ_cfi import globalTrackingRegionFromBeamSpotFixedZ as _globalTrackingRegionFromBeamSpotFixedZ
24 detachedQuadStepTrackingRegions = _globalTrackingRegionFromBeamSpotFixedZ.clone(RegionPSet = dict(
25  ptMin = 0.3,
26  originHalfLength = 15.0,
27  originRadius = 1.5
28 ))
29 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
30 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
31 trackingPhase2PU140.toReplaceWith(detachedQuadStepTrackingRegions, _globalTrackingRegionFromBeamSpot.clone(RegionPSet = dict(
32  ptMin = 0.45,
33  originRadius = 0.9,
34  nSigmaZ = 5.0
35 )))
36 
37 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
38 from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cff import globalTrackingRegionWithVertices as _globalTrackingRegionWithVertices
39 pp_on_XeXe_2017.toReplaceWith(detachedQuadStepTrackingRegions,
40  _globalTrackingRegionWithVertices.clone(RegionPSet=dict(
41  fixedError = 3.75,
42  ptMin = 0.8,
43  originRadius = 1.5
44  )
45  )
46 )
47 
48 
49 # seeding
50 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
51 detachedQuadStepHitDoublets = _hitPairEDProducer.clone(
52  seedingLayers = "detachedQuadStepSeedLayers",
53  trackingRegions = "detachedQuadStepTrackingRegions",
54  layerPairs = [0,1,2], # layer pairs (0,1), (1,2), (2,3),
55  maxElement = 0,
56  produceIntermediateHitDoublets = True,
57 )
58 from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer
59 from RecoPixelVertexing.PixelTriplets.pixelTripletLargeTipEDProducer_cfi import pixelTripletLargeTipEDProducer as _pixelTripletLargeTipEDProducer
61 detachedQuadStepHitQuadruplets = _caHitQuadrupletEDProducer.clone(
62  doublets = "detachedQuadStepHitDoublets",
63  extraHitRPhitolerance = _pixelTripletLargeTipEDProducer.extraHitRPhitolerance,
64  maxChi2 = dict(
65  pt1 = 0.8, pt2 = 2,
66  value1 = 500, value2 = 100,
67  ),
68  useBendingCorrection = True,
69  fitFastCircle = True,
70  fitFastCircleChi2Cut = True,
71  CAThetaCut = 0.0011,
72  CAPhiCut = 0,
73 )
74 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer_cff import seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer
75 detachedQuadStepSeeds = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(
76  seedingHitSets = "detachedQuadStepHitQuadruplets",
77  SeedComparitorPSet = dict(# FIXME: is this defined in any cfi that could be imported instead of copy-paste?
78  ComponentName = 'PixelClusterShapeSeedComparitor',
79  FilterAtHelixStage = cms.bool(False),
80  FilterPixelHits = cms.bool(True),
81  FilterStripHits = cms.bool(False),
82  ClusterShapeHitFilterName = cms.string('ClusterShapeHitFilter'),
83  ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache')
84  ),
85 )
86 
87 
88 from Configuration.Eras.Modifier_trackingPhase1QuadProp_cff import trackingPhase1QuadProp
89 trackingPhase1QuadProp.toModify(detachedQuadStepHitDoublets, layerPairs = [0])
90 detachedQuadStepHitTriplets = _pixelTripletLargeTipEDProducer.clone(
91  doublets = "detachedQuadStepHitDoublets",
92  produceIntermediateHitTriplets = True,
93 )
94 from RecoPixelVertexing.PixelTriplets.pixelQuadrupletEDProducer_cfi import pixelQuadrupletEDProducer as _pixelQuadrupletEDProducer
95 _detachedQuadStepHitQuadruplets_propagation = _pixelQuadrupletEDProducer.clone(
96  triplets = "detachedQuadStepHitTriplets",
97  extraHitRZtolerance = detachedQuadStepHitTriplets.extraHitRZtolerance,
98  extraHitRPhitolerance = detachedQuadStepHitTriplets.extraHitRPhitolerance,
99  maxChi2 = dict(
100  pt1 = 0.8, pt2 = 2,
101  value1 = 500, value2 = 100,
102  enabled = True,
103  ),
104  extraPhiTolerance = dict(
105  pt1 = 0.4, pt2 = 1,
106  value1 = 0.2, value2 = 0.05,
107  enabled = True,
108  ),
109  useBendingCorrection = True,
110  fitFastCircle = True,
111  fitFastCircleChi2Cut = True,
112 )
113 trackingPhase1QuadProp.toReplaceWith(detachedQuadStepHitQuadruplets, _detachedQuadStepHitQuadruplets_propagation)
114 
115 
116 # QUALITY CUTS DURING TRACK BUILDING
117 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
118 _detachedQuadStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
119  minimumNumberOfHits = 3,
120  minPt = 0.075,
121 )
122 detachedQuadStepTrajectoryFilterBase = _detachedQuadStepTrajectoryFilterBase.clone(
123  maxCCCLostHits = 0,
124  minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
125 )
126 trackingPhase2PU140.toReplaceWith(detachedQuadStepTrajectoryFilterBase,
127  _detachedQuadStepTrajectoryFilterBase.clone(
128  maxLostHitsFraction = 1./10.,
129  constantValueForLostHitsFractionFilter = 0.301,
130  )
131 )
132 detachedQuadStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
133  filters = [cms.PSet(refToPSet_ = cms.string('detachedQuadStepTrajectoryFilterBase'))]
134 )
135 trackingPhase2PU140.toModify(detachedQuadStepTrajectoryFilter,
136  filters = detachedQuadStepTrajectoryFilter.filters.value()+[cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
137 )
138 
139 pp_on_XeXe_2017.toModify(detachedQuadStepTrajectoryFilterBase, minPt=0.9)
140 
141 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
142 detachedQuadStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
143  ComponentName = 'detachedQuadStepChi2Est',
144  nSigma = 3.0,
145  MaxChi2 = 9.0,
146  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight'),
147 )
148 trackingPhase2PU140.toModify(detachedQuadStepChi2Est,
149  MaxChi2 = 12.0,
150  clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")
151 )
152 
153 
154 # TRACK BUILDING
156 detachedQuadStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
157  MeasurementTrackerName = '',
158  trajectoryFilter = dict(refToPSet_ = 'detachedQuadStepTrajectoryFilter'),
159  maxCand = 3,
160  alwaysUseInvalidHits = True,
161  estimator = 'detachedQuadStepChi2Est',
162  maxDPhiForLooperReconstruction = cms.double(2.0),
163  maxPtForLooperReconstruction = cms.double(0.7)
164 )
165 trackingPhase2PU140.toModify(detachedQuadStepTrajectoryBuilder,
166  maxCand = 2,
167  alwaysUseInvalidHits = False,
168 )
169 
170 # MAKING OF TRACK CANDIDATES
171 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits
172 detachedQuadStepTrajectoryCleanerBySharedHits = trajectoryCleanerBySharedHits.clone(
173  ComponentName = cms.string('detachedQuadStepTrajectoryCleanerBySharedHits'),
174  fractionShared = cms.double(0.13),
175  allowSharedFirstHit = cms.bool(True)
176 )
177 
179 detachedQuadStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
180  src = 'detachedQuadStepSeeds',
181  clustersToSkip = cms.InputTag('detachedQuadStepClusters'),
182  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
183  numHitsForSeedCleaner = cms.int32(50),
184  onlyPixelHitsForSeedCleaner = cms.bool(True),
185  TrajectoryBuilderPSet = dict(refToPSet_ = 'detachedQuadStepTrajectoryBuilder'),
186  TrajectoryCleaner = 'detachedQuadStepTrajectoryCleanerBySharedHits',
187  doSeedingRegionRebuilding = True,
188  useHitsSplitting = True
189 )
190 trackingPhase2PU140.toModify(detachedQuadStepTrackCandidates,
191  clustersToSkip = None,
192  phase2clustersToSkip = cms.InputTag("detachedQuadStepClusters")
193 )
194 
195 
196 # TRACK FITTING
198 detachedQuadStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
199  AlgorithmName = 'detachedQuadStep',
200  src = 'detachedQuadStepTrackCandidates',
201  Fitter = 'FlexibleKFFittingSmoother',
202 )
203 
204 # TRACK SELECTION AND QUALITY FLAG SETTING.
206 detachedQuadStep = TrackMVAClassifierDetached.clone(
207  src = 'detachedQuadStepTracks',
208  GBRForestLabel = 'MVASelectorDetachedQuadStep_Phase1',
209  qualityCuts = [-0.5,0.0,0.5],
210 )
211 
212 
213 # For Phase2PU140
214 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
215 detachedQuadStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
216  src = 'detachedQuadStepTracks',
217  trackSelectors = [
218  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
219  name = 'detachedQuadStepVtxLoose',
220  chi2n_par = 1.0,
221  res_par = ( 0.003, 0.001 ),
222  minNumberLayers = 3,
223  d0_par1 = ( 0.9, 3.0 ),
224  dz_par1 = ( 0.9, 3.0 ),
225  d0_par2 = ( 1.0, 3.0 ),
226  dz_par2 = ( 1.0, 3.0 )
227  ),
228  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
229  name = 'detachedQuadStepTrkLoose',
230  chi2n_par = 0.6,
231  res_par = ( 0.003, 0.001 ),
232  minNumberLayers = 3,
233  d0_par1 = ( 1.3, 4.0 ),
234  dz_par1 = ( 1.3, 4.0 ),
235  d0_par2 = ( 1.3, 4.0 ),
236  dz_par2 = ( 1.3, 4.0 )
237  ),
238  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
239  name = 'detachedQuadStepVtxTight',
240  preFilterName = 'detachedQuadStepVtxLoose',
241  chi2n_par = 0.9,
242  res_par = ( 0.003, 0.001 ),
243  minNumberLayers = 3,
244  maxNumberLostLayers = 1,
245  minNumber3DLayers = 3,
246  d0_par1 = ( 0.9, 3.0 ),
247  dz_par1 = ( 0.9, 3.0 ),
248  d0_par2 = ( 0.9, 3.0 ),
249  dz_par2 = ( 0.9, 3.0 )
250  ),
251  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
252  name = 'detachedQuadStepTrkTight',
253  preFilterName = 'detachedQuadStepTrkLoose',
254  chi2n_par = 0.5,
255  res_par = ( 0.003, 0.001 ),
256  minNumberLayers = 4,
257  maxNumberLostLayers = 1,
258  minNumber3DLayers = 3,
259  d0_par1 = ( 1.1, 4.0 ),
260  dz_par1 = ( 1.1, 4.0 ),
261  d0_par2 = ( 1.1, 4.0 ),
262  dz_par2 = ( 1.1, 4.0 )
263  ),
264  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
265  name = 'detachedQuadStepVtx',
266  preFilterName = 'detachedQuadStepVtxTight',
267  chi2n_par = 0.9,
268  res_par = ( 0.003, 0.001 ),
269  minNumberLayers = 3,
270  maxNumberLostLayers = 1,
271  minNumber3DLayers = 3,
272  d0_par1 = ( 0.8, 3.0 ),
273  dz_par1 = ( 0.8, 3.0 ),
274  d0_par2 = ( 0.8, 3.0 ),
275  dz_par2 = ( 0.8, 3.0 )
276  ),
277  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
278  name = 'detachedQuadStepTrk',
279  preFilterName = 'detachedQuadStepTrkTight',
280  chi2n_par = 0.5,
281  res_par = ( 0.003, 0.001 ),
282  minNumberLayers = 4,
283  maxNumberLostLayers = 1,
284  minNumber3DLayers = 3,
285  d0_par1 = ( 0.9, 4.0 ),
286  dz_par1 = ( 0.9, 4.0 ),
287  d0_par2 = ( 0.9, 4.0 ),
288  dz_par2 = ( 0.9, 4.0 )
289  )
290  ] #end of vpset
291 ) #end of clone
292 
293 
294 from RecoTracker.FinalTrackSelectors.trackAlgoPriorityOrder_cfi import trackAlgoPriorityOrder
296 trackingPhase2PU140.toReplaceWith(detachedQuadStep, RecoTracker.FinalTrackSelectors.trackListMerger_cfi.trackListMerger.clone(
297  TrackProducers = cms.VInputTag(cms.InputTag('detachedQuadStepTracks'),
298  cms.InputTag('detachedQuadStepTracks')),
299  hasSelector=cms.vint32(1,1),
300  shareFrac = cms.double(0.09),
301  indivShareFrac=cms.vdouble(0.09,0.09),
302  selectedTrackQuals = cms.VInputTag(cms.InputTag("detachedQuadStepSelector","detachedQuadStepVtx"),
303  cms.InputTag("detachedQuadStepSelector","detachedQuadStepTrk")),
304  setsToMerge = cms.VPSet(cms.PSet( tLists=cms.vint32(0,1), pQual=cms.bool(True) )),
305  writeOnlyTrkQuals=cms.bool(True)
306  )
307 )
308 
309 DetachedQuadStep = cms.Sequence(detachedQuadStepClusters*
310  detachedQuadStepSeedLayers*
311  detachedQuadStepTrackingRegions*
312  detachedQuadStepHitDoublets*
313  detachedQuadStepHitQuadruplets*
314  detachedQuadStepSeeds*
315  detachedQuadStepTrackCandidates*
316  detachedQuadStepTracks*
317  detachedQuadStep)
318 _DetachedQuadStep_Phase1Prop = DetachedQuadStep.copy()
319 _DetachedQuadStep_Phase1Prop.replace(detachedQuadStepHitDoublets, detachedQuadStepHitDoublets+detachedQuadStepHitTriplets)
320 trackingPhase1QuadProp.toReplaceWith(DetachedQuadStep, _DetachedQuadStep_Phase1Prop)
321 _DetachedQuadStep_Phase2PU140 = DetachedQuadStep.copy()
322 _DetachedQuadStep_Phase2PU140.replace(detachedQuadStep, detachedQuadStepSelector+detachedQuadStep)
323 trackingPhase2PU140.toReplaceWith(DetachedQuadStep, _DetachedQuadStep_Phase2PU140)
COSMIC RUN SETTING.