File indexing completed on 2024-04-06 12:07:42
0001 from __future__ import print_function
0002
0003 import sys
0004 import FWCore.ParameterSet.Config as cms
0005
0006
0007 useMuons = False
0008 isOfflineDQM = False
0009
0010 unitTest = False
0011 if 'unitTest=True' in sys.argv:
0012 unitTest=True
0013
0014 from Configuration.Eras.Era_Run3_cff import Run3
0015 process = cms.Process("RPCDQM", Run3)
0016
0017
0018
0019 if unitTest:
0020 process.load("DQM.Integration.config.unittestinputsource_cfi")
0021 from DQM.Integration.config.unittestinputsource_cfi import options
0022 else:
0023
0024 process.load("DQM.Integration.config.inputsource_cfi")
0025 from DQM.Integration.config.inputsource_cfi import options
0026
0027
0028
0029
0030
0031
0032
0033 process.hltTriggerTypeFilter = cms.EDFilter("HLTTriggerTypeFilter",
0034 SelectedTriggerType = cms.int32(1)
0035 )
0036
0037
0038
0039
0040
0041 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0042
0043
0044 process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
0045
0046
0047
0048
0049
0050 process.GlobalTag.RefreshEachRun = True
0051
0052
0053
0054
0055
0056 process.load("DQM.Integration.config.environment_cfi")
0057 process.dqmEnv.subSystemFolder = 'RPC'
0058 process.dqmSaver.tag = 'RPC'
0059 process.dqmSaver.runNumber = options.runNumber
0060 process.dqmSaverPB.tag = 'RPC'
0061 process.dqmSaverPB.runNumber = options.runNumber
0062
0063
0064
0065 process.load("EventFilter.ScalersRawToDigi.ScalersRawToDigi_cfi")
0066
0067
0068 process.rpcunpacker = cms.EDProducer("RPCUnpackingModule",
0069 InputLabel = cms.InputTag("source"),
0070 doSynchro = cms.bool(False)
0071 )
0072
0073
0074 process.load("EventFilter.RPCRawToDigi.RPCTwinMuxRawToDigi_cff")
0075
0076
0077 process.load("EventFilter.RPCRawToDigi.RPCCPPFRawToDigi_cff")
0078
0079
0080
0081 process.omtfStage2Digis = cms.EDProducer("OmtfUnpacker",
0082 inputLabel = cms.InputTag('rawDataCollector'),
0083 )
0084
0085 process.load("EventFilter.RPCRawToDigi.RPCDigiMerger_cff")
0086 process.rpcDigiMerger.inputTagTwinMuxDigis = 'rpcTwinMuxRawToDigi'
0087 process.rpcDigiMerger.inputTagOMTFDigis = 'omtfStage2Digis'
0088 process.rpcDigiMerger.inputTagCPPFDigis = 'rpcCPPFRawToDigi'
0089
0090
0091 process.load("RecoLocalMuon.RPCRecHit.rpcRecHits_cfi")
0092 process.rpcRecHits.rpcDigiLabel = 'rpcunpacker'
0093
0094
0095 process.rpcMergerRecHits = process.rpcRecHits.clone(
0096 rpcDigiLabel = 'rpcDigiMerger'
0097 )
0098
0099
0100
0101 process.load("DQM.RPCMonitorDigi.RPCDigiMonitoring_cfi")
0102 process.rpcdigidqm.UseMuon = useMuons
0103 process.rpcdigidqm.NoiseFolder = "AllHitsLegacy"
0104 process.rpcdigidqm.RecHitLabel = "rpcRecHits"
0105
0106 process.rpcMergerdigidqm = process.rpcdigidqm.clone(
0107 NoiseFolder = "AllHits",
0108 RecHitLabel = "rpcMergerRecHits"
0109 )
0110
0111
0112
0113
0114 process.load("DQM.RPCMonitorClient.RPCDqmClient_cfi")
0115 process.rpcdqmclient.RPCDqmClientList = ["RPCMultiplicityTest", "RPCDeadChannelTest", "RPCClusterSizeTest", "RPCOccupancyTest","RPCNoisyStripTest"]
0116 process.rpcdqmclient.DiagnosticPrescale = 1
0117 process.rpcdqmclient.MinimumRPCEvents = 100
0118 process.rpcdqmclient.OfflineDQM = isOfflineDQM
0119 process.rpcdqmclient.RecHitTypeFolder = "AllHitsLegacy"
0120
0121 process.rpcMergerdqmclient = process.rpcdqmclient.clone(
0122 RecHitTypeFolder = "AllHits"
0123 )
0124
0125
0126
0127
0128 process.load("DQM.RPCMonitorClient.RPCMonitorRaw_cfi")
0129 process.load("DQM.RPCMonitorClient.RPCFEDIntegrity_cfi")
0130 process.load("DQM.RPCMonitorClient.RPCMonitorLinkSynchro_cfi")
0131
0132
0133 process.load("DQM.RPCMonitorClient.RPCEventSummary_cfi")
0134 process.rpcEventSummary.OfflineDQM = isOfflineDQM
0135 process.rpcEventSummary.MinimumRPCEvents = 10000
0136 process.rpcEventSummary.RecHitTypeFolder = "AllHitsLegacy"
0137
0138 process.rpcEventSummaryMerger = process.rpcEventSummary.clone(
0139 RecHitTypeFolder = "AllHits"
0140 )
0141
0142
0143 from DQMServices.Core.DQMQualityTester import DQMQualityTester
0144 process.qTesterRPC = DQMQualityTester(
0145 qtList = cms.untracked.FileInPath('DQM/RPCMonitorClient/test/RPCQualityTests.xml'),
0146 prescaleFactor = cms.untracked.int32(5),
0147 qtestOnEndLumi = cms.untracked.bool(True),
0148 qtestOnEndRun = cms.untracked.bool(True)
0149 )
0150
0151
0152 process.rpcSource = cms.Sequence( process.rpcunpacker
0153 * (process.rpcTwinMuxRawToDigi + process.rpcCPPFRawToDigi + process.omtfStage2Digis)
0154 * process.rpcDigiMerger
0155 * (process.rpcRecHits + process.rpcMergerRecHits)
0156 * process.scalersRawToDigi
0157 * (process.rpcdigidqm + process.rpcMergerdigidqm)
0158 * process.rpcMonitorRaw*process.qTesterRPC
0159 )
0160 process.rpcClient = cms.Sequence(process.rpcdqmclient*process.rpcMergerdqmclient*process.rpcEventSummary*process.rpcEventSummaryMerger*process.dqmEnv*process.dqmSaver*process.dqmSaverPB)
0161 process.p = cms.Path(process.hltTriggerTypeFilter*process.rpcSource*process.rpcClient)
0162
0163 process.rpcunpacker.InputLabel = "rawDataCollector"
0164 process.scalersRawToDigi.scalersInputTag = "rawDataCollector"
0165 process.rpcCPPFRawToDigi.inputTag = "rawDataCollector"
0166
0167
0168
0169
0170 print("Running with run type = ", process.runType.getRunType())
0171
0172 if (process.runType.getRunType() == process.runType.hi_run):
0173 process.rpcunpacker.InputLabel = "rawDataRepacker"
0174 process.scalersRawToDigi.scalersInputTag = "rawDataRepacker"
0175 process.rpcTwinMuxRawToDigi.inputTag = "rawDataRepacker"
0176 process.rpcCPPFRawToDigi.inputTag = "rawDataRepacker"
0177 process.omtfStage2Digis.inputLabel = "rawDataRepacker"
0178 process.rpcEventSummary.MinimumRPCEvents = 100000
0179 process.rpcEventSummaryMerger.MinimumRPCEvents = 100000
0180
0181
0182 from DQM.Integration.config.online_customizations_cfi import *
0183 process = customise(process)
0184 print("Final Source settings:", process.source)
0185
0186