CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions
customiseForRunI Namespace Reference

Functions

def customiseForRunI
 

Function Documentation

def customiseForRunI.customiseForRunI (   process)

Definition at line 3 of file customiseForRunI.py.

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