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