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