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 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 = 50000000,
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 
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 from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
145 from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
146 (pp_on_XeXe_2017 | pp_on_AA_2018).toModify(firstStepPrimaryVerticesPreSplitting, TkFilterParameters = dict(trackQuality = "any"))
147 
148 #Jet Core emulation to identify jet-tracks
149 from RecoTracker.IterativeTracking.InitialStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk
150 from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import jetsForCoreTracking
151 initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
152  src = 'initialStepTracksPreSplitting')
153 caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
154 ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
155  src = 'caloTowerForTrkPreSplitting',
156  srcPVs = 'firstStepPrimaryVerticesPreSplitting')
157 jetsForCoreTrackingPreSplitting = jetsForCoreTracking.clone(
158  src = 'ak4CaloJetsForTrkPreSplitting')
159 
160 #Cluster Splitting
161 from RecoLocalTracker.SubCollectionProducers.jetCoreClusterSplitter_cfi import jetCoreClusterSplitter
162 siPixelClusters = jetCoreClusterSplitter.clone(
163  pixelClusters = cms.InputTag('siPixelClustersPreSplitting'),
164  vertices = 'firstStepPrimaryVerticesPreSplitting',
165  cores = 'jetsForCoreTrackingPreSplitting'
166 )
167 
168 # Final sequence
170 from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent
172 InitialStepPreSplittingTask = cms.Task(trackerClusterCheckPreSplitting,
173  initialStepSeedLayersPreSplitting,
174  initialStepTrackingRegionsPreSplitting,
175  initialStepHitDoubletsPreSplitting,
176  initialStepHitTripletsPreSplitting,
177  initialStepSeedsPreSplitting,
178  initialStepTrackCandidatesPreSplitting,
179  initialStepTracksPreSplitting,
180  firstStepPrimaryVerticesPreSplitting,
181  initialStepTrackRefsForJetsPreSplitting,
182  caloTowerForTrkPreSplitting,
183  ak4CaloJetsForTrkPreSplitting,
184  jetsForCoreTrackingPreSplitting,
185  siPixelClusters,
186  siPixelRecHits,
187  MeasurementTrackerEvent,
188  siPixelClusterShapeCache)
189 InitialStepPreSplitting = cms.Sequence(InitialStepPreSplittingTask)
190 _InitialStepPreSplittingTask_trackingPhase1 = InitialStepPreSplittingTask.copy()
191 _InitialStepPreSplittingTask_trackingPhase1.replace(initialStepHitTripletsPreSplitting, cms.Task(initialStepHitTripletsPreSplitting,initialStepHitQuadrupletsPreSplitting))
192 trackingPhase1.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_trackingPhase1.copyAndExclude([initialStepHitTripletsPreSplitting]))
193 
194 
195 # Although InitialStepPreSplitting is not really part of LowPU/Run1/Phase2PU140
196 # tracking, we use it to get siPixelClusters and siPixelRecHits
197 # collections for non-splitted pixel clusters. All modules before
198 # iterTracking sequence use siPixelClustersPreSplitting and
199 # siPixelRecHitsPreSplitting for that purpose.
200 #
201 # If siPixelClusters would be defined in
202 # RecoLocalTracker.Configuration.RecoLocalTracker_cff, we would have a
203 # situation where
204 # - LowPU/Phase2PU140 has siPixelClusters defined in RecoLocalTracker_cff
205 # - everything else has siPixelClusters defined here
206 # and this leads to a mess. The way it is done here we have only
207 # one place (within Reconstruction_cff) where siPixelClusters
208 # module is defined.
209 from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi import siPixelClusters as _siPixelClusters
210 from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
211 trackingLowPU.toReplaceWith(siPixelClusters, _siPixelClusters)
212 from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
213 trackingPhase2PU140.toReplaceWith(siPixelClusters, _siPixelClusters)
214 _InitialStepPreSplittingTask_LowPU_Phase2PU140 = cms.Task(
215  siPixelClusters ,
216  siPixelRecHits ,
217  MeasurementTrackerEvent ,
218  siPixelClusterShapeCache
219 )
220 trackingLowPU.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU_Phase2PU140)
221 trackingPhase2PU140.toReplaceWith(InitialStepPreSplittingTask, _InitialStepPreSplittingTask_LowPU_Phase2PU140)
TrajectoryFilter_cff
GroupedCkfTrajectoryBuilder_cfi
PixelCPEESProducers_cff
OfflinePrimaryVertices_cfi
ClusterShapeHitFilterESProducer_cfi
SiPixelClusterizer_cfi
siPixelClusterShapeCache_cfi
SiPixelRecHits_cfi
InitialStep_cff
clone
TEveGeoShape * clone(const TEveElement *element, TEveElement *parent)
Definition: eve_macros.cc:135
TTRHBuilders_cff
PixelLayerTriplets_cfi
TRIGGER SELECTION #####.
TrackProducer_cfi
trackerClusterCheck_cfi
JetCoreRegionalStep_cff
CkfTrackCandidates_cfi
MeasurementTrackerEventProducer_cfi