From de7fb1dc9d352e36741c641c0de9bcea83712431 Mon Sep 17 00:00:00 2001 From: Vladimir Rekovic Date: Wed, 25 May 2016 15:43:01 +0200 Subject: [PATCH 1/2] Adding L1REPACK FullMC to run on RAW of MC. Fix Csc tag for Omtf emulator in REPACK:Full, and clean REPACK:uGT --- .../Applications/python/ConfigBuilder.py | 2 +- .../python/SimL1EmulatorRepack_FullMC_cff.py | 109 ++++++++++++++++++ .../python/SimL1EmulatorRepack_Full_cff.py | 2 +- .../python/SimL1EmulatorRepack_uGT_cff.py | 8 -- 4 files changed, 111 insertions(+), 10 deletions(-) create mode 100644 Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py diff --git a/Configuration/Applications/python/ConfigBuilder.py b/Configuration/Applications/python/ConfigBuilder.py index 4cd55c4347dcd..9d8f1d1308f41 100644 --- a/Configuration/Applications/python/ConfigBuilder.py +++ b/Configuration/Applications/python/ConfigBuilder.py @@ -1499,7 +1499,7 @@ def prepare_L1(self, sequence = None): def prepare_L1REPACK(self, sequence = None): """ Enrich the schedule with the L1 simulation step, running the L1 emulator on data unpacked from the RAW collection, and repacking the result in a new RAW collection""" - supported = ['GT','GT1','GT2','GCTGT','Full','Full2015Data','uGT'] + supported = ['GT','GT1','GT2','GCTGT','Full','FullMC','Full2015Data','uGT'] if sequence in supported: self.loadAndRemember('Configuration/StandardSequences/SimL1EmulatorRepack_%s_cff'%sequence) if self._options.scenario == 'HeavyIons': diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py new file mode 100644 index 0000000000000..77e5fbe23ef83 --- /dev/null +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py @@ -0,0 +1,109 @@ +import FWCore.ParameterSet.Config as cms +from Configuration.StandardSequences.Eras import eras + +## L1REPACK FULL: Re-Emulate all of L1 and repack into RAW + + +if not (eras.stage2L1Trigger.isChosen()): + 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." +else: + 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: + + import EventFilter.RPCRawToDigi.rpcUnpacker_cfi + unpackRPC = EventFilter.RPCRawToDigi.rpcUnpacker_cfi.rpcunpacker.clone( + InputLabel = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess())) + + import EventFilter.DTRawToDigi.dtunpacker_cfi + unpackDT = EventFilter.DTRawToDigi.dtunpacker_cfi.muonDTDigis.clone( + inputLabel = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess())) + + import EventFilter.CSCRawToDigi.cscUnpacker_cfi + unpackCSC = EventFilter.CSCRawToDigi.cscUnpacker_cfi.muonCSCDigis.clone( + InputObjects = 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())) + + import EventFilter.HcalRawToDigi.HcalRawToDigi_cfi + unpackHcal = EventFilter.HcalRawToDigi.HcalRawToDigi_cfi.hcalDigis.clone( + InputLabel = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess())) + + # Second, Re-Emulate the entire L1T + # + # Legacy trigger primitive emulations still running in 2016 trigger: + # + from SimCalorimetry.Configuration.SimCalorimetry_cff import * + + # Ecal TPs + # cannot simulate EcalTPs, don't have EcalUnsuppressedDigis in RAW + # simEcalTriggerPrimitiveDigis.Label = 'unpackEcal' + # further downstream, use unpacked EcalTPs + + # Hcal TPs + simHcalTriggerPrimitiveDigis.inputLabel = cms.VInputTag( + cms.InputTag('unpackHcal'), + cms.InputTag('unpackHcal') + ) + + from L1Trigger.Configuration.SimL1Emulator_cff import * + # DT TPs + simDtTriggerPrimitiveDigis.digiTag = 'unpackDT' + # CSC TPs + simCscTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag('unpackCSC', 'MuonCSCComparatorDigi' ) + simCscTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag( 'unpackCSC', 'MuonCSCWireDigi' ) + + # TWIN-MUX + simTwinMuxDigis.RPC_Source = cms.InputTag('unpackRPC') + simTwinMuxDigis.DTDigi_Source = cms.InputTag("simDtTriggerPrimitiveDigis") + simTwinMuxDigis.DTThetaDigi_Source = cms.InputTag("simDtTriggerPrimitiveDigis") + + # BMTF + simBmtfDigis.DTDigi_Source = cms.InputTag("simDtTriggerPrimitiveDigis") + simBmtfDigis.DTDigi_Theta_Source = cms.InputTag("simDtTriggerPrimitiveDigis") + + # OMTF + simOmtfDigis.srcRPC = cms.InputTag('unpackRPC') + simOmtfDigis.srcDTPh = cms.InputTag("simDtTriggerPrimitiveDigis") + simOmtfDigis.srcDTTh = cms.InputTag("simDtTriggerPrimitiveDigis") + simOmtfDigis.srcCSC = cms.InputTag('simCscTriggerPrimitiveDigis','MPCSORTED') + + # EMTF + simEmtfDigis.CSCInput = cms.InputTag('simCscTriggerPrimitiveDigis','MPCSORTED') + + # CALO Layer1 + simCaloStage2Layer1Digis.ecalToken = cms.InputTag('unpackEcal:EcalTriggerPrimitives') + simCaloStage2Layer1Digis.hcalToken = cms.InputTag('simHcalTriggerPrimitiveDigis') + + # Finally, pack the new L1T output back into RAW + from EventFilter.L1TRawToDigi.caloStage2Raw_cfi import caloStage2Raw as packCaloStage2 + from EventFilter.L1TRawToDigi.gmtStage2Raw_cfi import gmtStage2Raw as packGmtStage2 + from EventFilter.L1TRawToDigi.gtStage2Raw_cfi import gtStage2Raw as packGtStage2 + + # combine the new L1 RAW with existing RAW for other FEDs + import EventFilter.RawDataCollector.rawDataCollectorByLabel_cfi + rawDataCollector = EventFilter.RawDataCollector.rawDataCollectorByLabel_cfi.rawDataCollector.clone( + verbose = cms.untracked.int32(0), + RawCollectionList = cms.VInputTag( + cms.InputTag('packCaloStage2'), + cms.InputTag('packGmtStage2'), + cms.InputTag('packGtStage2'), + cms.InputTag('rawDataCollector', processName=cms.InputTag.skipCurrentProcess()), + ) + ) + + SimL1Emulator = cms.Sequence(unpackRPC + + unpackDT + + unpackCSC + + unpackEcal + + unpackHcal + #+ simEcalTriggerPrimitiveDigis + + simHcalTriggerPrimitiveDigis + + SimL1EmulatorCore + + packCaloStage2 + + packGmtStage2 + + packGtStage2 + + rawDataCollector) diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full_cff.py index 0a4b4a0fca6b1..7637d09eb7345 100644 --- a/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full_cff.py +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_Full_cff.py @@ -78,7 +78,7 @@ simOmtfDigis.srcRPC = cms.InputTag('unpackRPC') simOmtfDigis.srcDTPh = cms.InputTag("unpackBmtf") simOmtfDigis.srcDTTh = cms.InputTag("unpackBmtf") - simEmtfDigis.CSCInput = cms.InputTag("unpackCsctf") # replace when emtfDigis availalbe + simOmtfDigis.srcCSC = cms.InputTag("unpackCsctf") # replace when emtfDigis availalbe # EMTF simEmtfDigis.CSCInput = cms.InputTag("unpackCsctf") # replace when emtfDigis availalbe diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_uGT_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_uGT_cff.py index f22466da8a1d1..f7714c382f64f 100644 --- a/Configuration/StandardSequences/python/SimL1EmulatorRepack_uGT_cff.py +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_uGT_cff.py @@ -30,14 +30,6 @@ # Finally, pack the new L1T output back into RAW - # pack unpacked - from EventFilter.L1TRawToDigi.caloStage2Raw_cfi import caloStage2Raw as packCaloStage2 - packCaloStage2.InputLabel = cms.InputTag("unpackCaloStage2") - - # pack unpacked - from EventFilter.L1TRawToDigi.gmtStage2Raw_cfi import gmtStage2Raw as packGmtStage2 - packGmtStage2.InputLabel = cms.InputTag("unpackGmtStage2") - # pack simulated uGT from EventFilter.L1TRawToDigi.gtStage2Raw_cfi import gtStage2Raw as packGtStage2 packGtStage2.MuonInputTag = cms.InputTag("unpackGmtStage2","Muon") From 28671c6e0dfce741c4ad537941ac335cb78518b7 Mon Sep 17 00:00:00 2001 From: Vladimir Rekovic Date: Thu, 26 May 2016 15:26:26 +0200 Subject: [PATCH 2/2] Use default configuration with DTDigi_Source for simBmtfDigis --- .../StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py b/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py index 77e5fbe23ef83..97895579812b7 100644 --- a/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py +++ b/Configuration/StandardSequences/python/SimL1EmulatorRepack_FullMC_cff.py @@ -62,7 +62,7 @@ simTwinMuxDigis.DTThetaDigi_Source = cms.InputTag("simDtTriggerPrimitiveDigis") # BMTF - simBmtfDigis.DTDigi_Source = cms.InputTag("simDtTriggerPrimitiveDigis") + simBmtfDigis.DTDigi_Source = cms.InputTag("simTwinMuxDigis") simBmtfDigis.DTDigi_Theta_Source = cms.InputTag("simDtTriggerPrimitiveDigis") # OMTF