Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:42:27

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 import sys
0004 from Configuration.Eras.Era_Run3_cff import Run3
0005 process = cms.Process("L1TStage2DQM", Run3)
0006 
0007 unitTest = False
0008 if 'unitTest=True' in sys.argv:
0009     unitTest=True
0010 
0011 #--------------------------------------------------
0012 # Event Source and Condition
0013 
0014 if unitTest:
0015     process.load("DQM.Integration.config.unittestinputsource_cfi")
0016     from DQM.Integration.config.unittestinputsource_cfi import options
0017 else:
0018     # Live Online DQM in P5
0019     process.load("DQM.Integration.config.inputsource_cfi")
0020     from DQM.Integration.config.inputsource_cfi import options
0021 
0022 # # Testing in lxplus
0023 # process.load("DQM.Integration.config.fileinputsource_cfi")
0024 # from DQM.Integration.config.fileinputsource_cfi import options
0025 # process.load("FWCore.MessageLogger.MessageLogger_cfi")
0026 # process.MessageLogger.cerr.FwkReport.reportEvery = 1
0027 
0028 # Required to load Global Tag
0029 process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
0030 
0031 # # Condition for lxplus: change and possibly customise the GT
0032 # from Configuration.AlCa.GlobalTag import GlobalTag as gtCustomise
0033 # process.GlobalTag = gtCustomise(process.GlobalTag, 'auto:run3_data', '')
0034 
0035 # Required to load EcalMappingRecord
0036 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0037 
0038 #--------------------------------------------------
0039 # DQM Environment
0040 
0041 process.load("DQM.Integration.config.environment_cfi")
0042 
0043 process.dqmEnv.subSystemFolder = "L1T"
0044 process.dqmSaver.tag = "L1T"
0045 process.dqmSaver.runNumber = options.runNumber
0046 process.dqmSaverPB.tag = "L1T"
0047 process.dqmSaverPB.runNumber = options.runNumber
0048 
0049 process.dqmEndPath = cms.EndPath(process.dqmEnv * process.dqmSaver * process.dqmSaverPB)
0050 
0051 #--------------------------------------------------
0052 # Standard Unpacking Path
0053 
0054 process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
0055 
0056 # remove unneeded unpackers
0057 process.RawToDigi.remove(process.ecalPreshowerDigis)
0058 #process.RawToDigi.remove(process.muonCSCDigis)
0059 process.RawToDigi.remove(process.muonDTDigis)
0060 process.RawToDigi.remove(process.muonRPCDigis)
0061 process.RawToDigi.remove(process.siPixelDigis)
0062 process.RawToDigi.remove(process.siStripDigis)
0063 process.RawToDigi.remove(process.castorDigis)
0064 process.RawToDigi.remove(process.scalersRawToDigi)
0065 process.RawToDigi.remove(process.tcdsDigis)
0066 process.RawToDigi.remove(process.totemRPRawToDigi)
0067 process.RawToDigi.remove(process.ctppsDiamondRawToDigi)
0068 process.RawToDigi.remove(process.ctppsPixelDigis)
0069 
0070 process.rawToDigiPath = cms.Path(process.RawToDigi)
0071 
0072 #--------------------------------------------------
0073 # Stage2 Unpacker and DQM Path
0074 
0075 # Filter fat events
0076 from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel
0077 process.hltFatEventFilter = hltHighLevel.clone(
0078   throw = False,
0079 # HLT_Physics now has the event % 107 filter as well as L1FatEvents
0080   HLTPaths = ['HLT_L1FatEvents_v*', 'HLT_Physics_v*']
0081 )
0082 
0083 # This can be used if HLT filter not available in a run
0084 process.selfFatEventFilter = cms.EDFilter("HLTL1NumberFilter",
0085         invert = cms.bool(False),
0086         period = cms.uint32(107),
0087         rawInput = cms.InputTag("rawDataCollector"),
0088         fedId = cms.int32(1024)
0089         )
0090 
0091 process.load("DQM.L1TMonitor.L1TStage2_cff")
0092 
0093 process.l1tMonitorPath = cms.Path(
0094     process.l1tStage2OnlineDQM +
0095     process.hltFatEventFilter +
0096 #    process.selfFatEventFilter +
0097     process.l1tStage2OnlineDQMValidationEvents
0098 )
0099 
0100 # Remove DQM Modules
0101 #process.l1tStage2OnlineDQM.remove(process.l1tStage2CaloLayer1)
0102 #process.l1tStage2OnlineDQM.remove(process.l1tStage2CaloLayer2)
0103 #process.l1tStage2OnlineDQM.remove(process.l1tStage2Bmtf)
0104 #process.l1tStage2OnlineDQM.remove(process.l1tStage2Emtf)
0105 #process.l1tStage2OnlineDQM.remove(process.l1tStage2uGMT)
0106 #process.l1tStage2OnlineDQM.remove(process.l1tStage2uGt)
0107 
0108 #--------------------------------------------------
0109 # Stage2 Quality Tests
0110 process.load("DQM.L1TMonitorClient.L1TStage2MonitorClient_cff")
0111 process.l1tStage2MonitorClientPath = cms.Path(process.l1tStage2MonitorClient)
0112 
0113 #--------------------------------------------------
0114 # Customize for other type of runs
0115 
0116 # Cosmic run
0117 if process.runType.getRunType() == process.runType.cosmic_run:
0118     # Remove Quality Tests for L1T Muon Subsystems since they are not optimized yet for cosmics
0119     process.l1tStage2MonitorClient.remove(process.l1TStage2uGMTQualityTests)
0120     process.l1tStage2MonitorClient.remove(process.l1TStage2EMTFQualityTests)
0121     #process.l1tStage2MonitorClient.remove(process.l1TStage2OMTFQualityTests)
0122     process.l1tStage2MonitorClient.remove(process.l1TStage2BMTFQualityTests)
0123     process.l1tStage2MonitorClient.remove(process.l1TStage2MuonQualityTestsCollisions)
0124     process.l1tStage2EventInfoClient.DisableL1Systems = ["EMTF", "OMTF", "BMTF", "uGMT"]
0125 
0126 # Heavy-Ion run
0127 if process.runType.getRunType() == process.runType.hi_run:
0128     process.hltFatEventFilter.HLTPaths.append('HLT_HIPhysics_v*')
0129     rawDataRepackerLabel = 'rawDataRepacker'
0130     process.onlineMetaDataDigis.onlineMetaDataInputLabel = rawDataRepackerLabel
0131     process.onlineMetaDataRawToDigi.onlineMetaDataInputLabel = rawDataRepackerLabel
0132     process.castorDigis.InputLabel = rawDataRepackerLabel
0133     process.ctppsDiamondRawToDigi.rawDataTag = rawDataRepackerLabel
0134     process.ctppsPixelDigis.inputLabel = rawDataRepackerLabel
0135     process.ecalDigis.cpu.InputLabel = rawDataRepackerLabel
0136     process.ecalPreshowerDigis.sourceTag = rawDataRepackerLabel
0137     process.hcalDigis.InputLabel = rawDataRepackerLabel
0138     process.muonCSCDigis.InputObjects = rawDataRepackerLabel
0139     process.muonDTDigis.inputLabel = rawDataRepackerLabel
0140     process.muonRPCDigis.InputLabel = rawDataRepackerLabel
0141     process.muonGEMDigis.InputLabel = rawDataRepackerLabel
0142     process.scalersRawToDigi.scalersInputTag = rawDataRepackerLabel
0143     process.siPixelDigis.cpu.InputLabel = rawDataRepackerLabel
0144     process.siStripDigis.ProductLabel = rawDataRepackerLabel
0145     process.tcdsDigis.InputLabel = rawDataRepackerLabel
0146     process.tcdsRawToDigi.InputLabel = rawDataRepackerLabel
0147     process.totemRPRawToDigi.rawDataTag = rawDataRepackerLabel
0148     process.totemTimingRawToDigi.rawDataTag = rawDataRepackerLabel
0149     process.csctfDigis.producer = rawDataRepackerLabel
0150     process.dttfDigis.DTTF_FED_Source = rawDataRepackerLabel
0151     process.gctDigis.inputLabel = rawDataRepackerLabel
0152     process.gtDigis.DaqGtInputTag = rawDataRepackerLabel
0153     process.twinMuxStage2Digis.DTTM7_FED_Source = rawDataRepackerLabel
0154     process.bmtfDigis.InputLabel = rawDataRepackerLabel
0155     process.omtfStage2Digis.inputLabel = rawDataRepackerLabel
0156     process.emtfStage2Digis.InputLabel = rawDataRepackerLabel
0157     process.gmtStage2Digis.InputLabel = rawDataRepackerLabel
0158     process.caloLayer1Digis.InputLabel = rawDataRepackerLabel
0159     process.caloStage1Digis.InputLabel = rawDataRepackerLabel
0160     process.caloStage2Digis.InputLabel = rawDataRepackerLabel
0161     process.gtStage2Digis.InputLabel = rawDataRepackerLabel
0162     process.l1tStage2CaloLayer1.fedRawDataLabel = rawDataRepackerLabel
0163     process.l1tStage2BmtfZeroSupp.rawData = rawDataRepackerLabel
0164     process.l1tStage2BmtfZeroSuppFatEvts.rawData = rawDataRepackerLabel
0165     process.selfFatEventFilter.rawInput = rawDataRepackerLabel
0166     process.rpcTwinMuxRawToDigi.inputTag = rawDataRepackerLabel
0167     process.rpcCPPFRawToDigi.inputTag = rawDataRepackerLabel
0168 
0169 #--------------------------------------------------
0170 # L1T Online DQM Schedule
0171 
0172 process.schedule = cms.Schedule(
0173     process.rawToDigiPath,
0174     process.l1tMonitorPath,
0175     process.l1tStage2MonitorClientPath,
0176 #    process.l1tMonitorEndPath,
0177     process.dqmEndPath
0178 )
0179 
0180 #--------------------------------------------------
0181 # Process Customizations
0182 
0183 from DQM.Integration.config.online_customizations_cfi import *
0184 process = customise(process)
0185 print("Final Source settings:", process.source)