CMS 3D CMS Logo

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

Functions

def customizeHLTforFastSim
 
def customizeHLTforFullSim
 
def customizeHLTforMC
 

Function Documentation

def customizeHLTforMC.customizeHLTforFastSim (   process,
  _fastSim = True 
)

Definition at line 3 of file customizeHLTforMC.py.

3 
4 def customizeHLTforFastSim(process,_fastSim=True):
5  process=customizeHLTforMC(process,_fastSim)
6  return process
def customizeHLTforMC.customizeHLTforFullSim (   process,
  _fastSim = False 
)

Definition at line 7 of file customizeHLTforMC.py.

7 
8 def customizeHLTforFullSim(process,_fastSim=False):
9  process=customizeHLTforMC(process,_fastSim)
10  return process
def customizeHLTforMC.customizeHLTforMC (   process,
  _fastSim = False 
)
adapt the HLT to run on MC, instead of data
see Configuration/StandardSequences/Reconstruction_Data_cff.py
which does the opposite, for RECO

Definition at line 11 of file customizeHLTforMC.py.

References relativeConstraints.keys, ConfigBuilder.MassReplaceInputTag(), and CustomConfigs.MassReplaceParameter().

11 
12 def customizeHLTforMC(process,_fastSim=False):
13  """adapt the HLT to run on MC, instead of data
14  see Configuration/StandardSequences/Reconstruction_Data_cff.py
15  which does the opposite, for RECO"""
16 
17  # PFRecHitProducerHCAL
18  if 'hltParticleFlowRecHitHCAL' in process.__dict__:
19  process.hltParticleFlowRecHitHCAL.ApplyPulseDPG = cms.bool(False)
20  process.hltParticleFlowRecHitHCAL.LongShortFibre_Cut = cms.double(1000000000.0)
21 
22  if _fastSim:
23 
24  fastsim = cms.ProcessFragment( process.name_() )
25  fastsim.load( "FastSimulation.HighLevelTrigger.HLTSetup_cff" )
26 
27  fastSimUnsupportedPaths = (
28 
29  # paths for which a recovery is not foreseen/possible
30  "AlCa_*_v*",
31  "DQM_*_v*",
32  "HLT_*Calibration_v*",
33  "HLT_DTErrors_v*",
34  "HLT_Random_v*",
35  "HLT_HcalNZS_v*",
36  "HLT_HcalPhiSym_v*",
37  "HLT_Activity_Ecal*_v*",
38  "HLT_IsoTrackHB_v*",
39  "HLT_IsoTrackHE_v*",
40  "HLT_L1SingleMuOpen_AntiBPTX_v*",
41  "HLT_JetE*_NoBPTX*_v*",
42  "HLT_L2Mu*_NoBPTX*_v*",
43  "HLT_PixelTracks_Multiplicity70_v*",
44  "HLT_PixelTracks_Multiplicity80_v*",
45  "HLT_PixelTracks_Multiplicity90_v*",
46  "HLT_Beam*_v*",
47  #"HLT_L1Tech_*_v*",
48  "HLT_HI*",
49  "HLT_GlobalRunHPDNoise_v*",
50  "HLT_L1TrackerCosmics_v*",
51  "HLT_HcalUTCA_v*",
52 
53  # TODO: paths not supported by FastSim, but for which a recovery should be attempted
54  "HLT_DoubleMu33NoFiltersNoVtx_v*",
55  "HLT_DoubleMu38NoFiltersNoVtx_v*",
56  "HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v*",
57  "HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v*",
58  "HLT_DoubleMu23NoFiltersNoVtxDisplaced_v*",
59  "HLT_DoubleMu28NoFiltersNoVtxDisplaced_v*",
60  "HLT_Mu28NoFiltersNoVtxDisplaced_Photon28_CaloIdL_v*",
61  "HLT_Mu33NoFiltersNoVtxDisplaced_Photon33_CaloIdL_v*",
62  "HLT_HT350_DisplacedDijet80_Tight_DisplacedTrack_v*",
63  "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
64  "HLT_HT500_DisplacedDijet40_Inclusive_v*",
65  "HLT_HT350_DisplacedDijet40_DisplacedTrack_v*",
66  "HLT_HT550_DisplacedDijet40_Inclusive_v*",
67  "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
68  "HLT_TrkMu15_DoubleTrkMu5NoFiltersNoVtx_v*",
69  "HLT_TrkMu17_DoubleTrkMu8NoFiltersNoVtx_v*",
70  "HLT_MET75_IsoTrk50_v*",
71  "HLT_MET90_IsoTrk50_v*",
72  "HLT_VBF_DisplacedJet40_DisplacedTrack_v*",
73  "HLT_VBF_DisplacedJet40_TightID_DisplacedTrack_v*",
74  "HLT_VBF_DisplacedJet40_VTightID_DisplacedTrack_v*",
75  "HLT_VBF_DisplacedJet40_VVTightID_DisplacedTrack_v*",
76  "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Tight_v*",
77  "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Loose_v*",
78  "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Tight_v*",
79  "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Loose_v*",
80  "HLT_Mu38NoFiltersNoVtx_DisplacedJet60_Loose_v*",
81  "HLT_Mu28NoFiltersNoVtx_DisplacedJet40_Loose_v*",
82  "HLT_Mu28NoFiltersNoVtx_CentralCaloJet40_v*",
83  "HLT_Mu23NoFiltersNoVtx_Photon23_CaloIdL_v*",
84  "HLT_DoubleMu18NoFiltersNoVtx_v*",
85  "HLT_DoubleMuNoFiltersNoVtx_SaveObjects_v*",
86  "MC_DoubleMuNoFiltersNoVtx_v*",
87  "HLT_MET60_IsoTrk*",
88  )
89 
90  ESModulesToRemove = (
91 # "CaloTowerGeometryFromDBEP",
92 # "CastorGeometryFromDBEP",
93 # "EcalBarrelGeometryFromDBEP",
94 # "EcalEndcapGeometryFromDBEP",
95 # "EcalPreshowerGeometryFromDBEP",
96 # "HcalGeometryFromDBEP",
97 # "ZdcGeometryFromDBEP",
98 # "XMLFromDBSource",
99 # "sistripconn",
100 
101 # "navigationSchoolESProducer",
102 # "TransientTrackBuilderESProducer",
103 # "SteppingHelixPropagatorAny",
104 # "OppositeMaterialPropagator",
105 # "MaterialPropagator",
106 # "CaloTowerConstituentsMapBuilder",
107 # "CaloTopologyBuilder",
108  )
109 
110  ModulesToRemove = (
111  # "hltL3MuonIsolations",
112  # "hltPixelVertices",
113  "hltCkfL1SeededTrackCandidates",
114  "hltCtfL1SeededithMaterialTracks",
115  "hltCkf3HitL1SeededTrackCandidates",
116  "hltCtf3HitL1SeededWithMaterialTracks",
117  "hltCkf3HitActivityTrackCandidates",
118  "hltCtf3HitActivityWithMaterialTracks",
119  "hltActivityCkfTrackCandidatesForGSF",
120  "hltL1SeededCkfTrackCandidatesForGSF",
121  "hltMuCkfTrackCandidates",
122  "hltMuCtfTracks",
123  "hltTau3MuCkfTrackCandidates",
124  "hltTau3MuCtfWithMaterialTracks",
125  "hltMuTrackJpsiCkfTrackCandidates",
126  "hltMuTrackJpsiCtfTracks",
127  "hltMuTrackJpsiEffCkfTrackCandidates",
128  "hltMuTrackJpsiEffCtfTracks",
129  "hltJpsiTkPixelSeedFromL3Candidate",
130  "hltCkfTrackCandidatesJpsiTk",
131  "hltCtfWithMaterialTracksJpsiTk",
132  "hltMuTrackCkfTrackCandidatesOnia",
133  "hltMuTrackCtfTracksOnia",
134 
135  "hltFEDSelector",
136  "hltL3TrajSeedOIHit",
137  "hltL3TrajSeedIOHit",
138  "hltL3NoFiltersTrajSeedOIHit",
139  "hltL3NoFiltersTrajSeedIOHit",
140  "hltL3TrackCandidateFromL2OIState",
141  "hltL3TrackCandidateFromL2OIHit",
142  "hltL3TrackCandidateFromL2IOHit",
143  "hltL3TrackCandidateFromL2NoVtx",
144  "hltHcalDigis",
145  "hltHoreco",
146  "hltHfreco",
147  "hltHbhereco",
148  "hltESRawToRecHitFacility",
149  "hltEcalRecHitAll",
150  "hltESRecHitAll",
151  # === eGamma
152  "hltEgammaCkfTrackCandidatesForGSF",
153  "hltEgammaGsfTracks",
154  "hltEgammaCkfTrackCandidatesForGSFUnseeded",
155  "hltEgammaGsfTracksUnseeded",
156  # === hltPF
157  "hltPFJetCkfTrackCandidates",
158  "hltPFJetCtfWithMaterialTracks",
159  "hltPFlowTrackSelectionHighPurity",
160  # === hltFastJet
161  "hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator",
162  "hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates",
163  "hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks",
164  "hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator",
165  "hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates",
166  "hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks",
167  "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet",
168  "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet",
169  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet",
170  "hltBLifetimeRegionalPixelSeedGeneratorHbbVBF",
171  "hltBLifetimeRegionalCkfTrackCandidatesHbbVBF",
172  "hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF",
173  "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
174  "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
175  "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
176  "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
177  "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
178  "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
179  # === hltBLifetimeRegional
180  "hltBLifetimeRegionalPixelSeedGeneratorHbb",
181  "hltBLifetimeRegionalCkfTrackCandidatesHbb",
182  "hltBLifetimeRegionalCtfWithMaterialTracksHbb",
183  "hltBLifetimeRegionalPixelSeedGeneratorbbPhi",
184  "hltBLifetimeRegionalCkfTrackCandidatesbbPhi",
185  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhi",
186  "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
187  "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
188  "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
189  "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
190  "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
191  "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
192  "hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF",
193  "hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF",
194  "hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF",
195  "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV",
196  "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV",
197  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV",
198  "hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb",
199  "hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb",
200  "hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb",
201 
202  "hltPixelTracksForMinBias",
203  "hltPixelTracksForHighMult",
204  "hltRegionalPixelTracks",
205  "hltPixelTracksReg",
206  "hltPixelTracksL3Muon",
207  "hltPixelTracksGlbTrkMuon",
208  "hltPixelTracksHighPtTkMuIso",
209  "hltPixelTracksHybrid",
210  "hltPixelTracksForPhotons",
211  "hltPixelTracksForEgamma",
212  "hltPixelTracksElectrons",
213  "hltPixelTracksForHighPt",
214  "hltHighPtPixelTracks",
215  "hltPixelTracksForNoPU",
216 
217  "hltFastPixelHitsVertex",
218  "hltFastPixelTracks",
219  "hltFastPixelTracksRecover",
220 
221  "hltPixelLayerPairs",
222  "hltPixelLayerTriplets",
223  "hltPixelLayerTripletsReg",
224  "hltPixelLayerTripletsHITHB",
225  "hltPixelLayerTripletsHITHE",
226  "hltMixedLayerPairs",
227 
228  "hltFastPrimaryVertexbbPhi",
229  "hltPixelTracksFastPVbbPhi",
230  "hltPixelTracksRecoverbbPhi",
231  "hltFastPixelHitsVertexVHbb",
232  "hltFastPixelTracksVHbb",
233  "hltFastPixelTracksRecoverVHbb",
234 
235  "hltFastPrimaryVertex",
236  "hltFastPVPixelVertexFilter",
237  "hltFastPVPixelTracks",
238  "hltFastPVPixelTracksRecover",
239 
240  # "hltPixelMatchElectronsActivity",
241 
242  "hltMuonCSCDigis",
243  "hltMuonDTDigis",
244  "hltMuonRPCDigis",
245  "hltGtDigis",
246 # "hltL1GtTrigReport",
247  # "hltCsc2DRecHits",
248  # "hltDt1DRecHits",
249  # "hltRpcRecHits",
250  "hltScalersRawToDigi",
251  "hltEcalPreshowerDigis",
252  "hltEcalDigis",
253  "hltEcalDetIdToBeRecovered",
254 
255  )
256 
257  SequencesToRemove = (
258  "HLTL1SeededEgammaRegionalRecoTrackerSequence",
259  "HLTEcalActivityEgammaRegionalRecoTrackerSequence",
260  "HLTPixelMatchElectronActivityTrackingSequence",
261  "HLTDoLocalStripSequence",
262  "HLTDoLocalPixelSequence",
263  "HLTDoLocalPixelSequenceRegL2Tau",
264  "HLTDoLocalStripSequenceReg",
265  "HLTDoLocalPixelSequenceReg",
266  "HLTDoLocalStripSequenceRegForBTag",
267  "HLTDoLocalPixelSequenceRegForBTag",
268  "HLTDoLocalPixelSequenceRegForNoPU",
269  # "hltSiPixelDigis",
270  # "hltSiPixelClusters",
271  # "hltSiPixelRecHits",
272  "HLTRecopixelvertexingSequence",
273 # "HLTEndSequence",
274  "HLTBeginSequence",
275  "HLTBeginSequenceNZS",
276  "HLTBeginSequenceBPTX",
277  "HLTBeginSequenceAntiBPTX",
278  "HLTHBHENoiseSequence",
279  "HLTIterativeTrackingIter04",
280  "HLTIterativeTrackingIter02",
281  "HLTIterativeTracking",
282  "HLTIterativeTrackingForHighPt",
283  "HLTIterativeTrackingTau3Mu",
284  "HLTIterativeTrackingReg",
285  "HLTIterativeTrackingForElectronIter02",
286  "HLTIterativeTrackingForPhotonsIter02",
287  "HLTIterativeTrackingL3MuonIter02",
288  "HLTIterativeTrackingGlbTrkMuonIter02",
289  "HLTIterativeTrackingL3MuonRegIter02",
290  "HLTIterativeTrackingHighPtTkMu",
291  "HLTIterativeTrackingHighPtTkMuIsoIter02",
292  "HLTIterativeTrackingForBTagIter02",
293  "HLTIterativeTrackingForBTagIter12",
294  "HLTIterativeTrackingForTauIter04",
295  "HLTIterativeTrackingForTauIter02",
296  "HLTIterativeTrackingDisplacedJpsiIter02",
297  "HLTIterativeTrackingDisplacedPsiPrimeIter02",
298  "HLTIterativeTrackingDisplacedNRMuMuIter02",
299  "HLTIterativeTrackingForBTagIteration0",
300  "HLTIterativeTrackingIteration4DisplacedJets",
301  "HLTRegionalCKFTracksForL3Isolation",
302  "HLTHBHENoiseCleanerSequence",
303  )
304 
305 # Removing ESmodules
306  for label in ESModulesToRemove:
307  if (hasattr(process,label)):
308  delattr(process,label)
309 
310 # Removing paths
311  import fnmatch,re
312  ExplicitList = []
313  HLTSchedule = tuple( path.label_() for path in process.HLTSchedule)
314  for black in fastSimUnsupportedPaths:
315  compiled = re.compile(fnmatch.translate(black))
316  for path in HLTSchedule:
317  if compiled.search(path) is not None:
318  ExplicitList += [path]
319  UniqueList = []
320  for path in ExplicitList:
321  if path not in UniqueList:
322  UniqueList += [path]
323  for path in UniqueList:
324  process.schedule.remove(getattr(process,path))
325  process.setSchedule_(process.schedule)
326  process.prune()
327 
328 # Removing streams and datasets PSets
329  if hasattr(process,'streams'):
330  delattr(process,'streams')
331  if hasattr(process,'datasets'):
332  delattr(process,'datasets')
333 
334 # Removing sequences, possibly to be taken from fastsim import
335  for label in SequencesToRemove:
336  if hasattr(process,label):
337  if hasattr(fastsim,label):
338  setattr(process,label,getattr(fastsim,label))
339  else:
340  object = getattr(process,label)
341  list = tuple(process.sequences_().keys())
342  for name in list:
343  sequence = getattr(process,name)
344  more=True
345  while more:
346  more = sequence.remove(object)
347  list = tuple(process.paths_().keys())
348  for name in list:
349  path = getattr(process,name)
350  more=True
351  while more:
352  more = path.remove(object)
353  delattr(process,label)
354 
355 # Removing modules, possibly to be taken from fastsim import
356  for label in ModulesToRemove:
357  if hasattr(process,label):
358  if hasattr(fastsim,label):
359  setattr(process,label,getattr(fastsim,label))
360  else:
361  object = getattr(process,label)
362  list = tuple(process.sequences_().keys())
363  for name in list:
364  sequence = getattr(process,name)
365  more=True
366  while more:
367  more = sequence.remove(object)
368  list = tuple(process.paths_().keys())
369  for name in list:
370  path = getattr(process,name)
371  more=True
372  while more:
373  more = path.remove(object)
374  delattr(process,label)
375 
376 # Special transformations:
377  if hasattr(process,'hltGetConditions') and hasattr(process,'HLTriggerFirstPath'):
378  process.hltDummyConditions = cms.EDFilter( "HLTBool", result = cms.bool( True ) )
379  process.HLTriggerFirstPath.replace(process.hltGetConditions,process.hltDummyConditions)
380  if hasattr(process,'hltPixelVertices'):
381  process.hltPixelVertices.beamSpot = cms.InputTag('offlineBeamSpot')
382  specialModules = ( 'hltEcalRecHit', 'hltEcalPreshowerRecHit', )
383  for label in specialModules:
384  if hasattr(process,label):
385  setattr(fastsim,label,getattr(process,label))
386 
387 # Use fastsim imports
388  for label in fastsim.producers_().keys():
389  if hasattr(process,label):
390  setattr(process,label,getattr(fastsim,label))
391  for label in fastsim.filters_().keys():
392  if hasattr(process,label):
393  setattr(process,label,getattr(fastsim,label))
394  for label in fastsim.analyzers_().keys():
395  if hasattr(process,label):
396  setattr(process,label,getattr(fastsim,label))
397  for label in fastsim.sequences_().keys():
398  if hasattr(process,label):
399  setattr(process,label,getattr(fastsim,label))
400 
401 # Update InputTags
402 
403  InputTags = (
404  ('hltGtDigis','gtDigis'),
405  ('hltL1GtObjectMap','gtDigis'),
406  ('hltEcalDigis:ebDigis','ecalDigis:ebDigis'),
407  ('hltEcalDigis:eeDigis','ecalDigis:eeDigis'),
408  ('hltMuonCSCDigis','muonCSCDigis'),
409  ('hltMuonCSCDigis:MuonCSCStripDigi','muonCSCDigis:MuonCSCStripDigi'),
410  ('hltMuonCSCDigis:MuonCSCWireDigi','muonCSCDigis:MuonCSCWireDigi'),
411  ('hltMuonDTDigis','muonDTDigis'),
412  ('hltMuonRPCDigis','muonRPCDigis'),
413  ('hltEcalPreshowerDigis','ecalPreshowerDigis'),
414  ('hltHbhereco', 'hbhereco'),
415  ('hltHoreco', 'horeco'),
416  ('hltHfreco', 'hfreco'),
417 
418  ('hltIter2Merged', 'generalTracks'),
419  ('hltIter2HighPtMerged', 'generalTracks'),
420  ('hltIter2MergedForElectrons', 'generalTracks'),
421  ('hltIter2MergedForPhotons', 'generalTracks'),
422  ('hltIter2L3MuonMerged', 'generalTracks'),
423  ('hltIter2MergedForBTag', 'generalTracks'),
424  ('hltIter2MergedForTau', 'generalTracks'),
425  ('hltIter2GlbTrkMuonMerged', 'generalTracks'),
426  ('hltIter2HighPtTkMuMerged', 'generalTracks'),
427  ('hltIter2HighPtTkMuIsoMerged', 'generalTracks'),
428  ('hltIter2DisplacedJpsiMerged', 'generalTracks'),
429  ('hltIter2DisplacedPsiPrimeMerged', 'generalTracks'),
430  ('hltIter2DisplacedNRMuMuMerged', 'generalTracks'),
431  ('hltIter0PFlowTrackSelectionHighPurityForBTag', 'generalTracks'),
432  ('hltIter4HighPtMerged', 'generalTracks'),
433 
434  ('hltRegionalTracksForL3MuonIsolation', 'hltPixelTracks'),
435 
436  ('hltL1extraParticles','l1extraParticles'),
437  ('hltL1extraParticles:Central','l1extraParticles:Central'),
438  ('hltL1extraParticles:Forward','l1extraParticles:Forward'),
439  ('hltL1extraParticles:Isolated','l1extraParticles:Isolated'),
440  ('hltL1extraParticles:NonIsolated','l1extraParticles:NonIsolated'),
441  ('hltL1extraParticles:Tau','l1extraParticles:Tau'),
442  ('hltL1extraParticles:IsoTau','l1extraParticles:IsoTau'),
443  ('hltOfflineBeamSpot','offlineBeamSpot'),
444  ('hltOnlineBeamSpot','offlineBeamSpot'),
445  ('hltSiStripClusters','MeasurementTrackerEvent'),
446 
447  )
448  from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
449  for pair in InputTags:
450  process = MassReplaceInputTag(process,pair[0],pair[1])
451 
452 # Update top-level named parameters
453  NamedParameters = (
454  ('GMTReadoutCollection',cms.InputTag('gtDigis'),cms.InputTag('gmtDigis')),
455  ('killDeadChannels',cms.bool(True),cms.bool(False)),
456  ('recoverEBFE',cms.bool(True),cms.bool(False)),
457  ('recoverEEFE',cms.bool(True),cms.bool(False)),
458  ('src',cms.InputTag('hltHcalTowerNoiseCleaner'),cms.InputTag('hltTowerMakerForAll')),
459  ('initialSeeds',cms.InputTag('noSeedsHere'),cms.InputTag('globalPixelSeeds')),
460  ('preFilteredSeeds',cms.bool(True),cms.bool(False)),
461  )
462  from HLTrigger.Configuration.CustomConfigs import MassReplaceParameter
463  for thrice in NamedParameters:
464  process = MassReplaceParameter(process,thrice[0],thrice[1],thrice[2])
465 
466 # Update nested named parameters
467  for label in ('hltEgammaElectronPixelSeeds','hltEgammaElectronPixelSeedsUnseeded',):
468  if hasattr(process,label):
469  getattr(process,label).SeedConfiguration.initialSeeds = cms.InputTag('globalPixelSeeds')
470  getattr(process,label).SeedConfiguration.preFilteredSeeds = cms.bool(False)
471  if hasattr(fastsim,'globalPixelSeeds'):
472  if hasattr(fastsim.globalPixelSeeds,'outputSeedCollectionName'):
473  getattr(process,label).SeedConfiguration.initialSeeds = cms.InputTag('globalPixelSeeds',fastsim.globalPixelSeeds.outputSeedCollectionName.value())
474 
475 
476 # Extending fastsim import
477  fastsim.extend(process)
478  fastsim.setSchedule_(fastsim.schedule)
479  fastsim.prune()
480 
481  return fastsim
482 
483  else:
484 
485  return process
def MassReplaceParameter