CMS 3D CMS Logo

InitialStepPreSplitting_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016 as _tracker_apv_vfp30_2016
3 
4 
5 
6 # hit building
9 
10 from RecoTracker.TkSeedGenerator.trackerClusterCheck_cfi import trackerClusterCheck as _trackerClusterCheck
11 trackerClusterCheckPreSplitting = _trackerClusterCheck.clone(
12  PixelClusterCollectionLabel = 'siPixelClustersPreSplitting'
13 )
14 
15 # SEEDING LAYERS
17 import RecoTracker.TkSeedingLayers.PixelLayerQuadruplets_cfi
18 initialStepSeedLayersPreSplitting = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone(
19  FPix = dict(HitProducer = 'siPixelRecHitsPreSplitting'),
20  BPix = dict(HitProducer = 'siPixelRecHitsPreSplitting')
21 )
22 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
23 trackingPhase1.toModify(initialStepSeedLayersPreSplitting,
24  layerList = RecoTracker.TkSeedingLayers.PixelLayerQuadruplets_cfi.PixelLayerQuadruplets.layerList.value()
25 )
26 from Configuration.ProcessModifiers.splitClustersInPhase2Pixel_cff import splitClustersInPhase2Pixel
27 splitClustersInPhase2Pixel.toModify(initialStepSeedLayersPreSplitting,
28  layerList = RecoTracker.TkSeedingLayers.PixelLayerQuadruplets_cfi.PixelLayerQuadruplets.layerList.value()
29 )
30 
31 # TrackingRegion
32 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
33 initialStepTrackingRegionsPreSplitting = _globalTrackingRegionFromBeamSpot.clone(RegionPSet = dict(
34  ptMin = 0.6,
35  originRadius = 0.02,
36  nSigmaZ = 4.0
37 ))
38 trackingPhase1.toModify(initialStepTrackingRegionsPreSplitting, RegionPSet = dict(ptMin = 0.5))
39 splitClustersInPhase2Pixel.toModify(initialStepTrackingRegionsPreSplitting, RegionPSet = dict(ptMin = 0.6,originRadius = 0.03))
40 
41 # seeding
42 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
43 initialStepHitDoubletsPreSplitting = _hitPairEDProducer.clone(
44  seedingLayers = 'initialStepSeedLayersPreSplitting',
45  trackingRegions = 'initialStepTrackingRegionsPreSplitting',
46  clusterCheck = 'trackerClusterCheckPreSplitting',
47  maxElement = 50000000,
48  produceIntermediateHitDoublets = True,
49 )
50 from RecoTracker.PixelSeeding.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
52 import RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
53 initialStepHitTripletsPreSplitting = _pixelTripletHLTEDProducer.clone(
54  doublets = 'initialStepHitDoubletsPreSplitting',
55  produceSeedingHitSets = True,
56  SeedComparitorPSet = RecoTracker.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(
57  clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting'
58  ),
59 )
60 from RecoTracker.PixelSeeding.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer
61 trackingPhase1.toModify(initialStepHitDoubletsPreSplitting, layerPairs = [0,1,2]) # layer pairs (0,1), (1,2), (2,3)
62 splitClustersInPhase2Pixel.toModify(initialStepHitDoubletsPreSplitting, layerPairs = [0,1,2]) # layer pairs (0,1), (1,2), (2,3)
63 initialStepHitQuadrupletsPreSplitting = _caHitQuadrupletEDProducer.clone(
64  doublets = 'initialStepHitDoubletsPreSplitting',
65  extraHitRPhitolerance = initialStepHitTripletsPreSplitting.extraHitRPhitolerance,
66  SeedComparitorPSet = initialStepHitTripletsPreSplitting.SeedComparitorPSet,
67  maxChi2 = dict(
68  pt1 = 0.7, pt2 = 2,
69  value1 = 200, value2 = 50,
70  ),
71  useBendingCorrection = True,
72  fitFastCircle = True,
73  fitFastCircleChi2Cut = True,
74  CAThetaCut = 0.0012,
75  CAPhiCut = 0.2,
76 )
77 splitClustersInPhase2Pixel.toModify(initialStepHitQuadrupletsPreSplitting,
78  CAThetaCut = 0.0010,
79  CAPhiCut = 0.175,
80 )
81 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
82 initialStepSeedsPreSplitting = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
83  seedingHitSets = 'initialStepHitTripletsPreSplitting',
84 )
85 trackingPhase1.toModify(initialStepSeedsPreSplitting, seedingHitSets = 'initialStepHitQuadrupletsPreSplitting')
86 splitClustersInPhase2Pixel.toModify(initialStepSeedsPreSplitting, seedingHitSets = 'initialStepHitQuadrupletsPreSplitting')
87 
88 
89 # building
91 _initialStepTrajectoryFilterBasePreSplitting = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
92  minimumNumberOfHits = 4,
93  minPt = 0.2,
94 )
95 initialStepTrajectoryFilterBasePreSplitting = _initialStepTrajectoryFilterBasePreSplitting.clone(
96  maxCCCLostHits = 0,
97  minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose'))
98 )
99 splitClustersInPhase2Pixel.toReplaceWith(initialStepTrajectoryFilterBasePreSplitting, _initialStepTrajectoryFilterBasePreSplitting)
100 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
101 _tracker_apv_vfp30_2016.toModify(initialStepTrajectoryFilterBasePreSplitting, maxCCCLostHits = 2)
102 import RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
103 initialStepTrajectoryFilterShapePreSplitting = RecoTracker.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
104 initialStepTrajectoryFilterPreSplitting = cms.PSet(
105  ComponentType = cms.string('CompositeTrajectoryFilter'),
106  filters = cms.VPSet(
107  cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterBasePreSplitting')),
108  cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterShapePreSplitting'))),
109 )
110 splitClustersInPhase2Pixel.toReplaceWith(initialStepTrajectoryFilterPreSplitting, TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
111  minimumNumberOfHits = 3,
112  minPt = 0.2
113 ))
114 
115 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
116 initialStepChi2EstPreSplitting = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
117  ComponentName = 'initialStepChi2EstPreSplitting',
118  nSigma = 3.0,
119  MaxChi2 = 16.0,
120  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose')),
121 )
122 _tracker_apv_vfp30_2016.toModify(initialStepChi2EstPreSplitting,
123  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
124 )
125 splitClustersInPhase2Pixel.toModify(initialStepChi2EstPreSplitting,
126  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutNone'),
127 )
128 
130 initialStepTrajectoryBuilderPreSplitting = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilderIterativeDefault.clone(
131  trajectoryFilter = dict(refToPSet_ = 'initialStepTrajectoryFilterPreSplitting'),
132  alwaysUseInvalidHits = True,
133  maxCand = 3,
134  estimator = 'initialStepChi2Est',
135 )
136 
138 initialStepTrackCandidatesPreSplitting = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidatesIterativeDefault.clone(
139  src = 'initialStepSeedsPreSplitting',
140 
141  numHitsForSeedCleaner = 50,
142  onlyPixelHitsForSeedCleaner = True,
143  TrajectoryBuilderPSet = dict(refToPSet_ = 'initialStepTrajectoryBuilderPreSplitting'),
144  doSeedingRegionRebuilding = True,
145  useHitsSplitting = True,
146  MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting',
147 )
148 
149 from Configuration.ProcessModifiers.trackingMkFitInitialStepPreSplitting_cff import trackingMkFitInitialStepPreSplitting
150 from RecoTracker.MkFit.mkFitGeometryESProducer_cfi import mkFitGeometryESProducer
151 import RecoTracker.MkFit.mkFitSiPixelHitConverter_cfi as _mkFitSiPixelHitConverter_cfi
152 import RecoTracker.MkFit.mkFitSiStripHitConverter_cfi as _mkFitSiStripHitConverter_cfi
153 import RecoTracker.MkFit.mkFitEventOfHitsProducer_cfi as _mkFitEventOfHitsProducer_cfi
154 import RecoTracker.MkFit.mkFitSeedConverter_cfi as _mkFitSeedConverter_cfi
155 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as _mkFitIterationConfigESProducer_cfi
156 import RecoTracker.MkFit.mkFitProducer_cfi as _mkFitProducer_cfi
157 import RecoTracker.MkFit.mkFitOutputConverter_cfi as _mkFitOutputConverter_cfi
158 mkFitSiPixelHitsPreSplitting = _mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone(
159  hits = 'siPixelRecHitsPreSplitting'
160 )
161 mkFitSiStripHits = _mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone() # TODO: figure out better place for this module?
162 mkFitEventOfHitsPreSplitting = _mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone(
163  pixelHits = 'mkFitSiPixelHitsPreSplitting'
164 )
165 initialStepTrackCandidatesMkFitSeedsPreSplitting = _mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
166  seeds = 'initialStepSeedsPreSplitting',
167 )
168 # TODO: or try to re-use the ESProducer of initialStep?
169 initialStepTrackCandidatesMkFitConfigPreSplitting = _mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
170  ComponentName = 'initialStepTrackCandidatesMkFitConfigPreSplitting',
171  config = 'RecoTracker/MkFit/data/mkfit-phase1-initialStep.json',
172 )
173 initialStepTrackCandidatesMkFitPreSplitting = _mkFitProducer_cfi.mkFitProducer.clone(
174  pixelHits = 'mkFitSiPixelHitsPreSplitting',
175  eventOfHits = 'mkFitEventOfHitsPreSplitting',
176  seeds = 'initialStepTrackCandidatesMkFitSeedsPreSplitting',
177  config = ('', 'initialStepTrackCandidatesMkFitConfigPreSplitting'),
178 )
179 trackingMkFitInitialStepPreSplitting.toReplaceWith(initialStepTrackCandidatesPreSplitting, _mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
180  mkFitPixelHits = 'mkFitSiPixelHitsPreSplitting',
181  mkFitEventOfHits = 'mkFitEventOfHitsPreSplitting',
182  seeds = 'initialStepSeedsPreSplitting',
183  mkFitSeeds = 'initialStepTrackCandidatesMkFitSeedsPreSplitting',
184  tracks = 'initialStepTrackCandidatesMkFitPreSplitting',
185 ))
186 
187 # fitting
188 import RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi
189 initialStepTracksPreSplitting = RecoTracker.TrackProducer.TrackProducerIterativeDefault_cfi.TrackProducerIterativeDefault.clone(
190  src = 'initialStepTrackCandidatesPreSplitting',
191  AlgorithmName = 'initialStep',
192  Fitter = 'FlexibleKFFittingSmoother',
193  NavigationSchool = '',
194  MeasurementTrackerEvent = ''
195 )
196 initialStepTracksPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
197 
198 #vertices
199 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices
200 firstStepPrimaryVerticesPreSplitting = _offlinePrimaryVertices.clone(
201  TrackLabel = 'initialStepTracksPreSplitting',
202  vertexCollections = [_offlinePrimaryVertices.vertexCollections[0].clone()]
203 )
204 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
205 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
206 (pp_on_XeXe_2017 | pp_on_AA).toModify(firstStepPrimaryVerticesPreSplitting,
207  TkFilterParameters = dict(
208  trackQuality = 'any',
209  maxNumTracksThreshold = 2**31-1
210  )
211 )
212 
213 #Jet Core emulation to identify jet-tracks
214 from RecoTracker.IterativeTracking.InitialStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk
215 from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import jetsForCoreTracking
216 initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
217  src = 'initialStepTracksPreSplitting'
218 )
219 caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
220 ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
221  src = 'caloTowerForTrkPreSplitting',
222  srcPVs = 'firstStepPrimaryVerticesPreSplitting'
223 )
224 jetsForCoreTrackingPreSplitting = jetsForCoreTracking.clone(
225  src = 'ak4CaloJetsForTrkPreSplitting'
226 )
227 
228 #Cluster Splitting
229 from RecoLocalTracker.SubCollectionProducers.jetCoreClusterSplitter_cfi import jetCoreClusterSplitter
230 siPixelClusters = jetCoreClusterSplitter.clone(
231  pixelClusters = 'siPixelClustersPreSplitting',
232  vertices = 'firstStepPrimaryVerticesPreSplitting',
233  cores = 'jetsForCoreTrackingPreSplitting'
234 )
235 
236 # Final sequence
238 from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent
240 InitialStepPreSplittingTask = cms.Task(trackerClusterCheckPreSplitting,
241  initialStepSeedLayersPreSplitting,
242  initialStepTrackingRegionsPreSplitting,
243  initialStepHitDoubletsPreSplitting,
244  initialStepHitTripletsPreSplitting,
245  initialStepSeedsPreSplitting,
246  initialStepTrackCandidatesPreSplitting,
247  initialStepTracksPreSplitting,
248  firstStepPrimaryVerticesPreSplitting,
249  initialStepTrackRefsForJetsPreSplitting,
250  caloTowerForTrkPreSplitting,
251  ak4CaloJetsForTrkPreSplitting,
252  jetsForCoreTrackingPreSplitting,
253  siPixelClusters,
254  siPixelRecHits,
255  MeasurementTrackerEvent,
256  siPixelClusterShapeCache)
257 InitialStepPreSplitting = cms.Sequence(InitialStepPreSplittingTask)
258 _InitialStepPreSplittingTask_trackingPhase1 = InitialStepPreSplittingTask.copy()
259 _InitialStepPreSplittingTask_trackingPhase1.replace(initialStepHitTripletsPreSplitting, cms.Task(initialStepHitTripletsPreSplitting,initialStepHitQuadrupletsPreSplitting))
260 trackingPhase1.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingPhase1.copyAndExclude([initialStepHitTripletsPreSplitting]))
261 _InitialStepPreSplittingTask_trackingPhase2PU140 = InitialStepPreSplittingTask.copy()
262 _InitialStepPreSplittingTask_trackingPhase2PU140.replace(initialStepHitTripletsPreSplitting, cms.Task(initialStepHitTripletsPreSplitting,initialStepHitQuadrupletsPreSplitting))
263 splitClustersInPhase2Pixel.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingPhase2PU140.copyAndExclude([initialStepHitTripletsPreSplitting]))
264 
265 from Configuration.ProcessModifiers.trackingMkFitCommon_cff import trackingMkFitCommon
266 _InitialStepPreSplittingTask_trackingMkFitCommon = InitialStepPreSplittingTask.copy()
267 _InitialStepPreSplittingTask_trackingMkFitCommon.add(mkFitSiStripHits, mkFitGeometryESProducer)
268 trackingMkFitCommon.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingMkFitCommon)
269 _InitialStepPreSplittingTask_trackingMkFit = InitialStepPreSplittingTask.copy()
270 _InitialStepPreSplittingTask_trackingMkFit.add(mkFitSiPixelHitsPreSplitting, mkFitEventOfHitsPreSplitting, initialStepTrackCandidatesMkFitSeedsPreSplitting, initialStepTrackCandidatesMkFitPreSplitting, initialStepTrackCandidatesMkFitConfigPreSplitting)
271 trackingMkFitInitialStepPreSplitting.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingMkFit)
272 
273 
274 # Although InitialStepPreSplitting is not really part of LowPU/Run1/Phase2PU140
275 # tracking, we use it to get siPixelClusters and siPixelRecHits
276 # collections for non-splitted pixel clusters. All modules before
277 # iterTracking sequence use siPixelClustersPreSplitting and
278 # siPixelRecHitsPreSplitting for that purpose.
279 #
280 # If siPixelClusters would be defined in
281 # RecoLocalTracker.Configuration.RecoLocalTracker_cff, we would have a
282 # situation where
283 # - LowPU/Phase2PU140 has siPixelClusters defined in RecoLocalTracker_cff
284 # - everything else has siPixelClusters defined here
285 # and this leads to a mess. The way it is done here we have only
286 # one place (within Reconstruction_cff) where siPixelClusters
287 # module is defined.
288 from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi import siPixelClusters as _siPixelClusters
289 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
290 trackingLowPU.toReplaceWith(siPixelClusters, _siPixelClusters)
291 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
292 (trackingPhase2PU140 & ~splitClustersInPhase2Pixel).toReplaceWith(siPixelClusters, _siPixelClusters)
293 _InitialStepPreSplittingTask_LowPU = cms.Task(
294  siPixelClusters ,
295  siPixelRecHits ,
296  MeasurementTrackerEvent ,
297  siPixelClusterShapeCache
298 )
299 trackingLowPU.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU)
300 (trackingPhase2PU140 & ~splitClustersInPhase2Pixel).toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU)
301 splitClustersInPhase2Pixel.toModify(siPixelClusters,
302  centralMIPCharge = cms.double(12000),
303  expSizeXAtLorentzAngleIncidence = cms.double(1.5),
304  expSizeXDeltaPerTanAlpha = cms.double(5.2),
305  expSizeYAtNormalIncidence = cms.double(2.3),
306  tanLorentzAngle = cms.double(-0.21),
307  tanLorentzAngleBarrelLayer1 = cms.double(0.0),
308  chargeFractionMin = cms.double(2.0),
309  forceXError = cms.double(25.0),
310  forceYError = cms.double(100.0),
311 )
TRIGGER SELECTION #####.
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135