CMS 3D CMS Logo

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