test
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_tracking.index(process.trackingGlobalReco)
21  tgrIndexFromReco = process.reconstruction_fromRECO.index(process.InitialStep)
22  process.globalreco_tracking.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_tracking.insert(tgrIndex, process.trackingGlobalReco)
56  process.globalreco_tracking.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.trackProducers = ['initialStepTracks',
61  'lowPtTripletStepTracks',
62  'pixelPairStepTracks',
63  'detachedTripletStepTracks',
64  'mixedTripletStepTracks',
65  'pixelLessStepTracks',
66  'tobTecStepTracks'
67  ]
68 
69  process.earlyGeneralTracks.inputClassifiers =["initialStepSelector",
70  "lowPtTripletStepSelector",
71  "pixelPairStepSelector",
72  "detachedTripletStep",
73  "mixedTripletStep",
74  "pixelLessStepSelector",
75  "tobTecStep"
76  ]
77 
78  # Now get rid of any pre-splitting business
79  process.siPixelClusters = process.siPixelClustersPreSplitting.clone()
80  process.pixeltrackerlocalreco.replace(process.siPixelClustersPreSplitting, process.siPixelClusters)
81  process.pixeltrackerlocalreco.replace(process.siPixelRecHitsPreSplitting, process.siPixelRecHits)
82  process.clusterSummaryProducer.pixelClusters = 'siPixelClusters'
83  process.globalreco_tracking.replace(process.MeasurementTrackerEventPreSplitting, process.MeasurementTrackerEvent)
84  process.globalreco_tracking.replace(process.siPixelClusterShapeCachePreSplitting, process.siPixelClusterShapeCache)
85 
86  # Now restore pixelVertices wherever was not possible with an ad-hoc RunI cfg
87  process.muonSeededTracksInOutClassifier.vertices = 'pixelVertices'
88  process.muonSeededTracksOutInClassifier.vertices = 'pixelVertices'
89  process.muonSeededTracksOutInDisplacedClassifier.vertices = 'pixelVertices'
90  process.duplicateTrackClassifier.vertices = 'pixelVertices'
91  process.duplicateDisplacedTrackClassifier.vertices = 'pixelVertices'
92  process.convStepSelector.vertices = 'pixelVertices'
93  process.pixelPairElectronSeeds.RegionFactoryPSet.RegionPSet.VertexCollection = 'pixelVertices'
94  process.ak4CaloJetsForTrk.srcPVs = 'pixelVertices'
95  process.photonConvTrajSeedFromSingleLeg.primaryVerticesTag = 'pixelVertices'
96 
97  # ... and finally turn off all possible references to CCC: this is
98  # done by switching off the Tight and Loose reftoPSet, rather than
99  # following all the places in which they are effectively used in
100  # release. The RunI-like tracking already uses CCCNone: this will
101  # be useful mainly for conversions.
102  process.SiStripClusterChargeCutTight.value = -1.
103  process.SiStripClusterChargeCutLoose.value = -1.
104 
105 
106  if hasattr(process, 'TrackingDQMSourceTier0Common') and 'TrackSeedMonjetCoreRegionalStep' in process.TrackingDQMSourceTier0Common.moduleNames():
107  process.TrackingDQMSourceTier0Common.remove(process.TrackSeedMonjetCoreRegionalStep)
108 
109  if hasattr(process, 'TrackingDQMSourceTier0') and 'TrackSeedMonjetCoreRegionalStep' in process.TrackingDQMSourceTier0.moduleNames():
110  process.TrackingDQMSourceTier0.remove(process.TrackSeedMonjetCoreRegionalStep)
111 
112  if hasattr(process, 'TrackingDQMSourceTier0MinBias') and 'TrackSeedMonjetCoreRegionalStep' in process.TrackingDQMSourceTier0MinBias.moduleNames():
113  process.TrackingDQMSourceTier0MinBias.remove(process.TrackSeedMonjetCoreRegionalStep)
114 
115 
116 
117  return process