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")
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 if not hasattr(process,
'L1TReEmulPath'):
104 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
105 process.schedule.append(process.L1TReEmulPath)
107 print(
"# L1TReEmul sequence: ")
114 stage2L1Trigger.toModify(process.simEmtfDigis, CSCInput =
'simCscTriggerPrimitiveDigis:MPCSORTED')
115 stage2L1Trigger.toModify(process.simOmtfDigis, srcCSC =
'simCscTriggerPrimitiveDigis:MPCSORTED')
120 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
124 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
125 process.load(
'L1Trigger.Configuration.CaloTriggerPrimitives_cff')
126 process.simEcalTriggerPrimitiveDigis.Label =
'ecalDigis' 127 process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
128 cms.InputTag(
'hcalDigis'),
129 cms.InputTag(
'hcalDigis')
131 process.simHcalTriggerPrimitiveDigis.inputUpgradeLabel = cms.VInputTag(
132 cms.InputTag(
'hcalDigis'),
133 cms.InputTag(
'hcalDigis')
135 process.simDtTriggerPrimitiveDigis.digiTag = cms.InputTag(
"muonDTDigis")
136 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi')
137 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
138 process.L1TReEmul = cms.Sequence(process.simEcalTriggerPrimitiveDigis * process.simHcalTriggerPrimitiveDigis * process.SimL1Emulator)
145 stage2L1Trigger.toModify(process.simTwinMuxDigis,
146 RPC_Source =
'rpcTwinMuxRawToDigi',
147 DTDigi_Source =
'twinMuxStage2Digis:PhIn',
148 DTThetaDigi_Source =
'twinMuxStage2Digis:ThIn' 151 stage2L1Trigger.toModify(process.simBmtfDigis,
152 DTDigi_Source =
"simTwinMuxDigis",
153 DTDigi_Theta_Source =
"bmtfDigis" 156 stage2L1Trigger.toModify(process.simKBmtfStubs,
157 srcPhi =
'simTwinMuxDigis',
158 srcTheta =
'bmtfDigis' 161 stage2L1Trigger.toModify(process.simOmtfDigis,
162 srcRPC =
'muonRPCDigis',
163 srcCSC =
'csctfDigis',
164 srcDTPh =
'bmtfDigis',
165 srcDTTh =
'bmtfDigis' 168 stage2L1Trigger.toModify(process.simEmtfDigis,
169 CSCInput =
'emtfStage2Digis',
170 RPCInput =
'muonRPCDigis' 173 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
174 ecalToken =
'ecalDigis:EcalTriggerPrimitives',
175 hcalToken =
'hcalDigis:' 178 (~stage2L1Trigger).toModify(process.simRctDigis,
179 ecalDigis = [
'ecalDigis:EcalTriggerPrimitives'],
180 hcalDigis = [
'hcalDigis:']
182 (~stage2L1Trigger).toModify(process.simRpcTriggerDigis, label =
'muonRPCDigis')
184 if not hasattr(process,
'L1TReEmulPath'):
185 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
186 process.schedule.append(process.L1TReEmulPath)
194 stage2L1Trigger_2017.toModify(process.simOmtfDigis,
195 srcRPC =
'omtfStage2Digis',
196 srcCSC =
'omtfStage2Digis',
197 srcDTPh =
'omtfStage2Digis',
198 srcDTTh =
'omtfStage2Digis' 201 stage2L1Trigger.toModify(process.simEmtfDigis,
202 CSCInput = cms.InputTag(
'emtfStage2Digis'),
203 RPCInput = cms.InputTag(
'muonRPCDigis'),
204 CPPFInput = cms.InputTag(
'emtfStage2Digis'),
205 GEMEnable = cms.bool(
False),
206 GEMInput = cms.InputTag(
'muonGEMPadDigis'),
207 CPPFEnable = cms.bool(
True),
210 run3_GEM.toModify(process.simMuonGEMPadDigis,
211 InputCollection =
'muonGEMDigis',
214 run3_GEM.toModify(process.simTwinMuxDigis,
215 RPC_Source =
'rpcTwinMuxRawToDigi',
216 DTDigi_Source =
'simDtTriggerPrimitiveDigis',
217 DTThetaDigi_Source =
'simDtTriggerPrimitiveDigis' 220 run3_GEM.toModify(process.simKBmtfStubs,
221 srcPhi =
'bmtfDigis',
222 srcTheta =
'bmtfDigis' 225 run3_GEM.toModify(process.simBmtfDigis,
226 DTDigi_Source =
'bmtfDigis',
227 DTDigi_Theta_Source =
'bmtfDigis' 230 print(
"# L1TReEmul sequence: ")
237 process.simGtStage2Digis.MuonInputTag = cms.InputTag(
"gtStage2Digis",
"Muon")
242 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
243 process.L1TReEmul = cms.Sequence(process.SimL1TGlobal)
244 stage2L1Trigger_2017.toModify(process.simGtStage2Digis,
245 ExtInputTag =
"hltGtStage2Digis",
246 MuonInputTag =
"hltGtStage2Digis:Muon",
247 EtSumInputTag =
"hltGtStage2Digis:EtSum",
248 EGammaInputTag =
"hltGtStage2Digis:EGamma",
249 TauInputTag =
"hltGtStage2Digis:Tau",
250 JetInputTag =
"hltGtStage2Digis:Jet" 253 if not hasattr(process,
'L1TReEmulPath'):
254 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
255 process.schedule.append(process.L1TReEmulPath)
257 print (
"# L1TReEmul sequence: ")
258 print (
"# {0}".
format(process.L1TReEmul))
259 print (
"# {0}".
format(process.schedule))
263 process.load(
'L1Trigger.Configuration.SimL1CaloEmulator_cff')
264 process.L1TReEmul = cms.Sequence(process.SimL1CaloEmulator)
265 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag(
'ecalDigis:EcalTriggerPrimitives')
266 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag(
'hcalDigis:')
268 if not hasattr(process,
'L1TReEmulPath'):
269 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
270 process.schedule.append(process.L1TReEmulPath)
272 print (
"# L1TReEmul sequence: ")
273 print (
"# {0}".
format(process.L1TReEmul))
274 print (
"# {0}".
format(process.schedule))
278 process.load(
'L1Trigger.Configuration.SimL1CaloEmulator_cff')
279 process.L1TReEmul = cms.Sequence(process.SimL1CaloEmulator)
280 if not hasattr(process,
'L1TReEmulPath'):
281 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
282 process.schedule.append(process.L1TReEmulPath)
284 print (
"# L1TReEmul sequence: ")
285 print (
"# {0}".
format(process.L1TReEmul))
286 print (
"# {0}".
format(process.schedule))
291 stage2L1Trigger.toModify(process.simEmtfDigis, CSCInput =
'simCscTriggerPrimitiveDigis:MPCSORTED')
292 stage2L1Trigger.toModify(process.simOmtfDigis, srcCSC =
'simCscTriggerPrimitiveDigis:MPCSORTED')
295 run3_GEM.toModify(process.simBmtfDigis,
296 DTDigi_Source =
'simTwinMuxDigis',
297 DTDigi_Theta_Source =
'simDtTriggerPrimitiveDigis' 300 run3_GEM.toModify(process.simKBmtfStubs,
301 srcPhi =
"simTwinMuxDigis",
302 srcTheta =
"simDtTriggerPrimitiveDigis" 305 run3_GEM.toModify(process.simOmtfDigis,
306 srcRPC =
'muonRPCDigis',
307 srcDTPh =
'simDtTriggerPrimitiveDigis',
308 srcDTTh =
'simDtTriggerPrimitiveDigis' 311 run3_GEM.toModify(process.simEmtfDigis,
312 RPCInput =
'muonRPCDigis',
314 GEMInput =
'simMuonGEMPadDigiClusters',
316 UseRun3CCLUT_OTMB =
False,
323 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
328 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
333 stage2L1Trigger.toModify(process.simHcalTriggerPrimitiveDigis,
335 'simHcalUnsuppressedDigis',
336 'simHcalUnsuppressedDigis' 338 inputUpgradeLabel = [
339 'simHcalUnsuppressedDigis:HBHEQIE11DigiCollection',
340 'simHcalUnsuppressedDigis:HFQIE10DigiCollection' 343 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
351 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
352 ecalToken =
"simEcalTriggerPrimitiveDigis",
353 hcalToken =
'simHcalTriggerPrimitiveDigis' 359 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, ecalToken =
"simEcalTriggerPrimitiveDigis")
364 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis, hcalToken =
'simHcalTriggerPrimitiveDigis')
370 stage2L1Trigger.toModify(process.simTwinMuxDigis,
371 RPC_Source =
'muonRPCDigis',
372 DTDigi_Source =
'simDtTriggerPrimitiveDigis',
373 DTThetaDigi_Source =
'simDtTriggerPrimitiveDigis' 376 stage2L1Trigger.toModify(process.simBmtfDigis,
377 DTDigi_Source =
'simTwinMuxDigis',
378 DTDigi_Theta_Source =
'simDtTriggerPrimitiveDigis' 381 stage2L1Trigger.toModify(process.simKBmtfStubs,
382 srcPhi =
"simTwinMuxDigis",
383 srcTheta =
"simDtTriggerPrimitiveDigis" 386 stage2L1Trigger.toModify(process.simOmtfDigis,
387 srcRPC =
'muonRPCDigis',
388 srcCSC =
'simCscTriggerPrimitiveDigis',
389 srcDTPh =
'simDtTriggerPrimitiveDigis',
390 srcDTTh =
'simDtTriggerPrimitiveDigis' 393 stage2L1Trigger.toModify(process.simEmtfDigis,
394 CSCInput =
'simCscTriggerPrimitiveDigis',
395 RPCInput =
'muonRPCDigis' 398 stage2L1Trigger.toModify(process.simCaloStage2Layer1Digis,
399 ecalToken =
"simEcalTriggerPrimitiveDigis",
400 hcalToken =
'simHcalTriggerPrimitiveDigis' 405 process.load(
'L1Trigger.Configuration.SimL1Emulator_cff')
406 process.load(
'L1Trigger.Configuration.CaloTriggerPrimitives_cff')
407 process.simEcalTriggerPrimitiveDigis.Label =
'ecalDigis' 408 process.simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag(
409 cms.InputTag(
'hcalDigis'),
410 cms.InputTag(
'hcalDigis')
414 process.load(
'L1Trigger.L1TCommon.muonLegacyInStage2FormatDigis_cfi')
415 process.muonLegacyInStage2FormatDigis.muonSource = cms.InputTag(
'simGmtDigis')
419 process.simDtTriggerPrimitiveDigis = dtTriggerPrimitiveDigis.clone()
420 process.simDtTriggerPrimitiveDigis.digiTag = cms.InputTag(
'muonDTDigis')
424 process.simTwinMuxDigisForDttf = simTwinMuxDigis.clone()
425 process.simTwinMuxDigisForDttf.RPC_Source = cms.InputTag(
'muonRPCDigis')
426 process.simTwinMuxDigisForDttf.DTDigi_Source = cms.InputTag(
'bmtfDigis')
427 process.simTwinMuxDigisForDttf.DTThetaDigi_Source = cms.InputTag(
'bmtfDigis')
430 process.load(
"CalibMuon.CSCCalibration.CSCL1TPLookupTableEP_cff")
433 process.simCscTriggerPrimitiveDigis = cscTriggerPrimitiveDigis.clone()
434 process.simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCComparatorDigi' )
435 process.simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag(
'muonCSCDigis',
'MuonCSCWireDigi' )
440 process.simCsctfTrackDigis = csctfTrackDigis.clone()
441 process.simCsctfTrackDigis.SectorReceiverInput = cms.untracked.InputTag(
'csctfDigis' )
442 process.simCsctfTrackDigis.DTproducer =
'simDtTriggerPrimitiveDigis' 444 process.simCsctfDigis = csctfDigis.clone()
445 process.simCsctfDigis.CSCTrackProducer =
'simCsctfTrackDigis' 450 process.simDttfDigis = dttfDigis.clone()
451 process.simDttfDigis.DTDigi_Source =
'simTwinMuxDigisForDttf' 452 process.simDttfDigis.CSCStub_Source =
'simCsctfTrackDigis' 457 process.load(
'L1Trigger.RPCTrigger.RPCConeConfig_cff')
458 process.simRpcTriggerDigis = rpcTriggerDigis.clone()
459 process.simRpcTriggerDigis.label =
'muonRPCDigis' 460 process.simRpcTriggerDigis.RPCTriggerDebug = cms.untracked.int32(1)
466 process.simGmtDigis = gmtDigis.clone()
467 process.simGmtDigis.DTCandidates = cms.InputTag(
'simDttfDigis',
'DT' )
468 process.simGmtDigis.CSCCandidates = cms.InputTag(
'simCsctfDigis',
'CSC' )
469 process.simGmtDigis.RPCbCandidates = cms.InputTag(
'simRpcTriggerDigis',
'RPCb' )
470 process.simGmtDigis.RPCfCandidates = cms.InputTag(
'simRpcTriggerDigis',
'RPCf' )
476 process.simBmtfDigis.DTDigi_Source = cms.InputTag(
'bmtfDigis')
477 process.simBmtfDigis.DTDigi_Theta_Source = cms.InputTag(
'bmtfDigis')
479 process.simTwinMuxDigis.RPC_Source = cms.InputTag(
'muonRPCDigis')
480 process.simTwinMuxDigis.DTDigi_Source = cms.InputTag(
'bmtfDigis')
481 process.simTwinMuxDigis.DTThetaDigi_Source = cms.InputTag(
'bmtfDigis')
483 process.simOmtfDigis.srcRPC = cms.InputTag(
'muonRPCDigis')
484 process.simOmtfDigis.srcCSC = cms.InputTag(
'csctfDigis')
485 process.simOmtfDigis.srcDTPh = cms.InputTag(
'bmtfDigis')
486 process.simOmtfDigis.srcDTTh = cms.InputTag(
'bmtfDigis')
488 process.simEmtfDigis.CSCInput = cms.InputTag(
'emtfStage2Digis')
489 process.simEmtfDigis.RPCInput = cms.InputTag(
'muonRPCDigis')
491 process.simCaloStage2Layer1Digis.ecalToken = cms.InputTag(
'ecalDigis:EcalTriggerPrimitives')
492 process.simCaloStage2Layer1Digis.hcalToken = cms.InputTag(
'hcalDigis:')
496 process.L1TMuonTriggerPrimitives = cms.Sequence(process.simCscTriggerPrimitiveDigis + process.simDtTriggerPrimitiveDigis + process.simTwinMuxDigisForDttf)
498 process.L1TReEmul = cms.Sequence(process.L1TMuonTriggerPrimitives + process.simCsctfTrackDigis + process.simCsctfDigis + process.simDttfDigis + process.simRpcTriggerDigis + process.simGmtDigis + process.muonLegacyInStage2FormatDigis)
500 process.load(
'L1Trigger.L1TMuon.simMuonQualityAdjusterDigis_cfi')
502 process.L1TReEmul = cms.Sequence( process.L1TReEmul + process.simTwinMuxDigis + process.simBmtfDigis + process.simEmtfDigis + process.simOmtfDigis + process.simGmtCaloSumDigis + process.simMuonQualityAdjusterDigis + process.simGmtStage2Digis)
504 process.L1TReEmul = cms.Sequence( process.L1TReEmul + process.SimL1TechnicalTriggers + process.SimL1TGlobal )
506 if not hasattr(process,
'L1TReEmulPath'):
507 process.L1TReEmulPath = cms.Path(process.L1TReEmul)
508 process.schedule.append(process.L1TReEmulPath)
509 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)