CMS 3D CMS Logo

customizeForClusterSplitting.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
4  process.load('RecoLocalTracker.SubCollectionProducers.jetCoreClusterSplitter_cfi')
5  clustersTmp = 'siPixelClustersPreSplitting'
6  # 0. Produce tmp clusters in the first place.
7  process.siPixelClustersPreSplitting = process.siPixelClusters.clone()
8  process.siPixelRecHitsPreSplitting = process.siPixelRecHits.clone()
9  process.siPixelRecHitsPreSplitting.src = clustersTmp
10  process.pixeltrackerlocalreco.replace(process.siPixelClusters, process.siPixelClustersPreSplitting)
11  process.pixeltrackerlocalreco.replace(process.siPixelRecHits, process.siPixelRecHitsPreSplitting)
12  process.clusterSummaryProducer.pixelClusters = clustersTmp
13 
14  # 0.5 Feed them to MTE and PixelClusterShapeCache
15 
16  process.MeasurementTrackerEventPreSplitting = process.MeasurementTrackerEvent.clone()
17  process.MeasurementTrackerEventPreSplitting.pixelClusterProducer = clustersTmp
18  process.siPixelClusterShapeCachePreSplitting = process.siPixelClusterShapeCache.clone()
19  process.siPixelClusterShapeCachePreSplitting.src = clustersTmp
20  process.globalreco.replace(process.MeasurementTrackerEvent, process.MeasurementTrackerEventPreSplitting)
21  process.globalreco.replace(process.siPixelClusterShapeCache, process.siPixelClusterShapeCachePreSplitting)
22 
23  # 1. clone what needs to be cloned to have PV before Cluster
24  # Splitting, put together the sequence and prepend it to the main
25  # iterative sequence
26  process.initialStepSeedLayersPreSplitting = process.initialStepSeedLayers.clone()
27  process.initialStepSeedLayersPreSplitting.FPix.HitProducer = 'siPixelRecHitsPreSplitting'
28  process.initialStepSeedLayersPreSplitting.BPix.HitProducer = 'siPixelRecHitsPreSplitting'
29 
30  process.initialStepSeedsPreSplitting = process.initialStepSeeds.clone()
31  process.initialStepSeedsPreSplitting.OrderedHitsFactoryPSet.SeedingLayers = 'initialStepSeedLayersPreSplitting'
32  process.initialStepSeedsPreSplitting.OrderedHitsFactoryPSet.GeneratorPSet.SeedComparitorPSet.clusterShapeCacheSrc = 'siPixelClusterShapeCachePreSplitting'
33  process.initialStepSeedsPreSplitting.ClusterCheckPSet.PixelClusterCollectionLabel = clustersTmp
34 
35  process.initialStepTrackCandidatesPreSplitting = process.initialStepTrackCandidates.clone()
36  process.initialStepTrackCandidatesPreSplitting.src = 'initialStepSeedsPreSplitting'
37  process.initialStepTrackCandidatesPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
38 
39  process.initialStepTracksPreSplitting = process.initialStepTracks.clone()
40  process.initialStepTracksPreSplitting.src = 'initialStepTrackCandidatesPreSplitting'
41  process.initialStepTracksPreSplitting.MeasurementTrackerEvent = 'MeasurementTrackerEventPreSplitting'
42 
43  process.firstStepPrimaryVerticesPreSplitting = process.firstStepPrimaryVertices.clone()
44  process.firstStepPrimaryVerticesPreSplitting.TrackLabel = 'initialStepTracksPreSplitting'
45 
46  process.initialStepTrackRefsForJetsPreSplitting = process.initialStepTrackRefsForJets.clone()
47  process.initialStepTrackRefsForJetsPreSplitting.src = 'initialStepTracksPreSplitting'
48  process.caloTowerForTrkPreSplitting = process.caloTowerForTrk.clone()
49  process.ak4CaloJetsForTrkPreSplitting = process.ak4CaloJetsForTrk.clone()
50  process.ak4CaloJetsForTrkPreSplitting.src = 'caloTowerForTrkPreSplitting'
51  process.ak4CaloJetsForTrkPreSplitting.srcPVs = 'firstStepPrimaryVerticesPreSplitting'
52  process.jetsForCoreTrackingPreSplitting = process.jetsForCoreTracking.clone()
53  process.jetsForCoreTrackingPreSplitting.src = 'ak4CaloJetsForTrkPreSplitting'
54 
55  process.siPixelClusters = process.jetCoreClusterSplitter.clone(
56  pixelClusters = cms.InputTag(clustersTmp),
57  vertices = cms.InputTag('firstStepPrimaryVerticesPreSplitting'),
58  cores = cms.InputTag("jetsForCoreTrackingPreSplitting"),
59  )
60 
61 
62  process.InitialStepPreSplittingTask = cms.Task(process.initialStepSeedLayersPreSplitting ,
63  process.initialStepSeedsPreSplitting ,
64  process.initialStepTrackCandidatesPreSplitting ,
65  process.initialStepTracksPreSplitting ,
66  process.firstStepPrimaryVerticesPreSplitting ,
67  process.initialStepTrackRefsForJetsPreSplitting ,
68  process.caloTowerForTrkPreSplitting ,
69  process.ak4CaloJetsForTrkPreSplitting ,
70  process.jetsForCoreTrackingPreSplitting ,
71  process.siPixelClusters ,
72  process.siPixelRecHits ,
73  process.MeasurementTrackerEvent ,
74  process.siPixelClusterShapeCache)
75  process.InitialStepPreSplitting = cms.Sequence(process.InitialStepPreSplittingTask)
76 
77  process.iterTracking.insert(0,process.InitialStepPreSplitting)
78 
79  return process