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