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