test
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.
1 import FWCore.ParameterSet.Config as cms
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  # new time slew parametrisation
27  process.hltHbhereco.timeSlewPars = cms.vdouble( 12.2999, -2.19142, 0, 12.2999, -2.19142, 0, 12.2999, -2.19142, 0 )
28  # old response correction, matching the 2015D 25ns data
29  process.hltHbhereco.respCorrM3 = cms.double( 1.0 )
30 
31 
32  if _fastSim:
33 
34  fastsim = cms.ProcessFragment( process.name_() )
35  fastsim.load( "FastSimulation.HighLevelTrigger.HLTSetup_cff" )
36 
37  fastSimUnsupportedPaths = (
38 
39  # paths for which a recovery is not foreseen/possible
40  "AlCa_*_v*",
41  "DQM_*_v*",
42  "HLT_*Calibration_v*",
43  "HLT_DTErrors_v*",
44  "HLT_Random_v*",
45  "HLT_HcalNZS_v*",
46  "HLT_HcalPhiSym_v*",
47  "HLT_Activity_Ecal*_v*",
48  "HLT_IsoTrackHB_v*",
49  "HLT_IsoTrackHE_v*",
50  "HLT_L1SingleMuOpen_AntiBPTX_v*",
51  "HLT_JetE*_NoBPTX*_v*",
52  "HLT_L2Mu*_NoBPTX*_v*",
53  "HLT_Beam*_v*",
54  #"HLT_L1Tech_*_v*",
55  "HLT_HI*",
56  "HLT_GlobalRunHPDNoise_v*",
57  "HLT_L1TrackerCosmics_v*",
58  "HLT_HcalUTCA_v*",
59  "HLT_L1FatEvents_v*",
60 
61  # TODO: paths not supported by FastSim, but for which a recovery should be attempted
62  "HLT_DoubleMu33NoFiltersNoVtx_v*",
63  "HLT_DoubleMu38NoFiltersNoVtx_v*",
64  "HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v*",
65  "HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v*",
66  "HLT_DoubleMu23NoFiltersNoVtxDisplaced_v*",
67  "HLT_DoubleMu28NoFiltersNoVtxDisplaced_v*",
68  "HLT_Mu28NoFiltersNoVtxDisplaced_Photon28_CaloIdL_v*",
69  "HLT_Mu33NoFiltersNoVtxDisplaced_Photon33_CaloIdL_v*",
70  "HLT_HT350_DisplacedDijet80_Tight_DisplacedTrack_v*",
71  "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
72  "HLT_HT500_DisplacedDijet40_Inclusive_v*",
73  "HLT_HT350_DisplacedDijet40_DisplacedTrack_v*",
74  "HLT_HT550_DisplacedDijet40_Inclusive_v*",
75  "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
76  "HLT_HT400_DisplacedDijet40_Inclusive_v*",
77  "HLT_HT250_DisplacedDijet40_DisplacedTrack_v*",
78  "HLT_HT200_DisplacedDijet40_DisplacedTrack_v*",
79  "HLT_HT350_DisplacedDijet40_Inclusive_v*",
80  "HLT_TrkMu15_DoubleTrkMu5NoFiltersNoVtx_v*",
81  "HLT_TrkMu17_DoubleTrkMu8NoFiltersNoVtx_v*",
82  "HLT_MET60_IsoTrk*",
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_L1MuOpenNotHF2Pixel_SingleTrack*",
103  "HLT_L1TOTEM0_RomanPotsAND_PixelClusters*",
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  "hltCkfL1SeededTrackCandidates",
129  "hltCtfL1SeededithMaterialTracks",
130  "hltCkf3HitL1SeededTrackCandidates",
131  "hltCtf3HitL1SeededWithMaterialTracks",
132  "hltCkf3HitActivityTrackCandidates",
133  "hltCtf3HitActivityWithMaterialTracks",
134  "hltActivityCkfTrackCandidatesForGSF",
135  "hltL1SeededCkfTrackCandidatesForGSF",
136  "hltMuCkfTrackCandidates",
137  "hltMuCtfTracks",
138  "hltTau3MuCkfTrackCandidates",
139  "hltTau3MuCtfWithMaterialTracks",
140  "hltMuTrackJpsiCkfTrackCandidates",
141  "hltMuTrackJpsiCtfTracks",
142  "hltMuTrackJpsiEffCkfTrackCandidates",
143  "hltMuTrackJpsiEffCtfTracks",
144  "hltJpsiTkPixelSeedFromL3Candidate",
145  "hltCkfTrackCandidatesJpsiTk",
146  "hltCtfWithMaterialTracksJpsiTk",
147  "hltMuTrackCkfTrackCandidatesOnia",
148  "hltMuTrackCtfTracksOnia",
149 
150  "hltFEDSelector",
151  "hltL3TrajSeedOIHit",
152  "hltL3TrajSeedIOHit",
153  "hltL3NoFiltersTrajSeedOIHit",
154  "hltL3NoFiltersTrajSeedIOHit",
155  "hltL3TrackCandidateFromL2OIState",
156  "hltL3TrackCandidateFromL2OIHit",
157  "hltL3TrackCandidateFromL2IOHit",
158  "hltL3TrackCandidateFromL2NoVtx",
159  "hltHcalDigis",
160  "hltHoreco",
161  "hltHfreco",
162  "hltHbhereco",
163  "hltESRawToRecHitFacility",
164  "hltEcalRecHitAll",
165  "hltESRecHitAll",
166  # === eGamma
167  "hltEgammaCkfTrackCandidatesForGSF",
168  "hltEgammaGsfTracks",
169  "hltEgammaCkfTrackCandidatesForGSFUnseeded",
170  "hltEgammaGsfTracksUnseeded",
171  # === hltPF
172  "hltPFJetCkfTrackCandidates",
173  "hltPFJetCtfWithMaterialTracks",
174  "hltPFlowTrackSelectionHighPurity",
175  # === hltFastJet
176  "hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator",
177  "hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates",
178  "hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks",
179  "hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator",
180  "hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates",
181  "hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks",
182  "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet",
183  "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet",
184  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet",
185  "hltBLifetimeRegionalPixelSeedGeneratorHbbVBF",
186  "hltBLifetimeRegionalCkfTrackCandidatesHbbVBF",
187  "hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF",
188  "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
189  "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
190  "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
191  "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
192  "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
193  "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
194  # === hltBLifetimeRegional
195  "hltBLifetimeRegionalPixelSeedGeneratorHbb",
196  "hltBLifetimeRegionalCkfTrackCandidatesHbb",
197  "hltBLifetimeRegionalCtfWithMaterialTracksHbb",
198  "hltBLifetimeRegionalPixelSeedGeneratorbbPhi",
199  "hltBLifetimeRegionalCkfTrackCandidatesbbPhi",
200  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhi",
201  "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
202  "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
203  "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
204  "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
205  "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
206  "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
207  "hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF",
208  "hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF",
209  "hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF",
210  "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV",
211  "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV",
212  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV",
213  "hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb",
214  "hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb",
215  "hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb",
216 
217  "hltPixelTracksForMinBias",
218  "hltPixelTracksForMinBias01",
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  "hltPixelTracksForSeedsTau3mu",
233 
234  "hltFastPixelHitsVertex",
235  "hltFastPixelTracks",
236  "hltFastPixelTracksRecover",
237 
238  "hltPixelLayerPairs",
239  "hltPixelLayerTriplets",
240  "hltPixelLayerTripletsReg",
241  "hltPixelLayerTripletsHITHB",
242  "hltPixelLayerTripletsHITHE",
243  "hltMixedLayerPairs",
244 
245  "hltFastPrimaryVertexbbPhi",
246  "hltPixelTracksFastPVbbPhi",
247  "hltPixelTracksRecoverbbPhi",
248  "hltFastPixelHitsVertexVHbb",
249  "hltFastPixelTracksVHbb",
250  "hltFastPixelTracksRecoverVHbb",
251 
252  "hltFastPrimaryVertex",
253  "hltFastPVPixelVertexFilter",
254  "hltFastPVPixelTracks",
255  "hltFastPVPixelTracksRecover",
256 
257  # "hltPixelMatchElectronsActivity",
258 
259  "hltMuonCSCDigis",
260  "hltMuonDTDigis",
261  "hltMuonRPCDigis",
262 # "hltGtDigis",
263 # "hltL1GtTrigReport",
264  # "hltCsc2DRecHits",
265  # "hltDt1DRecHits",
266  # "hltRpcRecHits",
267  "hltScalersRawToDigi",
268  "hltEcalPreshowerDigis",
269  "hltEcalDigis",
270  "hltEcalDetIdToBeRecovered",
271 
272  )
273 
274  SequencesToRemove = (
275  "HLTL1SeededEgammaRegionalRecoTrackerSequence",
276  "HLTEcalActivityEgammaRegionalRecoTrackerSequence",
277  "HLTPixelMatchElectronActivityTrackingSequence",
278  "HLTDoLocalStripSequence",
279  "HLTDoLocalPixelSequence",
280  "HLTDoLocalPixelSequenceRegL2Tau",
281  "HLTDoLocalStripSequenceReg",
282  "HLTDoLocalPixelSequenceReg",
283  "HLTDoLocalStripSequenceRegForBTag",
284  "HLTDoLocalPixelSequenceRegForBTag",
285  "HLTDoLocalPixelSequenceRegForNoPU",
286  "HLTBeginSequence",
287  "HLTBeginSequenceL1Fat",
288  "HLTBeginSequenceNZS",
289  "HLTBeginSequenceBPTX",
290  "HLTBeginSequenceAntiBPTX",
291  "HLTHBHENoiseSequence",
292  "HLTIterativeTrackingIter04",
293  "HLTIterativeTrackingIter02",
294  "HLTIterativeTracking",
295  "HLTIterativeTrackingForHighPt",
296  "HLTIterativeTrackingTau3Mu",
297  "HLTIterativeTrackingReg",
298  "HLTIterativeTrackingForPA",
299  "HLTPAIterativeTracking",
300  "HLTIterativeTrackingForElectronIter02",
301  "HLTIterativeTrackingForPhotonsIter02",
302  "HLTIterativeTrackingL3MuonIter02",
303  "HLTIterativeTrackingGlbTrkMuonIter02",
304  "HLTIterativeTrackingL3MuonRegIter02",
305  "HLTIterativeTrackingHighPtTkMu",
306  "HLTIterativeTrackingHighPtTkMuIsoIter02",
307  "HLTIterativeTrackingForBTagIter02",
308  "HLTIterativeTrackingForBTagIter12",
309  "HLTIterativeTrackingForTauIter04",
310  "HLTIterativeTrackingForTauIter02",
311  "HLTIterativeTrackingDisplacedJpsiIter02",
312  "HLTIterativeTrackingDisplacedPsiPrimeIter02",
313  "HLTIterativeTrackingDisplacedNRMuMuIter02",
314  "HLTIterativeTrackingDisplacedTau3muIter02",
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 path in HLTSchedule:
331  getattr(process,path).insert(1,process.HLTL1UnpackerSequence)
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  # remove from sequences
381  list = tuple(process.sequences_().keys())
382  for name in list:
383  sequence = getattr(process,name)
384  more=True
385  while more:
386  more = sequence.remove(object)
387  # remove from paths
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  # remove from end paths
395  list = tuple(process.endpaths_().keys())
396  for name in list:
397  path = getattr(process,name)
398  more=True
399  while more:
400  more = path.remove(object)
401  delattr(process,label)
402 
403 # Special transformations:
404  if hasattr(process,'hltGetConditions') and hasattr(process,'HLTriggerFirstPath'):
405  process.hltDummyConditions = cms.EDFilter( "HLTBool", result = cms.bool( True ) )
406  process.HLTriggerFirstPath.replace(process.hltGetConditions,process.hltDummyConditions)
407  if hasattr(process,'hltPixelVertices'):
408  process.hltPixelVertices.beamSpot = cms.InputTag('offlineBeamSpot')
409  specialModules = ( 'hltEcalRecHit', 'hltEcalPreshowerRecHit', )
410  for label in specialModules:
411  if hasattr(process,label):
412  setattr(fastsim,label,getattr(process,label))
413 
414 # Use fastsim imports
415  for label in fastsim.producers_().keys():
416  if hasattr(process,label):
417  setattr(process,label,getattr(fastsim,label))
418  for label in fastsim.filters_().keys():
419  if hasattr(process,label):
420  setattr(process,label,getattr(fastsim,label))
421  for label in fastsim.analyzers_().keys():
422  if hasattr(process,label):
423  setattr(process,label,getattr(fastsim,label))
424  for label in fastsim.sequences_().keys():
425  if hasattr(process,label):
426  setattr(process,label,getattr(fastsim,label))
427 
428 # Update InputTags
429 
430  InputTags = (
431 # ('hltGtDigis','gtDigis'),
432 # ('hltL1GtObjectMap','gtDigis'),
433  ('hltEcalDigis:ebDigis','ecalDigis:ebDigis'),
434  ('hltEcalDigis:eeDigis','ecalDigis:eeDigis'),
435  ('hltMuonCSCDigis','muonCSCDigis'),
436  ('hltMuonCSCDigis:MuonCSCStripDigi','muonCSCDigis:MuonCSCStripDigi'),
437  ('hltMuonCSCDigis:MuonCSCWireDigi','muonCSCDigis:MuonCSCWireDigi'),
438  ('hltMuonDTDigis','muonDTDigis'),
439  ('hltMuonRPCDigis','muonRPCDigis'),
440  ('hltEcalPreshowerDigis','ecalPreshowerDigis'),
441  ('hltHbhereco', 'hbhereco'),
442  ('hltHoreco', 'horeco'),
443  ('hltHfreco', 'hfreco'),
444 
445  ('hltIter2Merged', 'generalTracks'),
446  ('hltIter2HighPtMerged', 'generalTracks'),
447  ('hltIter2MergedForElectrons', 'generalTracks'),
448  ('hltIter2MergedForPhotons', 'generalTracks'),
449  ('hltIter2L3MuonMerged', 'generalTracks'),
450  ('hltIter2MergedForBTag', 'generalTracks'),
451  ('hltIter2MergedForTau', 'generalTracks'),
452  ('hltIter2GlbTrkMuonMerged', 'generalTracks'),
453  ('hltIter2HighPtTkMuMerged', 'generalTracks'),
454  ('hltIter2HighPtTkMuIsoMerged', 'generalTracks'),
455  ('hltIter2DisplacedJpsiMerged', 'generalTracks'),
456  ('hltIter2DisplacedPsiPrimeMerged', 'generalTracks'),
457  ('hltIter2DisplacedNRMuMuMerged', 'generalTracks'),
458  ('hltIter2DisplacedTau3muMerged', 'generalTracks'),
459  ('hltIter0PFlowTrackSelectionHighPurityForBTag', 'generalTracks'),
460  ('hltIter4HighPtMerged', 'generalTracks'),
461  ('hltIterativeTrackingForPAMerged', 'generalTracks'),
462  ('hltPAIterativeTrackingMerged', 'generalTracks'),
463 
464  ('hltFastPVPixelTracks','hltPixelTracks'),
465  ('hltFastPVPixelTracksRecover','hltPixelTracks'),
466  ('hltPixelTracksL3Muon','hltPixelTracks'),
467  ('hltPixelTracksGlbTrkMuon','hltPixelTracks'),
468  ('hltPixelTracksHighPtTkMuIso','hltPixelTracks'),
469  ('hltPixelTracksHybrid','hltPixelTracks'),
470  ('hltPixelTracksForPhotons','hltPixelTracks'),
471  ('hltPixelTracksForEgamma','hltPixelTracks'),
472  ('hltPixelTracksElectrons','hltPixelTracks'),
473  ('hltPixelTracksForHighPt','hltPixelTracks'),
474  ('hltHighPtPixelTracks','hltPixelTracks'),
475  ('hltPixelTracksForNoPU','hltPixelTracks'),
476  ('hltPixelTracksForSeedsTau3mu','hltPixelTracks'),
477 
478  ('hltL1extraParticles','l1extraParticles'),
479  ('hltL1extraParticles:Central','l1extraParticles:Central'),
480  ('hltL1extraParticles:Forward','l1extraParticles:Forward'),
481  ('hltL1extraParticles:Isolated','l1extraParticles:Isolated'),
482  ('hltL1extraParticles:NonIsolated','l1extraParticles:NonIsolated'),
483  ('hltL1extraParticles:Tau','l1extraParticles:Tau'),
484  ('hltL1extraParticles:IsoTau','l1extraParticles:IsoTau'),
485  ('hltOfflineBeamSpot','offlineBeamSpot'),
486  ('hltOnlineBeamSpot','offlineBeamSpot'),
487  ('hltSiStripClusters','MeasurementTrackerEvent'),
488 
489  )
490  from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
491  for pair in InputTags:
492  process = MassReplaceInputTag(process,pair[0],pair[1])
493 
494 # Update top-level named parameters
495  NamedParameters = (
496 # ('GMTReadoutCollection',cms.InputTag('gtDigis'),cms.InputTag('gmtDigis')),
497  ('killDeadChannels',cms.bool(True),cms.bool(False)),
498  ('recoverEBFE',cms.bool(True),cms.bool(False)),
499  ('recoverEEFE',cms.bool(True),cms.bool(False)),
500  ('src',cms.InputTag('hltHcalTowerNoiseCleaner'),cms.InputTag('hltTowerMakerForAll')),
501  ('src',cms.InputTag('hltHcalTowerNoiseCleanerWithrechit'),cms.InputTag('hltTowerMakerForAll')),
502  ('initialSeeds',cms.InputTag('noSeedsHere'),cms.InputTag('hltPixelPairSeeds')),
503  ('preFilteredSeeds',cms.bool(True),cms.bool(False)),
504  )
505  from HLTrigger.Configuration.CustomConfigs import MassReplaceParameter
506  for thrice in NamedParameters:
507  process = MassReplaceParameter(process,thrice[0],thrice[1],thrice[2])
508 
509 # Update nested named parameters
510  for label in ('hltEgammaElectronPixelSeeds','hltEgammaElectronPixelSeedsUnseeded',):
511  if hasattr(process,label):
512  getattr(process,label).SeedConfiguration.initialSeeds = cms.InputTag('hltPixelPairSeeds')
513  getattr(process,label).SeedConfiguration.preFilteredSeeds = cms.bool(False)
514 
515 # Extending fastsim import
516  fastsim.extend(process)
517  fastsim.setSchedule_(fastsim.schedule)
518  fastsim.prune()
519 
520  return fastsim
521 
522  else:
523 
524  return process
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
def MassReplaceParameter