1 from __future__
import print_function
3 import FWCore.ParameterSet.Config
as cms
4 from Configuration.Eras.Modifier_stage2L1Trigger_cff
import stage2L1Trigger
5 from Configuration.Eras.Modifier_stage2L1Trigger_2017_cff
import stage2L1Trigger_2017
6 from Configuration.Eras.Modifier_run3_GEM_cff
import run3_GEM
9 process.load(
"L1Trigger.L1TCalorimeter.caloStage2Params_HWConfig_cfi")
13 from L1Trigger.L1TCaloLayer1.simCaloStage2Layer1Digis_cfi
import simCaloStage2Layer1Digis
as simCaloStage2BitwiseLayer1Digis
14 from L1Trigger.L1TCalorimeter.simCaloStage2Digis_cfi
import simCaloStage2Digis
as simCaloStage2BitwiseDigis
15 process.simCaloStage2BitwiseLayer1Digis = simCaloStage2BitwiseLayer1Digis.clone()
16 process.simCaloStage2BitwiseLayer1Digis.ecalToken = cms.InputTag(
"ecalDigis:EcalTriggerPrimitives")
17 process.simCaloStage2BitwiseDigis = simCaloStage2BitwiseDigis.clone()
18 process.simCaloStage2BitwiseDigis.towerToken = cms.InputTag(
"simCaloStage2BitwiseLayer1Digis")
19 process.SimL1TCalorimeter = cms.Sequence( process.simCaloStage2Layer1Digis + process.simCaloStage2Digis + process.simCaloStage2BitwiseLayer1Digis + process.simCaloStage2BitwiseDigis)
21 process.l1UpgradeBitwiseTree = l1UpgradeTree.clone()
22 process.l1UpgradeBitwiseTree.egToken = cms.untracked.InputTag(
"simCaloStage2BitwiseDigis")
23 process.l1UpgradeBitwiseTree.tauTokens = cms.untracked.VInputTag(
"simCaloStage2BitwiseDigis")
24 process.l1UpgradeBitwiseTree.jetToken = cms.untracked.InputTag(
"simCaloStage2BitwiseDigis")
25 process.l1UpgradeBitwiseTree.muonToken = cms.untracked.InputTag(
"simGmtStage2Digis")
26 process.l1UpgradeBitwiseTree.sumToken = cms.untracked.InputTag(
"simCaloStage2BitwiseDigis")
27 process.l1ntuplebitwise = cms.Path(
28 process.l1UpgradeBitwiseTree
30 process.schedule.append(process.l1ntuplebitwise)
31 print(
"# modified L1TReEmul: ")
37 process.es_pool_hf1x1 = cms.ESSource(
40 timetype = cms.string(
'runnumber'),
42 cms.PSet(record = cms.string(
"HcalLutMetadataRcd"),
43 tag = cms.string(
"HcalLutMetadata_HFTP_1x1")
45 cms.PSet(record = cms.string(
"HcalElectronicsMapRcd"),
46 tag = cms.string(
"HcalElectronicsMap_HFTP_1x1")
49 connect = cms.string(
'frontier://FrontierProd/CMS_CONDITIONS'),
50 authenticationMethod = cms.untracked.uint32(0)
52 process.es_prefer_es_pool_hf1x1 = cms.ESPrefer(
"PoolDBESSource",
"es_pool_hf1x1")
56 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
57 process.load(
'L1Trigger.Configuration.CaloTriggerPrimitives_cff')
58 process.simEcalTriggerPrimitiveDigis.Label =
'ecalDigis'
59 process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
60 cms.InputTag(
'hcalDigis'),
61 cms.InputTag(
'hcalDigis')
63 process.L1TReEmul = cms.Sequence(process.simEcalTriggerPrimitiveDigis * process.simHcalTriggerPrimitiveDigis * process.SimL1Emulator)
64 process.simDtTriggerPrimitiveDigis.digiTag =
'muonDTDigis'
65 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi')
66 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
68 stage2L1Trigger.toModify(process.simTwinMuxDigis,
69 RPC_Source =
'muonRPCDigis',
71 DTDigi_Source =
"dttfDigis",
72 DTThetaDigi_Source =
"dttfDigis"
74 stage2L1Trigger.toModify(process.simOmtfDigis,
75 srcRPC =
'muonRPCDigis',
78 stage2L1Trigger.toModify(process.simBmtfDigis,
79 DTDigi_Source =
"simTwinMuxDigis",
80 DTDigi_Theta_Source =
"dttfDigis"
82 stage2L1Trigger.toModify(process.simKBmtfStubs,
83 srcPhi =
"simTwinMuxDigis",
84 srcTheta =
"dttfDigis"
86 stage2L1Trigger.toModify(process.simEmtfDigis,
87 CSCInput =
"csctfDigis",
88 RPCInput =
'muonRPCDigis'
90 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"ecalDigis:EcalTriggerPrimitives")
92 stage2L1Trigger.toModify(process.caloStage2Digis, MinFeds = 0)
93 stage2L1Trigger.toModify(process.gmtStage2Digis, MinFeds = 0)
94 stage2L1Trigger.toModify(process.gtStage2Digis, MinFeds = 0)
96 (~stage2L1Trigger).toModify(process.simRctDigis,
97 ecalDigis = [
'simEcalTriggerPrimitiveDigis'],
98 hcalDigis = [
'simHcalTriggerPrimitiveDigis']
100 (~stage2L1Trigger).toModify(process.simRpcTriggerDigis, label =
'muonRPCDigis')
101 (~stage2L1Trigger).toModify(process.simRpcTechTrigDigis, RPCDigiLabel =
'muonRPCDigis')
103 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
104 process.schedule.append(process.L1TReEmulPath)
106 print(
"# L1TReEmul sequence: ")
113 stage2L1Trigger.toModify(process.simEmtfDigis, CSCInput =
'simCscTriggerPrimitiveDigis:MPCSORTED')
114 stage2L1Trigger.toModify(process.simOmtfDigis, srcCSC =
'simCscTriggerPrimitiveDigis:MPCSORTED')
119 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
123 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
124 process.load(
'L1Trigger.Configuration.CaloTriggerPrimitives_cff')
125 process.simEcalTriggerPrimitiveDigis.Label =
'ecalDigis'
126 process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
127 cms.InputTag(
'hcalDigis'),
128 cms.InputTag(
'hcalDigis')
130 process.simHcalTriggerPrimitiveDigis.inputUpgradeLabel = cms.VInputTag(
131 cms.InputTag(
'hcalDigis'),
132 cms.InputTag(
'hcalDigis')
134 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi')
135 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
136 process.L1TReEmul = cms.Sequence(process.simEcalTriggerPrimitiveDigis * process.simHcalTriggerPrimitiveDigis * process.SimL1Emulator)
143 stage2L1Trigger.toModify(process.simTwinMuxDigis,
144 RPC_Source =
'rpcTwinMuxRawToDigi',
145 DTDigi_Source =
'twinMuxStage2Digis:PhIn',
146 DTThetaDigi_Source =
'twinMuxStage2Digis:ThIn'
149 stage2L1Trigger.toModify(process.simBmtfDigis,
150 DTDigi_Source =
"simTwinMuxDigis",
151 DTDigi_Theta_Source =
"bmtfDigis"
154 stage2L1Trigger.toModify(process.simKBmtfStubs,
155 srcPhi =
'simTwinMuxDigis',
156 srcTheta =
'bmtfDigis'
159 stage2L1Trigger.toModify(process.simOmtfDigis,
160 srcRPC =
'muonRPCDigis',
161 srcCSC =
'csctfDigis',
162 srcDTPh =
'bmtfDigis',
163 srcDTTh =
'bmtfDigis'
166 stage2L1Trigger.toModify(process.simEmtfDigis,
167 CSCInput =
'emtfStage2Digis',
168 RPCInput =
'muonRPCDigis'
171 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
172 ecalToken =
'ecalDigis:EcalTriggerPrimitives',
173 hcalToken =
'hcalDigis:'
176 (~stage2L1Trigger).toModify(process.simRctDigis,
177 ecalDigis = [
'ecalDigis:EcalTriggerPrimitives'],
178 hcalDigis = [
'hcalDigis:']
180 (~stage2L1Trigger).toModify(process.simRpcTriggerDigis, label =
'muonRPCDigis')
182 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
183 process.schedule.append(process.L1TReEmulPath)
190 stage2L1Trigger_2017.toModify(process.simOmtfDigis,
191 srcRPC =
'omtfStage2Digis',
192 srcCSC =
'omtfStage2Digis',
193 srcDTPh =
'omtfStage2Digis',
194 srcDTTh =
'omtfStage2Digis'
197 stage2L1Trigger.toModify(process.simEmtfDigis,
198 CSCInput = cms.InputTag(
'emtfStage2Digis'),
199 RPCInput = cms.InputTag(
'muonRPCDigis'),
200 CPPFInput = cms.InputTag(
'emtfStage2Digis'),
201 GEMEnable = cms.bool(
False),
202 GEMInput = cms.InputTag(
'muonGEMPadDigis'),
203 CPPFEnable = cms.bool(
True),
206 run3_GEM.toModify(process.simMuonGEMPadDigis,
207 InputCollection =
'muonGEMDigis',
210 run3_GEM.toModify(process.simTwinMuxDigis,
211 RPC_Source =
'rpcTwinMuxRawToDigi',
212 DTDigi_Source =
'simDtTriggerPrimitiveDigis',
213 DTThetaDigi_Source =
'simDtTriggerPrimitiveDigis'
216 print(
"# L1TReEmul sequence: ")
223 process.simGtStage2Digis.MuonInputTag = cms.InputTag(
"gtStage2Digis",
"Muon")
228 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
229 process.L1TReEmul = cms.Sequence(process.SimL1TGlobal)
230 stage2L1Trigger_2017.toModify(process.simGtStage2Digis,
231 ExtInputTag =
"hltGtStage2Digis",
232 MuonInputTag =
"hltGtStage2Digis:Muon",
233 EtSumInputTag =
"hltGtStage2Digis:EtSum",
234 EGammaInputTag =
"hltGtStage2Digis:EGamma",
235 TauInputTag =
"hltGtStage2Digis:Tau",
236 JetInputTag =
"hltGtStage2Digis:Jet"
239 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
240 process.schedule.append(process.L1TReEmulPath)
242 print (
"# L1TReEmul sequence: ")
243 print (
"# {0}".
format(process.L1TReEmul))
244 print (
"# {0}".
format(process.schedule))
248 process.load(
'L1Trigger.Configuration.SimL1CaloEmulator_cff')
249 process.L1TReEmul = cms.Sequence(process.SimL1CaloEmulator)
250 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag(
'ecalDigis:EcalTriggerPrimitives')
251 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag(
'hcalDigis:')
252 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
253 process.schedule.append(process.L1TReEmulPath)
255 print (
"# L1TReEmul sequence: ")
256 print (
"# {0}".
format(process.L1TReEmul))
257 print (
"# {0}".
format(process.schedule))
262 stage2L1Trigger.toModify(process.simEmtfDigis, CSCInput =
'simCscTriggerPrimitiveDigis:MPCSORTED')
263 stage2L1Trigger.toModify(process.simOmtfDigis, srcCSC =
'simCscTriggerPrimitiveDigis:MPCSORTED')
268 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
273 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
278 stage2L1Trigger.toModify(process.simHcalTriggerPrimitiveDigis,
280 'simHcalUnsuppressedDigis',
281 'simHcalUnsuppressedDigis'
283 inputUpgradeLabel = [
284 'simHcalUnsuppressedDigis:HBHEQIE11DigiCollection',
285 'simHcalUnsuppressedDigis:HFQIE10DigiCollection'
288 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
296 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
297 ecalToken =
"simEcalTriggerPrimitiveDigis",
298 hcalToken =
'simHcalTriggerPrimitiveDigis'
304 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
309 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
315 stage2L1Trigger.toModify(process.simTwinMuxDigis,
316 RPC_Source =
'muonRPCDigis',
317 DTDigi_Source =
'simDtTriggerPrimitiveDigis',
318 DTThetaDigi_Source =
'simDtTriggerPrimitiveDigis'
321 stage2L1Trigger.toModify(process.simBmtfDigis,
322 DTDigi_Source =
'simTwinMuxDigis',
323 DTDigi_Theta_Source =
'simDtTriggerPrimitiveDigis'
326 stage2L1Trigger.toModify(process.simKBmtfStubs,
327 srcPhi =
"simTwinMuxDigis",
328 srcTheta =
"simDtTriggerPrimitiveDigis"
331 stage2L1Trigger.toModify(process.simOmtfDigis,
332 srcRPC =
'muonRPCDigis',
333 srcCSC =
'simCscTriggerPrimitiveDigis',
334 srcDTPh =
'simDtTriggerPrimitiveDigis',
335 srcDTTh =
'simDtTriggerPrimitiveDigis'
338 stage2L1Trigger.toModify(process.simEmtfDigis,
339 CSCInput =
'simCscTriggerPrimitiveDigis',
340 RPCInput =
'muonRPCDigis'
343 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
344 ecalToken =
"simEcalTriggerPrimitiveDigis",
345 hcalToken =
'simHcalTriggerPrimitiveDigis'
350 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
351 process.load(
'L1Trigger.Configuration.CaloTriggerPrimitives_cff')
352 process.simEcalTriggerPrimitiveDigis.Label =
'ecalDigis'
353 process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
354 cms.InputTag(
'hcalDigis'),
355 cms.InputTag(
'hcalDigis')
359 process.load(
'L1Trigger.L1TCommon.muonLegacyInStage2FormatDigis_cfi')
360 process.muonLegacyInStage2FormatDigis.muonSource = cms.InputTag(
'simGmtDigis')
364 process.simDtTriggerPrimitiveDigis = dtTriggerPrimitiveDigis.clone()
365 process.simDtTriggerPrimitiveDigis.digiTag = cms.InputTag(
'muonDTDigis')
369 process.simTwinMuxDigisForDttf = simTwinMuxDigis.clone()
370 process.simTwinMuxDigisForDttf.RPC_Source = cms.InputTag(
'muonRPCDigis')
371 process.simTwinMuxDigisForDttf.DTDigi_Source = cms.InputTag(
'bmtfDigis')
372 process.simTwinMuxDigisForDttf.DTThetaDigi_Source = cms.InputTag(
'bmtfDigis')
376 process.simCscTriggerPrimitiveDigis = cscTriggerPrimitiveDigis.clone()
377 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi' )
378 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
383 process.simCsctfTrackDigis = csctfTrackDigis.clone()
384 process.simCsctfTrackDigis.SectorReceiverInput = cms.untracked.InputTag(
'csctfDigis' )
385 process.simCsctfTrackDigis.DTproducer =
'simDtTriggerPrimitiveDigis'
387 process.simCsctfDigis = csctfDigis.clone()
388 process.simCsctfDigis.CSCTrackProducer =
'simCsctfTrackDigis'
393 process.simDttfDigis = dttfDigis.clone()
394 process.simDttfDigis.DTDigi_Source =
'simTwinMuxDigisForDttf'
395 process.simDttfDigis.CSCStub_Source =
'simCsctfTrackDigis'
400 process.load(
'L1Trigger.RPCTrigger.RPCConeConfig_cff')
401 process.simRpcTriggerDigis = rpcTriggerDigis.clone()
402 process.simRpcTriggerDigis.label =
'muonRPCDigis'
403 process.simRpcTriggerDigis.RPCTriggerDebug = cms.untracked.int32(1)
409 process.simGmtDigis = gmtDigis.clone()
410 process.simGmtDigis.DTCandidates = cms.InputTag(
'simDttfDigis',
'DT' )
411 process.simGmtDigis.CSCCandidates = cms.InputTag(
'simCsctfDigis',
'CSC' )
412 process.simGmtDigis.RPCbCandidates = cms.InputTag(
'simRpcTriggerDigis',
'RPCb' )
413 process.simGmtDigis.RPCfCandidates = cms.InputTag(
'simRpcTriggerDigis',
'RPCf' )
419 process.simBmtfDigis.DTDigi_Source = cms.InputTag(
'bmtfDigis')
420 process.simBmtfDigis.DTDigi_Theta_Source = cms.InputTag(
'bmtfDigis')
422 process.simTwinMuxDigis.RPC_Source = cms.InputTag(
'muonRPCDigis')
423 process.simTwinMuxDigis.DTDigi_Source = cms.InputTag(
'bmtfDigis')
424 process.simTwinMuxDigis.DTThetaDigi_Source = cms.InputTag(
'bmtfDigis')
426 process.simOmtfDigis.srcRPC = cms.InputTag(
'muonRPCDigis')
427 process.simOmtfDigis.srcCSC = cms.InputTag(
'csctfDigis')
428 process.simOmtfDigis.srcDTPh = cms.InputTag(
'bmtfDigis')
429 process.simOmtfDigis.srcDTTh = cms.InputTag(
'bmtfDigis')
431 process.simEmtfDigis.CSCInput = cms.InputTag(
'emtfStage2Digis')
432 process.simEmtfDigis.RPCInput = cms.InputTag(
'muonRPCDigis')
434 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag(
'ecalDigis:EcalTriggerPrimitives')
435 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag(
'hcalDigis:')
439 process.L1TMuonTriggerPrimitives = cms.Sequence(process.simCscTriggerPrimitiveDigis + process.simDtTriggerPrimitiveDigis + process.simTwinMuxDigisForDttf)
441 process.L1TReEmul = cms.Sequence(process.L1TMuonTriggerPrimitives + process.simCsctfTrackDigis + process.simCsctfDigis + process.simDttfDigis + process.simRpcTriggerDigis + process.simGmtDigis + process.muonLegacyInStage2FormatDigis)
443 process.load(
'L1Trigger.L1TMuon.simMuonQualityAdjusterDigis_cfi')
445 process.L1TReEmul = cms.Sequence( process.L1TReEmul + process.simTwinMuxDigis + process.simBmtfDigis + process.simEmtfDigis + process.simOmtfDigis + process.simGmtCaloSumDigis + process.simMuonQualityAdjusterDigis + process.simGmtStage2Digis)
447 process.L1TReEmul = cms.Sequence( process.L1TReEmul + process.SimL1TechnicalTriggers + process.SimL1TGlobal )
449 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
450 process.schedule.append(process.L1TReEmulPath)
451 print(
"# L1TReEmul sequence: ")