Skip to content

Commit

Permalink
fix GEM inputs for L1REPACK:FullMC
Browse files Browse the repository at this point in the history
  • Loading branch information
missirol committed Jan 9, 2023
1 parent 44c3f64 commit e290d42
Showing 1 changed file with 16 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

## L1REPACK FULL: Re-Emulate all of L1 and repack into RAW


from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM

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."))
(~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:

Expand All @@ -25,6 +28,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()))
Expand Down Expand Up @@ -60,6 +67,8 @@ def _print(ignored):
# CSC TPs
simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = 'unpackCSC:MuonCSCComparatorDigi'
simCscTriggerPrimitiveDigis.CSCWireDigiProducer = 'unpackCSC:MuonCSCWireDigi'
# GEM
run3_GEM.toModify(simMuonGEMPadDigis, InputCollection = 'unpackGEM')

# TWIN-MUX
simTwinMuxDigis.RPC_Source = 'unpackRPC'
Expand Down Expand Up @@ -114,4 +123,9 @@ def _print(ignored):
, packGmtStage2
, packGtStage2
, rawDataCollector))

_SimL1EmulatorTaskWithGEM = SimL1EmulatorTask.copy()
_SimL1EmulatorTaskWithGEM.add(unpackGEM)
(stage2L1Trigger & run3_GEM).toReplaceWith(SimL1EmulatorTask, _SimL1EmulatorTaskWithGEM)

SimL1Emulator = cms.Sequence(SimL1EmulatorTask)

0 comments on commit e290d42

Please sign in to comment.