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.simDtTriggerPrimitiveDigis.digiTag = cms.InputTag(
"muonDTDigis")
135 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi')
136 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
137 process.L1TReEmul = cms.Sequence(process.simEcalTriggerPrimitiveDigis * process.simHcalTriggerPrimitiveDigis * process.SimL1Emulator)
144 stage2L1Trigger.toModify(process.simTwinMuxDigis,
145 RPC_Source =
'rpcTwinMuxRawToDigi',
146 DTDigi_Source =
'twinMuxStage2Digis:PhIn',
147 DTThetaDigi_Source =
'twinMuxStage2Digis:ThIn' 150 stage2L1Trigger.toModify(process.simBmtfDigis,
151 DTDigi_Source =
"simTwinMuxDigis",
152 DTDigi_Theta_Source =
"bmtfDigis" 155 stage2L1Trigger.toModify(process.simKBmtfStubs,
156 srcPhi =
'simTwinMuxDigis',
157 srcTheta =
'bmtfDigis' 160 stage2L1Trigger.toModify(process.simOmtfDigis,
161 srcRPC =
'muonRPCDigis',
162 srcCSC =
'csctfDigis',
163 srcDTPh =
'bmtfDigis',
164 srcDTTh =
'bmtfDigis' 167 stage2L1Trigger.toModify(process.simEmtfDigis,
168 CSCInput =
'emtfStage2Digis',
169 RPCInput =
'muonRPCDigis' 172 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
173 ecalToken =
'ecalDigis:EcalTriggerPrimitives',
174 hcalToken =
'hcalDigis:' 177 (~stage2L1Trigger).toModify(process.simRctDigis,
178 ecalDigis = [
'ecalDigis:EcalTriggerPrimitives'],
179 hcalDigis = [
'hcalDigis:']
181 (~stage2L1Trigger).toModify(process.simRpcTriggerDigis, label =
'muonRPCDigis')
183 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
184 process.schedule.append(process.L1TReEmulPath)
191 stage2L1Trigger_2017.toModify(process.simOmtfDigis,
192 srcRPC =
'omtfStage2Digis',
193 srcCSC =
'omtfStage2Digis',
194 srcDTPh =
'omtfStage2Digis',
195 srcDTTh =
'omtfStage2Digis' 198 stage2L1Trigger.toModify(process.simEmtfDigis,
199 CSCInput = cms.InputTag(
'emtfStage2Digis'),
200 RPCInput = cms.InputTag(
'muonRPCDigis'),
201 CPPFInput = cms.InputTag(
'emtfStage2Digis'),
202 GEMEnable = cms.bool(
False),
203 GEMInput = cms.InputTag(
'muonGEMPadDigis'),
204 CPPFEnable = cms.bool(
True),
207 run3_GEM.toModify(process.simMuonGEMPadDigis,
208 InputCollection =
'muonGEMDigis',
211 run3_GEM.toModify(process.simTwinMuxDigis,
212 RPC_Source =
'rpcTwinMuxRawToDigi',
213 DTDigi_Source =
'simDtTriggerPrimitiveDigis',
214 DTThetaDigi_Source =
'simDtTriggerPrimitiveDigis' 217 run3_GEM.toModify(process.simKBmtfStubs,
218 srcPhi =
'bmtfDigis',
219 srcTheta =
'bmtfDigis' 222 run3_GEM.toModify(process.simBmtfDigis,
223 DTDigi_Source =
'bmtfDigis',
224 DTDigi_Theta_Source =
'bmtfDigis' 227 print(
"# L1TReEmul sequence: ")
234 process.simGtStage2Digis.MuonInputTag = cms.InputTag(
"gtStage2Digis",
"Muon")
239 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
240 process.L1TReEmul = cms.Sequence(process.SimL1TGlobal)
241 stage2L1Trigger_2017.toModify(process.simGtStage2Digis,
242 ExtInputTag =
"hltGtStage2Digis",
243 MuonInputTag =
"hltGtStage2Digis:Muon",
244 EtSumInputTag =
"hltGtStage2Digis:EtSum",
245 EGammaInputTag =
"hltGtStage2Digis:EGamma",
246 TauInputTag =
"hltGtStage2Digis:Tau",
247 JetInputTag =
"hltGtStage2Digis:Jet" 250 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
251 process.schedule.append(process.L1TReEmulPath)
253 print (
"# L1TReEmul sequence: ")
254 print (
"# {0}".
format(process.L1TReEmul))
255 print (
"# {0}".
format(process.schedule))
259 process.load(
'L1Trigger.Configuration.SimL1CaloEmulator_cff')
260 process.L1TReEmul = cms.Sequence(process.SimL1CaloEmulator)
261 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag(
'ecalDigis:EcalTriggerPrimitives')
262 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag(
'hcalDigis:')
263 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
264 process.schedule.append(process.L1TReEmulPath)
266 print (
"# L1TReEmul sequence: ")
267 print (
"# {0}".
format(process.L1TReEmul))
268 print (
"# {0}".
format(process.schedule))
272 process.load(
'L1Trigger.Configuration.SimL1CaloEmulator_cff')
273 process.L1TReEmul = cms.Sequence(process.SimL1CaloEmulator)
274 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
275 process.schedule.append(process.L1TReEmulPath)
277 print (
"# L1TReEmul sequence: ")
278 print (
"# {0}".
format(process.L1TReEmul))
279 print (
"# {0}".
format(process.schedule))
284 stage2L1Trigger.toModify(process.simEmtfDigis, CSCInput =
'simCscTriggerPrimitiveDigis:MPCSORTED')
285 stage2L1Trigger.toModify(process.simOmtfDigis, srcCSC =
'simCscTriggerPrimitiveDigis:MPCSORTED')
288 run3_GEM.toModify(process.simBmtfDigis,
289 DTDigi_Source =
'simTwinMuxDigis',
290 DTDigi_Theta_Source =
'simDtTriggerPrimitiveDigis' 293 run3_GEM.toModify(process.simKBmtfStubs,
294 srcPhi =
"simTwinMuxDigis",
295 srcTheta =
"simDtTriggerPrimitiveDigis" 298 run3_GEM.toModify(process.simOmtfDigis,
299 srcRPC =
'muonRPCDigis',
300 srcDTPh =
'simDtTriggerPrimitiveDigis',
301 srcDTTh =
'simDtTriggerPrimitiveDigis' 304 run3_GEM.toModify(process.simEmtfDigis,
305 RPCInput =
'muonRPCDigis',
307 GEMInput =
'simMuonGEMPadDigiClusters',
309 UseRun3CCLUT_OTMB =
False,
316 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
321 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
326 stage2L1Trigger.toModify(process.simHcalTriggerPrimitiveDigis,
328 'simHcalUnsuppressedDigis',
329 'simHcalUnsuppressedDigis' 331 inputUpgradeLabel = [
332 'simHcalUnsuppressedDigis:HBHEQIE11DigiCollection',
333 'simHcalUnsuppressedDigis:HFQIE10DigiCollection' 336 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
344 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
345 ecalToken =
"simEcalTriggerPrimitiveDigis",
346 hcalToken =
'simHcalTriggerPrimitiveDigis' 352 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
357 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
363 stage2L1Trigger.toModify(process.simTwinMuxDigis,
364 RPC_Source =
'muonRPCDigis',
365 DTDigi_Source =
'simDtTriggerPrimitiveDigis',
366 DTThetaDigi_Source =
'simDtTriggerPrimitiveDigis' 369 stage2L1Trigger.toModify(process.simBmtfDigis,
370 DTDigi_Source =
'simTwinMuxDigis',
371 DTDigi_Theta_Source =
'simDtTriggerPrimitiveDigis' 374 stage2L1Trigger.toModify(process.simKBmtfStubs,
375 srcPhi =
"simTwinMuxDigis",
376 srcTheta =
"simDtTriggerPrimitiveDigis" 379 stage2L1Trigger.toModify(process.simOmtfDigis,
380 srcRPC =
'muonRPCDigis',
381 srcCSC =
'simCscTriggerPrimitiveDigis',
382 srcDTPh =
'simDtTriggerPrimitiveDigis',
383 srcDTTh =
'simDtTriggerPrimitiveDigis' 386 stage2L1Trigger.toModify(process.simEmtfDigis,
387 CSCInput =
'simCscTriggerPrimitiveDigis',
388 RPCInput =
'muonRPCDigis' 391 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
392 ecalToken =
"simEcalTriggerPrimitiveDigis",
393 hcalToken =
'simHcalTriggerPrimitiveDigis' 398 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
399 process.load(
'L1Trigger.Configuration.CaloTriggerPrimitives_cff')
400 process.simEcalTriggerPrimitiveDigis.Label =
'ecalDigis' 401 process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
402 cms.InputTag(
'hcalDigis'),
403 cms.InputTag(
'hcalDigis')
407 process.load(
'L1Trigger.L1TCommon.muonLegacyInStage2FormatDigis_cfi')
408 process.muonLegacyInStage2FormatDigis.muonSource = cms.InputTag(
'simGmtDigis')
412 process.simDtTriggerPrimitiveDigis = dtTriggerPrimitiveDigis.clone()
413 process.simDtTriggerPrimitiveDigis.digiTag = cms.InputTag(
'muonDTDigis')
417 process.simTwinMuxDigisForDttf = simTwinMuxDigis.clone()
418 process.simTwinMuxDigisForDttf.RPC_Source = cms.InputTag(
'muonRPCDigis')
419 process.simTwinMuxDigisForDttf.DTDigi_Source = cms.InputTag(
'bmtfDigis')
420 process.simTwinMuxDigisForDttf.DTThetaDigi_Source = cms.InputTag(
'bmtfDigis')
423 process.load(
"CalibMuon.CSCCalibration.CSCL1TPLookupTableEP_cff")
426 process.simCscTriggerPrimitiveDigis = cscTriggerPrimitiveDigis.clone()
427 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi' )
428 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
433 process.simCsctfTrackDigis = csctfTrackDigis.clone()
434 process.simCsctfTrackDigis.SectorReceiverInput = cms.untracked.InputTag(
'csctfDigis' )
435 process.simCsctfTrackDigis.DTproducer =
'simDtTriggerPrimitiveDigis' 437 process.simCsctfDigis = csctfDigis.clone()
438 process.simCsctfDigis.CSCTrackProducer =
'simCsctfTrackDigis' 443 process.simDttfDigis = dttfDigis.clone()
444 process.simDttfDigis.DTDigi_Source =
'simTwinMuxDigisForDttf' 445 process.simDttfDigis.CSCStub_Source =
'simCsctfTrackDigis' 450 process.load(
'L1Trigger.RPCTrigger.RPCConeConfig_cff')
451 process.simRpcTriggerDigis = rpcTriggerDigis.clone()
452 process.simRpcTriggerDigis.label =
'muonRPCDigis' 453 process.simRpcTriggerDigis.RPCTriggerDebug = cms.untracked.int32(1)
459 process.simGmtDigis = gmtDigis.clone()
460 process.simGmtDigis.DTCandidates = cms.InputTag(
'simDttfDigis',
'DT' )
461 process.simGmtDigis.CSCCandidates = cms.InputTag(
'simCsctfDigis',
'CSC' )
462 process.simGmtDigis.RPCbCandidates = cms.InputTag(
'simRpcTriggerDigis',
'RPCb' )
463 process.simGmtDigis.RPCfCandidates = cms.InputTag(
'simRpcTriggerDigis',
'RPCf' )
469 process.simBmtfDigis.DTDigi_Source = cms.InputTag(
'bmtfDigis')
470 process.simBmtfDigis.DTDigi_Theta_Source = cms.InputTag(
'bmtfDigis')
472 process.simTwinMuxDigis.RPC_Source = cms.InputTag(
'muonRPCDigis')
473 process.simTwinMuxDigis.DTDigi_Source = cms.InputTag(
'bmtfDigis')
474 process.simTwinMuxDigis.DTThetaDigi_Source = cms.InputTag(
'bmtfDigis')
476 process.simOmtfDigis.srcRPC = cms.InputTag(
'muonRPCDigis')
477 process.simOmtfDigis.srcCSC = cms.InputTag(
'csctfDigis')
478 process.simOmtfDigis.srcDTPh = cms.InputTag(
'bmtfDigis')
479 process.simOmtfDigis.srcDTTh = cms.InputTag(
'bmtfDigis')
481 process.simEmtfDigis.CSCInput = cms.InputTag(
'emtfStage2Digis')
482 process.simEmtfDigis.RPCInput = cms.InputTag(
'muonRPCDigis')
484 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag(
'ecalDigis:EcalTriggerPrimitives')
485 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag(
'hcalDigis:')
489 process.L1TMuonTriggerPrimitives = cms.Sequence(process.simCscTriggerPrimitiveDigis + process.simDtTriggerPrimitiveDigis + process.simTwinMuxDigisForDttf)
491 process.L1TReEmul = cms.Sequence(process.L1TMuonTriggerPrimitives + process.simCsctfTrackDigis + process.simCsctfDigis + process.simDttfDigis + process.simRpcTriggerDigis + process.simGmtDigis + process.muonLegacyInStage2FormatDigis)
493 process.load(
'L1Trigger.L1TMuon.simMuonQualityAdjusterDigis_cfi')
495 process.L1TReEmul = cms.Sequence( process.L1TReEmul + process.simTwinMuxDigis + process.simBmtfDigis + process.simEmtfDigis + process.simOmtfDigis + process.simGmtCaloSumDigis + process.simMuonQualityAdjusterDigis + process.simGmtStage2Digis)
497 process.L1TReEmul = cms.Sequence( process.L1TReEmul + process.SimL1TechnicalTriggers + process.SimL1TGlobal )
499 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
500 process.schedule.append(process.L1TReEmulPath)
501 print(
"# L1TReEmul sequence: ")
def L1TReEmulMCFromRAWSimCalTP(process)
def L1TReEmulFromRAWCalo(process)
def L1TReEmulMCFromRAW(process)
def L1TReEmulFromRAWCaloSimTP(process)
def L1TReEmulMCFromRAWSimHcalTP(process)
def L1TReEmulFromRAWsimEcalTP(process)
def L1TReEmulFromRAW2016(process)
def L1TReEmulFromRAW2015simCaloTP(process)
def L1TReEmulMCFrom90xRAWSimHcalTP(process)
def L1TReEmulFromRAW2015(process)
def L1TReEmulFromRAWLegacyMuon(process)
def L1TCaloStage2ParamsForHW(process)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def L1TReEmulFromRAW(process)
def L1TReEmulFromRAWsimHcalTP(process)
def L1TEventSetupForHF1x1TPs(process)
def L1TReEmulFromRAWCalouGT(process)
def L1TReEmulMCFromRAW2015(process)
def L1TReEmulFromRAWsimTP(process)
def L1TReEmulFromNANO(process)
def L1TReEmulMCFromRAWSimEcalTP(process)
def L1TAddBitwiseLayer1(process)