Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:20:23

0001 # customization fragments to run L1Emulator with hltGetConfiguration
0002 #
0003 
0004 import FWCore.ParameterSet.Config as cms
0005 import os
0006 
0007 ##############################################################################
0008 
0009 def customiseL1EmulatorFromRaw(process):
0010     # customization fragment to run full emulator chain (TPGs and L1 Muon,Calo and GT emulators) 
0011     # starting from a RAW file assuming that "RawToDigi_cff" and "SimL1Emulator_cff" 
0012     # have already been loaded
0013     
0014     # (GMT digis produced by same module as the GT digis, as GT and GMT have common unpacker)
0015     ## process.simRpcTechTrigDigis.RPCDigiLabel = 'muonRPCDigis'
0016 
0017     ## 2015 L1 Calo Emulator
0018     process.load('L1Trigger.L1TCalorimeter.L1TCaloStage1_PPFromRaw_cff')
0019 
0020     ### 2015 L1 Muon Emulator
0021     from L1Trigger.DTTrackFinder.dttfDigis_cfi import dttfDigis
0022     process.dttfReEmulDigis       = dttfDigis.clone()
0023     process.dttfReEmulDigis.DTDigi_Source  = cms.InputTag("dttfDigis")
0024     process.dttfReEmulDigis.CSCStub_Source = cms.InputTag("csctfReEmulTrackDigis")
0025 
0026     from L1Trigger.RPCTrigger.rpcTriggerDigis_cfi import rpcTriggerDigis
0027     process.rpcTriggerReEmulDigis = rpcTriggerDigis.clone()
0028 
0029     process.load("L1TriggerConfig.RPCTriggerConfig.RPCConeDefinition_cff")
0030     process.load("L1Trigger.RPCTrigger.RPCConeConfig_cff")
0031 
0032     from SLHCUpgradeSimulations.Configuration.muonCustoms import customise_csc_L1Emulator_sim
0033     from L1Trigger.CSCTrackFinder.csctfDigis_cfi import csctfDigis
0034     customise_csc_L1Emulator_sim(process) 
0035 
0036     process.csctfReEmulTrackDigis = process.simCsctfTrackDigis.clone()
0037     process.csctfReEmulDigis      = csctfDigis.clone()
0038 
0039     process.csctfReEmulTrackDigis.DTproducer  = cms.untracked.InputTag("dttfDigis")
0040     process.csctfReEmulDigis.CSCTrackProducer = cms.untracked.InputTag("csctfReEmulTrackDigis")
0041 
0042     process.csctfReEmulTrackDigis.SectorProcessor.PTLUT.PtMethod = cms.untracked.uint32(34) # no triple ganging in ME11a
0043     process.csctfReEmulTrackDigis.SectorProcessor.gangedME1a = cms.untracked.bool(False)
0044     process.csctfReEmulTrackDigis.SectorProcessor.firmwareSP = cms.uint32(20140515) #core 20120730
0045     process.csctfReEmulTrackDigis.SectorProcessor.initializeFromPSet = cms.bool(True) 
0046     process.csctfReEmulTrackDigis.SectorReceiverInput = cms.untracked.InputTag("cscReEmulTriggerPrimitiveDigis","MPCSORTED")
0047 
0048     process.cscReEmulTriggerPrimitiveDigis = process.simCscTriggerPrimitiveDigis.clone()
0049     process.cscReEmulTriggerPrimitiveDigis.CSCComparatorDigiProducer = cms.InputTag("muonCSCDigis","MuonCSCComparatorDigi")
0050     process.cscReEmulTriggerPrimitiveDigis.CSCWireDigiProducer = cms.InputTag("muonCSCDigis","MuonCSCWireDigi")
0051 
0052     process.csctfReEmulSequence = cms.Sequence(
0053         process.cscReEmulTriggerPrimitiveDigis
0054         * process.csctfReEmulTrackDigis
0055         * process.csctfReEmulDigis
0056     )
0057 
0058     from L1Trigger.GlobalMuonTrigger.gmtDigis_cfi import gmtDigis
0059     process.gmtReEmulDigis  = gmtDigis.clone()
0060 
0061     process.gmtReEmulDigis.DTCandidates   = cms.InputTag("dttfReEmulDigis","DT")
0062     process.gmtReEmulDigis.CSCCandidates  = cms.InputTag("csctfReEmulDigis","CSC")
0063     process.gmtReEmulDigis.RPCbCandidates = cms.InputTag("rpcTriggerReEmulDigis","RPCb")
0064     process.gmtReEmulDigis.RPCfCandidates = cms.InputTag("rpcTriggerReEmulDigis","RPCf")
0065     process.gmtReEmulDigis.MipIsoData     = cms.InputTag("none")
0066     
0067     process.load('L1TriggerConfig.GMTConfigProducers.L1MuGMTParameters_cfi')
0068     process.L1MuGMTParameters.MergeMethodPtBrl=cms.string("byMinPt")
0069     process.L1MuGMTParameters.MergeMethodPtFwd=cms.string("byMinPt")
0070     process.L1MuGMTParameters.VersionSortRankEtaQLUT = cms.uint32(275)
0071     process.L1MuGMTParameters.VersionLUTs = cms.uint32(1) 
0072     process.es_prefer_gmtConfig = cms.ESPrefer("L1MuGMTParametersProducer","L1MuGMTParameters")
0073 
0074     process.reEmulMuonChain = cms.Sequence(
0075         process.rpcTriggerReEmulDigis
0076         *process.csctfReEmulSequence
0077         *process.dttfReEmulDigis
0078         *process.gmtReEmulDigis
0079         )
0080 
0081     ## remove for 720pre7 and beyond
0082     ## use new muon LUTs
0083     ## dttfFile='sqlite:dttf_config.db'
0084     ## process.GlobalTag.toGet.extend(
0085     ##     cms.VPSet(cms.PSet(record = cms.string("L1MuDTEtaPatternLutRcd"),
0086     ##                        tag = cms.string("L1MuDTEtaPatternLut_CRAFT09_hlt"),
0087     ##                        connect = cms.untracked.string(dttfFile)
0088     ##                    ),
0089     ##               cms.PSet(record = cms.string("L1MuDTExtLutRcd"),
0090     ##                        tag = cms.string("L1MuDTExtLut_CRAFT09_hlt"),
0091     ##                        connect = cms.untracked.string(dttfFile)
0092     ##                    ),
0093     ##               cms.PSet(record = cms.string("L1MuDTPhiLutRcd"),
0094     ##                        tag = cms.string("L1MuDTPhiLut_CRAFT09_hlt"),
0095     ##                        connect = cms.untracked.string(dttfFile)
0096     ##                    ),
0097     ##               cms.PSet(record = cms.string("L1MuDTPtaLutRcd"),
0098     ##                        tag = cms.string("L1MuDTPtaLut_CRAFT09_hlt"),
0099     ##                        connect = cms.untracked.string(dttfFile)
0100     ##                    ),
0101     ##               cms.PSet(record = cms.string("L1MuDTQualPatternLutRcd"),
0102     ##                        tag = cms.string("L1MuDTQualPatternLut_CRAFT09_hlt"),
0103     ##                        connect = cms.untracked.string(dttfFile)
0104     ##                    )
0105     ##          )
0106     ## )
0107     ## end
0108 
0109     # GT
0110     from L1Trigger.Configuration.SimL1Emulator_cff import simGtDigis
0111     simGtDigis.GmtInputTag = 'gmtReEmulDigis'
0112     simGtDigis.GctInputTag = 'simCaloStage1LegacyFormatDigis'
0113     simGtDigis.TechnicalTriggersInputTags = cms.VInputTag( )
0114 
0115     # run Calo TPGs, L1 GCT, technical triggers, L1 GT
0116     SimL1Emulator = cms.Sequence(
0117         ## process.reEmulCaloChain +
0118         process.L1TCaloStage1_PPFromRaw +
0119         process.reEmulMuonChain +
0120         process.simGtDigis )
0121 
0122     # replace the SimL1Emulator in all paths and sequences
0123     for iterable in process.sequences.values():
0124         iterable.replace( process.SimL1Emulator, SimL1Emulator)
0125     for iterable in process.paths.values():
0126         iterable.replace( process.SimL1Emulator, SimL1Emulator)
0127     for iterable in process.endpaths.values():
0128         iterable.replace( process.SimL1Emulator, SimL1Emulator)
0129     process.SimL1Emulator = SimL1Emulator
0130 
0131     return process
0132 
0133 ##############################################################################