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
8 process.load(
"L1Trigger.L1TCalorimeter.caloStage2Params_HWConfig_cfi")
12 from L1Trigger.L1TCaloLayer1.simCaloStage2Layer1Digis_cfi
import simCaloStage2Layer1Digis
as simCaloStage2BitwiseLayer1Digis
13 from L1Trigger.L1TCalorimeter.simCaloStage2Digis_cfi
import simCaloStage2Digis
as simCaloStage2BitwiseDigis
14 process.simCaloStage2BitwiseLayer1Digis = simCaloStage2BitwiseLayer1Digis.clone()
15 process.simCaloStage2BitwiseLayer1Digis.ecalToken = cms.InputTag(
"ecalDigis:EcalTriggerPrimitives")
16 process.simCaloStage2BitwiseDigis = simCaloStage2BitwiseDigis.clone()
17 process.simCaloStage2BitwiseDigis.towerToken = cms.InputTag(
"simCaloStage2BitwiseLayer1Digis")
18 process.SimL1TCalorimeter = cms.Sequence( process.simCaloStage2Layer1Digis + process.simCaloStage2Digis + process.simCaloStage2BitwiseLayer1Digis + process.simCaloStage2BitwiseDigis)
20 process.l1UpgradeBitwiseTree = l1UpgradeTree.clone()
21 process.l1UpgradeBitwiseTree.egToken = cms.untracked.InputTag(
"simCaloStage2BitwiseDigis")
22 process.l1UpgradeBitwiseTree.tauTokens = cms.untracked.VInputTag(
"simCaloStage2BitwiseDigis")
23 process.l1UpgradeBitwiseTree.jetToken = cms.untracked.InputTag(
"simCaloStage2BitwiseDigis")
24 process.l1UpgradeBitwiseTree.muonToken = cms.untracked.InputTag(
"simGmtStage2Digis")
25 process.l1UpgradeBitwiseTree.sumToken = cms.untracked.InputTag(
"simCaloStage2BitwiseDigis")
26 process.l1ntuplebitwise = cms.Path(
27 process.l1UpgradeBitwiseTree
29 process.schedule.append(process.l1ntuplebitwise)
30 print(
"# modified L1TReEmul: ")
36 process.es_pool_hf1x1 = cms.ESSource(
39 timetype = cms.string(
'runnumber'),
41 cms.PSet(record = cms.string(
"HcalLutMetadataRcd"),
42 tag = cms.string(
"HcalLutMetadata_HFTP_1x1")
44 cms.PSet(record = cms.string(
"HcalElectronicsMapRcd"),
45 tag = cms.string(
"HcalElectronicsMap_HFTP_1x1")
48 connect = cms.string(
'frontier://FrontierProd/CMS_CONDITIONS'),
49 authenticationMethod = cms.untracked.uint32(0)
51 process.es_prefer_es_pool_hf1x1 = cms.ESPrefer(
"PoolDBESSource",
"es_pool_hf1x1")
55 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
56 process.load(
'L1Trigger.Configuration.CaloTriggerPrimitives_cff')
57 process.simEcalTriggerPrimitiveDigis.Label =
'ecalDigis'
58 process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
59 cms.InputTag(
'hcalDigis'),
60 cms.InputTag(
'hcalDigis')
62 process.L1TReEmul = cms.Sequence(process.simEcalTriggerPrimitiveDigis * process.simHcalTriggerPrimitiveDigis * process.SimL1Emulator)
63 process.simDtTriggerPrimitiveDigis.digiTag =
'muonDTDigis'
64 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi')
65 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
67 stage2L1Trigger.toModify(process.simTwinMuxDigis,
68 RPC_Source =
'muonRPCDigis',
70 DTDigi_Source =
"dttfDigis",
71 DTThetaDigi_Source =
"dttfDigis"
73 stage2L1Trigger.toModify(process.simOmtfDigis,
74 srcRPC =
'muonRPCDigis',
77 stage2L1Trigger.toModify(process.simBmtfDigis,
78 DTDigi_Source =
"simTwinMuxDigis",
79 DTDigi_Theta_Source =
"dttfDigis"
81 stage2L1Trigger.toModify(process.simKBmtfStubs,
82 srcPhi =
"simTwinMuxDigis",
83 srcTheta =
"dttfDigis"
85 stage2L1Trigger.toModify(process.simEmtfDigis,
86 CSCInput =
"csctfDigis",
87 RPCInput =
'muonRPCDigis'
89 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"ecalDigis:EcalTriggerPrimitives")
91 stage2L1Trigger.toModify(process.caloStage2Digis, MinFeds = 0)
92 stage2L1Trigger.toModify(process.gmtStage2Digis, MinFeds = 0)
93 stage2L1Trigger.toModify(process.gtStage2Digis, MinFeds = 0)
95 (~stage2L1Trigger).toModify(process.simRctDigis,
96 ecalDigis = [
'simEcalTriggerPrimitiveDigis'],
97 hcalDigis = [
'simHcalTriggerPrimitiveDigis']
99 (~stage2L1Trigger).toModify(process.simRpcTriggerDigis, label =
'muonRPCDigis')
100 (~stage2L1Trigger).toModify(process.simRpcTechTrigDigis, RPCDigiLabel =
'muonRPCDigis')
102 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
103 process.schedule.append(process.L1TReEmulPath)
105 print(
"# L1TReEmul sequence: ")
112 stage2L1Trigger.toModify(process.simEmtfDigis, CSCInput =
'simCscTriggerPrimitiveDigis:MPCSORTED')
113 stage2L1Trigger.toModify(process.simOmtfDigis, srcCSC =
'simCscTriggerPrimitiveDigis:MPCSORTED')
118 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
122 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
123 process.load(
'L1Trigger.Configuration.CaloTriggerPrimitives_cff')
124 process.simEcalTriggerPrimitiveDigis.Label =
'ecalDigis'
125 process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
126 cms.InputTag(
'hcalDigis'),
127 cms.InputTag(
'hcalDigis')
129 process.simHcalTriggerPrimitiveDigis.inputUpgradeLabel = cms.VInputTag(
130 cms.InputTag(
'hcalDigis'),
131 cms.InputTag(
'hcalDigis')
133 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi')
134 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
135 process.L1TReEmul = cms.Sequence(process.simEcalTriggerPrimitiveDigis * process.simHcalTriggerPrimitiveDigis * process.SimL1Emulator)
141 stage2L1Trigger.toModify(process.simTwinMuxDigis,
142 RPC_Source =
'RPCTwinMuxRawToDigi',
143 DTDigi_Source =
'twinMuxStage2Digis:PhIn',
144 DTThetaDigi_Source =
'twinMuxStage2Digis:ThIn'
147 stage2L1Trigger.toModify(process.simBmtfDigis,
148 DTDigi_Source =
"simTwinMuxDigis",
149 DTDigi_Theta_Source =
"bmtfDigis"
152 stage2L1Trigger.toModify(process.simKBmtfStubs,
153 srcPhi =
'simTwinMuxDigis',
154 srcTheta =
'bmtfDigis'
157 stage2L1Trigger.toModify(process.simOmtfDigis,
158 srcRPC =
'muonRPCDigis',
159 srcCSC =
'csctfDigis',
160 srcDTPh =
'bmtfDigis',
161 srcDTTh =
'bmtfDigis'
164 stage2L1Trigger.toModify(process.simEmtfDigis,
165 CSCInput =
'emtfStage2Digis',
166 RPCInput =
'muonRPCDigis'
169 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
170 ecalToken =
'ecalDigis:EcalTriggerPrimitives',
171 hcalToken =
'hcalDigis:'
174 (~stage2L1Trigger).toModify(process.simRctDigis,
175 ecalDigis = [
'ecalDigis:EcalTriggerPrimitives'],
176 hcalDigis = [
'hcalDigis:']
178 (~stage2L1Trigger).toModify(process.simRpcTriggerDigis, label =
'muonRPCDigis')
180 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
181 process.schedule.append(process.L1TReEmulPath)
187 stage2L1Trigger_2017.toModify(process.simOmtfDigis,
188 srcRPC =
'omtfStage2Digis',
189 srcCSC =
'omtfStage2Digis',
190 srcDTPh =
'omtfStage2Digis',
191 srcDTTh =
'omtfStage2Digis'
194 print(
"# L1TReEmul sequence: ")
201 process.simGtStage2Digis.MuonInputTag = cms.InputTag(
"gtStage2Digis",
"Muon")
206 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
207 process.L1TReEmul = cms.Sequence(process.SimL1TGlobal)
208 stage2L1Trigger_2017.toModify(process.simGtStage2Digis,
209 ExtInputTag =
"hltGtStage2Digis",
210 MuonInputTag =
"hltGtStage2Digis:Muon",
211 EtSumInputTag =
"hltGtStage2Digis:EtSum",
212 EGammaInputTag =
"hltGtStage2Digis:EGamma",
213 TauInputTag =
"hltGtStage2Digis:Tau",
214 JetInputTag =
"hltGtStage2Digis:Jet"
217 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
218 process.schedule.append(process.L1TReEmulPath)
220 print (
"# L1TReEmul sequence: ")
221 print (
"# {0}".
format(process.L1TReEmul))
222 print (
"# {0}".
format(process.schedule))
226 process.load(
'L1Trigger.Configuration.SimL1CaloEmulator_cff')
227 process.L1TReEmul = cms.Sequence(process.SimL1CaloEmulator)
228 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag(
'ecalDigis:EcalTriggerPrimitives')
229 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag(
'hcalDigis:')
230 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
231 process.schedule.append(process.L1TReEmulPath)
233 print (
"# L1TReEmul sequence: ")
234 print (
"# {0}".
format(process.L1TReEmul))
235 print (
"# {0}".
format(process.schedule))
240 stage2L1Trigger.toModify(process.simEmtfDigis, CSCInput =
'simCscTriggerPrimitiveDigis:MPCSORTED')
241 stage2L1Trigger.toModify(process.simOmtfDigis, srcCSC =
'simCscTriggerPrimitiveDigis:MPCSORTED')
246 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
251 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
256 stage2L1Trigger.toModify(process.simHcalTriggerPrimitiveDigis,
258 'simHcalUnsuppressedDigis',
259 'simHcalUnsuppressedDigis'
261 inputUpgradeLabel = [
262 'simHcalUnsuppressedDigis:HBHEQIE11DigiCollection',
263 'simHcalUnsuppressedDigis:HFQIE10DigiCollection'
266 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
274 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
275 ecalToken =
"simEcalTriggerPrimitiveDigis",
276 hcalToken =
'simHcalTriggerPrimitiveDigis'
282 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
287 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
293 stage2L1Trigger.toModify(process.simTwinMuxDigis,
294 RPC_Source =
'muonRPCDigis',
295 DTDigi_Source =
'simDtTriggerPrimitiveDigis',
296 DTThetaDigi_Source =
'simDtTriggerPrimitiveDigis'
299 stage2L1Trigger.toModify(process.simBmtfDigis,
300 DTDigi_Source =
'simTwinMuxDigis',
301 DTDigi_Theta_Source =
'simDtTriggerPrimitiveDigis'
304 stage2L1Trigger.toModify(process.simKBmtfStubs,
305 srcPhi =
"simTwinMuxDigis",
306 srcTheta =
"simDtTriggerPrimitiveDigis"
309 stage2L1Trigger.toModify(process.simOmtfDigis,
310 srcRPC =
'muonRPCDigis',
311 srcCSC =
'simCscTriggerPrimitiveDigis',
312 srcDTPh =
'simDtTriggerPrimitiveDigis',
313 srcDTTh =
'simDtTriggerPrimitiveDigis'
316 stage2L1Trigger.toModify(process.simEmtfDigis,
317 CSCInput =
'simCscTriggerPrimitiveDigis',
318 RPCInput =
'muonRPCDigis'
321 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
322 ecalToken =
"simEcalTriggerPrimitiveDigis",
323 hcalToken =
'simHcalTriggerPrimitiveDigis'
328 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
329 process.load(
'L1Trigger.Configuration.CaloTriggerPrimitives_cff')
330 process.simEcalTriggerPrimitiveDigis.Label =
'ecalDigis'
331 process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
332 cms.InputTag(
'hcalDigis'),
333 cms.InputTag(
'hcalDigis')
337 process.load(
'L1Trigger.L1TCommon.muonLegacyInStage2FormatDigis_cfi')
338 process.muonLegacyInStage2FormatDigis.muonSource = cms.InputTag(
'simGmtDigis')
342 process.simDtTriggerPrimitiveDigis = dtTriggerPrimitiveDigis.clone()
343 process.simDtTriggerPrimitiveDigis.digiTag = cms.InputTag(
'muonDTDigis')
347 process.simTwinMuxDigisForDttf = simTwinMuxDigis.clone()
348 process.simTwinMuxDigisForDttf.RPC_Source = cms.InputTag(
'muonRPCDigis')
349 process.simTwinMuxDigisForDttf.DTDigi_Source = cms.InputTag(
'bmtfDigis')
350 process.simTwinMuxDigisForDttf.DTThetaDigi_Source = cms.InputTag(
'bmtfDigis')
354 process.simCscTriggerPrimitiveDigis = cscTriggerPrimitiveDigis.clone()
355 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi' )
356 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
361 process.simCsctfTrackDigis = csctfTrackDigis.clone()
362 process.simCsctfTrackDigis.SectorReceiverInput = cms.untracked.InputTag(
'csctfDigis' )
363 process.simCsctfTrackDigis.DTproducer =
'simDtTriggerPrimitiveDigis'
365 process.simCsctfDigis = csctfDigis.clone()
366 process.simCsctfDigis.CSCTrackProducer =
'simCsctfTrackDigis'
371 process.simDttfDigis = dttfDigis.clone()
372 process.simDttfDigis.DTDigi_Source =
'simTwinMuxDigisForDttf'
373 process.simDttfDigis.CSCStub_Source =
'simCsctfTrackDigis'
378 process.load(
'L1Trigger.RPCTrigger.RPCConeConfig_cff')
379 process.simRpcTriggerDigis = rpcTriggerDigis.clone()
380 process.simRpcTriggerDigis.label =
'muonRPCDigis'
381 process.simRpcTriggerDigis.RPCTriggerDebug = cms.untracked.int32(1)
387 process.simGmtDigis = gmtDigis.clone()
388 process.simGmtDigis.DTCandidates = cms.InputTag(
'simDttfDigis',
'DT' )
389 process.simGmtDigis.CSCCandidates = cms.InputTag(
'simCsctfDigis',
'CSC' )
390 process.simGmtDigis.RPCbCandidates = cms.InputTag(
'simRpcTriggerDigis',
'RPCb' )
391 process.simGmtDigis.RPCfCandidates = cms.InputTag(
'simRpcTriggerDigis',
'RPCf' )
397 process.simBmtfDigis.DTDigi_Source = cms.InputTag(
'bmtfDigis')
398 process.simBmtfDigis.DTDigi_Theta_Source = cms.InputTag(
'bmtfDigis')
400 process.simTwinMuxDigis.RPC_Source = cms.InputTag(
'muonRPCDigis')
401 process.simTwinMuxDigis.DTDigi_Source = cms.InputTag(
'bmtfDigis')
402 process.simTwinMuxDigis.DTThetaDigi_Source = cms.InputTag(
'bmtfDigis')
404 process.simOmtfDigis.srcRPC = cms.InputTag(
'muonRPCDigis')
405 process.simOmtfDigis.srcCSC = cms.InputTag(
'csctfDigis')
406 process.simOmtfDigis.srcDTPh = cms.InputTag(
'bmtfDigis')
407 process.simOmtfDigis.srcDTTh = cms.InputTag(
'bmtfDigis')
409 process.simEmtfDigis.CSCInput = cms.InputTag(
'emtfStage2Digis')
410 process.simEmtfDigis.RPCInput = cms.InputTag(
'muonRPCDigis')
412 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag(
'ecalDigis:EcalTriggerPrimitives')
413 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag(
'hcalDigis:')
417 process.L1TMuonTriggerPrimitives = cms.Sequence(process.simCscTriggerPrimitiveDigis + process.simDtTriggerPrimitiveDigis + process.simTwinMuxDigisForDttf)
419 process.L1TReEmul = cms.Sequence(process.L1TMuonTriggerPrimitives + process.simCsctfTrackDigis + process.simCsctfDigis + process.simDttfDigis + process.simRpcTriggerDigis + process.simGmtDigis + process.muonLegacyInStage2FormatDigis)
421 process.load(
'L1Trigger.L1TMuon.simMuonQualityAdjusterDigis_cfi')
423 process.L1TReEmul = cms.Sequence( process.L1TReEmul + process.simTwinMuxDigis + process.simBmtfDigis + process.simEmtfDigis + process.simOmtfDigis + process.simGmtCaloSumDigis + process.simMuonQualityAdjusterDigis + process.simGmtStage2Digis)
425 process.L1TReEmul = cms.Sequence( process.L1TReEmul + process.SimL1TechnicalTriggers + process.SimL1TGlobal )
427 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
428 process.schedule.append(process.L1TReEmulPath)
429 print(
"# L1TReEmul sequence: ")