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