Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #
0002 # test-o2o-emulator.py
0003 #
0004 # Run O2O for a given configuration key, then run GCT emulator and DQM
0005 #
0006 # NB - masks not included for now!
0007 
0008 import FWCore.ParameterSet.Config as cms
0009 
0010 import sys
0011 import os
0012 from subprocess import *
0013 
0014 # arguments
0015 key=str(sys.argv[2])
0016 
0017 
0018 # CMSSW process proper
0019 process = cms.Process('testGCTO2OEmulator')
0020 
0021 
0022 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0023 process.MessageLogger.cerr.INFO.limit = cms.untracked.int32(1000)
0024 process.MessageLogger.cerr.threshold = cms.untracked.string('DEBUG')
0025 process.MessageLogger.debugModules = cms.untracked.vstring('l1GctConfigDump')
0026 
0027 # Configuration
0028 process.load("CondTools.L1Trigger.L1TriggerKeyListDummy_cff")
0029 
0030 # get 
0031 process.load("CondTools.L1Trigger.L1TriggerKeyDummy_cff")
0032 process.L1TriggerKeyDummy.objectKeys = cms.VPSet()
0033 process.L1TriggerKeyDummy.label = cms.string('SubsystemKeysOnly')
0034 
0035 # xxxKey = csctfKey, dttfKey, rpcKey, gmtKey, rctKey, gctKey, gtKey, or tsp0Key
0036 process.L1TriggerKeyDummy.gctKey = cms.string(key)
0037 
0038 # Subclass of L1ObjectKeysOnlineProdBase.
0039 process.load("L1TriggerConfig.GctConfigProducers.L1GctTSCObjectKeysOnline_cfi")
0040 process.L1GctTSCObjectKeysOnline.subsystemLabel = cms.string('')
0041 
0042 # Get configuration data from OMDS.  This is the subclass of L1ConfigOnlineProdBase.
0043 process.load("L1TriggerConfig.GctConfigProducers.L1GctJetFinderParamsOnline_cfi")
0044 process.load("L1TriggerConfig.L1ScalesProducers.L1JetEtScaleOnline_cfi")
0045 process.load("L1TriggerConfig.L1ScalesProducers.L1HfRingEtScaleOnline_cfi")
0046 process.load("L1TriggerConfig.L1ScalesProducers.L1HtMissScaleOnline_cfi")
0047 
0048 # dummy producer for masks
0049 process.load("L1TriggerConfig.GctConfigProducers.L1GctConfig_cff")
0050 # but this produces masks *and* parameters, so set es_prefer for online params
0051 process.es_prefer = cms.ESPrefer('L1GctJetFinderParamsOnlineProd', 'L1GctJetFinderParamsOnline')
0052 
0053 # dump config
0054 process.load('L1TriggerConfig/GctConfigProducers.l1GctConfigDump_cfi')
0055 
0056 
0057 # GCT Unpacker
0058 process.load('Configuration.StandardSequences.RawToDigi_Data_cff')
0059 
0060 # GCT emulator
0061 process.load('L1Trigger.HardwareValidation.L1HardwareValidation_cff')
0062 process.l1compare.COMPARE_COLLS = cms.untracked.vuint32(
0063 # ETP,HTP,RCT,GCT,DTP,DTF,CTP,CTF,RPC,LTC,GMT,GT
0064     0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0
0065 )
0066 
0067 # GCT DQM
0068 process.load('DQMServices.Core.DQM_cfg')
0069 process.load('DQM.L1TMonitor.L1TGCT_cfi')
0070 process.l1tgct.disableROOToutput = cms.untracked.bool(False)
0071 process.l1tgct.gctCentralJetsSource = cms.InputTag("gctDigis","cenJets")
0072 process.l1tgct.gctNonIsoEmSource = cms.InputTag("gctDigis","nonIsoEm")
0073 process.l1tgct.gctForwardJetsSource = cms.InputTag("gctDigis","forJets")
0074 process.l1tgct.gctIsoEmSource = cms.InputTag("gctDigis","isoEm")
0075 process.l1tgct.gctEnergySumsSource = cms.InputTag("gctDigis","")
0076 process.l1tgct.gctTauJetsSource = cms.InputTag("gctDigis","tauJets")
0077 
0078 # RCT DQM
0079 process.load('DQM.L1TMonitor.L1TRCT_cfi')
0080 process.l1trct.disableROOToutput = cms.untracked.bool(False)
0081 process.l1trct.rctSource = cms.InputTag("gctDigis","")
0082 
0083 
0084 # GCT EXPERT EMU DQM
0085 process.load('DQM.L1TMonitor.L1TdeGCT_cfi')
0086 process.l1demongct.VerboseFlag = cms.untracked.int32(0)
0087 process.l1demongct.DataEmulCompareSource = cms.InputTag("l1compare")
0088 process.l1demongct.disableROOToutput = cms.untracked.bool( False )
0089 process.l1demongct.HistFile = cms.untracked.string('test-o2o-emulator.root')
0090 
0091 
0092 process.path = cms.Path (
0093 process.gctDigis +
0094 process.valGctDigis + 
0095 process.l1compare +
0096 process.l1trct + 
0097 process.l1tgct + 
0098 process.l1demongct
0099 #process.l1GctConfigDump
0100 )
0101 
0102 
0103 
0104 # Number of events
0105 process.maxEvents = cms.untracked.PSet ( input = cms.untracked.int32 ( 1000 ) )
0106 
0107 # input files
0108 #process.source = cms.Source("NewEventStreamFileReader",
0109 #    fileNames = cms.untracked.vstring('file:/lookarea_SM/PrivMinidaq.00124879.0001.A.storageManager.00.0000.dat'
0110 #        )
0111 #)
0112 
0113 
0114 process.source = cms.Source("PoolSource",
0115     fileNames = cms.untracked.vstring('file:~/cmssw/Calo_CRAFT09-GR09_31X_V5P_StoppedHSCP-332_v4_RAW-RECO_111039_test.root'
0116         )
0117 )
0118