CMS 3D CMS Logo

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

Functions

def customiseFor10087
 
def customiseFor10234
 
def customiseFor10353
 
def customiseFor10418
 
def customiseFor10911
 
def customiseFor10927
 
def customiseFor11183
 
def customiseFor11497
 
def customiseFor12044
 
def customiseFor12062
 
def customiseFor7794
 
def customiseFor7966
 
def customiseFor8356
 
def customiseFor8679
 
def customiseFor9232
 
def customiseHLTforCMSSW
 
def esproducers_by_type
 
def producers_by_type
 

Function Documentation

def customizeHLTforCMSSW.customiseFor10087 (   process)

Definition at line 104 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

105 def customiseFor10087(process):
106  if hasattr(process, 'hltCaloStage1Digis'):
107  if hasattr(process.hltCaloStage1Digis, 'FWId'):
108  delattr(process.hltCaloStage1Digis, 'FWId')
109  if hasattr(process.hltCaloStage1Digis, 'FedId'):
110  delattr(process.hltCaloStage1Digis, 'FedId')
111  return process
def customizeHLTforCMSSW.customiseFor10234 (   process)

Definition at line 112 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

113 def customiseFor10234(process):
114  if hasattr(process, 'hltCaloStage1Digis'):
115  if hasattr(process.hltCaloStage1Digis, 'FWId'):
116  delattr(process.hltCaloStage1Digis, 'FWId')
117  if hasattr(process.hltCaloStage1Digis, 'FedId'):
118  delattr(process.hltCaloStage1Digis, 'FedId')
119  return process
def customizeHLTforCMSSW.customiseFor10353 (   process)

Definition at line 120 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

121 def customiseFor10353(process):
122  # Take care of geometry changes in HCAL
123  if not hasattr(process,'hcalDDDSimConstants'):
124  process.hcalDDDSimConstants = cms.ESProducer( 'HcalDDDSimConstantsESModule' )
125  if not hasattr(process,'hcalDDDRecConstants'):
126  process.hcalDDDRecConstants = cms.ESProducer( 'HcalDDDRecConstantsESModule' )
127  return process
128 
# upgrade RecoTrackSelector to allow selection on originalAlgo (PR #10418)
def customizeHLTforCMSSW.customiseFor10418 (   process)

Definition at line 129 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

130 def customiseFor10418(process):
131  if hasattr(process,'hltBSoftMuonMu5L3') :
132  setattr(process.hltBSoftMuonMu5L3,'originalAlgorithm', cms.vstring())
133  setattr(process.hltBSoftMuonMu5L3,'algorithmMaskContains', cms.vstring())
134  return process
135 
# migrate RPCPointProducer to a global::EDProducer (PR #10927)
def customizeHLTforCMSSW.customiseFor10911 (   process)

Definition at line 145 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

146 def customiseFor10911(process):
147  if hasattr(process,'hltBSoftMuonMu5L3'):
148  # Switch module type from EDFilter to EDProducer
149  process.hltBSoftMuonMu5L3 = cms.EDProducer("RecoTrackRefSelector", **process.hltBSoftMuonMu5L3.parameters_())
150  return process
151 
# Fix MeasurementTrackerEvent configuration in several TrackingRegionProducers (PR 11183)
def customizeHLTforCMSSW.customiseFor10927 (   process)

Definition at line 136 of file customizeHLTforCMSSW.py.

References any().

Referenced by customiseHLTforCMSSW().

137 def customiseFor10927(process):
138  if any(module.type_() is 'RPCPointProducer' for module in process.producers.itervalues()):
139  if not hasattr(process, 'CSCObjectMapESProducer'):
140  process.CSCObjectMapESProducer = cms.ESProducer( 'CSCObjectMapESProducer' )
141  if not hasattr(process, 'DTObjectMapESProducer'):
142  process.DTObjectMapESProducer = cms.ESProducer( 'DTObjectMapESProducer' )
143  return process
144 
# change RecoTrackRefSelector to stream::EDProducer (PR #10911)
bool any(const std::vector< T > &v, const T &what)
Definition: ECalSD.cc:34
def customizeHLTforCMSSW.customiseFor11183 (   process)

Definition at line 152 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

153 def customiseFor11183(process):
154  def useMTEName(componentName):
155  if componentName in ["CandidateSeededTrackingRegionsProducer", "TrackingRegionsFromBeamSpotAndL2Tau"]:
156  return "whereToUseMeasurementTracker"
157  return "howToUseMeasurementTracker"
158 
159  def replaceInPSet(pset, moduleLabel):
160  for paramName in pset.parameterNames_():
161  param = getattr(pset, paramName)
162  if isinstance(param, cms.PSet):
163  if hasattr(param, "ComponentName") and param.ComponentName.value() in ["CandidateSeededTrackingRegionsProducer", "TauRegionalPixelSeedGenerator"]:
164  useMTE = useMTEName(param.ComponentName.value())
165 
166  if hasattr(param.RegionPSet, "measurementTrackerName"):
167  param.RegionPSet.measurementTrackerName = cms.InputTag(param.RegionPSet.measurementTrackerName.value())
168  if hasattr(param.RegionPSet, useMTE):
169  raise Exception("Assumption of CandidateSeededTrackingRegionsProducer not having '%s' parameter failed" % useMTE)
170  setattr(param.RegionPSet, useMTE, cms.string("ForSiStrips"))
171  else:
172  setattr(param.RegionPSet, useMTE, cms.string("Never"))
173  else:
174  replaceInPSet(param, moduleLabel)
175  elif isinstance(param, cms.VPSet):
176  for element in param:
177  replaceInPSet(element, moduleLabel)
178 
179  for label, module in process.producers_().iteritems():
180  replaceInPSet(module, label)
181 
182  return process
183 
def customizeHLTforCMSSW.customiseFor11497 (   process)

Definition at line 184 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

185 def customiseFor11497(process):
186  # Take care of CaloTowerTopology
187  if not hasattr(process,'CaloTowerTopologyEP'):
188  process.CaloTowerTopologyEP = cms.ESProducer( 'CaloTowerTopologyEP' )
189  return process
190 
def customizeHLTforCMSSW.customiseFor12044 (   process)

Definition at line 191 of file customizeHLTforCMSSW.py.

References producers_by_type().

Referenced by customiseHLTforCMSSW().

192 def customiseFor12044(process):
193  # add a label to indentify the PFProducer calibrations
194  for module in producers_by_type(process, 'PFProducer'):
195  if not 'calibrationsLabel' in module.__dict__:
196  module.calibrationsLabel = cms.string('HLT')
197  return process
198 
def customizeHLTforCMSSW.customiseFor12062 (   process)

Definition at line 199 of file customizeHLTforCMSSW.py.

References esproducers_by_type().

Referenced by customiseHLTforCMSSW().

200 def customiseFor12062(process):
201  # add a label to indentify the b-tagging calibrations
202  for module in esproducers_by_type(process, 'CombinedSecondaryVertexESProducer'):
203  if not 'recordLabel' in module.__dict__:
204  module.recordLabel = cms.string('HLT')
205  return process
206 
207 
# CMSSW version specific customizations
def customizeHLTforCMSSW.customiseFor7794 (   process)

Definition at line 95 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

95 
96 def customiseFor7794(process):
97  if hasattr(process, 'TrackerDigiGeometryESModule'):
98  if hasattr(process.TrackerDigiGeometryESModule, 'trackerGeometryConstants'):
99  if hasattr(process.TrackerDigiGeometryESModule.trackerGeometryConstants, 'upgradeGeometry'):
100  delattr(process.TrackerDigiGeometryESModule.trackerGeometryConstants, 'upgradeGeometry')
101  return process
102 
103 
# Removal of L1 Stage 1 unpacker configuration from config (PR #10087)
def customizeHLTforCMSSW.customiseFor7966 (   process)

Definition at line 83 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

83 
84 def customiseFor7966(process):
85  if hasattr(process, 'trackerTopology'):
86  params = process.trackerTopology.parameterNames_()
87  for param in params:
88  delattr(process.trackerTopology, param)
89  setattr(process.trackerTopology, 'appendToDataLabel', cms.string(""))
90  if hasattr(process,'TrackerDigiGeometryESModule'):
91  if hasattr(process.TrackerDigiGeometryESModule,'trackerGeometryConstants'):
92  delattr(process.TrackerDigiGeometryESModule,'trackerGeometryConstants')
93  return process
94 
# Removal of 'upgradeGeometry' from TrackerDigiGeometryESModule (PR #7794)
def customizeHLTforCMSSW.customiseFor8356 (   process)

Definition at line 36 of file customizeHLTforCMSSW.py.

References producers_by_type().

Referenced by customiseHLTforCMSSW().

36 
37 def customiseFor8356(process):
38  MTRBPSet = cms.PSet(
39  Rescale_eta = cms.double( 3.0 ),
40  Rescale_phi = cms.double( 3.0 ),
41  Rescale_Dz = cms.double( 3.0 ),
42  EtaR_UpperLimit_Par1 = cms.double( 0.25 ),
43  EtaR_UpperLimit_Par2 = cms.double( 0.15 ),
44  PhiR_UpperLimit_Par1 = cms.double( 0.6 ),
45  PhiR_UpperLimit_Par2 = cms.double( 0.2 ),
46  UseVertex = cms.bool( False ),
47  Pt_fixed = cms.bool( False ),
48  Z_fixed = cms.bool( True ),
49  Phi_fixed = cms.bool( False ),
50  Eta_fixed = cms.bool( False ),
51  Pt_min = cms.double( 1.5 ),
52  Phi_min = cms.double( 0.1 ),
53  Eta_min = cms.double( 0.1 ),
54  DeltaZ = cms.double( 15.9 ),
55  DeltaR = cms.double( 0.2 ),
56  DeltaEta = cms.double( 0.2 ),
57  DeltaPhi = cms.double( 0.2 ),
58  maxRegions = cms.int32( 2 ),
59  precise = cms.bool( True ),
60  OnDemand = cms.int32( -1 ),
61  MeasurementTrackerName = cms.InputTag( "hltESPMeasurementTracker" ),
62  beamSpot = cms.InputTag( "hltOnlineBeamSpot" ),
63  vertexCollection = cms.InputTag( "pixelVertices" ),
64  input = cms.InputTag( 'hltL2Muons','UpdatedAtVtx' )
65  )
66 
67  for l3MPModule in producers_by_type(process, 'L3MuonProducer'):
68  if hasattr(l3MPModule, 'GlbRefitterParameters'):
69  l3MPModule.GlbRefitterParameters.RefitFlag = cms.bool(True)
70  if hasattr(l3MPModule, 'L3TrajBuilderParameters'):
71  if hasattr(l3MPModule.L3TrajBuilderParameters, 'MuonTrackingRegionBuilder'):
72  l3MPModule.L3TrajBuilderParameters.MuonTrackingRegionBuilder = MTRBPSet
73 
74  listL3seedingModule = ['hltL3TrajSeedIOHit','hltL3NoFiltersNoVtxTrajSeedIOHit','hltHIL3TrajSeedIOHit']
75  for l3IOTrajModule in listL3seedingModule:
76  if hasattr(process, l3IOTrajModule):
77  if hasattr(getattr(process, l3IOTrajModule), 'MuonTrackingRegionBuilder'):
78  setattr(getattr(process, l3IOTrajModule), 'MuonTrackingRegionBuilder', MTRBPSet)
79 
80  return process
81 
82 
# Simplified TrackerTopologyEP config (PR #7966)
def customizeHLTforCMSSW.customiseFor8679 (   process)

Definition at line 24 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

24 
25 def customiseFor8679(process):
26  if hasattr(process,'hltBSoftMuonMu5L3') :
27  delattr(process.hltBSoftMuonMu5L3,'min3DHit')
28  setattr(process.hltBSoftMuonMu5L3,'minLayer', cms.int32(0))
29  setattr(process.hltBSoftMuonMu5L3,'min3DLayer', cms.int32(0))
30  setattr(process.hltBSoftMuonMu5L3,'minPixelHit', cms.int32(0))
31  setattr(process.hltBSoftMuonMu5L3,'usePV', cms.bool(False))
32  setattr(process.hltBSoftMuonMu5L3,'vertexTag', cms.InputTag(''))
33  return process
34 
35 
# Updating the config (PR #8356)
def customizeHLTforCMSSW.customiseFor9232 (   process)

Definition at line 15 of file customizeHLTforCMSSW.py.

Referenced by customiseHLTforCMSSW().

15 
16 def customiseFor9232(process):
17  if hasattr(process,'hltEcalPhiSymFilter'):
18  if hasattr(process.hltEcalPhiSymFilter,'ampCut_barrel'):
19  delattr(process.hltEcalPhiSymFilter,'ampCut_barrel')
20  if hasattr(process.hltEcalPhiSymFilter,'ampCut_endcap'):
21  delattr(process.hltEcalPhiSymFilter,'ampCut_endcap')
22  return process
23 
# upgrade RecoTrackSelector to allow BTV-like cuts (PR #8679)
def customizeHLTforCMSSW.customiseHLTforCMSSW (   process,
  menuType = "GRun",
  fastSim = False 
)

Definition at line 208 of file customizeHLTforCMSSW.py.

References customiseFor10087(), customiseFor10234(), customiseFor10353(), customiseFor10418(), customiseFor10911(), customiseFor10927(), customiseFor11183(), customiseFor11497(), customiseFor12044(), customiseFor12062(), customiseFor7794(), customiseFor7966(), customiseFor8356(), customiseFor8679(), and customiseFor9232().

Referenced by customizeHLTforALL.customizeHLTforAll().

209 def customiseHLTforCMSSW(process, menuType="GRun", fastSim=False):
210  import os
211  cmsswVersion = os.environ['CMSSW_VERSION']
212 
213  if cmsswVersion >= "CMSSW_7_6":
214  process = customiseFor10418(process)
215  process = customiseFor10353(process)
216  process = customiseFor10911(process)
217  process = customiseFor11183(process)
218  process = customiseFor11497(process)
219  process = customiseFor12044(process)
220  process = customiseFor12062(process)
221  if cmsswVersion >= "CMSSW_7_5":
222  process = customiseFor10927(process)
223  process = customiseFor9232(process)
224  process = customiseFor8679(process)
225  process = customiseFor8356(process)
226  process = customiseFor7966(process)
227  process = customiseFor7794(process)
228  process = customiseFor10087(process)
229  process = customizeHLTforNewJetCorrectors(process)
230  if cmsswVersion >= "CMSSW_7_4":
231  process = customiseFor10234(process)
232 
233  return process
def customizeHLTforCMSSW.esproducers_by_type (   process,
  types 
)

Definition at line 7 of file customizeHLTforCMSSW.py.

Referenced by customiseFor12062().

7 
8 def esproducers_by_type(process, *types):
9  return (module for module in process._Process__esproducers.values() if module._TypedParameterizable__type in types)
10 
11 
# Update to replace old jet corrector mechanism
def customizeHLTforCMSSW.producers_by_type (   process,
  types 
)

Definition at line 4 of file customizeHLTforCMSSW.py.

Referenced by customiseFor12044(), and customiseFor8356().

4 
5 def producers_by_type(process, *types):
6  return (module for module in process._Process__producers.values() if module._TypedParameterizable__type in types)