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  )
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  "hltPixelTracksForHighMult",
220  "hltRegionalPixelTracks",
221  "hltPixelTracksReg",
222  "hltPixelTracksL3Muon",
223  "hltPixelTracksGlbTrkMuon",
224  "hltPixelTracksHighPtTkMuIso",
225  "hltPixelTracksHybrid",
226  "hltPixelTracksForPhotons",
227  "hltPixelTracksForEgamma",
228  "hltPixelTracksElectrons",
229  "hltPixelTracksForHighPt",
230  "hltHighPtPixelTracks",
231  "hltPixelTracksForNoPU",
232 
233  "hltFastPixelHitsVertex",
234  "hltFastPixelTracks",
235  "hltFastPixelTracksRecover",
236 
237  "hltPixelLayerPairs",
238  "hltPixelLayerTriplets",
239  "hltPixelLayerTripletsReg",
240  "hltPixelLayerTripletsHITHB",
241  "hltPixelLayerTripletsHITHE",
242  "hltMixedLayerPairs",
243 
244  "hltFastPrimaryVertexbbPhi",
245  "hltPixelTracksFastPVbbPhi",
246  "hltPixelTracksRecoverbbPhi",
247  "hltFastPixelHitsVertexVHbb",
248  "hltFastPixelTracksVHbb",
249  "hltFastPixelTracksRecoverVHbb",
250 
251  "hltFastPrimaryVertex",
252  "hltFastPVPixelVertexFilter",
253  "hltFastPVPixelTracks",
254  "hltFastPVPixelTracksRecover",
255 
256  # "hltPixelMatchElectronsActivity",
257 
258  "hltMuonCSCDigis",
259  "hltMuonDTDigis",
260  "hltMuonRPCDigis",
261  "hltGtDigis",
262 # "hltL1GtTrigReport",
263  # "hltCsc2DRecHits",
264  # "hltDt1DRecHits",
265  # "hltRpcRecHits",
266  "hltScalersRawToDigi",
267  "hltEcalPreshowerDigis",
268  "hltEcalDigis",
269  "hltEcalDetIdToBeRecovered",
270 
271  )
272 
273  SequencesToRemove = (
274  "HLTL1SeededEgammaRegionalRecoTrackerSequence",
275  "HLTEcalActivityEgammaRegionalRecoTrackerSequence",
276  "HLTPixelMatchElectronActivityTrackingSequence",
277  "HLTDoLocalStripSequence",
278  "HLTDoLocalPixelSequence",
279  "HLTDoLocalPixelSequenceRegL2Tau",
280  "HLTDoLocalStripSequenceReg",
281  "HLTDoLocalPixelSequenceReg",
282  "HLTDoLocalStripSequenceRegForBTag",
283  "HLTDoLocalPixelSequenceRegForBTag",
284  "HLTDoLocalPixelSequenceRegForNoPU",
285  # "hltSiPixelDigis",
286  # "hltSiPixelClusters",
287  # "hltSiPixelRecHits",
288  "HLTRecopixelvertexingSequence",
289 # "HLTEndSequence",
290  "HLTBeginSequence",
291  "HLTBeginSequenceNZS",
292  "HLTBeginSequenceBPTX",
293  "HLTBeginSequenceAntiBPTX",
294  "HLTHBHENoiseSequence",
295  "HLTIterativeTrackingIter04",
296  "HLTIterativeTrackingIter02",
297  "HLTIterativeTracking",
298  "HLTIterativeTrackingForHighPt",
299  "HLTIterativeTrackingTau3Mu",
300  "HLTIterativeTrackingReg",
301  "HLTIterativeTrackingForElectronIter02",
302  "HLTIterativeTrackingForPhotonsIter02",
303  "HLTIterativeTrackingL3MuonIter02",
304  "HLTIterativeTrackingGlbTrkMuonIter02",
305  "HLTIterativeTrackingL3MuonRegIter02",
306  "HLTIterativeTrackingHighPtTkMu",
307  "HLTIterativeTrackingHighPtTkMuIsoIter02",
308  "HLTIterativeTrackingForBTagIter02",
309  "HLTIterativeTrackingForBTagIter12",
310  "HLTIterativeTrackingForTauIter04",
311  "HLTIterativeTrackingForTauIter02",
312  "HLTIterativeTrackingDisplacedJpsiIter02",
313  "HLTIterativeTrackingDisplacedPsiPrimeIter02",
314  "HLTIterativeTrackingDisplacedNRMuMuIter02",
315  "HLTIterativeTrackingForBTagIteration0",
316  "HLTIterativeTrackingIteration4DisplacedJets",
317  "HLTRegionalCKFTracksForL3Isolation",
318  "HLTHBHENoiseCleanerSequence",
319  )
320 
321 # Removing ESmodules
322  for label in ESModulesToRemove:
323  if (hasattr(process,label)):
324  delattr(process,label)
325 
326 # Removing paths
327  import fnmatch,re
328  ExplicitList = []
329  HLTSchedule = tuple( path.label_() for path in process.HLTSchedule)
330  for black in fastSimUnsupportedPaths:
331  compiled = re.compile(fnmatch.translate(black))
332  for path in HLTSchedule:
333  if compiled.search(path) is not None:
334  ExplicitList += [path]
335  UniqueList = []
336  for path in ExplicitList:
337  if path not in UniqueList:
338  UniqueList += [path]
339  for path in UniqueList:
340  process.schedule.remove(getattr(process,path))
341  process.setSchedule_(process.schedule)
342  process.prune()
343 
344 # Removing streams and datasets PSets
345  if hasattr(process,'streams'):
346  delattr(process,'streams')
347  if hasattr(process,'datasets'):
348  delattr(process,'datasets')
349 
350 # Removing sequences, possibly to be taken from fastsim import
351  for label in SequencesToRemove:
352  if hasattr(process,label):
353  if hasattr(fastsim,label):
354  setattr(process,label,getattr(fastsim,label))
355  else:
356  object = getattr(process,label)
357  list = tuple(process.sequences_().keys())
358  for name in list:
359  sequence = getattr(process,name)
360  more=True
361  while more:
362  more = sequence.remove(object)
363  list = tuple(process.paths_().keys())
364  for name in list:
365  path = getattr(process,name)
366  more=True
367  while more:
368  more = path.remove(object)
369  delattr(process,label)
370 
371 # Removing modules, possibly to be taken from fastsim import
372  for label in ModulesToRemove:
373  if hasattr(process,label):
374  if hasattr(fastsim,label):
375  setattr(process,label,getattr(fastsim,label))
376  else:
377  object = getattr(process,label)
378  list = tuple(process.sequences_().keys())
379  for name in list:
380  sequence = getattr(process,name)
381  more=True
382  while more:
383  more = sequence.remove(object)
384  list = tuple(process.paths_().keys())
385  for name in list:
386  path = getattr(process,name)
387  more=True
388  while more:
389  more = path.remove(object)
390  delattr(process,label)
391 
392 # Special transformations:
393  if hasattr(process,'hltGetConditions') and hasattr(process,'HLTriggerFirstPath'):
394  process.hltDummyConditions = cms.EDFilter( "HLTBool", result = cms.bool( True ) )
395  process.HLTriggerFirstPath.replace(process.hltGetConditions,process.hltDummyConditions)
396  if hasattr(process,'hltPixelVertices'):
397  process.hltPixelVertices.beamSpot = cms.InputTag('offlineBeamSpot')
398  specialModules = ( 'hltEcalRecHit', 'hltEcalPreshowerRecHit', )
399  for label in specialModules:
400  if hasattr(process,label):
401  setattr(fastsim,label,getattr(process,label))
402 
403 # Use fastsim imports
404  for label in fastsim.producers_().keys():
405  if hasattr(process,label):
406  setattr(process,label,getattr(fastsim,label))
407  for label in fastsim.filters_().keys():
408  if hasattr(process,label):
409  setattr(process,label,getattr(fastsim,label))
410  for label in fastsim.analyzers_().keys():
411  if hasattr(process,label):
412  setattr(process,label,getattr(fastsim,label))
413  for label in fastsim.sequences_().keys():
414  if hasattr(process,label):
415  setattr(process,label,getattr(fastsim,label))
416 
417 # Update InputTags
418 
419  InputTags = (
420  ('hltGtDigis','gtDigis'),
421  ('hltL1GtObjectMap','gtDigis'),
422  ('hltEcalDigis:ebDigis','ecalDigis:ebDigis'),
423  ('hltEcalDigis:eeDigis','ecalDigis:eeDigis'),
424  ('hltMuonCSCDigis','muonCSCDigis'),
425  ('hltMuonCSCDigis:MuonCSCStripDigi','muonCSCDigis:MuonCSCStripDigi'),
426  ('hltMuonCSCDigis:MuonCSCWireDigi','muonCSCDigis:MuonCSCWireDigi'),
427  ('hltMuonDTDigis','muonDTDigis'),
428  ('hltMuonRPCDigis','muonRPCDigis'),
429  ('hltEcalPreshowerDigis','ecalPreshowerDigis'),
430  ('hltHbhereco', 'hbhereco'),
431  ('hltHoreco', 'horeco'),
432  ('hltHfreco', 'hfreco'),
433 
434  ('hltIter2Merged', 'generalTracks'),
435  ('hltIter2HighPtMerged', 'generalTracks'),
436  ('hltIter2MergedForElectrons', 'generalTracks'),
437  ('hltIter2MergedForPhotons', 'generalTracks'),
438  ('hltIter2L3MuonMerged', 'generalTracks'),
439  ('hltIter2MergedForBTag', 'generalTracks'),
440  ('hltIter2MergedForTau', 'generalTracks'),
441  ('hltIter2GlbTrkMuonMerged', 'generalTracks'),
442  ('hltIter2HighPtTkMuMerged', 'generalTracks'),
443  ('hltIter2HighPtTkMuIsoMerged', 'generalTracks'),
444  ('hltIter2DisplacedJpsiMerged', 'generalTracks'),
445  ('hltIter2DisplacedPsiPrimeMerged', 'generalTracks'),
446  ('hltIter2DisplacedNRMuMuMerged', 'generalTracks'),
447  ('hltIter0PFlowTrackSelectionHighPurityForBTag', 'generalTracks'),
448  ('hltIter4HighPtMerged', 'generalTracks'),
449 
450  ('hltRegionalTracksForL3MuonIsolation', 'hltPixelTracks'),
451 
452  ('hltL1extraParticles','l1extraParticles'),
453  ('hltL1extraParticles:Central','l1extraParticles:Central'),
454  ('hltL1extraParticles:Forward','l1extraParticles:Forward'),
455  ('hltL1extraParticles:Isolated','l1extraParticles:Isolated'),
456  ('hltL1extraParticles:NonIsolated','l1extraParticles:NonIsolated'),
457  ('hltL1extraParticles:Tau','l1extraParticles:Tau'),
458  ('hltL1extraParticles:IsoTau','l1extraParticles:IsoTau'),
459  ('hltOfflineBeamSpot','offlineBeamSpot'),
460  ('hltOnlineBeamSpot','offlineBeamSpot'),
461  ('hltSiStripClusters','MeasurementTrackerEvent'),
462 
463  )
464  from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
465  for pair in InputTags:
466  process = MassReplaceInputTag(process,pair[0],pair[1])
467 
468 # Update top-level named parameters
469  NamedParameters = (
470  ('GMTReadoutCollection',cms.InputTag('gtDigis'),cms.InputTag('gmtDigis')),
471  ('killDeadChannels',cms.bool(True),cms.bool(False)),
472  ('recoverEBFE',cms.bool(True),cms.bool(False)),
473  ('recoverEEFE',cms.bool(True),cms.bool(False)),
474  ('src',cms.InputTag('hltHcalTowerNoiseCleaner'),cms.InputTag('hltTowerMakerForAll')),
475  ('initialSeeds',cms.InputTag('noSeedsHere'),cms.InputTag('globalPixelSeeds')),
476  ('preFilteredSeeds',cms.bool(True),cms.bool(False)),
477  )
478  from HLTrigger.Configuration.CustomConfigs import MassReplaceParameter
479  for thrice in NamedParameters:
480  process = MassReplaceParameter(process,thrice[0],thrice[1],thrice[2])
481 
482 # Update nested named parameters
483  for label in ('hltEgammaElectronPixelSeeds','hltEgammaElectronPixelSeedsUnseeded',):
484  if hasattr(process,label):
485  getattr(process,label).SeedConfiguration.initialSeeds = cms.InputTag('globalPixelSeeds')
486  getattr(process,label).SeedConfiguration.preFilteredSeeds = cms.bool(False)
487  if hasattr(fastsim,'globalPixelSeeds'):
488  if hasattr(fastsim.globalPixelSeeds,'outputSeedCollectionName'):
489  getattr(process,label).SeedConfiguration.initialSeeds = cms.InputTag('globalPixelSeeds',fastsim.globalPixelSeeds.outputSeedCollectionName.value())
490 
491 
492 # Extending fastsim import
493  fastsim.extend(process)
494  fastsim.setSchedule_(fastsim.schedule)
495  fastsim.prune()
496 
497  return fastsim
498 
499  else:
500 
501  return process
def MassReplaceParameter