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