CMS 3D CMS Logo

LowPtQuadStep_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 # NEW CLUSTERS (remove previously used clusters)
5 lowPtQuadStepClusters = _cfg.clusterRemoverForIter("LowPtQuadStep")
6 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
7  _era.toReplaceWith(lowPtQuadStepClusters, _cfg.clusterRemoverForIter("LowPtQuadStep", _eraName, _postfix))
8 
9 
10 # SEEDING LAYERS
11 import RecoTracker.TkSeedingLayers.PixelLayerQuadruplets_cfi
12 lowPtQuadStepSeedLayers = RecoTracker.TkSeedingLayers.PixelLayerQuadruplets_cfi.PixelLayerQuadruplets.clone(
13  BPix = dict(skipClusters = cms.InputTag('lowPtQuadStepClusters')),
14  FPix = dict(skipClusters = cms.InputTag('lowPtQuadStepClusters'))
15 )
16 
17 # TrackingRegion
18 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
19 lowPtQuadStepTrackingRegions = _globalTrackingRegionFromBeamSpot.clone(RegionPSet = dict(
20  ptMin = 0.15,
21  originRadius = 0.02,
22  nSigmaZ = 4.0
23 ))
24 from Configuration.Eras.Modifier_trackingPhase1QuadProp_cff import trackingPhase1QuadProp
25 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
26 trackingPhase1QuadProp.toModify(lowPtQuadStepTrackingRegions, RegionPSet = dict(ptMin = 0.2))
27 trackingPhase2PU140.toModify(lowPtQuadStepTrackingRegions, RegionPSet = dict(ptMin = 0.35,originRadius = 0.025))
28 
29 
30 # seeding
31 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
32 lowPtQuadStepHitDoublets = _hitPairEDProducer.clone(
33  seedingLayers = "lowPtQuadStepSeedLayers",
34  trackingRegions = "lowPtQuadStepTrackingRegions",
35  layerPairs = [0,1,2], # layer pairs (0,1), (1,2), (2,3)
36  maxElement = 0,
37  produceIntermediateHitDoublets = True,
38 )
39 from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer
40 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
42 import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
43 lowPtQuadStepHitQuadruplets = _caHitQuadrupletEDProducer.clone(
44  doublets = "lowPtQuadStepHitDoublets",
45  extraHitRPhitolerance = _pixelTripletHLTEDProducer.extraHitRPhitolerance,
46  SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(),
47  maxChi2 = dict(
48  pt1 = 0.7, pt2 = 2,
49  value1 = 1000, value2 = 150,
50  ),
51  useBendingCorrection = True,
52  fitFastCircle = True,
53  fitFastCircleChi2Cut = True,
54  CAThetaCut = 0.0017,
55  CAPhiCut = 0.3,
56 )
57 trackingPhase2PU140.toModify(lowPtQuadStepHitQuadruplets,CAThetaCut = 0.0015,CAPhiCut = 0.25)
58 
59 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
60 lowPtQuadStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
61  seedingHitSets = "lowPtQuadStepHitQuadruplets",
62 )
63 
64 trackingPhase1QuadProp.toModify(lowPtQuadStepHitDoublets, layerPairs = [0])
65 lowPtQuadStepHitTriplets = _pixelTripletHLTEDProducer.clone(
66  doublets = "lowPtQuadStepHitDoublets",
67  produceIntermediateHitTriplets = True,
68  SeedComparitorPSet = lowPtQuadStepHitQuadruplets.SeedComparitorPSet,
69 )
70 from RecoPixelVertexing.PixelTriplets.pixelQuadrupletEDProducer_cfi import pixelQuadrupletEDProducer as _pixelQuadrupletEDProducer
71 _lowPtQuadStepHitQuadruplets_propagation = _pixelQuadrupletEDProducer.clone(
72  triplets = "lowPtQuadStepHitTriplets",
73  extraHitRZtolerance = lowPtQuadStepHitTriplets.extraHitRZtolerance,
74  extraHitRPhitolerance = lowPtQuadStepHitTriplets.extraHitRPhitolerance,
75  maxChi2 = dict(
76  pt1 = 0.8 , pt2 = 2,
77  value1 = 2000, value2 = 100,
78  enabled = True,
79  ),
80  extraPhiTolerance = dict(
81  pt1 = 0.3, pt2 = 1,
82  value1 = 0.4, value2 = 0.05,
83  enabled = True,
84  ),
85  useBendingCorrection = True,
86  fitFastCircle = True,
87  fitFastCircleChi2Cut = True,
88  SeedComparitorPSet = lowPtQuadStepHitTriplets.SeedComparitorPSet,
89 )
90 trackingPhase1QuadProp.toReplaceWith(lowPtQuadStepHitQuadruplets, _lowPtQuadStepHitQuadruplets_propagation)
91 
92 
93 
94 # QUALITY CUTS DURING TRACK BUILDING
95 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
96 _lowPtQuadStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
97  minimumNumberOfHits = 3,
98  minPt = 0.075,
99 )
100 lowPtQuadStepTrajectoryFilterBase = _lowPtQuadStepTrajectoryFilterBase.clone(
101  maxCCCLostHits = 0,
102  minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
103 )
104 trackingPhase2PU140.toReplaceWith(lowPtQuadStepTrajectoryFilterBase, _lowPtQuadStepTrajectoryFilterBase)
105 
107 # Composite filter
108 lowPtQuadStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
109  filters = [cms.PSet(refToPSet_ = cms.string('lowPtQuadStepTrajectoryFilterBase'))]
110 )
111 trackingPhase2PU140.toModify(lowPtQuadStepTrajectoryFilter,
112  filters = lowPtQuadStepTrajectoryFilter.filters.value() + [cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
113 )
114 
115 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
116 lowPtQuadStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
117  ComponentName = 'lowPtQuadStepChi2Est',
118  nSigma = 3.0,
119  MaxChi2 = 9.0,
120  clusterChargeCut = dict(refToPSet_ = ('SiStripClusterChargeCutTight')),
121 )
122 trackingPhase2PU140.toModify(lowPtQuadStepChi2Est,
123  MaxChi2 = 16.0,
124  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutNone')
125 )
126 
127 # TRACK BUILDING
129 lowPtQuadStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
130  MeasurementTrackerName = '',
131  trajectoryFilter = dict(refToPSet_ = 'lowPtQuadStepTrajectoryFilter'),
132  maxCand = 4,
133  estimator = cms.string('lowPtQuadStepChi2Est'),
134  maxDPhiForLooperReconstruction = cms.double(2.0),
135  # 0.63 GeV is the maximum pT for a charged particle to loop within the 1.1m radius
136  # of the outermost Tracker barrel layer (with B=3.8T)
137  maxPtForLooperReconstruction = cms.double(0.7)
138 )
139 trackingPhase2PU140.toModify(lowPtQuadStepTrajectoryBuilder,
140  minNrOfHitsForRebuild = 1,
141  keepOriginalIfRebuildFails = True,
142 )
143 
144 
145 # MAKING OF TRACK CANDIDATES
146 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits as _trajectoryCleanerBySharedHits
147 lowPtQuadStepTrajectoryCleanerBySharedHits = _trajectoryCleanerBySharedHits.clone(
148  ComponentName = 'lowPtQuadStepTrajectoryCleanerBySharedHits',
149  fractionShared = 0.16,
150  allowSharedFirstHit = True
151 )
152 trackingPhase2PU140.toModify(lowPtQuadStepTrajectoryCleanerBySharedHits, fractionShared = 0.09)
153 
155 lowPtQuadStepTrackCandidates = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
156  src = 'lowPtQuadStepSeeds',
157  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
158  numHitsForSeedCleaner = cms.int32(50),
159  onlyPixelHitsForSeedCleaner = cms.bool(True),
160  TrajectoryBuilderPSet = dict(refToPSet_ = 'lowPtQuadStepTrajectoryBuilder'),
161  TrajectoryCleaner = 'lowPtQuadStepTrajectoryCleanerBySharedHits',
162  clustersToSkip = cms.InputTag('lowPtQuadStepClusters'),
163  doSeedingRegionRebuilding = True,
164  useHitsSplitting = True
165 )
166 trackingPhase2PU140.toModify(lowPtQuadStepTrackCandidates,
167  clustersToSkip = None,
168  phase2clustersToSkip = cms.InputTag("lowPtQuadStepClusters")
169 )
170 # TRACK FITTING
172 lowPtQuadStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
173  src = 'lowPtQuadStepTrackCandidates',
174  AlgorithmName = 'lowPtQuadStep',
175  Fitter = 'FlexibleKFFittingSmoother',
176 )
177 
178 
179 
180 # Final selection
182 lowPtQuadStep = TrackMVAClassifierPrompt.clone(
183  src = 'lowPtQuadStepTracks',
184  GBRForestLabel = 'MVASelectorLowPtQuadStep_Phase1',
185  qualityCuts = [-0.65,-0.35,-0.15],
186 )
187 
188 # For Phase2PU140
189 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
190 lowPtQuadStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
191  src = 'lowPtQuadStepTracks',
192  trackSelectors = [
193  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
194  name = 'lowPtQuadStepLoose',
195  chi2n_par = 2.0,
196  res_par = ( 0.003, 0.002 ),
197  minNumberLayers = 3,
198  maxNumberLostLayers = 2,
199  minNumber3DLayers = 3,
200  d0_par1 = ( 0.8, 4.0 ),
201  dz_par1 = ( 0.7, 4.0 ),
202  d0_par2 = ( 0.6, 4.0 ),
203  dz_par2 = ( 0.6, 4.0 )
204  ), #end of pset
205  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
206  name = 'lowPtQuadStepTight',
207  preFilterName = 'lowPtQuadStepLoose',
208  chi2n_par = 1.4,
209  res_par = ( 0.003, 0.002 ),
210  minNumberLayers = 3,
211  maxNumberLostLayers = 2,
212  minNumber3DLayers = 3,
213  d0_par1 = ( 0.7, 4.0 ),
214  dz_par1 = ( 0.6, 4.0 ),
215  d0_par2 = ( 0.5, 4.0 ),
216  dz_par2 = ( 0.5, 4.0 )
217  ),
218  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
219  name = 'lowPtQuadStep',
220  preFilterName = 'lowPtQuadStepTight',
221  chi2n_par = 1.2,
222  res_par = ( 0.003, 0.001 ),
223  minNumberLayers = 3,
224  maxNumberLostLayers = 2,
225  minNumber3DLayers = 3,
226  d0_par1 = ( 0.5, 4.0 ),
227  dz_par1 = ( 0.5, 4.0 ),
228  d0_par2 = ( 0.45, 4.0 ),
229  dz_par2 = ( 0.45, 4.0 )
230  ),
231  ] #end of vpset
232 ) #end of clone
233 
234 
235 # Final sequence
236 LowPtQuadStep = cms.Sequence(lowPtQuadStepClusters*
237  lowPtQuadStepSeedLayers*
238  lowPtQuadStepTrackingRegions*
239  lowPtQuadStepHitDoublets*
240  lowPtQuadStepHitQuadruplets*
241  lowPtQuadStepSeeds*
242  lowPtQuadStepTrackCandidates*
243  lowPtQuadStepTracks*
244  lowPtQuadStep)
245 _LowPtQuadStep_Phase1Prop = LowPtQuadStep.copy()
246 _LowPtQuadStep_Phase1Prop.replace(lowPtQuadStepHitDoublets, lowPtQuadStepHitDoublets+lowPtQuadStepHitTriplets)
247 trackingPhase1QuadProp.toReplaceWith(LowPtQuadStep, _LowPtQuadStep_Phase1Prop)
248 _LowPtQuadStep_Phase2PU140 = LowPtQuadStep.copy()
249 _LowPtQuadStep_Phase2PU140.replace(lowPtQuadStep, lowPtQuadStepSelector)
250 trackingPhase2PU140.toReplaceWith(LowPtQuadStep, _LowPtQuadStep_Phase2PU140)