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.49,
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 = 50000000,
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.49)
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 pp_on_AA_2018.toModify(lowPtQuadStep,
207  mva = dict(GBRForestLabel = 'HIMVASelectorLowPtQuadStep_Phase1'),
208  qualityCuts = [-0.9, -0.4, 0.3],
209 )
210 
211 # For Phase2PU140
212 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
213 lowPtQuadStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
214  src = 'lowPtQuadStepTracks',
215  trackSelectors = [
216  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
217  name = 'lowPtQuadStepLoose',
218  chi2n_par = 2.0,
219  res_par = ( 0.003, 0.002 ),
220  minNumberLayers = 3,
221  maxNumberLostLayers = 2,
222  minNumber3DLayers = 3,
223  d0_par1 = ( 0.8, 4.0 ),
224  dz_par1 = ( 0.7, 4.0 ),
225  d0_par2 = ( 0.6, 4.0 ),
226  dz_par2 = ( 0.6, 4.0 )
227  ), #end of pset
228  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
229  name = 'lowPtQuadStepTight',
230  preFilterName = 'lowPtQuadStepLoose',
231  chi2n_par = 1.4,
232  res_par = ( 0.003, 0.002 ),
233  minNumberLayers = 3,
234  maxNumberLostLayers = 2,
235  minNumber3DLayers = 3,
236  d0_par1 = ( 0.7, 4.0 ),
237  dz_par1 = ( 0.6, 4.0 ),
238  d0_par2 = ( 0.5, 4.0 ),
239  dz_par2 = ( 0.5, 4.0 )
240  ),
241  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
242  name = 'lowPtQuadStep',
243  preFilterName = 'lowPtQuadStepTight',
244  chi2n_par = 1.2,
245  res_par = ( 0.003, 0.001 ),
246  minNumberLayers = 3,
247  maxNumberLostLayers = 2,
248  minNumber3DLayers = 3,
249  d0_par1 = ( 0.5, 4.0 ),
250  dz_par1 = ( 0.5, 4.0 ),
251  d0_par2 = ( 0.45, 4.0 ),
252  dz_par2 = ( 0.45, 4.0 )
253  ),
254  ] #end of vpset
255 ) #end of clone
256 
257 
258 # Final sequence
259 LowPtQuadStepTask = cms.Task(lowPtQuadStepClusters,
260  lowPtQuadStepSeedLayers,
261  lowPtQuadStepTrackingRegions,
262  lowPtQuadStepHitDoublets,
263  lowPtQuadStepHitQuadruplets,
264  lowPtQuadStepSeeds,
265  lowPtQuadStepTrackCandidates,
266  lowPtQuadStepTracks,
267  lowPtQuadStep)
268 LowPtQuadStep = cms.Sequence(LowPtQuadStepTask)
269 
270 _LowPtQuadStepTask_Phase2PU140 = LowPtQuadStepTask.copy()
271 _LowPtQuadStepTask_Phase2PU140.replace(lowPtQuadStep, lowPtQuadStepSelector)
272 trackingPhase2PU140.toReplaceWith(LowPtQuadStepTask, _LowPtQuadStepTask_Phase2PU140)
273 
274 # fast tracking mask producer
275 from FastSimulation.Tracking.FastTrackerRecHitMaskProducer_cfi import maskProducerFromClusterRemover
276 lowPtQuadStepMasks = maskProducerFromClusterRemover(lowPtQuadStepClusters)
277 fastSim.toReplaceWith(LowPtQuadStepTask,
278  cms.Task(lowPtQuadStepMasks
279  ,lowPtQuadStepTrackingRegions
280  ,lowPtQuadStepSeeds
281  ,lowPtQuadStepTrackCandidates
282  ,lowPtQuadStepTracks
283  ,lowPtQuadStep
284  ) )
def _hitSetProducerToFactoryPSet(producer)
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135