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