1 import FWCore.ParameterSet.Config
as cms
5 from FWCore.ParameterSet.MassReplace
import massReplaceInputTag
as MassReplaceInputTag
6 from FWCore.ParameterSet.MassReplace
import massReplaceParameter
as MassReplaceParameter
11 if 'hltTrigReport' in process.__dict__:
12 process.hltTrigReport.HLTriggerResults = cms.InputTag(
'TriggerResults',
'',process.name_() )
20 process.options.wantSummary = cms.untracked.bool(
True)
21 process.options.numberOfThreads = cms.untracked.uint32( 4 )
22 process.options.numberOfStreams = cms.untracked.uint32( 0 )
23 process.options.sizeOfStackForThreadsInKB = cms.untracked.uint32( 10*1024 )
25 process.MessageLogger.categories.append(
'TriggerSummaryProducerAOD')
26 process.MessageLogger.categories.append(
'L1GtTrigReport')
27 process.MessageLogger.categories.append(
'L1TGlobalSummary')
28 process.MessageLogger.categories.append(
'HLTrigReport')
46 def _legacyStage1(process):
47 labels = [
'gtDigis',
'simGtDigis',
'newGtDigis',
'hltGtDigis']
49 if label
in process.__dict__:
50 process.load(
'L1Trigger.GlobalTriggerAnalyzer.l1GtTrigReport_cfi')
51 process.l1GtTrigReport.L1GtRecordInputTag = cms.InputTag( label )
52 process.L1AnalyzerEndpath = cms.EndPath( process.l1GtTrigReport )
53 process.schedule.append(process.L1AnalyzerEndpath)
56 labels = [
'gtStage2Digis',
'simGtStage2Digis',
'newGtStage2Digis',
'hltGtStage2Digis']
58 if label
in process.__dict__:
59 process.load(
'L1Trigger.L1TGlobal.L1TGlobalSummary_cfi')
60 process.L1TGlobalSummary.AlgInputTag = cms.InputTag( label )
61 process.L1TGlobalSummary.ExtInputTag = cms.InputTag( label )
62 process.L1TAnalyzerEndpath = cms.EndPath(process.L1TGlobalSummary )
63 process.schedule.append(process.L1TAnalyzerEndpath)
65 from Configuration.Eras.Modifier_stage2L1Trigger_cff
import stage2L1Trigger
66 (~stage2L1Trigger).toModify(process, _legacyStage1)
67 stage2L1Trigger.toModify(process, _stage2)
69 if hasattr(process,
'TriggerMenu'):
70 delattr(process,
'TriggerMenu')
80 if not (
'HLTAnalyzerEndpath' in process.__dict__) :
81 def _legacyStage1(process):
82 if 'hltGtDigis' in process.__dict__:
83 from HLTrigger.Configuration.HLT_Fake_cff
import fragment
84 process.hltL1GtTrigReport = fragment.hltL1GtTrigReport
85 process.hltTrigReport = fragment.hltTrigReport
86 process.HLTAnalyzerEndpath = cms.EndPath(process.hltGtDigis + process.hltL1GtTrigReport + process.hltTrigReport)
87 process.schedule.append(process.HLTAnalyzerEndpath)
90 if 'hltGtStage2ObjectMap' in process.__dict__:
91 from HLTrigger.Configuration.HLT_FULL_cff
import fragment
92 process.hltL1TGlobalSummary = fragment.hltL1TGlobalSummary
93 process.hltTrigReport = fragment.hltTrigReport
94 process.HLTAnalyzerEndpath = cms.EndPath(process.hltGtStage2Digis + process.hltL1TGlobalSummary + process.hltTrigReport)
95 process.schedule.append(process.HLTAnalyzerEndpath)
97 from Configuration.Eras.Modifier_stage2L1Trigger_cff
import stage2L1Trigger
98 (~stage2L1Trigger).toModify(process, _legacyStage1)
99 stage2L1Trigger.toModify(process, _stage2)
101 if hasattr(process,
'TriggerMenu'):
102 delattr(process,
'TriggerMenu')
104 process=
Base(process)
111 process.source.inputCommands = cms.untracked.vstring (
113 'drop *_hltL1GtObjectMap_*_*',
114 'drop *_TriggerResults_*_*',
115 'drop *_hltTriggerSummaryAOD_*_*',
118 process=
Base(process)
127 l1repack = cms.Process(
'L1REPACK',Run2_2018)
128 l1repack.load(
'Configuration.StandardSequences.SimL1EmulatorRepack_'+sequence+
'_cff')
130 for module
in l1repack.es_sources_():
131 if (
not hasattr(process,module)):
132 setattr(process,module,getattr(l1repack,module))
133 for module
in l1repack.es_producers_():
134 if (
not hasattr(process,module)):
135 setattr(process,module,getattr(l1repack,module))
137 for module
in l1repack.SimL1Emulator.expandAndClone().moduleNames():
138 setattr(process,module,getattr(l1repack,module))
139 for task
in l1repack.tasks_():
140 setattr(process,task,getattr(l1repack,task))
141 for sequence
in l1repack.sequences_():
142 setattr(process,sequence,getattr(l1repack,sequence))
143 process.SimL1Emulator = l1repack.SimL1Emulator
145 for path
in process.paths_():
146 getattr(process,path).
insert(0,process.SimL1Emulator)
147 for path
in process.endpaths_():
148 getattr(process,path).
insert(0,process.SimL1Emulator)
151 cleanupL1T = (
'SimL1TCalorimeter' 152 ,
'SimL1TCalorimeterTask' 154 ,
'SimL1TMuonCommonTask' 157 ,
'SimL1TechnicalTriggers' 158 ,
'SimL1TechnicalTriggersTask' 160 ,
'SimL1EmulatorCoreTask' 167 ,
'me0TriggerPseudoDigis' 168 ,
'me0TriggerPseudoDigiTask' 169 ,
'hgcalTriggerPrimitives' 170 ,
'hgcalTriggerPrimitivesTask' 173 ,
'hgcalBackEndLayer2' 174 ,
'hgcalBackEndLayer2Producer' 176 ,
'hgcalTowerMapProducer' 178 ,
'hgcalConcentratorProducer' 179 ,
'hgcalBackEndLayer1' 180 ,
'hgcalBackEndLayer1Producer' 182 ,
'hgcalTowerProducer' 183 ,
'hgcalTriggerGeometryESProducer')
184 for obj
in cleanupL1T:
185 if hasattr(process,obj):
194 if ((xmlFile
is None)
or (xmlFile==
"")):
197 process.L1TriggerMenu= cms.ESProducer(
"L1TUtmTriggerMenuESProducer",
198 L1TriggerMenuFile= cms.string(xmlFile)
200 process.ESPreferL1TXML = cms.ESPrefer(
"L1TUtmTriggerMenuESProducer",
"L1TriggerMenu")
def L1T(process)
override the GlobalTag, connection string and pfnPrefix if 'GlobalTag' in process.__dict__: process.GlobalTag.connect = 'frontier://FrontierProd/CMS_CONDITIONS' process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://Frontie#rProd/')
def HLTDropPrevious(process)
def L1XML(process, xmlFile=None)
def L1REPACK(process, sequence="Full")
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)