CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ### STEP 0 ###
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 
27 # TrackingRegion
28 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
29 initialStepTrackingRegionsPreSplitting = _globalTrackingRegionFromBeamSpot.clone(RegionPSet = dict(
30  ptMin = 0.6,
31  originRadius = 0.02,
32  nSigmaZ = 4.0
33 ))
34 trackingPhase1.toModify(initialStepTrackingRegionsPreSplitting, RegionPSet = dict(ptMin = 0.5))
35 
36 # seeding
37 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
38 initialStepHitDoubletsPreSplitting = _hitPairEDProducer.clone(
39  seedingLayers = 'initialStepSeedLayersPreSplitting',
40  trackingRegions = 'initialStepTrackingRegionsPreSplitting',
41  clusterCheck = 'trackerClusterCheckPreSplitting',
42  maxElement = 50000000,
43  produceIntermediateHitDoublets = True,
44 )
45 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
47 import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
48 initialStepHitTripletsPreSplitting = _pixelTripletHLTEDProducer.clone(
49  doublets = 'initialStepHitDoubletsPreSplitting',
50  produceSeedingHitSets = True,
51  SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(
52  clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting'
53  ),
54 )
55 from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer
56 trackingPhase1.toModify(initialStepHitDoubletsPreSplitting, layerPairs = [0,1,2]) # layer pairs (0,1), (1,2), (2,3)
57 initialStepHitQuadrupletsPreSplitting = _caHitQuadrupletEDProducer.clone(
58  doublets = 'initialStepHitDoubletsPreSplitting',
59  extraHitRPhitolerance = initialStepHitTripletsPreSplitting.extraHitRPhitolerance,
60  SeedComparitorPSet = initialStepHitTripletsPreSplitting.SeedComparitorPSet,
61  maxChi2 = dict(
62  pt1 = 0.7, pt2 = 2,
63  value1 = 200, value2 = 50,
64  ),
65  useBendingCorrection = True,
66  fitFastCircle = True,
67  fitFastCircleChi2Cut = True,
68  CAThetaCut = 0.0012,
69  CAPhiCut = 0.2,
70 )
71 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
72 initialStepSeedsPreSplitting = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
73  seedingHitSets = 'initialStepHitTripletsPreSplitting',
74 )
75 trackingPhase1.toModify(initialStepSeedsPreSplitting, seedingHitSets = 'initialStepHitQuadrupletsPreSplitting')
76 
77 
78 # building
80 initialStepTrajectoryFilterBasePreSplitting = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
81  minimumNumberOfHits = 4,
82  minPt = 0.2,
83  maxCCCLostHits = 0,
84  minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose'))
85 )
86 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
87 _tracker_apv_vfp30_2016.toModify(initialStepTrajectoryFilterBasePreSplitting, maxCCCLostHits = 2)
88 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
89 initialStepTrajectoryFilterShapePreSplitting = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
90 initialStepTrajectoryFilterPreSplitting = cms.PSet(
91  ComponentType = cms.string('CompositeTrajectoryFilter'),
92  filters = cms.VPSet(
93  cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterBasePreSplitting')),
94  cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterShapePreSplitting'))),
95 )
96 
97 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
98 initialStepChi2EstPreSplitting = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
99  ComponentName = 'initialStepChi2EstPreSplitting',
100  nSigma = 3.0,
101  MaxChi2 = 16.0,
102  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose')),
103 )
104 _tracker_apv_vfp30_2016.toModify(initialStepChi2EstPreSplitting,
105  clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
106 )
107 
109 initialStepTrajectoryBuilderPreSplitting = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
110  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('initialStepTrajectoryFilterPreSplitting')),
111  alwaysUseInvalidHits = True,
112  maxCand = 3,
113  estimator = 'initialStepChi2Est',
114 )
115 
117 initialStepTrackCandidatesPreSplitting = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
118  src = 'initialStepSeedsPreSplitting',
119  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
120  numHitsForSeedCleaner = cms.int32(50),
121  onlyPixelHitsForSeedCleaner = cms.bool(True),
122  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('initialStepTrajectoryBuilderPreSplitting')),
123  doSeedingRegionRebuilding = True,
124  useHitsSplitting = True
125 )
126 initialStepTrackCandidatesPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
127 
128 from Configuration.ProcessModifiers.trackingMkFitInitialStepPreSplitting_cff import trackingMkFitInitialStepPreSplitting
129 from RecoTracker.MkFit.mkFitGeometryESProducer_cfi import mkFitGeometryESProducer
130 import RecoTracker.MkFit.mkFitSiPixelHitConverter_cfi as _mkFitSiPixelHitConverter_cfi
131 import RecoTracker.MkFit.mkFitSiStripHitConverter_cfi as _mkFitSiStripHitConverter_cfi
132 import RecoTracker.MkFit.mkFitEventOfHitsProducer_cfi as _mkFitEventOfHitsProducer_cfi
133 import RecoTracker.MkFit.mkFitSeedConverter_cfi as _mkFitSeedConverter_cfi
134 import RecoTracker.MkFit.mkFitIterationConfigESProducer_cfi as _mkFitIterationConfigESProducer_cfi
135 import RecoTracker.MkFit.mkFitProducer_cfi as _mkFitProducer_cfi
136 import RecoTracker.MkFit.mkFitOutputConverter_cfi as _mkFitOutputConverter_cfi
137 mkFitSiPixelHitsPreSplitting = _mkFitSiPixelHitConverter_cfi.mkFitSiPixelHitConverter.clone(
138  hits = 'siPixelRecHitsPreSplitting'
139 )
140 mkFitSiStripHits = _mkFitSiStripHitConverter_cfi.mkFitSiStripHitConverter.clone() # TODO: figure out better place for this module?
141 mkFitEventOfHitsPreSplitting = _mkFitEventOfHitsProducer_cfi.mkFitEventOfHitsProducer.clone(
142  pixelHits = 'mkFitSiPixelHitsPreSplitting'
143 )
144 initialStepTrackCandidatesMkFitSeedsPreSplitting = _mkFitSeedConverter_cfi.mkFitSeedConverter.clone(
145  seeds = 'initialStepSeedsPreSplitting',
146 )
147 # TODO: or try to re-use the ESProducer of initialStep?
148 initialStepTrackCandidatesMkFitConfigPreSplitting = _mkFitIterationConfigESProducer_cfi.mkFitIterationConfigESProducer.clone(
149  ComponentName = 'initialStepTrackCandidatesMkFitConfigPreSplitting',
150  config = 'RecoTracker/MkFit/data/mkfit-phase1-initialStep.json',
151 )
152 initialStepTrackCandidatesMkFitPreSplitting = _mkFitProducer_cfi.mkFitProducer.clone(
153  pixelHits = 'mkFitSiPixelHitsPreSplitting',
154  eventOfHits = 'mkFitEventOfHitsPreSplitting',
155  seeds = 'initialStepTrackCandidatesMkFitSeedsPreSplitting',
156  config = ('', 'initialStepTrackCandidatesMkFitConfigPreSplitting'),
157 )
158 trackingMkFitInitialStepPreSplitting.toReplaceWith(initialStepTrackCandidatesPreSplitting, _mkFitOutputConverter_cfi.mkFitOutputConverter.clone(
159  mkFitPixelHits = 'mkFitSiPixelHitsPreSplitting',
160  mkFitEventOfHits = 'mkFitEventOfHitsPreSplitting',
161  seeds = 'initialStepSeedsPreSplitting',
162  mkFitSeeds = 'initialStepTrackCandidatesMkFitSeedsPreSplitting',
163  tracks = 'initialStepTrackCandidatesMkFitPreSplitting',
164 ))
165 
166 # fitting
168 initialStepTracksPreSplitting = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
169  src = 'initialStepTrackCandidatesPreSplitting',
170  AlgorithmName = 'initialStep',
171  Fitter = 'FlexibleKFFittingSmoother',
172  NavigationSchool = '',
173  MeasurementTrackerEvent = ''
174 )
175 initialStepTracksPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
176 
177 #vertices
178 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices
179 firstStepPrimaryVerticesPreSplitting = _offlinePrimaryVertices.clone(
180  TrackLabel = 'initialStepTracksPreSplitting',
181  vertexCollections = [_offlinePrimaryVertices.vertexCollections[0].clone()]
182 )
183 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
184 from Configuration.ProcessModifiers.pp_on_AA_cff import pp_on_AA
185 (pp_on_XeXe_2017 | pp_on_AA).toModify(firstStepPrimaryVerticesPreSplitting, TkFilterParameters = dict(trackQuality = 'any'))
186 
187 #Jet Core emulation to identify jet-tracks
188 from RecoTracker.IterativeTracking.InitialStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk
189 from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import jetsForCoreTracking
190 initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
191  src = 'initialStepTracksPreSplitting'
192 )
193 caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
194 ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
195  src = 'caloTowerForTrkPreSplitting',
196  srcPVs = 'firstStepPrimaryVerticesPreSplitting'
197 )
198 jetsForCoreTrackingPreSplitting = jetsForCoreTracking.clone(
199  src = 'ak4CaloJetsForTrkPreSplitting'
200 )
201 
202 #Cluster Splitting
203 from RecoLocalTracker.SubCollectionProducers.jetCoreClusterSplitter_cfi import jetCoreClusterSplitter
204 siPixelClusters = jetCoreClusterSplitter.clone(
205  pixelClusters = 'siPixelClustersPreSplitting',
206  vertices = 'firstStepPrimaryVerticesPreSplitting',
207  cores = 'jetsForCoreTrackingPreSplitting'
208 )
209 
210 # Final sequence
212 from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent
214 InitialStepPreSplittingTask = cms.Task(trackerClusterCheckPreSplitting,
215  initialStepSeedLayersPreSplitting,
216  initialStepTrackingRegionsPreSplitting,
217  initialStepHitDoubletsPreSplitting,
218  initialStepHitTripletsPreSplitting,
219  initialStepSeedsPreSplitting,
220  initialStepTrackCandidatesPreSplitting,
221  initialStepTracksPreSplitting,
222  firstStepPrimaryVerticesPreSplitting,
223  initialStepTrackRefsForJetsPreSplitting,
224  caloTowerForTrkPreSplitting,
225  ak4CaloJetsForTrkPreSplitting,
226  jetsForCoreTrackingPreSplitting,
227  siPixelClusters,
228  siPixelRecHits,
229  MeasurementTrackerEvent,
230  siPixelClusterShapeCache)
231 InitialStepPreSplitting = cms.Sequence(InitialStepPreSplittingTask)
232 _InitialStepPreSplittingTask_trackingPhase1 = InitialStepPreSplittingTask.copy()
233 _InitialStepPreSplittingTask_trackingPhase1.replace(initialStepHitTripletsPreSplitting, cms.Task(initialStepHitTripletsPreSplitting,initialStepHitQuadrupletsPreSplitting))
234 trackingPhase1.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingPhase1.copyAndExclude([initialStepHitTripletsPreSplitting]))
235 
236 from Configuration.ProcessModifiers.trackingMkFitCommon_cff import trackingMkFitCommon
237 _InitialStepPreSplittingTask_trackingMkFitCommon = InitialStepPreSplittingTask.copy()
238 _InitialStepPreSplittingTask_trackingMkFitCommon.add(mkFitSiStripHits, mkFitGeometryESProducer)
239 trackingMkFitCommon.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingMkFitCommon)
240 _InitialStepPreSplittingTask_trackingMkFit = InitialStepPreSplittingTask.copy()
241 _InitialStepPreSplittingTask_trackingMkFit.add(mkFitSiPixelHitsPreSplitting, mkFitEventOfHitsPreSplitting, initialStepTrackCandidatesMkFitSeedsPreSplitting, initialStepTrackCandidatesMkFitPreSplitting, initialStepTrackCandidatesMkFitConfigPreSplitting)
242 trackingMkFitInitialStepPreSplitting.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingMkFit)
243 
244 
245 # Although InitialStepPreSplitting is not really part of LowPU/Run1/Phase2PU140
246 # tracking, we use it to get siPixelClusters and siPixelRecHits
247 # collections for non-splitted pixel clusters. All modules before
248 # iterTracking sequence use siPixelClustersPreSplitting and
249 # siPixelRecHitsPreSplitting for that purpose.
250 #
251 # If siPixelClusters would be defined in
252 # RecoLocalTracker.Configuration.RecoLocalTracker_cff, we would have a
253 # situation where
254 # - LowPU/Phase2PU140 has siPixelClusters defined in RecoLocalTracker_cff
255 # - everything else has siPixelClusters defined here
256 # and this leads to a mess. The way it is done here we have only
257 # one place (within Reconstruction_cff) where siPixelClusters
258 # module is defined.
259 from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi import siPixelClusters as _siPixelClusters
260 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
261 trackingLowPU.toReplaceWith(siPixelClusters, _siPixelClusters)
262 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
263 trackingPhase2PU140.toReplaceWith(siPixelClusters, _siPixelClusters)
264 _InitialStepPreSplittingTask_LowPU_Phase2PU140 = cms.Task(
265  siPixelClusters ,
266  siPixelRecHits ,
267  MeasurementTrackerEvent ,
268  siPixelClusterShapeCache
269 )
270 trackingLowPU.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU_Phase2PU140)
271 trackingPhase2PU140.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU_Phase2PU140)
COSMIC RUN SETTING.
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135