Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:31:06

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 
0004 # LUT generator process
0005 process = cms.Process("LUTgen")
0006 
0007 # just run once
0008 process.maxEvents = cms.untracked.PSet(
0009     input = cms.untracked.int32(1)
0010     )
0011 
0012 # setup message logging to cout, without any filtering
0013 #process.MessageLogger = cms.Service("MessageLogger",
0014 #     destinations = cms.untracked.vstring('cout'),
0015 #     cout = cms.untracked.PSet(
0016 #         threshold = cms.untracked.string('DEBUG'), ## DEBUG mode 
0017 #
0018 #         DEBUG = cms.untracked.PSet( 
0019 #             limit = cms.untracked.int32(-1)          ## DEBUG mode, all messages  
0020 #             #limit = cms.untracked.int32(10)         ## DEBUG mode, max 10 messages 
0021 #         ),
0022 #         INFO = cms.untracked.PSet(
0023 #             limit = cms.untracked.int32(-1)
0024 #         )
0025 #     ),
0026 #     debugModules = cms.untracked.vstring('*'), ## DEBUG mode 
0027 #)
0028 
0029 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0030 process.MessageLogger.cout.enable = cms.untracked.bool(True)
0031 process.MessageLogger.cout.threshold = cms.untracked.string('INFO')
0032 process.MessageLogger.debugModules = cms.untracked.vstring('*')
0033 
0034 ##############################
0035 # CondTools key lookup magic #
0036 ##############################
0037 
0038 # Generate dummy L1TriggerKeyList
0039 process.load("CondTools.L1Trigger.L1TriggerKeyListDummy_cff")
0040 
0041 # # from https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideL1ConfigOnlineProd
0042 
0043 # Alternative 1 :
0044 # For known object keys:
0045 
0046 # print "Specifying parameters directly"
0047 # process.load("CondTools.L1Trigger.L1TriggerKeyDummy_cff")
0048 # process.L1TriggerKeyDummy.objectKeys = cms.VPSet(
0049 #     cms.PSet(
0050 #         record = cms.string('L1MuGMTParametersRcd'),
0051 #         type = cms.string('L1MuGMTParameters'),
0052 #         key = cms.string('default1')),
0053 #     cms.PSet(
0054 #         record = cms.string('L1MuTriggerScalesRcd'),
0055 #         type = cms.string('L1MuTriggerScales'),
0056 #         key = cms.string('...')),
0057 #         cms.PSet(
0058 #         record = cms.string('L1MuTriggerPtScaleRcd'),
0059 #         type = cms.string('L1MuTriggerPtScale'),
0060 #         key = cms.string('...'))    
0061 # )
0062 
0063 
0064 
0065 # Alternative 2:
0066 # For a known subsystem key (MySubsystemKey):
0067 # [x] Works!
0068 
0069 print("Specifying GMT key")
0070 process.load("CondTools.L1Trigger.L1TriggerKeyDummy_cff")
0071 process.L1TriggerKeyDummy.objectKeys = cms.VPSet()
0072 process.L1TriggerKeyDummy.label = cms.string('SubsystemKeysOnly')
0073 
0074 # xxxKey = csctfKey, dttfKey, rpcKey, gmtKey, rctKey, gctKey, gtKey, or tsp0Key
0075 process.L1TriggerKeyDummy.gmtKey = cms.string('test20080429')
0076 
0077 # Subclass of L1ObjectKeysOnlineProdBase.
0078 process.load("L1TriggerConfig.GMTConfigProducers.L1MuGMTParametersKeysOnlineProd_cfi")
0079 process.L1MuGMTParametersKeysOnlineProd.subsystemLabel = cms.string('softwareConfig')
0080 process.load("L1TriggerConfig.L1ScalesProducers.L1MuTriggerScaleKeysOnlineProd_cfi")
0081 process.L1MuTriggerScaleKeysOnlineProd.subsystemLabel = cms.string('scales')
0082 
0083 process.load("CondTools.L1Trigger.L1TriggerKeyOnline_cfi")
0084 process.L1TriggerKeyOnline.subsystemLabels = cms.vstring('softwareConfig', 'scales')
0085 
0086 # # Alternative 3:
0087 # # For a known TSC key (MyTSCKey):
0088 # # [x] Works!
0089 
0090 # print "Specifying TSC key"
0091 # process.load("CondTools.L1Trigger.L1SubsystemKeysOnline_cfi")
0092 # process.L1SubsystemKeysOnline.tscKey = cms.string( 'TSC_CRUZET2_080613_GTmuon_GMTDTRPC5CSC5_CSCclosedwindow_DTTFtopbot_RPC_LUM_GCT_RCTH' )
0093  
0094 # # Subclass of L1ObjectKeysOnlineProdBase.
0095 # process.load("L1TriggerConfig.GMTConfigProducers.L1MuGMTParametersKeysOnlineProd_cfi")
0096 # process.L1MuGMTParametersKeysOnlineProd.subsystemLabel = cms.string('softwareConfig')
0097 # process.load("L1TriggerConfig.L1ScalesProducers.L1MuTriggerScaleKeysOnlineProd_cfi")
0098 # process.L1MuTriggerScaleKeysOnlineProd.subsystemLabel = cms.string('scales')
0099 
0100 # process.load("CondTools.L1Trigger.L1TriggerKeyOnline_cfi")
0101 # process.L1TriggerKeyOnline.subsystemLabels = cms.vstring('softwareConfig', 'scales')
0102 
0103 ######################
0104 # GMT emulator setup #
0105 ######################
0106 
0107 # load external parameter data (TODO: Get this from DB as well)
0108 process.load("L1TriggerConfig.L1GeometryProducers.l1CaloGeometry_cfi")
0109 process.load("L1TriggerConfig.L1GeometryProducers.l1CaloGeomRecordSource_cff")
0110 
0111 # load online producers for scales
0112 process.load("L1TriggerConfig.L1ScalesProducers.L1MuTriggerScalesOnlineProducer_cfi")
0113 process.load("L1TriggerConfig.L1ScalesProducers.L1MuTriggerPtScaleOnlineProducer_cfi")
0114 
0115 process.load("L1TriggerConfig.L1ScalesProducers.L1MuGMTScalesConfig_cff")
0116 
0117 # load online producer for GMT parameters
0118 process.load("L1TriggerConfig.GMTConfigProducers.L1MuGMTParametersOnlineProducer_cfi")
0119 
0120 # ignore CMSSW version mismatches!
0121 process.L1MuGMTParametersOnlineProducer.ignoreVersionMismatch = True
0122 
0123 # load the GMT simulator 
0124 print("Before load")
0125 process.load("L1Trigger.GlobalMuonTrigger.gmtDigis_cfi")
0126 print("After load")
0127 
0128 # Clear event data
0129 process.gmtDigis.DTCandidates = cms.InputTag("none", "")
0130 process.gmtDigis.CSCCandidates = cms.InputTag("none", "")
0131 process.gmtDigis.RPCbCandidates = cms.InputTag("none", "")
0132 process.gmtDigis.RPCfCandidates = cms.InputTag("none", "")
0133 
0134 # GMT emulator debugging
0135 process.gmtDigis.Debug = cms.untracked.int32(1)
0136 
0137 # Tell the emulator to generate LUTs
0138 process.gmtDigis.WriteLUTsAndRegs = cms.untracked.bool(True)
0139 
0140 # And run!
0141 process.path = cms.Path(process.gmtDigis)
0142 
0143 process.source = cms.Source("EmptyIOVSource",
0144     timetype = cms.string('runnumber'),
0145     firstValue = cms.uint64(1),
0146     lastValue = cms.uint64(1),
0147     interval = cms.uint64(1)
0148 )
0149 
0150 
0151