1 import FWCore.ParameterSet.Config
as cms
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"""
17 if 'hltParticleFlowRecHitHCAL' in process.__dict__:
18 process.hltParticleFlowRecHitHCAL.ApplyPulseDPG = cms.bool(
False)
19 process.hltParticleFlowRecHitHCAL.LongShortFibre_Cut = cms.double(1000000000.0)
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 )
27 process.hltHbhereco.timeSlewPars = cms.vdouble( 12.2999, -2.19142, 0, 12.2999, -2.19142, 0, 12.2999, -2.19142, 0 )
29 process.hltHbhereco.respCorrM3 = cms.double( 1.0 )
34 fastsim = cms.ProcessFragment( process.name_() )
35 fastsim.load(
"FastSimulation.HighLevelTrigger.HLTSetup_cff" )
37 fastSimUnsupportedPaths = (
42 "HLT_*Calibration_v*",
47 "HLT_Activity_Ecal*_v*",
50 "HLT_L1SingleMuOpen_AntiBPTX_v*",
51 "HLT_JetE*_NoBPTX*_v*",
52 "HLT_L2Mu*_NoBPTX*_v*",
56 "HLT_GlobalRunHPDNoise_v*",
57 "HLT_L1TrackerCosmics_v*",
61 "HLT_DoubleMu33NoFiltersNoVtx_v*",
62 "HLT_DoubleMu38NoFiltersNoVtx_v*",
63 "HLT_Mu38NoFiltersNoVtx_Photon38_CaloIdL_v*",
64 "HLT_Mu42NoFiltersNoVtx_Photon42_CaloIdL_v*",
65 "HLT_DoubleMu23NoFiltersNoVtxDisplaced_v*",
66 "HLT_DoubleMu28NoFiltersNoVtxDisplaced_v*",
67 "HLT_Mu28NoFiltersNoVtxDisplaced_Photon28_CaloIdL_v*",
68 "HLT_Mu33NoFiltersNoVtxDisplaced_Photon33_CaloIdL_v*",
69 "HLT_HT350_DisplacedDijet80_Tight_DisplacedTrack_v*",
70 "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
71 "HLT_HT500_DisplacedDijet40_Inclusive_v*",
72 "HLT_HT350_DisplacedDijet40_DisplacedTrack_v*",
73 "HLT_HT550_DisplacedDijet40_Inclusive_v*",
74 "HLT_HT350_DisplacedDijet80_DisplacedTrack_v*",
75 "HLT_HT400_DisplacedDijet40_Inclusive_v*",
76 "HLT_HT250_DisplacedDijet40_DisplacedTrack_v*",
77 "HLT_TrkMu15_DoubleTrkMu5NoFiltersNoVtx_v*",
78 "HLT_TrkMu17_DoubleTrkMu8NoFiltersNoVtx_v*",
80 "HLT_MET75_IsoTrk50_v*",
81 "HLT_MET90_IsoTrk50_v*",
82 "HLT_VBF_DisplacedJet40_DisplacedTrack_v*",
83 "HLT_VBF_DisplacedJet40_TightID_DisplacedTrack_v*",
84 "HLT_VBF_DisplacedJet40_VTightID_DisplacedTrack_v*",
85 "HLT_VBF_DisplacedJet40_VVTightID_DisplacedTrack_v*",
86 "HLT_VBF_DisplacedJet40_Hadronic_2PromptTrack_v*",
87 "HLT_VBF_DisplacedJet40_DisplacedTrack_2TrackIP2DSig5_v*",
88 "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Tight_v*",
89 "HLT_Mu33NoFiltersNoVtxDisplaced_DisplacedJet50_Loose_v*",
90 "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Tight_v*",
91 "HLT_Mu38NoFiltersNoVtxDisplaced_DisplacedJet60_Loose_v*",
92 "HLT_Mu38NoFiltersNoVtx_DisplacedJet60_Loose_v*",
93 "HLT_Mu28NoFiltersNoVtx_DisplacedJet40_Loose_v*",
94 "HLT_Mu28NoFiltersNoVtx_CentralCaloJet40_v*",
95 "HLT_Mu23NoFiltersNoVtx_Photon23_CaloIdL_v*",
96 "HLT_DoubleMu18NoFiltersNoVtx_v*",
97 "HLT_DoubleMuNoFiltersNoVtx_SaveObjects_v*",
98 "MC_DoubleMuNoFiltersNoVtx_v*",
99 "HLT_L1MuOpenNotHF2Pixel_SingleTrack*",
100 "HLT_L1TOTEM0_RomanPotsAND_PixelClusters*",
103 ESModulesToRemove = (
125 "hltCkfL1SeededTrackCandidates",
126 "hltCtfL1SeededithMaterialTracks",
127 "hltCkf3HitL1SeededTrackCandidates",
128 "hltCtf3HitL1SeededWithMaterialTracks",
129 "hltCkf3HitActivityTrackCandidates",
130 "hltCtf3HitActivityWithMaterialTracks",
131 "hltActivityCkfTrackCandidatesForGSF",
132 "hltL1SeededCkfTrackCandidatesForGSF",
133 "hltMuCkfTrackCandidates",
135 "hltTau3MuCkfTrackCandidates",
136 "hltTau3MuCtfWithMaterialTracks",
137 "hltMuTrackJpsiCkfTrackCandidates",
138 "hltMuTrackJpsiCtfTracks",
139 "hltMuTrackJpsiEffCkfTrackCandidates",
140 "hltMuTrackJpsiEffCtfTracks",
141 "hltJpsiTkPixelSeedFromL3Candidate",
142 "hltCkfTrackCandidatesJpsiTk",
143 "hltCtfWithMaterialTracksJpsiTk",
144 "hltMuTrackCkfTrackCandidatesOnia",
145 "hltMuTrackCtfTracksOnia",
148 "hltL3TrajSeedOIHit",
149 "hltL3TrajSeedIOHit",
150 "hltL3NoFiltersTrajSeedOIHit",
151 "hltL3NoFiltersTrajSeedIOHit",
152 "hltL3TrackCandidateFromL2OIState",
153 "hltL3TrackCandidateFromL2OIHit",
154 "hltL3TrackCandidateFromL2IOHit",
155 "hltL3TrackCandidateFromL2NoVtx",
160 "hltESRawToRecHitFacility",
164 "hltEgammaCkfTrackCandidatesForGSF",
165 "hltEgammaGsfTracks",
166 "hltEgammaCkfTrackCandidatesForGSFUnseeded",
167 "hltEgammaGsfTracksUnseeded",
169 "hltPFJetCkfTrackCandidates",
170 "hltPFJetCtfWithMaterialTracks",
171 "hltPFlowTrackSelectionHighPurity",
173 "hltDisplacedHT250L1FastJetRegionalPixelSeedGenerator",
174 "hltDisplacedHT250L1FastJetRegionalCkfTrackCandidates",
175 "hltDisplacedHT250L1FastJetRegionalCtfWithMaterialTracks",
176 "hltDisplacedHT300L1FastJetRegionalPixelSeedGenerator",
177 "hltDisplacedHT300L1FastJetRegionalCkfTrackCandidates",
178 "hltDisplacedHT300L1FastJetRegionalCtfWithMaterialTracks",
179 "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJet",
180 "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJet",
181 "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJet",
182 "hltBLifetimeRegionalPixelSeedGeneratorHbbVBF",
183 "hltBLifetimeRegionalCkfTrackCandidatesHbbVBF",
184 "hltBLifetimeRegionalCtfWithMaterialTracksHbbVBF",
185 "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
186 "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
187 "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
188 "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20HbbL1FastJet",
189 "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20HbbL1FastJet",
190 "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20HbbL1FastJet",
192 "hltBLifetimeRegionalPixelSeedGeneratorHbb",
193 "hltBLifetimeRegionalCkfTrackCandidatesHbb",
194 "hltBLifetimeRegionalCtfWithMaterialTracksHbb",
195 "hltBLifetimeRegionalPixelSeedGeneratorbbPhi",
196 "hltBLifetimeRegionalCkfTrackCandidatesbbPhi",
197 "hltBLifetimeRegionalCtfWithMaterialTracksbbPhi",
198 "hltBLifetimeBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
199 "hltBLifetimeBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
200 "hltBLifetimeBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
201 "hltBLifetimeDiBTagIP3D1stTrkRegionalPixelSeedGeneratorJet20Hbb",
202 "hltBLifetimeDiBTagIP3D1stTrkRegionalCkfTrackCandidatesJet20Hbb",
203 "hltBLifetimeDiBTagIP3D1stTrkRegionalCtfWithMaterialTracksJet20Hbb",
204 "hltBLifetimeFastRegionalPixelSeedGeneratorHbbVBF",
205 "hltBLifetimeFastRegionalCkfTrackCandidatesHbbVBF",
206 "hltBLifetimeFastRegionalCtfWithMaterialTracksHbbVBF",
207 "hltBLifetimeRegionalPixelSeedGeneratorbbPhiL1FastJetFastPV",
208 "hltBLifetimeRegionalCkfTrackCandidatesbbPhiL1FastJetFastPV",
209 "hltBLifetimeRegionalCtfWithMaterialTracksbbPhiL1FastJetFastPV",
210 "hltFastPixelBLifetimeRegionalPixelSeedGeneratorHbb",
211 "hltFastPixelBLifetimeRegionalCkfTrackCandidatesHbb",
212 "hltFastPixelBLifetimeRegionalCtfWithMaterialTracksHbb",
214 "hltPixelTracksForMinBias",
215 "hltPixelTracksForMinBias01",
216 "hltPixelTracksForHighMult",
217 "hltRegionalPixelTracks",
219 "hltPixelTracksL3Muon",
220 "hltPixelTracksGlbTrkMuon",
221 "hltPixelTracksHighPtTkMuIso",
222 "hltPixelTracksHybrid",
223 "hltPixelTracksForPhotons",
224 "hltPixelTracksForEgamma",
225 "hltPixelTracksElectrons",
226 "hltPixelTracksForHighPt",
227 "hltHighPtPixelTracks",
228 "hltPixelTracksForNoPU",
230 "hltFastPixelHitsVertex",
231 "hltFastPixelTracks",
232 "hltFastPixelTracksRecover",
234 "hltPixelLayerPairs",
235 "hltPixelLayerTriplets",
236 "hltPixelLayerTripletsReg",
237 "hltPixelLayerTripletsHITHB",
238 "hltPixelLayerTripletsHITHE",
239 "hltMixedLayerPairs",
241 "hltFastPrimaryVertexbbPhi",
242 "hltPixelTracksFastPVbbPhi",
243 "hltPixelTracksRecoverbbPhi",
244 "hltFastPixelHitsVertexVHbb",
245 "hltFastPixelTracksVHbb",
246 "hltFastPixelTracksRecoverVHbb",
248 "hltFastPrimaryVertex",
249 "hltFastPVPixelVertexFilter",
250 "hltFastPVPixelTracks",
251 "hltFastPVPixelTracksRecover",
263 "hltScalersRawToDigi",
264 "hltEcalPreshowerDigis",
266 "hltEcalDetIdToBeRecovered",
270 SequencesToRemove = (
271 "HLTL1SeededEgammaRegionalRecoTrackerSequence",
272 "HLTEcalActivityEgammaRegionalRecoTrackerSequence",
273 "HLTPixelMatchElectronActivityTrackingSequence",
274 "HLTDoLocalStripSequence",
275 "HLTDoLocalPixelSequence",
276 "HLTDoLocalPixelSequenceRegL2Tau",
277 "HLTDoLocalStripSequenceReg",
278 "HLTDoLocalPixelSequenceReg",
279 "HLTDoLocalStripSequenceRegForBTag",
280 "HLTDoLocalPixelSequenceRegForBTag",
281 "HLTDoLocalPixelSequenceRegForNoPU",
283 "HLTBeginSequenceNZS",
284 "HLTBeginSequenceBPTX",
285 "HLTBeginSequenceAntiBPTX",
286 "HLTHBHENoiseSequence",
287 "HLTIterativeTrackingIter04",
288 "HLTIterativeTrackingIter02",
289 "HLTIterativeTracking",
290 "HLTIterativeTrackingForHighPt",
291 "HLTIterativeTrackingTau3Mu",
292 "HLTIterativeTrackingReg",
293 "HLTIterativeTrackingForPA",
294 "HLTIterativeTrackingForElectronIter02",
295 "HLTIterativeTrackingForPhotonsIter02",
296 "HLTIterativeTrackingL3MuonIter02",
297 "HLTIterativeTrackingGlbTrkMuonIter02",
298 "HLTIterativeTrackingL3MuonRegIter02",
299 "HLTIterativeTrackingHighPtTkMu",
300 "HLTIterativeTrackingHighPtTkMuIsoIter02",
301 "HLTIterativeTrackingForBTagIter02",
302 "HLTIterativeTrackingForBTagIter12",
303 "HLTIterativeTrackingForTauIter04",
304 "HLTIterativeTrackingForTauIter02",
305 "HLTIterativeTrackingDisplacedJpsiIter02",
306 "HLTIterativeTrackingDisplacedPsiPrimeIter02",
307 "HLTIterativeTrackingDisplacedNRMuMuIter02",
308 "HLTIterativeTrackingForBTagIteration0",
309 "HLTIterativeTrackingIteration4DisplacedJets",
310 "HLTRegionalCKFTracksForL3Isolation",
311 "HLTHBHENoiseCleanerSequence",
315 for label
in ESModulesToRemove:
316 if (hasattr(process,label)):
317 delattr(process,label)
322 HLTSchedule = tuple( path.label_()
for path
in process.HLTSchedule)
323 for black
in fastSimUnsupportedPaths:
324 compiled = re.compile(fnmatch.translate(black))
325 for path
in HLTSchedule:
326 if compiled.search(path)
is not None:
327 ExplicitList += [path]
329 for path
in ExplicitList:
330 if path
not in UniqueList:
332 for path
in UniqueList:
333 process.schedule.remove(getattr(process,path))
334 process.setSchedule_(process.schedule)
338 if hasattr(process,
'streams'):
339 delattr(process,
'streams')
340 if hasattr(process,
'datasets'):
341 delattr(process,
'datasets')
344 for label
in SequencesToRemove:
345 if hasattr(process,label):
346 if hasattr(fastsim,label):
347 setattr(process,label,getattr(fastsim,label))
349 object = getattr(process,label)
350 list = tuple(process.sequences_().
keys())
352 sequence = getattr(process,name)
355 more = sequence.remove(object)
356 list = tuple(process.paths_().
keys())
358 path = getattr(process,name)
361 more = path.remove(object)
362 delattr(process,label)
365 for label
in ModulesToRemove:
366 if hasattr(process,label):
367 if hasattr(fastsim,label):
368 setattr(process,label,getattr(fastsim,label))
370 object = getattr(process,label)
372 list = tuple(process.sequences_().
keys())
374 sequence = getattr(process,name)
377 more = sequence.remove(object)
379 list = tuple(process.paths_().
keys())
381 path = getattr(process,name)
384 more = path.remove(object)
386 list = tuple(process.endpaths_().
keys())
388 path = getattr(process,name)
391 more = path.remove(object)
392 delattr(process,label)
395 if hasattr(process,
'hltGetConditions')
and hasattr(process,
'HLTriggerFirstPath'):
396 process.hltDummyConditions = cms.EDFilter(
"HLTBool", result = cms.bool(
True ) )
397 process.HLTriggerFirstPath.replace(process.hltGetConditions,process.hltDummyConditions)
398 if hasattr(process,
'hltPixelVertices'):
399 process.hltPixelVertices.beamSpot = cms.InputTag(
'offlineBeamSpot')
400 specialModules = (
'hltEcalRecHit',
'hltEcalPreshowerRecHit', )
401 for label
in specialModules:
402 if hasattr(process,label):
403 setattr(fastsim,label,getattr(process,label))
406 for label
in fastsim.producers_().
keys():
407 if hasattr(process,label):
408 setattr(process,label,getattr(fastsim,label))
409 for label
in fastsim.filters_().
keys():
410 if hasattr(process,label):
411 setattr(process,label,getattr(fastsim,label))
412 for label
in fastsim.analyzers_().
keys():
413 if hasattr(process,label):
414 setattr(process,label,getattr(fastsim,label))
415 for label
in fastsim.sequences_().
keys():
416 if hasattr(process,label):
417 setattr(process,label,getattr(fastsim,label))
422 (
'hltGtDigis',
'gtDigis'),
423 (
'hltL1GtObjectMap',
'gtDigis'),
424 (
'hltEcalDigis:ebDigis',
'ecalDigis:ebDigis'),
425 (
'hltEcalDigis:eeDigis',
'ecalDigis:eeDigis'),
426 (
'hltMuonCSCDigis',
'muonCSCDigis'),
427 (
'hltMuonCSCDigis:MuonCSCStripDigi',
'muonCSCDigis:MuonCSCStripDigi'),
428 (
'hltMuonCSCDigis:MuonCSCWireDigi',
'muonCSCDigis:MuonCSCWireDigi'),
429 (
'hltMuonDTDigis',
'muonDTDigis'),
430 (
'hltMuonRPCDigis',
'muonRPCDigis'),
431 (
'hltEcalPreshowerDigis',
'ecalPreshowerDigis'),
432 (
'hltHbhereco',
'hbhereco'),
433 (
'hltHoreco',
'horeco'),
434 (
'hltHfreco',
'hfreco'),
436 (
'hltIter2Merged',
'generalTracks'),
437 (
'hltIter2HighPtMerged',
'generalTracks'),
438 (
'hltIter2MergedForElectrons',
'generalTracks'),
439 (
'hltIter2MergedForPhotons',
'generalTracks'),
440 (
'hltIter2L3MuonMerged',
'generalTracks'),
441 (
'hltIter2MergedForBTag',
'generalTracks'),
442 (
'hltIter2MergedForTau',
'generalTracks'),
443 (
'hltIter2GlbTrkMuonMerged',
'generalTracks'),
444 (
'hltIter2HighPtTkMuMerged',
'generalTracks'),
445 (
'hltIter2HighPtTkMuIsoMerged',
'generalTracks'),
446 (
'hltIter2DisplacedJpsiMerged',
'generalTracks'),
447 (
'hltIter2DisplacedPsiPrimeMerged',
'generalTracks'),
448 (
'hltIter2DisplacedNRMuMuMerged',
'generalTracks'),
449 (
'hltIter0PFlowTrackSelectionHighPurityForBTag',
'generalTracks'),
450 (
'hltIter4HighPtMerged',
'generalTracks'),
451 (
'hltIterativeTrackingForPAMerged',
'generalTracks'),
453 (
'hltFastPVPixelTracks',
'hltPixelTracks'),
454 (
'hltFastPVPixelTracksRecover',
'hltPixelTracks'),
455 (
'hltPixelTracksL3Muon',
'hltPixelTracks'),
456 (
'hltPixelTracksGlbTrkMuon',
'hltPixelTracks'),
457 (
'hltPixelTracksHighPtTkMuIso',
'hltPixelTracks'),
458 (
'hltPixelTracksHybrid',
'hltPixelTracks'),
459 (
'hltPixelTracksForPhotons',
'hltPixelTracks'),
460 (
'hltPixelTracksForEgamma',
'hltPixelTracks'),
461 (
'hltPixelTracksElectrons',
'hltPixelTracks'),
462 (
'hltPixelTracksForHighPt',
'hltPixelTracks'),
463 (
'hltHighPtPixelTracks',
'hltPixelTracks'),
464 (
'hltPixelTracksForNoPU',
'hltPixelTracks'),
466 (
'hltL1extraParticles',
'l1extraParticles'),
467 (
'hltL1extraParticles:Central',
'l1extraParticles:Central'),
468 (
'hltL1extraParticles:Forward',
'l1extraParticles:Forward'),
469 (
'hltL1extraParticles:Isolated',
'l1extraParticles:Isolated'),
470 (
'hltL1extraParticles:NonIsolated',
'l1extraParticles:NonIsolated'),
471 (
'hltL1extraParticles:Tau',
'l1extraParticles:Tau'),
472 (
'hltL1extraParticles:IsoTau',
'l1extraParticles:IsoTau'),
473 (
'hltOfflineBeamSpot',
'offlineBeamSpot'),
474 (
'hltOnlineBeamSpot',
'offlineBeamSpot'),
475 (
'hltSiStripClusters',
'MeasurementTrackerEvent'),
478 from HLTrigger.Configuration.CustomConfigs
import MassReplaceInputTag
479 for pair
in InputTags:
484 (
'GMTReadoutCollection',cms.InputTag(
'gtDigis'),cms.InputTag(
'gmtDigis')),
485 (
'killDeadChannels',cms.bool(
True),cms.bool(
False)),
486 (
'recoverEBFE',cms.bool(
True),cms.bool(
False)),
487 (
'recoverEEFE',cms.bool(
True),cms.bool(
False)),
488 (
'src',cms.InputTag(
'hltHcalTowerNoiseCleaner'),cms.InputTag(
'hltTowerMakerForAll')),
489 (
'src',cms.InputTag(
'hltHcalTowerNoiseCleanerWithrechit'),cms.InputTag(
'hltTowerMakerForAll')),
490 (
'initialSeeds',cms.InputTag(
'noSeedsHere'),cms.InputTag(
'hltPixelPairSeeds')),
491 (
'preFilteredSeeds',cms.bool(
True),cms.bool(
False)),
493 from HLTrigger.Configuration.CustomConfigs
import MassReplaceParameter
494 for thrice
in NamedParameters:
498 for label
in (
'hltEgammaElectronPixelSeeds',
'hltEgammaElectronPixelSeedsUnseeded',):
499 if hasattr(process,label):
500 getattr(process,label).SeedConfiguration.initialSeeds = cms.InputTag(
'hltPixelPairSeeds')
501 getattr(process,label).SeedConfiguration.preFilteredSeeds = cms.bool(
False)
504 fastsim.extend(process)
505 fastsim.setSchedule_(fastsim.schedule)