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