From 4005b850ea5a18e870a20a3496a1f75f8099e418 Mon Sep 17 00:00:00 2001 From: Marino Missiroli Date: Mon, 9 Jan 2023 18:07:44 +0100 Subject: [PATCH] fix GEM inputs for L1REPACK:FullMC --- .../python/SimL1EmulatorRepack_CalouGT_cff.py | 13 +++++----- .../SimL1EmulatorRepack_Full2015Data_cff.py | 13 +++++----- .../python/SimL1EmulatorRepack_FullMC_cff.py | 25 +++++++++++++------ .../SimL1EmulatorRepack_FullSimTP_cff.py | 13 +++++----- .../python/SimL1EmulatorRepack_Full_cff.py | 14 +++++------ .../python/SimL1EmulatorRepack_uGT_cff.py | 12 ++++----- 6 files changed, 48 insertions(+), 42 deletions(-) diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_CalouGT_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_CalouGT_cff.py index 99f52f8196b20..106932da70449 100644 --- a/Configuration/StandardSequences/python/SimL1EmulatorRepack_CalouGT_cff.py +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_CalouGT_cff.py @@ -1,15 +1,14 @@ from __future__ import print_function import FWCore.ParameterSet.Config as cms -## L1REPACK FULL: Re-Emulate all of L1 and repack into RAW - +## L1REPACK CalouGT : Re-Emulate all of L1 and repack into RAW from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger -def _print(ignored): - print("# L1T WARN: L1REPACK:CalouGT (intended for 2016/2017 data) only supports Stage 2 eras for now.") - print("# L1T WARN: Use a legacy version of L1REPACK for now.") -stage2L1Trigger.toModify(None, _print) -(~stage2L1Trigger).toModify(None, lambda x: print("# L1T INFO: L1REPACK:CalouGT (intended for 2016/2017 data), reemulates the Calo part, uses unpacked Muons, and reemulates uGT.")) + +(~stage2L1Trigger).toModify(None, lambda x: + print("# L1T WARN: L1REPACK:CalouGT (intended for 2016/2017 data) only supports Stage 2 eras for now.\n# L1T WARN: Use a legacy version of L1REPACK for now.")) +stage2L1Trigger.toModify(None, lambda x: + print("# L1T INFO: L1REPACK:CalouGT (intended for 2016/2017 data), reemulates the Calo part, uses unpacked Muons, and reemulates uGT.")) # First, Unpack all inputs to L1: import EventFilter.L1TRawToDigi.bmtfDigis_cfi diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full2015Data_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full2015Data_cff.py index 961b0815944eb..2a38f819206cd 100644 --- a/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full2015Data_cff.py +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full2015Data_cff.py @@ -1,15 +1,14 @@ from __future__ import print_function import FWCore.ParameterSet.Config as cms -## L1REPACK FULL: Re-Emulate all of L1 and repack into RAW - +## L1REPACK Full2015Data : Re-Emulate all of L1 and repack into RAW from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger -def _print(ignored): - print("# L1T WARN: L1REPACK:Full2015Data only supports Stage 2 eras for now.") - print("# L1T WARN: Use a legacy version of L1REPACK for now.") -stage2L1Trigger.toModify(None, _print) -(~stage2L1Trigger).toModify(None, lambda x: print("# L1T INFO: L1REPACK:Full2015Data will unpack all L1T inputs, re-emulated (Stage-2), and pack uGT, uGMT, and Calo Stage-2 output.")) + +(~stage2L1Trigger).toModify(None, lambda x: + print("# L1T WARN: L1REPACK:Full2015Data only supports Stage-2 eras for now.\n# L1T WARN: Use a legacy version of L1REPACK for now.")) +stage2L1Trigger.toModify(None, lambda x: + print("# L1T INFO: L1REPACK:Full2015Data will unpack all L1T inputs, re-emulated (Stage-2), and pack uGT, uGMT, and Calo Stage-2 output.")) # First, Unpack all inputs to L1: import EventFilter.DTTFRawToDigi.dttfunpacker_cfi diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py index 828ccfd38a0f6..28c4e0debd63e 100644 --- a/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py @@ -1,15 +1,15 @@ from __future__ import print_function import FWCore.ParameterSet.Config as cms -## L1REPACK FULL: Re-Emulate all of L1 and repack into RAW - +## L1REPACK FullMC : Re-Emulate all of L1 and repack into RAW from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger -def _print(ignored): - print("# L1T WARN: L1REPACK:FullMC (intended for MC events with RAW eventcontent) only supports Stage 2 eras for now.") - print("# L1T WARN: Use a legacy version of L1REPACK for now.") -stage2L1Trigger.toModify(None, _print) -(~stage2L1Trigger).toModify(None, lambda x: print("# L1T INFO: L1REPACK:FullMC will unpack Calorimetry and Muon L1T inputs, re-emulate L1T (Stage-2), and pack uGT, uGMT, and Calo Stage-2 output.")) +from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM + +(~stage2L1Trigger).toModify(None, lambda x: + print("# L1T WARN: L1REPACK:FullMC (intended for MC events with RAW eventcontent) only supports Stage-2 eras for now.\n# L1T WARN: Use a legacy version of L1REPACK for now.")) +stage2L1Trigger.toModify(None, lambda x: + print("# L1T INFO: L1REPACK:FullMC will unpack Calorimetry and Muon L1T inputs, re-emulate L1T (Stage-2), and pack uGT, uGMT, and Calo Stage-2 output.")) # First, Unpack all inputs to L1: @@ -25,6 +25,10 @@ def _print(ignored): unpackCSC = EventFilter.CSCRawToDigi.cscUnpacker_cfi.muonCSCDigis.clone( InputObjects = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess())) +import EventFilter.GEMRawToDigi.muonGEMDigis_cfi +unpackGEM = EventFilter.GEMRawToDigi.muonGEMDigis_cfi.muonGEMDigis.clone( + InputLabel = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess())) + import EventFilter.EcalRawToDigi.EcalUnpackerData_cfi unpackEcal = EventFilter.EcalRawToDigi.EcalUnpackerData_cfi.ecalEBunpacker.clone( InputLabel = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess())) @@ -60,6 +64,8 @@ def _print(ignored): # CSC TPs simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = 'unpackCSC:MuonCSCComparatorDigi' simCscTriggerPrimitiveDigis.CSCWireDigiProducer = 'unpackCSC:MuonCSCWireDigi' +# GEM +(stage2L1Trigger & run3_GEM).toModify(simMuonGEMPadDigis, InputCollection = 'unpackGEM') # TWIN-MUX simTwinMuxDigis.RPC_Source = 'unpackRPC' @@ -114,4 +120,9 @@ def _print(ignored): , packGmtStage2 , packGtStage2 , rawDataCollector)) + +_SimL1EmulatorTaskWithGEM = SimL1EmulatorTask.copy() +_SimL1EmulatorTaskWithGEM.add(unpackGEM) +(stage2L1Trigger & run3_GEM).toReplaceWith(SimL1EmulatorTask, _SimL1EmulatorTaskWithGEM) + SimL1Emulator = cms.Sequence(SimL1EmulatorTask) diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullSimTP_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullSimTP_cff.py index bd905384e2958..ac763f93af934 100644 --- a/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullSimTP_cff.py +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullSimTP_cff.py @@ -1,15 +1,14 @@ from __future__ import print_function import FWCore.ParameterSet.Config as cms -## L1REPACK FULL: Re-Emulate all of L1 and repack into RAW - +## L1REPACK FullSimTP : Re-Emulate all of L1 and repack into RAW from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger -def _print(ignored): - print("# L1T WARN: L1REPACK:FullSimTP (intended for 2016 data) only supports Stage 2 eras for now.") - print("# L1T WARN: Use a legacy version of L1REPACK for now.") -stage2L1Trigger.toModify(None, _print) -(~stage2L1Trigger).toModify(None, lambda x: print("# L1T INFO: L1REPACK:FullSimTP (intended for 2016 data) will unpack all L1T inputs, re-emulate Trigger Primitives, re-emulate L1T (Stage-2), and pack uGT, uGMT, and Calo Stage-2 output.")) + +(~stage2L1Trigger).toModify(None, lambda x: + print("# L1T WARN: L1REPACK:FullSimTP (intended for data) only supports Stage-2 eras for now.\n# L1T WARN: Use a legacy version of L1REPACK for now.")) +stage2L1Trigger.toModify(None, lambda x: + print("# L1T INFO: L1REPACK:FullSimTP (intended for data) will unpack all L1T inputs, re-emulate Trigger Primitives, re-emulate L1T (Stage-2), and pack uGT, uGMT, and Calo Stage-2 output.")) # First, Unpack all inputs to L1: import EventFilter.L1TRawToDigi.bmtfDigis_cfi diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full_cff.py index 4b658c5e1df77..ba8a355a65dfd 100644 --- a/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full_cff.py +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full_cff.py @@ -1,17 +1,17 @@ from __future__ import print_function import FWCore.ParameterSet.Config as cms -## L1REPACK FULL: Re-Emulate all of L1 and repack into RAW +## L1REPACK Full : Re-Emulate all of L1 and repack into RAW from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger from Configuration.Eras.Modifier_stage2L1Trigger_2017_cff import stage2L1Trigger_2017 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM -def _print(ignored): - print("# L1T WARN: L1REPACK:Full (intended for 2016 data) only supports Stage 2 eras for now.") - print("# L1T WARN: Use a legacy version of L1REPACK for now.") -stage2L1Trigger.toModify(None, _print) -(~stage2L1Trigger).toModify(None, lambda x: print("# L1T INFO: L1REPACK:Full (intended for 2016 & 2017 data) will unpack all L1T inputs, re-emulated (Stage-2), and pack uGT, uGMT, and Calo Stage-2 output.")) +(~stage2L1Trigger).toModify(None, lambda x: + print("# L1T WARN: L1REPACK:Full only supports Stage-2 eras for now.\n# L1T WARN: Use a legacy version of L1REPACK for now.")) + +stage2L1Trigger.toModify(None, lambda x: + print("# L1T INFO: L1REPACK:Full will unpack all L1T inputs, re-emulated (Stage-2), and pack uGT, uGMT, and Calo Stage-2 output.")) # First, Unpack all inputs to L1: @@ -97,7 +97,7 @@ def _print(ignored): simTwinMuxDigis.DTDigi_Source = "unpackTwinMux:PhIn" simTwinMuxDigis.DTThetaDigi_Source = "unpackTwinMux:ThIn" -run3_GEM.toModify(simMuonGEMPadDigis, +(stage2L1Trigger & run3_GEM).toModify(simMuonGEMPadDigis, InputCollection = 'unpackGEM' ) diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_uGT_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_uGT_cff.py index 875ec18f8d8d7..2ff5372a5aaba 100644 --- a/Configuration/StandardSequences/python/SimL1EmulatorRepack_uGT_cff.py +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_uGT_cff.py @@ -1,16 +1,14 @@ from __future__ import print_function import FWCore.ParameterSet.Config as cms -## L1REPACK FULL: Re-Emulate all of L1 and repack into RAW - +## L1REPACK uGT : Re-Emulate L1 uGT and repack into RAW from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger -def _print(ignored): - print("# L1T WARN: L1REPACK:Full (intended for 2016 data) only supports Stage 2 eras for now.") - print("# L1T WARN: Use a legacy version of L1REPACK for now.") -stage2L1Trigger.toModify(None, _print) -(~stage2L1Trigger).toModify(None, lambda x: print("# L1T INFO: L1REPACK:uGT (intended for 2016 data) will unpack uGMT and CaloLaye2 outputs and re-emulate uGT")) +(~stage2L1Trigger).toModify(None, lambda x: + print("# L1T WARN: L1REPACK:uGT only supports Stage-2 eras for now.\n# L1T WARN: Use a legacy version of L1REPACK for now.")) +stage2L1Trigger.toModify(None, lambda x: + print("# L1T INFO: L1REPACK:uGT will unpack uGMT and CaloLayer2 outputs, and re-emulate uGT")) # First, inputs to uGT: import EventFilter.L1TRawToDigi.gtStage2Digis_cfi