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