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