test
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_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  "hltHoreco",
162  "hltHfreco",
163  "hltHbhereco",
164  "hltESRawToRecHitFacility",
165  "hltEcalRecHitAll",
166  "hltESRecHitAll",
167  # === eGamma
168  "hltEgammaCkfTrackCandidatesForGSF",
169  "hltEgammaGsfTracks",
170  "hltEgammaCkfTrackCandidatesForGSFUnseeded",
171  "hltEgammaGsfTracksUnseeded",
172  # === hltPF
173  "hltPFJetCkfTrackCandidates",
174  "hltPFJetCtfWithMaterialTracks",
175  "hltPFlowTrackSelectionHighPurity",
176  # === hltFastJet
177  "hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator",
178  "hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates",
179  "hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks",
180  "hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator",
181  "hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates",
182  "hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks",
183  "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet",
184  "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet",
185  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet",
186  "hltBLifetimeRegionalPixelSeedGeneratorHbbVBF",
187  "hltBLifetimeRegionalCkfTrackCandidatesHbbVBF",
188  "hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF",
189  "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
190  "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
191  "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
192  "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
193  "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
194  "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
195  # === hltBLifetimeRegional
196  "hltBLifetimeRegionalPixelSeedGeneratorHbb",
197  "hltBLifetimeRegionalCkfTrackCandidatesHbb",
198  "hltBLifetimeRegionalCtfWithMaterialTracksHbb",
199  "hltBLifetimeRegionalPixelSeedGeneratorbbPhi",
200  "hltBLifetimeRegionalCkfTrackCandidatesbbPhi",
201  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhi",
202  "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
203  "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
204  "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
205  "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
206  "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
207  "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
208  "hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF",
209  "hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF",
210  "hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF",
211  "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV",
212  "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV",
213  "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV",
214  "hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb",
215  "hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb",
216  "hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb",
217 
218  "hltPixelTracksForMinBias",
219  "hltPixelTracksForMinBias01",
220  "hltPixelTracksForHighMult",
221  "hltRegionalPixelTracks",
222  "hltPixelTracksReg",
223  "hltPixelTracksL3Muon",
224  "hltPixelTracksGlbTrkMuon",
225  "hltPixelTracksHighPtTkMuIso",
226  "hltPixelTracksHybrid",
227  "hltPixelTracksForPhotons",
228  "hltPixelTracksForEgamma",
229  "hltPixelTracksElectrons",
230  "hltPixelTracksForHighPt",
231  "hltHighPtPixelTracks",
232  "hltPixelTracksForNoPU",
233  "hltPixelTracksForSeedsTau3mu",
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  "HLTBeginSequence",
288  "HLTBeginSequenceL1Fat",
289  "HLTBeginSequenceNZS",
290  "HLTBeginSequenceBPTX",
291  "HLTBeginSequenceAntiBPTX",
292  "HLTHBHENoiseSequence",
293  "HLTIterativeTrackingIter04",
294  "HLTIterativeTrackingIter02",
295  "HLTIterativeTracking",
296  "HLTIterativeTrackingForHighPt",
297  "HLTIterativeTrackingTau3Mu",
298  "HLTIterativeTrackingReg",
299  "HLTIterativeTrackingForPA",
300  "HLTPAIterativeTracking",
301  "HLTIterativeTrackingForElectronIter02",
302  "HLTIterativeTrackingForPhotonsIter02",
303  "HLTIterativeTrackingL3MuonIter02",
304  "HLTIterativeTrackingGlbTrkMuonIter02",
305  "HLTIterativeTrackingL3MuonRegIter02",
306  "HLTIterativeTrackingHighPtTkMu",
307  "HLTIterativeTrackingHighPtTkMuIsoIter02",
308  "HLTIterativeTrackingForBTagIter02",
309  "HLTIterativeTrackingForBTagIter12",
310  "HLTIterativeTrackingForTauIter04",
311  "HLTIterativeTrackingForTauIter02",
312  "HLTIterativeTrackingDisplacedJpsiIter02",
313  "HLTIterativeTrackingDisplacedPsiPrimeIter02",
314  "HLTIterativeTrackingDisplacedNRMuMuIter02",
315  "HLTIterativeTrackingDisplacedTau3muIter02",
316  "HLTIterativeTrackingForBTagIteration0",
317  "HLTIterativeTrackingIteration4DisplacedJets",
318  "HLTRegionalCKFTracksForL3Isolation",
319  "HLTHBHENoiseCleanerSequence",
320  )
321 
322 # Removing ESmodules
323  for label in ESModulesToRemove:
324  if (hasattr(process,label)):
325  delattr(process,label)
326 
327 # Removing paths
328  import fnmatch,re
329  ExplicitList = []
330  HLTSchedule = tuple( path.label_() for path in process.HLTSchedule)
331  for path in HLTSchedule:
332  getattr(process,path).insert(1,process.HLTL1UnpackerSequence)
333  for black in fastSimUnsupportedPaths:
334  compiled = re.compile(fnmatch.translate(black))
335  for path in HLTSchedule:
336  if compiled.search(path) is not None:
337  ExplicitList += [path]
338  UniqueList = []
339  for path in ExplicitList:
340  if path not in UniqueList:
341  UniqueList += [path]
342  for path in UniqueList:
343  process.schedule.remove(getattr(process,path))
344  process.setSchedule_(process.schedule)
345  process.prune()
346 
347 # Removing streams and datasets PSets
348  if hasattr(process,'streams'):
349  delattr(process,'streams')
350  if hasattr(process,'datasets'):
351  delattr(process,'datasets')
352 
353 # Removing sequences, possibly to be taken from fastsim import
354  for label in SequencesToRemove:
355  if hasattr(process,label):
356  if hasattr(fastsim,label):
357  setattr(process,label,getattr(fastsim,label))
358  else:
359  object = getattr(process,label)
360  list = tuple(process.sequences_().keys())
361  for name in list:
362  sequence = getattr(process,name)
363  more=True
364  while more:
365  more = sequence.remove(object)
366  list = tuple(process.paths_().keys())
367  for name in list:
368  path = getattr(process,name)
369  more=True
370  while more:
371  more = path.remove(object)
372  delattr(process,label)
373 
374 # Removing modules, possibly to be taken from fastsim import
375  for label in ModulesToRemove:
376  if hasattr(process,label):
377  if hasattr(fastsim,label):
378  setattr(process,label,getattr(fastsim,label))
379  else:
380  object = getattr(process,label)
381  # remove from sequences
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  # remove from paths
389  list = tuple(process.paths_().keys())
390  for name in list:
391  path = getattr(process,name)
392  more=True
393  while more:
394  more = path.remove(object)
395  # remove from end paths
396  list = tuple(process.endpaths_().keys())
397  for name in list:
398  path = getattr(process,name)
399  more=True
400  while more:
401  more = path.remove(object)
402  delattr(process,label)
403 
404 # Special transformations:
405  if hasattr(process,'hltGetConditions') and hasattr(process,'HLTriggerFirstPath'):
406  process.hltDummyConditions = cms.EDFilter( "HLTBool", result = cms.bool( True ) )
407  process.HLTriggerFirstPath.replace(process.hltGetConditions,process.hltDummyConditions)
408  if hasattr(process,'hltPixelVertices'):
409  process.hltPixelVertices.beamSpot = cms.InputTag('offlineBeamSpot')
410  specialModules = ( 'hltEcalRecHit', 'hltEcalPreshowerRecHit', )
411  for label in specialModules:
412  if hasattr(process,label):
413  setattr(fastsim,label,getattr(process,label))
414 
415 # Use fastsim imports
416  for label in fastsim.producers_().keys():
417  if hasattr(process,label):
418  setattr(process,label,getattr(fastsim,label))
419  for label in fastsim.filters_().keys():
420  if hasattr(process,label):
421  setattr(process,label,getattr(fastsim,label))
422  for label in fastsim.analyzers_().keys():
423  if hasattr(process,label):
424  setattr(process,label,getattr(fastsim,label))
425  for label in fastsim.sequences_().keys():
426  if hasattr(process,label):
427  setattr(process,label,getattr(fastsim,label))
428 
429 # Update InputTags
430 
431  InputTags = (
432 # ('hltGtDigis','gtDigis'),
433 # ('hltL1GtObjectMap','gtDigis'),
434  ('hltEcalDigis:ebDigis','ecalDigis:ebDigis'),
435  ('hltEcalDigis:eeDigis','ecalDigis:eeDigis'),
436  ('hltMuonCSCDigis','muonCSCDigis'),
437  ('hltMuonCSCDigis:MuonCSCStripDigi','muonCSCDigis:MuonCSCStripDigi'),
438  ('hltMuonCSCDigis:MuonCSCWireDigi','muonCSCDigis:MuonCSCWireDigi'),
439  ('hltMuonDTDigis','muonDTDigis'),
440  ('hltMuonRPCDigis','muonRPCDigis'),
441  ('hltEcalPreshowerDigis','ecalPreshowerDigis'),
442  ('hltHbhereco', 'hbhereco'),
443  ('hltHoreco', 'horeco'),
444  ('hltHfreco', 'hfreco'),
445 
446  ('hltIter2Merged', 'generalTracks'),
447  ('hltIter2HighPtMerged', 'generalTracks'),
448  ('hltIter2MergedForElectrons', 'generalTracks'),
449  ('hltIter2MergedForPhotons', 'generalTracks'),
450  ('hltIter2L3MuonMerged', 'generalTracks'),
451  ('hltIter2MergedForBTag', 'generalTracks'),
452  ('hltIter2MergedForTau', 'generalTracks'),
453  ('hltIter2GlbTrkMuonMerged', 'generalTracks'),
454  ('hltIter2HighPtTkMuMerged', 'generalTracks'),
455  ('hltIter2HighPtTkMuIsoMerged', 'generalTracks'),
456  ('hltIter2DisplacedJpsiMerged', 'generalTracks'),
457  ('hltIter2DisplacedPsiPrimeMerged', 'generalTracks'),
458  ('hltIter2DisplacedNRMuMuMerged', 'generalTracks'),
459  ('hltIter2DisplacedTau3muMerged', 'generalTracks'),
460  ('hltIter0PFlowTrackSelectionHighPurityForBTag', 'generalTracks'),
461  ('hltIter4HighPtMerged', 'generalTracks'),
462  ('hltIterativeTrackingForPAMerged', 'generalTracks'),
463  ('hltPAIterativeTrackingMerged', 'generalTracks'),
464 
465  ('hltFastPVPixelTracks','hltPixelTracks'),
466  ('hltFastPVPixelTracksRecover','hltPixelTracks'),
467  ('hltPixelTracksL3Muon','hltPixelTracks'),
468  ('hltPixelTracksGlbTrkMuon','hltPixelTracks'),
469  ('hltPixelTracksHighPtTkMuIso','hltPixelTracks'),
470  ('hltPixelTracksHybrid','hltPixelTracks'),
471  ('hltPixelTracksForPhotons','hltPixelTracks'),
472  ('hltPixelTracksForEgamma','hltPixelTracks'),
473  ('hltPixelTracksElectrons','hltPixelTracks'),
474  ('hltPixelTracksForHighPt','hltPixelTracks'),
475  ('hltHighPtPixelTracks','hltPixelTracks'),
476  ('hltPixelTracksForNoPU','hltPixelTracks'),
477  ('hltPixelTracksForSeedsTau3mu','hltPixelTracks'),
478 
479  ('hltL1extraParticles','l1extraParticles'),
480  ('hltL1extraParticles:Central','l1extraParticles:Central'),
481  ('hltL1extraParticles:Forward','l1extraParticles:Forward'),
482  ('hltL1extraParticles:Isolated','l1extraParticles:Isolated'),
483  ('hltL1extraParticles:NonIsolated','l1extraParticles:NonIsolated'),
484  ('hltL1extraParticles:Tau','l1extraParticles:Tau'),
485  ('hltL1extraParticles:IsoTau','l1extraParticles:IsoTau'),
486  ('hltOfflineBeamSpot','offlineBeamSpot'),
487  ('hltOnlineBeamSpot','offlineBeamSpot'),
488  ('hltSiStripClusters','MeasurementTrackerEvent'),
489 
490  )
491  from HLTrigger.Configuration.CustomConfigs import MassReplaceInputTag
492  for pair in InputTags:
493  process = MassReplaceInputTag(process,pair[0],pair[1])
494 
495 # Update top-level named parameters
496  NamedParameters = (
497 # ('GMTReadoutCollection',cms.InputTag('gtDigis'),cms.InputTag('gmtDigis')),
498  ('killDeadChannels',cms.bool(True),cms.bool(False)),
499  ('recoverEBFE',cms.bool(True),cms.bool(False)),
500  ('recoverEEFE',cms.bool(True),cms.bool(False)),
501  ('src',cms.InputTag('hltHcalTowerNoiseCleaner'),cms.InputTag('hltTowerMakerForAll')),
502  ('src',cms.InputTag('hltHcalTowerNoiseCleanerWithrechit'),cms.InputTag('hltTowerMakerForAll')),
503  ('initialSeeds',cms.InputTag('noSeedsHere'),cms.InputTag('hltPixelPairSeeds')),
504  ('preFilteredSeeds',cms.bool(True),cms.bool(False)),
505  )
506  from HLTrigger.Configuration.CustomConfigs import MassReplaceParameter
507  for thrice in NamedParameters:
508  process = MassReplaceParameter(process,thrice[0],thrice[1],thrice[2])
509 
510 # Update nested named parameters
511  for label in ('hltEgammaElectronPixelSeeds','hltEgammaElectronPixelSeedsUnseeded',):
512  if hasattr(process,label):
513  getattr(process,label).SeedConfiguration.initialSeeds = cms.InputTag('hltPixelPairSeeds')
514  getattr(process,label).SeedConfiguration.preFilteredSeeds = cms.bool(False)
515 
516 # Extending fastsim import
517  fastsim.extend(process)
518  fastsim.setSchedule_(fastsim.schedule)
519  fastsim.prune()
520 
521  return fastsim
522 
523  else:
524 
525  return process
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:49
def MassReplaceParameter