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