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