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