CMS 3D CMS Logo

SimL1EmulatorRepack_uGT_cff.py
Go to the documentation of this file.
1 from __future__ import print_function
2 import FWCore.ParameterSet.Config as cms
3 
4 ## L1REPACK FULL: Re-Emulate all of L1 and repack into RAW
5 
6 
7 from Configuration.Eras.Modifier_stage2L1Trigger_cff import stage2L1Trigger
8 def _print(ignored):
9  print("L1T WARN: L1REPACK:Full (intended for 2016 data) only supports Stage 2 eras for now.")
10  print("L1T WARN: Use a legacy version of L1REPACK for now.")
11 stage2L1Trigger.toModify(None, _print)
12 (~stage2L1Trigger).toModify(None, lambda x: print("L1T INFO: L1REPACK:uGT (intended for 2016 data) will unpack uGMT and CaloLaye2 outputs and re-emulate uGT"))
13 
14 
15 # First, inputs to uGT:
16 import EventFilter.L1TRawToDigi.gtStage2Digis_cfi
17 unpackGtStage2 = EventFilter.L1TRawToDigi.gtStage2Digis_cfi.gtStage2Digis.clone(
18  InputLabel = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess()))
19 
21 unpackTcds = EventFilter.Utilities.tcdsRawToDigi_cfi.tcdsRawToDigi.clone(
22  InputLabel = cms.InputTag( 'rawDataCollector', processName=cms.InputTag.skipCurrentProcess()))
23 
25 
26 simGtExtFakeStage2Digis.tcdsRecordLabel= cms.InputTag("unpackTcds","tcdsRecord")
27 
28 simGtStage2Digis.MuonInputTag = "unpackGtStage2:Muon"
29 simGtStage2Digis.EGammaInputTag = "unpackGtStage2:EGamma"
30 simGtStage2Digis.TauInputTag = "unpackGtStage2:Tau"
31 simGtStage2Digis.JetInputTag = "unpackGtStage2:Jet"
32 simGtStage2Digis.EtSumInputTag = "unpackGtStage2:EtSum"
33 simGtStage2Digis.ExtInputTag = "unpackGtStage2" # as in default
34 
35 
36 # Finally, pack the new L1T output back into RAW
37 
38 # pack simulated uGT
39 from EventFilter.L1TRawToDigi.gtStage2Raw_cfi import gtStage2Raw as packGtStage2
40 packGtStage2.MuonInputTag = "unpackGtStage2:Muon"
41 packGtStage2.EGammaInputTag = "unpackGtStage2:EGamma"
42 packGtStage2.TauInputTag = "unpackGtStage2:Tau"
43 packGtStage2.JetInputTag = "unpackGtStage2:Jet"
44 packGtStage2.EtSumInputTag = "unpackGtStage2:EtSum"
45 packGtStage2.GtInputTag = "simGtStage2Digis" # as in default
46 packGtStage2.ExtInputTag = "unpackGtStage2" # as in default
47 
48 
49 # combine the new L1 RAW with existing RAW for other FEDs
50 import EventFilter.RawDataCollector.rawDataCollectorByLabel_cfi
51 rawDataCollector = EventFilter.RawDataCollector.rawDataCollectorByLabel_cfi.rawDataCollector.clone(
52  verbose = 0,
53  RawCollectionList = [
54  'packGtStage2',
55  cms.InputTag('rawDataCollector', processName=cms.InputTag.skipCurrentProcess()),
56  ]
57  )
58 
59 
60 SimL1EmulatorTask = cms.Task()
61 stage2L1Trigger.toReplaceWith(SimL1EmulatorTask, cms.Task(unpackGtStage2
62  ,unpackTcds
63  ,SimL1TechnicalTriggersTask
64  ,SimL1TGlobalTask
65  ,packGtStage2
66  ,rawDataCollector))
67 SimL1Emulator = cms.Sequence(SimL1EmulatorTask)
S & print(S &os, JobReport::InputFile const &f)
Definition: JobReport.cc:66