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 ### 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
18 initialStepSeedLayersPreSplitting = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone()
19 initialStepSeedLayersPreSplitting.FPix.HitProducer = 'siPixelRecHitsPreSplitting'
20 initialStepSeedLayersPreSplitting.BPix.HitProducer = 'siPixelRecHitsPreSplitting'
21 from Configuration.Eras.Modifier_trackingPhase1_cff import trackingPhase1
22 trackingPhase1.toModify(initialStepSeedLayersPreSplitting,
23  layerList = RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff.PixelSeedMergerQuadruplets.layerList.value()
24 )
25 from Configuration.Eras.Modifier_trackingPhase1QuadProp_cff import trackingPhase1QuadProp
26 trackingPhase1QuadProp.toModify(initialStepSeedLayersPreSplitting,
27  layerList = RecoPixelVertexing.PixelTriplets.quadrupletseedmerging_cff.PixelSeedMergerQuadruplets.layerList.value()
28 )
29 
30 # TrackingRegion
31 from RecoTracker.TkTrackingRegions.globalTrackingRegionFromBeamSpot_cfi import globalTrackingRegionFromBeamSpot as _globalTrackingRegionFromBeamSpot
32 initialStepTrackingRegionsPreSplitting = _globalTrackingRegionFromBeamSpot.clone(RegionPSet = dict(
33  ptMin = 0.6,
34  originRadius = 0.02,
35  nSigmaZ = 4.0
36 ))
37 trackingPhase1.toModify(initialStepTrackingRegionsPreSplitting, RegionPSet = dict(ptMin = 0.5))
38 
39 # seeding
40 from RecoTracker.TkHitPairs.hitPairEDProducer_cfi import hitPairEDProducer as _hitPairEDProducer
41 initialStepHitDoubletsPreSplitting = _hitPairEDProducer.clone(
42  seedingLayers = "initialStepSeedLayersPreSplitting",
43  trackingRegions = "initialStepTrackingRegionsPreSplitting",
44  clusterCheck = "trackerClusterCheckPreSplitting",
45  maxElement = 0,
46  produceIntermediateHitDoublets = True,
47 )
48 from RecoPixelVertexing.PixelTriplets.pixelTripletHLTEDProducer_cfi import pixelTripletHLTEDProducer as _pixelTripletHLTEDProducer
50 import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
51 initialStepHitTripletsPreSplitting = _pixelTripletHLTEDProducer.clone(
52  doublets = "initialStepHitDoubletsPreSplitting",
53  produceSeedingHitSets = True,
54  SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone(
55  clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting'
56  ),
57 )
58 from RecoPixelVertexing.PixelTriplets.pixelQuadrupletEDProducer_cfi import pixelQuadrupletEDProducer as _pixelQuadrupletEDProducer
59 trackingPhase1.toModify(initialStepHitDoubletsPreSplitting, layerPairs = [0,1,2]) # layer pairs (0,1), (1,2), (2,3)
60 initialStepHitQuadrupletsPreSplitting = _pixelQuadrupletEDProducer.clone(
61  triplets = "initialStepHitTripletsPreSplitting",
62  extraHitRZtolerance = initialStepHitTripletsPreSplitting.extraHitRZtolerance,
63  extraHitRPhitolerance = initialStepHitTripletsPreSplitting.extraHitRPhitolerance,
64  maxChi2 = dict(
65  pt1 = 0.8, pt2 = 2,
66  value1 = 200, value2 = 100,
67  enabled = True,
68  ),
69  extraPhiTolerance = dict(
70  pt1 = 0.6, pt2 = 1,
71  value1 = 0.15, value2 = 0.1,
72  enabled = True,
73  ),
74  useBendingCorrection = True,
75  fitFastCircle = True,
76  fitFastCircleChi2Cut = True,
77  SeedComparitorPSet = initialStepHitTripletsPreSplitting.SeedComparitorPSet
78 )
79 from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
80 initialStepSeedsPreSplitting = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
81  seedingHitSets = "initialStepHitTripletsPreSplitting",
82 )
83 
84 from RecoPixelVertexing.PixelTriplets.caHitQuadrupletEDProducer_cfi import caHitQuadrupletEDProducer as _caHitQuadrupletEDProducer
85 trackingPhase1.toReplaceWith(initialStepHitQuadrupletsPreSplitting, _caHitQuadrupletEDProducer.clone(
86  doublets = "initialStepHitDoubletsPreSplitting",
87  extraHitRPhitolerance = initialStepHitTripletsPreSplitting.extraHitRPhitolerance,
88  SeedComparitorPSet = initialStepHitTripletsPreSplitting.SeedComparitorPSet,
89  maxChi2 = dict(
90  pt1 = 0.7, pt2 = 2,
91  value1 = 200, value2 = 50,
92  ),
93  useBendingCorrection = True,
94  fitFastCircle = True,
95  fitFastCircleChi2Cut = True,
96  CAThetaCut = 0.0012,
97  CAPhiCut = 0.2,
98 ))
99 
100 trackingPhase1QuadProp.toModify(initialStepHitTripletsPreSplitting,
101  produceSeedingHitSets = False,
102  produceIntermediateHitTriplets = True,
103 )
104 trackingPhase1.toModify(initialStepSeedsPreSplitting, seedingHitSets = "initialStepHitQuadrupletsPreSplitting")
105 trackingPhase1QuadProp.toModify(initialStepSeedsPreSplitting, seedingHitSets = "initialStepHitQuadrupletsPreSplitting")
106 
107 
108 # building
110 initialStepTrajectoryFilterBasePreSplitting = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
111  minimumNumberOfHits = 4,
112  minPt = 0.2,
113  maxCCCLostHits = 0,
114  minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose'))
115  )
116 from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
117 _tracker_apv_vfp30_2016.toModify(initialStepTrajectoryFilterBasePreSplitting, maxCCCLostHits = 2)
118 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
119 initialStepTrajectoryFilterShapePreSplitting = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
120 initialStepTrajectoryFilterPreSplitting = cms.PSet(
121  ComponentType = cms.string('CompositeTrajectoryFilter'),
122  filters = cms.VPSet(
123  cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterBasePreSplitting')),
124  cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterShapePreSplitting'))),
125 )
126 
127 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
128 initialStepChi2EstPreSplitting = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
129  ComponentName = cms.string('initialStepChi2EstPreSplitting'),
130  nSigma = cms.double(3.0),
131  MaxChi2 = cms.double(16.0),
132  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose')),
133 )
134 _tracker_apv_vfp30_2016.toModify(initialStepChi2EstPreSplitting,
135  clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutTiny")
136 )
137 
139 initialStepTrajectoryBuilderPreSplitting = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
140  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('initialStepTrajectoryFilterPreSplitting')),
141  alwaysUseInvalidHits = True,
142  maxCand = 3,
143  estimator = cms.string('initialStepChi2Est'),
144  )
145 
147 initialStepTrackCandidatesPreSplitting = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
148  src = cms.InputTag('initialStepSeedsPreSplitting'),
149  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
150  numHitsForSeedCleaner = cms.int32(50),
151  onlyPixelHitsForSeedCleaner = cms.bool(True),
152  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('initialStepTrajectoryBuilderPreSplitting')),
153  doSeedingRegionRebuilding = True,
154  useHitsSplitting = True
155  )
156 initialStepTrackCandidatesPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
157 
158 # fitting
160 initialStepTracksPreSplitting = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
161  src = 'initialStepTrackCandidatesPreSplitting',
162  AlgorithmName = cms.string('initialStep'),
163  Fitter = cms.string('FlexibleKFFittingSmoother'),
164  NavigationSchool ='',
165  MeasurementTrackerEvent = ''
166  )
167 initialStepTracksPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
168 
169 #vertices
170 from RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi import offlinePrimaryVertices as _offlinePrimaryVertices
171 firstStepPrimaryVerticesPreSplitting = _offlinePrimaryVertices.clone()
172 firstStepPrimaryVerticesPreSplitting.TrackLabel = cms.InputTag("initialStepTracksPreSplitting")
173 firstStepPrimaryVerticesPreSplitting.vertexCollections = [_offlinePrimaryVertices.vertexCollections[0].clone()]
174 
175 #Jet Core emulation to identify jet-tracks
176 from RecoTracker.IterativeTracking.InitialStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk
177 from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import jetsForCoreTracking
178 initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
179  src = 'initialStepTracksPreSplitting')
180 caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
181 ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
182  src = 'caloTowerForTrkPreSplitting',
183  srcPVs = 'firstStepPrimaryVerticesPreSplitting')
184 jetsForCoreTrackingPreSplitting = jetsForCoreTracking.clone(
185  src = 'ak4CaloJetsForTrkPreSplitting')
186 
187 #Cluster Splitting
188 from RecoLocalTracker.SubCollectionProducers.jetCoreClusterSplitter_cfi import jetCoreClusterSplitter
189 siPixelClusters = jetCoreClusterSplitter.clone(
190  pixelClusters = cms.InputTag('siPixelClustersPreSplitting'),
191  vertices = 'firstStepPrimaryVerticesPreSplitting',
192  cores = 'jetsForCoreTrackingPreSplitting'
193 )
194 
195 # Final sequence
197 from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent
199 InitialStepPreSplitting = cms.Sequence(trackerClusterCheckPreSplitting*
200  initialStepSeedLayersPreSplitting*
201  initialStepTrackingRegionsPreSplitting*
202  initialStepHitDoubletsPreSplitting*
203  initialStepHitTripletsPreSplitting*
204  initialStepSeedsPreSplitting*
205  initialStepTrackCandidatesPreSplitting*
206  initialStepTracksPreSplitting*
207  firstStepPrimaryVerticesPreSplitting*
208  initialStepTrackRefsForJetsPreSplitting*
209  caloTowerForTrkPreSplitting*
210  ak4CaloJetsForTrkPreSplitting*
211  jetsForCoreTrackingPreSplitting*
212  siPixelClusters*
213  siPixelRecHits*
214  MeasurementTrackerEvent*
215  siPixelClusterShapeCache)
216 
217 _InitialStepPreSplitting_trackingPhase1 = InitialStepPreSplitting.copy()
218 _InitialStepPreSplitting_trackingPhase1.replace(initialStepHitTripletsPreSplitting, initialStepHitTripletsPreSplitting*initialStepHitQuadrupletsPreSplitting)
219 trackingPhase1.toReplaceWith(InitialStepPreSplitting, _InitialStepPreSplitting_trackingPhase1.copyAndExclude([initialStepHitTripletsPreSplitting]))
220 trackingPhase1QuadProp.toReplaceWith(InitialStepPreSplitting, _InitialStepPreSplitting_trackingPhase1)
221 
222 # Although InitialStepPreSplitting is not really part of LowPU/Run1/Phase2PU140
223 # tracking, we use it to get siPixelClusters and siPixelRecHits
224 # collections for non-splitted pixel clusters. All modules before
225 # iterTracking sequence use siPixelClustersPreSplitting and
226 # siPixelRecHitsPreSplitting for that purpose.
227 #
228 # If siPixelClusters would be defined in
229 # RecoLocalTracker.Configuration.RecoLocalTracker_cff, we would have a
230 # situation where
231 # - LowPU/Phase2PU140 has siPixelClusters defined in RecoLocalTracker_cff
232 # - everything else has siPixelClusters defined here
233 # and this leads to a mess. The way it is done here we have only
234 # one place (within Reconstruction_cff) where siPixelClusters
235 # module is defined.
236 from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi import siPixelClusters as _siPixelClusters
237 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
238 trackingLowPU.toReplaceWith(siPixelClusters, _siPixelClusters)
239 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
240 trackingPhase2PU140.toReplaceWith(siPixelClusters, _siPixelClusters)
241 _InitialStepPreSplitting_LowPU_Phase2PU140 = cms.Sequence(
242  siPixelClusters +
243  siPixelRecHits +
244  MeasurementTrackerEvent +
245  siPixelClusterShapeCache
246 )
247 trackingLowPU.toReplaceWith(InitialStepPreSplitting, _InitialStepPreSplitting_LowPU_Phase2PU140)
248 trackingPhase2PU140.toReplaceWith(InitialStepPreSplitting, _InitialStepPreSplitting_LowPU_Phase2PU140)
COSMIC RUN SETTING.
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135