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