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