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