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