Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-26 02:34:09

0001 #
0002 # cfg file to run online L1 Trigger emulator DQM
0003 #     the user can choose the environment (live, playback, file-P5, file)
0004 #     for 'file, one can also choose the global tag type and the actual tag
0005 #
0006 # V M Ghete 2010-07-09
0007 
0008 
0009 import FWCore.ParameterSet.Config as cms
0010 import sys
0011 
0012 # choose the environment you run
0013 #l1DqmEnv = 'live'
0014 #l1DqmEnv = 'playback'
0015 #l1DqmEnv = 'file-P5'
0016 l1DqmEnv = 'file'
0017 
0018 # for 'file' choose also the type of the global tag and (edit) the actual global tag
0019 if l1DqmEnv == 'file' :
0020     
0021     globalTagType = 'HLT'
0022     #globalTagType = 'P'
0023     #globalTagType = 'E'
0024     #globalTagType = 'R'
0025     
0026     if globalTagType == 'HLT' :
0027         globalTagValue = 'GR_H_V26'
0028     elif globalTagType == 'P' :
0029         globalTagValue = 'GR_P_V29'
0030     elif globalTagType == 'E' :
0031         globalTagValue = 'GR_E_V23'
0032     elif globalTagType == 'R' :
0033         globalTagValue = 'GR_R_52_V4'
0034     else :
0035         print('No valid global tag type', globalTagType)
0036         print('Valid types: HLT, P, E, R')
0037         sys.exit()
0038 
0039 
0040 process = cms.Process("L1TEmuDQM")
0041 
0042 # check that a valid choice for environment exists
0043 
0044 if not ((l1DqmEnv == 'live') or l1DqmEnv == 'playback' or l1DqmEnv == 'file-P5' or l1DqmEnv == 'file' ) : 
0045     print('No valid input source was chosen. Your value for l1DqmEnv input parameter is:')  
0046     print('l1DqmEnv = ', l1DqmEnv)
0047     print('Available options: "live", "playback", "file-P5", "file" ')
0048     sys.exit()
0049 
0050 #----------------------------
0051 # Event Source
0052 #
0053 
0054 if l1DqmEnv == 'live' :
0055     process.load("DQM.Integration.test.inputsource_cfi")
0056     process.EventStreamHttpReader.SelectEvents = cms.untracked.PSet(
0057             SelectEvents = cms.vstring("*")
0058             )
0059     process.EventStreamHttpReader.consumerName = 'L1TEMU DQM Consumer'
0060     process.EventStreamHttpReader.maxEventRequestRate = cms.untracked.double(25.0)
0061  
0062 elif l1DqmEnv == 'playback' :
0063     print('FIXME')
0064     sys.exit()
0065     
0066 else : 
0067     # running on a file
0068     process.load("DQM.L1TMonitor.inputsource_file_cfi")
0069     
0070       
0071 #----------------------------
0072 # DQM Environment
0073 #
0074 
0075 process.load("DQMServices.Core.DQM_cfg")
0076 process.load("DQMServices.Components.DQMEnvironment_cfi")
0077 process.dqmEnv.subSystemFolder = 'L1TEMU'
0078 
0079 if l1DqmEnv == 'live' :
0080     process.load("DQM.Integration.test.environment_cfi")
0081     # no references needed
0082 
0083     #
0084     # load and configure modules via Global Tag
0085     # https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
0086     process.load("DQM.Integration.test.FrontierCondition_GT_cfi")
0087     es_prefer_GlobalTag = cms.ESPrefer('GlobalTag')
0088     process.GlobalTag.RefreshEachRun = cms.untracked.bool(True)
0089 
0090 elif l1DqmEnv == 'playback' :
0091     print('FIXME')
0092     
0093 elif l1DqmEnv == 'file-P5' :
0094     process.load("DQM.Integration.test.FrontierCondition_GT_cfi")
0095     es_prefer_GlobalTag = cms.ESPrefer('GlobalTag')
0096     process.GlobalTag.RefreshEachRun = cms.untracked.bool(True)
0097     
0098 else : 
0099     # running on a file, on lxplus (not on .cms)
0100     process.load("DQM.L1TMonitor.environment_file_cff")
0101 
0102     process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0103     
0104     if globalTagType == 'HLT' :
0105          process.GlobalTag.connect = 'frontier://FrontierProd/CMS_COND_31X_GLOBALTAG' 
0106          process.GlobalTag.pfnPrefix = cms.untracked.string('frontier://FrontierProd/') 
0107                       
0108     process.GlobalTag.globaltag = globalTagValue+'::All'
0109     es_prefer_GlobalTag = cms.ESPrefer('GlobalTag')
0110 
0111 
0112 #process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0113 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0114 
0115 #-------------------------------------
0116 # sequences needed for L1 emulator DQM
0117 #
0118 
0119 # standard unpacking sequence 
0120 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")    
0121 
0122 # L1 data - emulator sequences 
0123 process.load("DQM.L1TMonitor.L1TEmulatorMonitor_cff")    
0124 process.load("DQM.L1TMonitorClient.L1TEMUMonitorClient_cff")    
0125 
0126 #-------------------------------------
0127 # paths & schedule for L1 emulator DQM
0128 #
0129 
0130 # TODO define a L1 trigger L1TriggerRawToDigi in the standard sequence 
0131 # to avoid all these remove
0132 process.rawToDigiPath = cms.Path(process.RawToDigi)
0133 #
0134 process.RawToDigi.remove("siPixelDigis")
0135 process.RawToDigi.remove("siStripDigis")
0136 process.RawToDigi.remove("scalersRawToDigi")
0137 process.RawToDigi.remove("castorDigis")
0138 
0139 # L1HvVal + emulator monitoring path
0140 process.l1HwValEmulatorMonitorPath = cms.Path(process.l1HwValEmulatorMonitor)
0141 
0142 # for RCT at P5, read FED vector from OMDS
0143 if ( l1DqmEnv != 'file' ) : 
0144     process.load("L1TriggerConfig.RCTConfigProducers.l1RCTOmdsFedVectorProducer_cfi")
0145     process.valRctDigis.getFedsFromOmds = cms.bool(True)
0146  
0147 #
0148 process.l1EmulatorMonitorClientPath = cms.Path(process.l1EmulatorMonitorClient)
0149 
0150 #
0151 process.l1EmulatorMonitorEndPath = cms.EndPath(process.dqmEnv*process.dqmSaver)
0152 
0153 #
0154 
0155 #
0156 process.schedule = cms.Schedule(process.rawToDigiPath,
0157                                 process.l1HwValEmulatorMonitorPath,
0158                                 process.l1EmulatorMonitorClientPath,
0159                                 process.l1EmulatorMonitorEndPath)
0160 
0161 #---------------------------------------------
0162 
0163 # examples for quick fixes in case of troubles 
0164 #    please do not modify the commented lines
0165 #
0166 # remove a module from hardware validation
0167 # cff file: L1Trigger.HardwareValidation.L1HardwareValidation_cff
0168 #
0169 # process.L1HardwareValidation.remove("deCsctf")
0170 #
0171 process.L1HardwareValidation.remove(process.deDt)
0172 
0173 
0174 #
0175 # remove a L1 trigger system from the comparator integrated in hardware validation
0176 # cfi file: L1Trigger.HardwareValidation.L1Comparator_cfi
0177 # remove (consistently) the same systems from L1TDEMON
0178 # cfi file: DQM.L1TMonitor.L1TDEMON_cfi
0179 #
0180 # 
0181 # process.l1compare.COMPARE_COLLS = [
0182 #        0,  0,  1,  1,   0,  1,  0,  0,  1,  0,  1, 0
0183 #        ]
0184 #    # ETP,HTP,RCT,GCT, DTP,DTF,CTP,CTF,RPC,LTC,GMT,GT
0185 #
0186 # process.l1demon.COMPARE_COLLS = [
0187 #        0,  0,  1,  1,   0,  1,  0,  0,  1,  0,  1, 0
0188 #        ]
0189 #    # ETP,HTP,RCT,GCT, DTP,DTF,CTP,CTF,RPC,LTC,GMT,GT
0190 
0191 
0192 #
0193 # remove an expert module for L1 trigger system
0194 # cff file: DQM.L1TMonitor.L1TEmulatorMonitor_cff
0195 #
0196 # process.l1ExpertDataVsEmulator.remove(process.l1GtHwValidation)
0197 #
0198 
0199 #process.l1ExpertDataVsEmulator.remove(process.l1TdeCSCTF)
0200 
0201 #
0202 # remove a module / sequence from l1EmulatorMonitorClient
0203 # cff file: DQM.L1TMonitorClient.L1TEmulatorMonitorClient_cff
0204 #
0205 # process.l1EmulatorMonitorClient.remove(process.l1EmulatorErrorFlagClient)
0206 #
0207 
0208 
0209 #
0210 # fast over-mask a system in L1TEMUEventInfoClient: 
0211 #   if the name of the system is in the list, the system will be masked
0212 #   (the default mask value is given in L1Systems VPSet)             
0213 #
0214 # names are case sensitive, order is irrelevant
0215 # "ECAL", "HCAL", "RCT", "GCT", "DTTF", "DTTPG", "CSCTF", "CSCTPG", "RPC", "GMT", "GT"
0216 #
0217 # process.l1temuEventInfoClient.MaskL1Systems = cms.vstring("ECAL")
0218 #
0219 
0220 
0221 #
0222 # fast over-mask an object in L1TEMUEventInfoClient:
0223 #   if the name of the object is in the list, the object will be masked
0224 #   (the default mask value is given in L1Objects VPSet)             
0225 #
0226 # names are case sensitive, order is irrelevant
0227 # 
0228 # "Mu", "NoIsoEG", "IsoEG", "CenJet", "ForJet", "TauJet", "ETM", "ETT", "HTT", "HTM", 
0229 # "HfBitCounts", "HfRingEtSums", "TechTrig", "GtExternal
0230 #
0231 # process.l1temuEventInfoClient.MaskL1Objects =  cms.vstring("ETM")   
0232 #
0233 
0234 
0235 #
0236 # turn on verbosity in L1TEMUEventInfoClient
0237 #
0238 # process.l1EmulatorEventInfoClient.verbose = cms.untracked.bool(True)
0239 
0240 
0241 print("Running with run type = ", process.runType.getRunType())
0242 process.castorDigis.InputLabel = cms.InputTag("rawDataCollector")
0243 process.csctfDigis.producer = cms.InputTag("rawDataCollector")
0244 process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataCollector")
0245 process.ecalDigis.InputLabel = cms.InputTag("rawDataCollector")
0246 process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataCollector")
0247 process.rctDigis.inputLabel = cms.InputTag("rawDataCollector")
0248 process.gctDigis.inputLabel = cms.InputTag("rawDataCollector")
0249 process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataCollector")
0250 process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataCollector")
0251 process.hcalDigis.InputLabel = cms.InputTag("rawDataCollector")
0252 process.l1compare.FEDsourceEmul = cms.untracked.InputTag("rawDataCollector")
0253 process.l1compare.FEDsourceData = cms.untracked.InputTag("rawDataCollector")
0254 process.muonCSCDigis.InputObjects = cms.InputTag("rawDataCollector")
0255 process.muonDTDigis.inputLabel = cms.InputTag("rawDataCollector")
0256 process.muonRPCDigis.InputLabel = cms.InputTag("rawDataCollector")
0257 process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataCollector")
0258 process.siPixelDigis.InputLabel = cms.InputTag("rawDataCollector")
0259 process.siStripDigis.ProductLabel = cms.InputTag("rawDataCollector")
0260 
0261 #--------------------------------------------------
0262 # Heavy Ion Specific Fed Raw Data Collection Label
0263 #--------------------------------------------------
0264 if (process.runType.getRunType() == process.runType.hi_run):
0265     process.castorDigis.InputLabel = cms.InputTag("rawDataRepacker")
0266     process.csctfDigis.producer = cms.InputTag("rawDataRepacker")
0267     process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataRepacker")
0268     process.ecalDigis.InputLabel = cms.InputTag("rawDataRepacker")
0269     process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataRepacker")
0270     process.rctDigis.inputLabel = cms.InputTag("rawDataRepacker")
0271     process.gctDigis.inputLabel = cms.InputTag("rawDataRepacker")
0272     process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataRepacker")
0273     process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataRepacker")
0274     process.hcalDigis.InputLabel = cms.InputTag("rawDataRepacker")
0275     process.l1compare.FEDsourceEmul = cms.untracked.InputTag("rawDataRepacker")
0276     process.l1compare.FEDsourceData = cms.untracked.InputTag("rawDataRepacker")
0277     process.muonCSCDigis.InputObjects = cms.InputTag("rawDataRepacker")
0278     process.muonDTDigis.inputLabel = cms.InputTag("rawDataRepacker")
0279     process.muonRPCDigis.InputLabel = cms.InputTag("rawDataRepacker")
0280     process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataRepacker")
0281     process.siPixelDigis.InputLabel = cms.InputTag("rawDataRepacker")
0282     process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker")
0283 
0284 
0285