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