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