Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-05-13 00:07:04

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 # Defines the L1 Emulator sequence for simulation use-case subsystem emulators
0004 # run on the results of previous (in the hardware chain) subsystem emulator:
0005 #  
0006 #     SimL1Emulator = cms.Sequence(...)
0007 #
0008 # properly configured for the current Era (e.g. Run1, 2015, or 2016).  Also
0009 # configures event setup producers appropriate to the current Era, to handle
0010 # conditions which are not yet available in the GT.
0011 #
0012 # Author List
0013 # Jim Brooke, 24 April 2008
0014 # Vasile Mihai Ghete, 2009
0015 # Jim Brooke, Michael Mulhearn, 2015
0016 # Vladimir Rekovic 2016,2017
0017 
0018 # Notes on Inputs:
0019 
0020 # ECAL TPG emulator and HCAL TPG run in the simulation sequence in order to be able 
0021 # to use unsuppressed digis produced by ECAL and HCAL simulation, respectively
0022 # in Configuration/StandardSequences/python/Digi_cff.py
0023 # SimCalorimetry.Configuration.SimCalorimetry_cff
0024 # which calls
0025 # SimCalorimetry.Configuration.ecalDigiSequence_cff
0026 # SimCalorimetry.Configuration.hcalDigiSequence_cff
0027 
0028 #
0029 # At the moment, there is no emulator available for upgrade HF Trigger Primitives,
0030 # so these missing (required!) inputs are presently ignored by downstream modules.
0031 #
0032 
0033 from L1Trigger.Configuration.SimL1TechnicalTriggers_cff import *
0034 
0035 from L1Trigger.L1TCalorimeter.simDigis_cff import *
0036 from L1Trigger.L1TMuon.simDigis_cff import *
0037 from L1Trigger.L1TGlobal.simDigis_cff import *
0038 
0039 # define a core which can be extented in customizations:
0040 SimL1EmulatorCoreTask = cms.Task(
0041     SimL1TCalorimeterTask,
0042     SimL1TMuonTask,
0043     SimL1TechnicalTriggersTask,
0044     SimL1TGlobalTask
0045 )
0046 SimL1EmulatorCore = cms.Sequence(SimL1EmulatorCoreTask)
0047 
0048 SimL1EmulatorTask = cms.Task(SimL1EmulatorCoreTask)
0049 SimL1Emulator = cms.Sequence( SimL1EmulatorTask )
0050 
0051 # 
0052 # Emulators are configured from DB (GlobalTags)
0053 #
0054 
0055 from L1Trigger.L1TGlobal.GlobalParameters_cff import *
0056 
0057 # 2017 EMTF and TwinMux emulator use payloads from DB, not yet in GT,
0058 # soon to be removed when availble in GTs
0059 from L1Trigger.L1TTwinMux.fakeTwinMuxParams_cff import *
0060 
0061 _phase2_siml1emulator = SimL1EmulatorTask.copy()
0062 
0063 # ########################################################################
0064 # ########################################################################
0065 #
0066 # Phase-2 
0067 #
0068 # ########################################################################
0069 # ########################################################################
0070 
0071 # ########################################################################
0072 # Phase-2 Trigger Primitives
0073 # ########################################################################
0074 from L1Trigger.DTTriggerPhase2.CalibratedDigis_cfi import *
0075 CalibratedDigis.dtDigiTag = "simMuonDTDigis"
0076 _phase2_siml1emulator.add(CalibratedDigis)
0077 from L1Trigger.DTTriggerPhase2.dtTriggerPhase2PrimitiveDigis_cfi import *
0078 _phase2_siml1emulator.add(dtTriggerPhase2PrimitiveDigis)
0079 
0080 # HGCAL TP 
0081 # ########################################################################
0082 from  L1Trigger.L1THGCal.hgcalTriggerPrimitives_cff import *
0083 _phase2_siml1emulator.add(L1THGCalTriggerPrimitivesTask)
0084  
0085 # ########################################################################
0086 # Phase 2 L1T
0087 # ########################################################################
0088 
0089 # Barrel and EndCap EGamma
0090 # ########################################################################
0091 
0092 from L1Trigger.L1CaloTrigger.l1tEGammaCrystalsEmulatorProducer_cfi import *
0093 _phase2_siml1emulator.add(l1tEGammaClusterEmuProducer)
0094 
0095 # Barrel and EndCap CaloJet/HT
0096 # ########################################################################
0097 # ----    Produce the calibrated tower collection combining Barrel, HGCal, HF
0098 from L1Trigger.L1CaloTrigger.l1tTowerCalibrationProducer_cfi import *
0099 l1tTowerCalibration = l1tTowerCalibrationProducer.clone(
0100   L1HgcalTowersInputTag = ("l1tHGCalTowerProducer","HGCalTowerProcessor",""),
0101   l1CaloTowers = ("l1tEGammaClusterEmuProducer","L1CaloTowerCollection","")
0102 )
0103 # ----    Produce the L1CaloJets
0104 from L1Trigger.L1CaloTrigger.l1tCaloJetProducer_cfi import *
0105 l1tCaloJet = l1tCaloJetProducer.clone (
0106     l1CaloTowers = ("l1tTowerCalibration","L1CaloTowerCalibratedCollection",""),
0107     L1CrystalClustersInputTag = ("l1tEGammaClusterEmuProducer", "","")
0108 )
0109 # ----    Produce the CaloJet HTT Sums
0110 from L1Trigger.L1CaloTrigger.l1tCaloJetHTTProducer_cfi import *
0111 l1tCaloJetHTT = l1tCaloJetHTTProducer.clone(
0112     BXVCaloJetsInputTag = ("L1CaloJet", "CaloJets") 
0113 )
0114 
0115 
0116 _phase2_siml1emulator.add(l1tTowerCalibration)
0117 _phase2_siml1emulator.add(l1tCaloJet)
0118 _phase2_siml1emulator.add(l1tCaloJetHTT)
0119 
0120 # ########################################################################
0121 # Phase-2 L1T - TrackTrigger dependent modules
0122 # ########################################################################
0123 from L1Trigger.L1TTrackMatch.l1tGTTInputProducer_cfi import *
0124 from L1Trigger.VertexFinder.l1tVertexProducer_cfi import *
0125 l1tVertexFinder = l1tVertexProducer.clone()
0126 l1tVertexFinderEmulator = l1tVertexProducer.clone()
0127 l1tVertexFinderEmulator.VertexReconstruction.Algorithm = "fastHistoEmulation"
0128 l1tVertexFinderEmulator.l1TracksInputTag = ("l1tGTTInputProducer","Level1TTTracksConverted")
0129 _phase2_siml1emulator.add(l1tVertexFinder)
0130 _phase2_siml1emulator.add(l1tVertexProducer)
0131 _phase2_siml1emulator.add(l1tGTTInputProducer)
0132 _phase2_siml1emulator.add(l1tGTTInputProducerExtended)
0133 _phase2_siml1emulator.add(l1tVertexFinderEmulator)
0134 
0135 # Emulated GMT Muons (Tk + Stub, Tk + MuonTFT, StandaloneMuon)
0136 # ########################################################################
0137 from L1Trigger.Phase2L1GMT.gmt_cfi  import *
0138 l1tTkStubsGmt = l1tGMTStubs.clone()
0139 l1tTkMuonsGmt = l1tGMTMuons.clone(
0140     srcStubs  = 'l1tTkStubsGmt'
0141 )
0142 l1tSAMuonsGmt = l1tStandaloneMuons.clone()
0143 _phase2_siml1emulator.add( l1tTkStubsGmt )
0144 _phase2_siml1emulator.add( l1tTkMuonsGmt )
0145 _phase2_siml1emulator.add( l1tSAMuonsGmt )
0146 
0147 ## fix for low-pt muons, this collection is a copy of the l1tTkMuonsGmt collection 
0148 ## in which we only keep those low pt muons with an SA muon associated to it. 
0149 l1tTkMuonsGmtLowPtFix = l1tGMTFilteredMuons.clone()
0150 _phase2_siml1emulator.add( l1tTkMuonsGmtLowPtFix )
0151 
0152 # Tracker Objects
0153 # ########################################################################
0154 from L1Trigger.L1TTrackMatch.l1tTrackJets_cfi import *
0155 from L1Trigger.L1TTrackMatch.l1tTrackFastJets_cfi import *
0156 from L1Trigger.L1TTrackMatch.l1tTrackerEtMiss_cfi import *
0157 from L1Trigger.L1TTrackMatch.l1tTrackerHTMiss_cfi import *
0158 # make the input tags consistent with the choice L1VertexFinder above
0159 l1tTrackJets.L1PVertexInputTag  = ("l1tVertexFinderEmulator","l1verticesEmulation")
0160 l1tTrackFastJets.L1PrimaryVertexTag  = ("l1tVertexFinder", "l1vertices")
0161 l1tTrackJetsExtended.L1PVertexInputTag  = ("l1tVertexFinderEmulator","l1verticesEmulation")
0162 #l1tTrackerEtMiss.L1VertexInputTag = ("l1tVertexFinder", "l1vertices")
0163 #l1tTrackerEtMissExtended.L1VertexInputTag = ("l1tVertexFinder", "l1vertices")
0164 
0165 from L1Trigger.L1TTrackMatch.l1tTrackSelectionProducer_cfi import *
0166 _phase2_siml1emulator.add(l1tTrackSelectionProducer)
0167 _phase2_siml1emulator.add(l1tTrackSelectionProducerExtended)
0168 
0169 _phase2_siml1emulator.add(l1tTrackJets)
0170 _phase2_siml1emulator.add(l1tTrackJetsExtended)
0171 _phase2_siml1emulator.add(l1tTrackFastJets)
0172 _phase2_siml1emulator.add(l1tTrackerEtMiss)
0173 _phase2_siml1emulator.add(l1tTrackerHTMiss)
0174 
0175 #Emulated tracker objects
0176 from L1Trigger.L1TTrackMatch.l1tTrackJetsEmulation_cfi import *
0177 _phase2_siml1emulator.add(l1tTrackJetsEmulation)
0178 _phase2_siml1emulator.add(l1tTrackJetsExtendedEmulation)
0179 
0180 from L1Trigger.L1TTrackMatch.l1tTrackerEmuEtMiss_cfi import *
0181 l1tTrackerEmuEtMiss.L1VertexInputTag = ("l1tVertexFinderEmulator","l1verticesEmulation")
0182 _phase2_siml1emulator.add(l1tTrackerEmuEtMiss)
0183 
0184 from L1Trigger.L1TTrackMatch.l1tTrackerEmuHTMiss_cfi import *
0185 _phase2_siml1emulator.add(l1tTrackerEmuHTMiss)
0186 _phase2_siml1emulator.add(l1tTrackerEmuHTMissExtended)
0187 
0188 # PF Candidates
0189 # ########################################################################
0190 from L1Trigger.Phase2L1ParticleFlow.l1ctLayer1_cff import *
0191 from L1Trigger.Phase2L1ParticleFlow.l1ctLayer2EG_cff import *
0192 _phase2_siml1emulator.add(L1TLayer1TaskInputsTask, L1TLayer1Task, L1TLayer2EGTask)
0193 
0194 # PF Jet
0195 # ########################################################################
0196 # Describe here l1PFJets_a_la_Phase1 Task
0197 # ###############################
0198 from L1Trigger.L1CaloTrigger.Phase1L1TJets_9x9_cff import *
0199 L1TPFJetsPhase1Task_9x9 = cms.Task( l1tPhase1JetProducer9x9, l1tPhase1JetCalibrator9x9, l1tPhase1JetSumsProducer9x9)
0200 _phase2_siml1emulator.add(L1TPFJetsPhase1Task_9x9)
0201 
0202 from L1Trigger.L1CaloTrigger.Phase1L1TJets_9x9trimmed_cff import *
0203 L1TPFJetsPhase1Task_9x9trimmed = cms.Task(  l1tPhase1JetProducer9x9trimmed, l1tPhase1JetCalibrator9x9trimmed, l1tPhase1JetSumsProducer9x9trimmed)
0204 _phase2_siml1emulator.add(L1TPFJetsPhase1Task_9x9trimmed)
0205 
0206 from L1Trigger.Phase2L1Taus.HPSPFTauProducerPF_cfi import *
0207 _phase2_siml1emulator.add(l1tHPSPFTauProducerPF)
0208 
0209 from L1Trigger.Phase2L1Taus.HPSPFTauProducerPuppi_cfi import *
0210 _phase2_siml1emulator.add(l1tHPSPFTauProducerPuppi)
0211 
0212 # PF MET
0213 # ########################################################################
0214 from L1Trigger.Phase2L1ParticleFlow.l1pfJetMet_cff import *
0215 _phase2_siml1emulator.add(L1TPFJetsEmulationTask)
0216 
0217 from L1Trigger.Phase2L1ParticleFlow.l1tMETPFProducer_cfi import *
0218 _phase2_siml1emulator.add(l1tMETPFProducer)
0219 
0220 
0221 # NNTaus
0222 # ########################################################################
0223 from L1Trigger.Phase2L1ParticleFlow.L1NNTauProducer_cff import *
0224 _phase2_siml1emulator.add(l1tNNTauProducerPuppi)
0225 
0226 
0227 # BJets
0228 # ########################################################################
0229 from L1Trigger.Phase2L1ParticleFlow.L1BJetProducer_cff import *
0230 _phase2_siml1emulator.add(L1TBJetsTask)
0231 
0232 
0233 # --> add modules
0234 from Configuration.Eras.Modifier_phase2_trigger_cff import phase2_trigger
0235 phase2_trigger.toReplaceWith( SimL1EmulatorTask , _phase2_siml1emulator)