CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
customiseForRunI.py
Go to the documentation of this file.
2 
3 def customiseForRunI(process):
4 
5  # apply only in reco step
6  if not hasattr(process,'reconstruction'):
7  return process
8 
9  # Put back 2012 default tracking. This piece of code is ugly.
10 
11  # first remove the current/default version of trackingGlocalReco
12  # and delete all its descendent sequences that are going to be
13  # redefined later on by the new process.load()
14 
15  # apply only in reco step
16  if not hasattr(process,'reconstruction'):
17  return process
18 
19  tgrIndex = process.globalreco.index(process.trackingGlobalReco)
20  tgrIndexFromReco = process.reconstruction_fromRECO.index(process.InitialStep)
21  process.globalreco.remove(process.trackingGlobalReco)
22  process.reconstruction_fromRECO.remove(process.InitialStep)
23  process.reconstruction_fromRECO.remove(process.DetachedTripletStep)
24  process.reconstruction_fromRECO.remove(process.LowPtTripletStep)
25  process.reconstruction_fromRECO.remove(process.PixelPairStep)
26  process.reconstruction_fromRECO.remove(process.MixedTripletStep)
27  process.reconstruction_fromRECO.remove(process.PixelLessStep)
28  process.reconstruction_fromRECO.remove(process.TobTecStep)
29  process.reconstruction_fromRECO.remove(process.JetCoreRegionalStep)
30  process.reconstruction_fromRECO.remove(process.earlyGeneralTracks)
31  process.reconstruction_fromRECO.remove(process.muonSeededStep)
32  process.reconstruction_fromRECO.remove(process.preDuplicateMergingGeneralTracks)
33  process.reconstruction_fromRECO.remove(process.generalTracksSequence)
34  process.reconstruction_fromRECO.remove(process.ConvStep)
35  process.reconstruction_fromRECO.remove(process.conversionStepTracks)
36  del process.trackingGlobalReco
37  del process.ckftracks
38  del process.ckftracks_wodEdX
39  del process.ckftracks_plus_pixelless
40  del process.ckftracks_woBH
41  del process.iterTracking
42  del process.InitialStep
43  del process.LowPtTripletStep
44  del process.PixelPairStep
45  del process.DetachedTripletStep
46  del process.MixedTripletStep
47  del process.PixelLessStep
48  del process.TobTecStep
49  del process.JetCoreRegionalStep
50 
51  # Load the new Iterative Tracking configuration
52  process.load("RecoTracker.Configuration.RecoTrackerRunI_cff")
53 
54  process.globalreco.insert(tgrIndex, process.trackingGlobalReco)
55  process.globalreco.insert(tgrIndex, process.recopixelvertexing)
56  process.reconstruction_fromRECO.insert(tgrIndexFromReco, process.iterTracking)
57 
58  # Now get rid of spurious reference to JetCore step
59  process.earlyGeneralTracks.selectedTrackQuals = cms.VInputTag(
60  cms.InputTag("initialStepSelector", "initialStep")
61  , cms.InputTag("lowPtTripletStepSelector", "lowPtTripletStep")
62  , cms.InputTag("pixelPairStepSelector", "pixelPairStep")
63  , cms.InputTag("detachedTripletStep")
64  , cms.InputTag("mixedTripletStep")
65  , cms.InputTag("pixelLessStepSelector", "pixelLessStep")
66  , cms.InputTag("tobTecStepSelector", "tobTecStep")
67  )
68  process.earlyGeneralTracks.indivShareFrac = cms.vdouble(1.0, 0.16, 0.19, 0.13, 0.11, 0.11, 0.09)
69  process.earlyGeneralTracks.setsToMerge = cms.VPSet(cms.PSet(
70  pQual = cms.bool(True),
71  tLists = cms.vint32(0, 1, 2, 3, 4, 5, 6)))
72 
73  process.earlyGeneralTracks.hasSelector = cms.vint32(1, 1, 1, 1, 1, 1, 1)
74 
75  process.earlyGeneralTracks.TrackProducers = cms.VInputTag(
76  cms.InputTag("initialStepTracks")
77  , cms.InputTag("lowPtTripletStepTracks")
78  , cms.InputTag("pixelPairStepTracks")
79  , cms.InputTag("detachedTripletStepTracks")
80  , cms.InputTag("mixedTripletStepTracks")
81  , cms.InputTag("pixelLessStepTracks")
82  , cms.InputTag("tobTecStepTracks")
83  )
84 
85  # Now get rid of any pre-splitting business
86  process.siPixelClusters = process.siPixelClustersPreSplitting.clone()
87  process.pixeltrackerlocalreco.replace(process.siPixelClustersPreSplitting, process.siPixelClusters)
88  process.pixeltrackerlocalreco.replace(process.siPixelRecHitsPreSplitting, process.siPixelRecHits)
89  process.clusterSummaryProducer.pixelClusters = 'siPixelClusters'
90  process.globalreco.replace(process.MeasurementTrackerEventPreSplitting, process.MeasurementTrackerEvent)
91  process.globalreco.replace(process.siPixelClusterShapeCachePreSplitting, process.siPixelClusterShapeCache)
92 
93  # Now restore pixelVertices wherever was not possible with an ad-hoc RunI cfg
94  process.muonSeededTracksInOutSelector.vertices = 'pixelVertices'
95  process.muonSeededTracksOutInSelector.vertices = 'pixelVertices'
96  process.muonSeededTracksOutInDisplacedSelector.vertices = 'pixelVertices'
97  process.duplicateTrackSelector.vertices = 'pixelVertices'
98  process.duplicateDisplacedTrackSelector.vertices = 'pixelVertices'
99  process.convStepSelector.vertices = 'pixelVertices'
100  process.pixelPairElectronSeeds.RegionFactoryPSet.RegionPSet.VertexCollection = 'pixelVertices'
101  process.ak4CaloJetsForTrk.srcPVs = 'pixelVertices'
102  process.photonConvTrajSeedFromSingleLeg.primaryVerticesTag = 'pixelVertices'
103 
104  # ... and finally turn off all possible references to CCC: this is
105  # done by switching off the Tight and Loose reftoPSet, rather than
106  # following all the places in which they are effectively used in
107  # release. The RunI-like tracking already uses CCCNone: this will
108  # be useful mainly for conversions.
109  process.SiStripClusterChargeCutTight.value = -1.
110  process.SiStripClusterChargeCutLoose.value = -1.
111 
112  return process