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