CMS 3D CMS Logo

HighPtTripletStep_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 ### high-pT triplets ###
5 
6 # NEW CLUSTERS (remove previously used clusters)
7 highPtTripletStepClusters = _cfg.clusterRemoverForIter("HighPtTripletStep")
8 for _eraName, _postfix, _era in _cfg.nonDefaultEras():
9  _era.toReplaceWith(highPtTripletStepClusters, _cfg.clusterRemoverForIter("HighPtTripletStep", _eraName, _postfix))
10 
11 
12 # SEEDING LAYERS
13 import RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi as _PixelLayerTriplets_cfi
14 highPtTripletStepSeedLayers = _PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
15  layerList = [
16  'BPix1+BPix2+BPix3',
17  'BPix2+BPix3+BPix4',
18  'BPix1+BPix3+BPix4',
19  'BPix1+BPix2+BPix4',
20  'BPix2+BPix3+FPix1_pos', 'BPix2+BPix3+FPix1_neg',
21  'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
22  'BPix1+BPix3+FPix1_pos', 'BPix1+BPix3+FPix1_neg',
23  'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
24  'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
25  'BPix1+BPix2+FPix2_pos', 'BPix1+BPix2+FPix2_neg',
26  'FPix1_pos+FPix2_pos+FPix3_pos', 'FPix1_neg+FPix2_neg+FPix3_neg',
27  'BPix1+FPix2_pos+FPix3_pos', 'BPix1+FPix2_neg+FPix3_neg',
28  'BPix1+FPix1_pos+FPix3_pos', 'BPix1+FPix1_neg+FPix3_neg'
29  ],
30  BPix = dict(skipClusters = cms.InputTag('highPtTripletStepClusters')),
31  FPix = dict(skipClusters = cms.InputTag('highPtTripletStepClusters'))
32 )
33 
34 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
35 trackingPhase2PU140.toModify(highPtTripletStepSeedLayers,
36 # combination with gap removed as only source of fakes in current geometry (kept for doc)
37  layerList = ['BPix1+BPix2+BPix3', 'BPix2+BPix3+BPix4',
38  'BPix1+BPix3+BPix4', 'BPix1+BPix2+BPix4',
39  'BPix2+BPix3+FPix1_pos', 'BPix2+BPix3+FPix1_neg',
40  'BPix1+BPix2+FPix1_pos', 'BPix1+BPix2+FPix1_neg',
41  'BPix2+FPix1_pos+FPix2_pos', 'BPix2+FPix1_neg+FPix2_neg',
42  'BPix1+FPix1_pos+FPix2_pos', 'BPix1+FPix1_neg+FPix2_neg',
43 # 'BPix1+BPix2+FPix2_pos', 'BPix1+BPix2+FPix2_neg',
44  'FPix1_pos+FPix2_pos+FPix3_pos', 'FPix1_neg+FPix2_neg+FPix3_neg',
45  'BPix1+FPix2_pos+FPix3_pos', 'BPix1+FPix2_neg+FPix3_neg',
46 # 'BPix1+FPix1_pos+FPix3_pos', 'BPix1+FPix1_neg+FPix3_neg',
47  'FPix2_pos+FPix3_pos+FPix4_pos', 'FPix2_neg+FPix3_neg+FPix4_neg',
48  'FPix3_pos+FPix4_pos+FPix5_pos', 'FPix3_neg+FPix4_neg+FPix5_neg',
49  'FPix4_pos+FPix5_pos+FPix6_pos', 'FPix4_neg+FPix5_neg+FPix6_neg',
50  'FPix5_pos+FPix6_pos+FPix7_pos', 'FPix5_neg+FPix6_neg+FPix7_neg',
51  'FPix6_pos+FPix7_pos+FPix8_pos', 'FPix6_neg+FPix7_neg+FPix8_neg',
52 # removed as redunant and covering effectively only eta>4 (here for documentation, to be optimized after TDR)
53 # 'FPix6_pos+FPix7_pos+FPix9_pos', 'FPix6_neg+FPix7_neg+FPix9_neg']
54  ]
55 )
56 # TrackingRegion
57 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
58 highPtTripletStepTrackingRegions = _globalTrackingRegionFromBeamSpot.clone(RegionPSet = dict(
59  ptMin = 0.55,
60  originRadius = 0.02,
61  nSigmaZ = 4.0
62 ))
63 from Configuration.Eras.Modifier_trackingPhase1QuadProp_cff import trackingPhase1QuadProp
64 trackingPhase1QuadProp.toModify(highPtTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.6))
65 trackingPhase2PU140.toModify(highPtTripletStepTrackingRegions, RegionPSet = dict(ptMin = 0.7, originRadius = 0.02))
66 
67 # seeding
68 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
69 highPtTripletStepHitDoublets = _hitPairEDProducer.clone(
70  seedingLayers = "highPtTripletStepSeedLayers",
71  trackingRegions = "highPtTripletStepTrackingRegions",
72  layerPairs = [0,1], # layer pairs (0,1), (1,2)
73  maxElement = 0,
74  produceIntermediateHitDoublets = True,
75 )
76 from RecoPixelVertexing.PixelTriplets.caHitTripletEDProducer_cfi import caHitTripletEDProducer as _caHitTripletEDProducer
77 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
79 import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
80 highPtTripletStepHitTriplets = _caHitTripletEDProducer.clone(
81  doublets = "highPtTripletStepHitDoublets",
82  extraHitRPhitolerance = _pixelTripletHLTEDProducer.extraHitRPhitolerance,
83  SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(),
84  maxChi2 = dict(
85  pt1 = 0.8, pt2 = 8,
86  value1 = 100, value2 = 6,
87  ),
88  useBendingCorrection = True,
89  CAThetaCut = 0.004,
90  CAPhiCut = 0.07,
91  CAHardPtCut = 0.3,
92 )
93 trackingPhase2PU140.toModify(highPtTripletStepHitTriplets,CAThetaCut = 0.003,CAPhiCut = 0.06,CAHardPtCut = 0.5)
94 
95 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
96 highPtTripletStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
97  seedingHitSets = "highPtTripletStepHitTriplets",
98 )
99 
100 trackingPhase1QuadProp.toModify(highPtTripletStepHitDoublets, layerPairs = [0]) # layer pair (0,1)
101 _highPtTripletStepHitTriplets_propagation = _pixelTripletHLTEDProducer.clone(
102  doublets = "highPtTripletStepHitDoublets",
103  produceSeedingHitSets = True,
104  SeedComparitorPSet = highPtTripletStepHitTriplets.SeedComparitorPSet,
105 )
106 trackingPhase1QuadProp.toReplaceWith(highPtTripletStepHitTriplets, _highPtTripletStepHitTriplets_propagation)
107 
108 # QUALITY CUTS DURING TRACK BUILDING
109 import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
110 _highPtTripletStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
111  minimumNumberOfHits = 3,
112  minPt = 0.2,
113 )
114 highPtTripletStepTrajectoryFilterBase = _highPtTripletStepTrajectoryFilterBase.clone(
115  maxCCCLostHits = 0,
116  minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
117 )
118 trackingPhase2PU140.toReplaceWith(highPtTripletStepTrajectoryFilterBase, _highPtTripletStepTrajectoryFilterBase)
119 
120 highPtTripletStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
121  filters = [cms.PSet(refToPSet_ = cms.string('highPtTripletStepTrajectoryFilterBase'))]
122 )
123 
124 trackingPhase2PU140.toModify(highPtTripletStepTrajectoryFilter,
125  filters = highPtTripletStepTrajectoryFilter.filters + [cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
126 )
127 
128 
129 highPtTripletStepTrajectoryFilterInOut = highPtTripletStepTrajectoryFilterBase.clone(
130  minPt = 0.4,
131  minimumNumberOfHits = 4,
132  seedExtension = 1,
133  strictSeedExtension = False, # allow inactive
134  pixelSeedExtension = False,
135 )
136 
137 
138 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
139 highPtTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
140  ComponentName = 'highPtTripletStepChi2Est',
141  nSigma = 3.0,
142  MaxChi2 = 30.0,
143  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutLoose'),
144  pTChargeCutThreshold = 15.
145 )
146 trackingPhase2PU140.toModify(highPtTripletStepChi2Est,
147  clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone"),
148  MaxChi2 = cms.double(20.0)
149 )
150 
151 
152 # TRACK BUILDING
153 import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi as _GroupedCkfTrajectoryBuilder_cfi
154 highPtTripletStepTrajectoryBuilder = _GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
155  trajectoryFilter = dict(refToPSet_ = 'highPtTripletStepTrajectoryFilter'),
156  alwaysUseInvalidHits = True,
157  maxCand = 3,
158  estimator = 'highPtTripletStepChi2Est',
159  maxDPhiForLooperReconstruction = cms.double(2.0),
160  # 0.63 GeV is the maximum pT for a charged particle to loop within the 1.1m radius
161  # of the outermost Tracker barrel layer (with B=3.8T)
162  maxPtForLooperReconstruction = cms.double(0.7)
163 )
164 trackingPhase2PU140.toModify(highPtTripletStepTrajectoryBuilder,
165  inOutTrajectoryFilter = dict(refToPSet_ = "highPtTripletStepTrajectoryFilterInOut"),
166  useSameTrajFilter = False,
167  maxCand = 3,
168 )
169 
170 # MAKING OF TRACK CANDIDATES
171 import RecoTracker.CkfPattern.CkfTrackCandidates_cfi as _CkfTrackCandidates_cfi
172 highPtTripletStepTrackCandidates = _CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
173  src = 'highPtTripletStepSeeds',
174  clustersToSkip = cms.InputTag('highPtTripletStepClusters'),
175  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
176  numHitsForSeedCleaner = cms.int32(50),
177  onlyPixelHitsForSeedCleaner = cms.bool(True),
178  TrajectoryBuilderPSet = dict(refToPSet_ = 'highPtTripletStepTrajectoryBuilder'),
179  doSeedingRegionRebuilding = True,
180  useHitsSplitting = True
181 )
182 
183 # For Phase2PU140
184 from TrackingTools.TrajectoryCleaning.TrajectoryCleanerBySharedHits_cfi import trajectoryCleanerBySharedHits as _trajectoryCleanerBySharedHits
185 highPtTripletStepTrajectoryCleanerBySharedHits = _trajectoryCleanerBySharedHits.clone(
186  ComponentName = 'highPtTripletStepTrajectoryCleanerBySharedHits',
187  fractionShared = 0.16,
188  allowSharedFirstHit = True
189 )
190 trackingPhase2PU140.toModify(highPtTripletStepTrackCandidates,
191  TrajectoryCleaner = 'highPtTripletStepTrajectoryCleanerBySharedHits',
192  clustersToSkip = None,
193  phase2clustersToSkip = cms.InputTag("highPtTripletStepClusters")
194 )
195 
196 # TRACK FITTING
198 highPtTripletStepTracks = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
199  src = 'highPtTripletStepTrackCandidates',
200  AlgorithmName = 'highPtTripletStep',
201  Fitter = 'FlexibleKFFittingSmoother',
202 )
203 
204 
205 # Final selection
207 highPtTripletStep = TrackMVAClassifierPrompt.clone(
208  src = 'highPtTripletStepTracks',
209  GBRForestLabel = 'MVASelectorHighPtTripletStep_Phase1',
210  qualityCuts = [0.2,0.3,0.4],
211 )
212 
213 
214 # For Phase2PU140
215 import RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi
216 highPtTripletStepSelector = RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.multiTrackSelector.clone(
217  src = 'highPtTripletStepTracks',
218  trackSelectors = [
219  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.looseMTS.clone(
220  name = 'highPtTripletStepLoose',
221  chi2n_par = 2.0,
222  res_par = ( 0.003, 0.002 ),
223  minNumberLayers = 3,
224  maxNumberLostLayers = 3,
225  minNumber3DLayers = 3,
226  d0_par1 = ( 0.7, 4.0 ),
227  dz_par1 = ( 0.8, 4.0 ),
228  d0_par2 = ( 0.6, 4.0 ),
229  dz_par2 = ( 0.6, 4.0 )
230  ), #end of pset
231  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.tightMTS.clone(
232  name = 'highPtTripletStepTight',
233  preFilterName = 'highPtTripletStepLoose',
234  chi2n_par = 1.0,
235  res_par = ( 0.003, 0.002 ),
236  minNumberLayers = 3,
237  maxNumberLostLayers = 2,
238  minNumber3DLayers = 3,
239  d0_par1 = ( 0.6, 4.0 ),
240  dz_par1 = ( 0.7, 4.0 ),
241  d0_par2 = ( 0.5, 4.0 ),
242  dz_par2 = ( 0.6, 4.0 )
243  ),
244  RecoTracker.FinalTrackSelectors.multiTrackSelector_cfi.highpurityMTS.clone(
245  name = 'highPtTripletStep',
246  preFilterName = 'highPtTripletStepTight',
247  chi2n_par = 0.8,
248  res_par = ( 0.003, 0.001 ),
249  min_nhits = 4,
250  minNumberLayers = 4,
251  maxNumberLostLayers = 2,
252  minNumber3DLayers = 4,
253  d0_par1 = ( 0.6, 4.0 ),
254  dz_par1 = ( 0.7, 4.0 ),
255  d0_par2 = ( 0.45, 4.0 ),
256  dz_par2 = ( 0.55, 4.0 )
257  ),
258  ] #end of vpset
259 ) #end of clone
260 
261 # Final sequence
262 HighPtTripletStep = cms.Sequence(highPtTripletStepClusters*
263  highPtTripletStepSeedLayers*
264  highPtTripletStepTrackingRegions*
265  highPtTripletStepHitDoublets*
266  highPtTripletStepHitTriplets*
267  highPtTripletStepSeeds*
268  highPtTripletStepTrackCandidates*
269  highPtTripletStepTracks*
270 # highPtTripletStepClassifier1*highPtTripletStepClassifier2*highPtTripletStepClassifier3*
271  highPtTripletStep)
272 _HighPtTripletStep_Phase2PU140 = HighPtTripletStep.copy()
273 _HighPtTripletStep_Phase2PU140.replace(highPtTripletStep, highPtTripletStepSelector)
274 trackingPhase2PU140.toReplaceWith(HighPtTripletStep, _HighPtTripletStep_Phase2PU140)
COSMIC RUN SETTING.