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