test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
InitialStepPreSplitting_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 from Configuration.StandardSequences.Eras import eras
3 
4 ### STEP 0 ###
5 
6 # hit building
9 
10 # SEEDING LAYERS
12 initialStepSeedLayersPreSplitting = RecoTracker.TkSeedingLayers.PixelLayerTriplets_cfi.PixelLayerTriplets.clone()
13 initialStepSeedLayersPreSplitting.FPix.HitProducer = 'siPixelRecHitsPreSplitting'
14 initialStepSeedLayersPreSplitting.BPix.HitProducer = 'siPixelRecHitsPreSplitting'
15 
16 # seeding
18 from RecoTracker.TkTrackingRegions.GlobalTrackingRegionFromBeamSpot_cfi import RegionPsetFomBeamSpotBlock
19 initialStepSeedsPreSplitting = RecoTracker.TkSeedGenerator.GlobalSeedsFromTriplets_cff.globalSeedsFromTriplets.clone(
20  RegionFactoryPSet = RegionPsetFomBeamSpotBlock.clone(
21  ComponentName = cms.string('GlobalRegionProducerFromBeamSpot'),
22  RegionPSet = RegionPsetFomBeamSpotBlock.RegionPSet.clone(
23  ptMin = 0.6,
24  originRadius = 0.02,
25  nSigmaZ = 4.0
26  )
27  )
28  )
29 initialStepSeedsPreSplitting.OrderedHitsFactoryPSet.SeedingLayers = 'initialStepSeedLayersPreSplitting'
30 
32 import RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi
33 initialStepSeedsPreSplitting.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet = RecoPixelVertexing.PixelLowPtUtilities.LowPtClusterShapeSeedComparitor_cfi.LowPtClusterShapeSeedComparitor.clone()
34 initialStepSeedsPreSplitting.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet.clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting'
35 initialStepSeedsPreSplitting.ClusterCheckPSet.PixelClusterCollectionLabel = 'siPixelClustersPreSplitting'
36 
37 # building
39 initialStepTrajectoryFilterBasePreSplitting = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
40  minimumNumberOfHits = 3,
41  minPt = 0.2,
42  maxCCCLostHits = 2,
43  minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose'))
44  )
45 import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
46 initialStepTrajectoryFilterShapePreSplitting = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
47 initialStepTrajectoryFilterPreSplitting = cms.PSet(
48  ComponentType = cms.string('CompositeTrajectoryFilter'),
49  filters = cms.VPSet(
50  cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterBasePreSplitting')),
51  cms.PSet( refToPSet_ = cms.string('initialStepTrajectoryFilterShapePreSplitting'))),
52 )
53 
54 import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
55 initialStepChi2EstPreSplitting = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
56  ComponentName = cms.string('initialStepChi2EstPreSplitting'),
57  nSigma = cms.double(3.0),
58  MaxChi2 = cms.double(30.0),
59  clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTiny')),
60  pTChargeCutThreshold = cms.double(15.)
61 )
62 
64 initialStepTrajectoryBuilderPreSplitting = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
65  trajectoryFilter = cms.PSet(refToPSet_ = cms.string('initialStepTrajectoryFilterPreSplitting')),
66  alwaysUseInvalidHits = True,
67  maxCand = 3,
68  estimator = cms.string('initialStepChi2Est'),
69  maxDPhiForLooperReconstruction = cms.double(2.0),
70  maxPtForLooperReconstruction = cms.double(0.7)
71  )
72 
74 initialStepTrackCandidatesPreSplitting = RecoTracker.CkfPattern.CkfTrackCandidates_cfi.ckfTrackCandidates.clone(
75  src = cms.InputTag('initialStepSeedsPreSplitting'),
76  ### these two parameters are relevant only for the CachingSeedCleanerBySharedInput
77  numHitsForSeedCleaner = cms.int32(50),
78  onlyPixelHitsForSeedCleaner = cms.bool(True),
79  TrajectoryBuilderPSet = cms.PSet(refToPSet_ = cms.string('initialStepTrajectoryBuilderPreSplitting')),
80  doSeedingRegionRebuilding = True,
81  useHitsSplitting = True
82  )
83 initialStepTrackCandidatesPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
84 
85 # fitting
87 initialStepTracksPreSplitting = RecoTracker.TrackProducer.TrackProducer_cfi.TrackProducer.clone(
88  src = 'initialStepTrackCandidatesPreSplitting',
89  AlgorithmName = cms.string('initialStep'),
90  Fitter = cms.string('FlexibleKFFittingSmoother')
91  )
92 initialStepTracksPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
93 
94 #vertices
96 firstStepPrimaryVerticesPreSplitting = RecoVertex.PrimaryVertexProducer.OfflinePrimaryVertices_cfi.offlinePrimaryVertices.clone()
97 firstStepPrimaryVerticesPreSplitting.TrackLabel = cms.InputTag("initialStepTracksPreSplitting")
98 firstStepPrimaryVerticesPreSplitting.vertexCollections = cms.VPSet(
99  [cms.PSet(label=cms.string(""),
100  algorithm=cms.string("AdaptiveVertexFitter"),
101  minNdof=cms.double(0.0),
102  useBeamConstraint = cms.bool(False),
103  maxDistanceToBeam = cms.double(1.0)
104  )
105  ]
106  )
107 
108 #Jet Core emulation to identify jet-tracks
109 from RecoTracker.IterativeTracking.JetCoreRegionalStep_cff import initialStepTrackRefsForJets, caloTowerForTrk, ak4CaloJetsForTrk, jetsForCoreTracking
110 initialStepTrackRefsForJetsPreSplitting = initialStepTrackRefsForJets.clone(
111  src = 'initialStepTracksPreSplitting')
112 caloTowerForTrkPreSplitting = caloTowerForTrk.clone()
113 ak4CaloJetsForTrkPreSplitting = ak4CaloJetsForTrk.clone(
114  src = 'caloTowerForTrkPreSplitting',
115  srcPVs = 'firstStepPrimaryVerticesPreSplitting')
116 jetsForCoreTrackingPreSplitting = jetsForCoreTracking.clone(
117  src = 'ak4CaloJetsForTrkPreSplitting')
118 
119 #Cluster Splitting
120 from RecoLocalTracker.SubCollectionProducers.jetCoreClusterSplitter_cfi import jetCoreClusterSplitter
121 siPixelClusters = jetCoreClusterSplitter.clone(
122  pixelClusters = cms.InputTag('siPixelClustersPreSplitting'),
123  vertices = 'firstStepPrimaryVerticesPreSplitting',
124  cores = 'jetsForCoreTrackingPreSplitting'
125 )
126 
127 # Final sequence
129 from RecoTracker.MeasurementDet.MeasurementTrackerEventProducer_cfi import MeasurementTrackerEvent
131 InitialStepPreSplitting = cms.Sequence(initialStepSeedLayersPreSplitting*
132  initialStepSeedsPreSplitting*
133  initialStepTrackCandidatesPreSplitting*
134  initialStepTracksPreSplitting*
135  firstStepPrimaryVerticesPreSplitting*
136  initialStepTrackRefsForJetsPreSplitting*
137  caloTowerForTrkPreSplitting*
138  ak4CaloJetsForTrkPreSplitting*
139  jetsForCoreTrackingPreSplitting*
140  siPixelClusters*
141  siPixelRecHits*
142  MeasurementTrackerEvent*
143  siPixelClusterShapeCache)
144 
145 # Although InitialStepPreSplitting is not really part of LowPU/Run1/Phase1PU70
146 # tracking, we use it to get siPixelClusters and siPixelRecHits
147 # collections for non-splitted pixel clusters. All modules before
148 # iterTracking sequence use siPixelClustersPreSplitting and
149 # siPixelRecHitsPreSplitting for that purpose.
150 #
151 # If siPixelClusters would be defined in
152 # RecoLocalTracker.Configuration.RecoLocalTracker_cff, we would have a
153 # situation where
154 # - LowPU/Phase1PU70 has siPixelClusters defined in RecoLocalTracker_cff
155 # - everything else has siPixelClusters defined here
156 # and this leads to a mess. The way it is done here we have only
157 # one place (within Reconstruction_cff) where siPixelClusters
158 # module is defined.
159 from RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi import siPixelClusters as _siPixelClusters
160 eras.trackingLowPU.toReplaceWith(siPixelClusters, _siPixelClusters)
161 eras.trackingLowPU.toReplaceWith(InitialStepPreSplitting, cms.Sequence(
162  siPixelClusters +
163  siPixelRecHits +
164  MeasurementTrackerEvent +
165  siPixelClusterShapeCache
166 ))