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