Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-04-22 22:55:32

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:run2_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.totemTriggerRawToDigi)
0067 process.RawToDigi.remove(process.totemRPRawToDigi)
0068 process.RawToDigi.remove(process.ctppsDiamondRawToDigi)
0069 process.RawToDigi.remove(process.ctppsPixelDigis)
0070 
0071 process.rawToDigiPath = cms.Path(process.RawToDigi)
0072 
0073 #--------------------------------------------------
0074 # Stage2 Unpacker and DQM Path
0075 
0076 # Filter fat events
0077 from HLTrigger.HLTfilters.hltHighLevel_cfi import hltHighLevel
0078 process.hltFatEventFilter = hltHighLevel.clone(
0079   throw = False,
0080 # HLT_Physics now has the event % 107 filter as well as L1FatEvents
0081   HLTPaths = ['HLT_L1FatEvents_v*', 'HLT_Physics_v*']
0082 )
0083 
0084 # This can be used if HLT filter not available in a run
0085 process.selfFatEventFilter = cms.EDFilter("HLTL1NumberFilter",
0086         invert = cms.bool(False),
0087         period = cms.uint32(107),
0088         rawInput = cms.InputTag("rawDataCollector"),
0089         fedId = cms.int32(1024)
0090         )
0091 
0092 process.load("DQM.L1TMonitor.L1TStage2_cff")
0093 
0094 process.l1tMonitorPath = cms.Path(
0095     process.l1tStage2OnlineDQM +
0096     process.hltFatEventFilter +
0097 #    process.selfFatEventFilter +
0098     process.l1tStage2OnlineDQMValidationEvents
0099 )
0100 
0101 # Remove DQM Modules
0102 #process.l1tStage2OnlineDQM.remove(process.l1tStage2CaloLayer1)
0103 #process.l1tStage2OnlineDQM.remove(process.l1tStage2CaloLayer2)
0104 #process.l1tStage2OnlineDQM.remove(process.l1tStage2Bmtf)
0105 #process.l1tStage2OnlineDQM.remove(process.l1tStage2Emtf)
0106 #process.l1tStage2OnlineDQM.remove(process.l1tStage2uGMT)
0107 #process.l1tStage2OnlineDQM.remove(process.l1tStage2uGt)
0108 
0109 #--------------------------------------------------
0110 # Stage2 Quality Tests
0111 process.load("DQM.L1TMonitorClient.L1TStage2MonitorClient_cff")
0112 process.l1tStage2MonitorClientPath = cms.Path(process.l1tStage2MonitorClient)
0113 
0114 #--------------------------------------------------
0115 # Customize for other type of runs
0116 
0117 # Cosmic run
0118 if (process.runType.getRunType() == process.runType.cosmic_run):
0119     # Remove Quality Tests for L1T Muon Subsystems since they are not optimized yet for cosmics
0120     process.l1tStage2MonitorClient.remove(process.l1TStage2uGMTQualityTests)
0121     process.l1tStage2MonitorClient.remove(process.l1TStage2EMTFQualityTests)
0122     #process.l1tStage2MonitorClient.remove(process.l1TStage2OMTFQualityTests)
0123     process.l1tStage2MonitorClient.remove(process.l1TStage2BMTFQualityTests)
0124     process.l1tStage2MonitorClient.remove(process.l1TStage2MuonQualityTestsCollisions)
0125     process.l1tStage2EventInfoClient.DisableL1Systems = ["EMTF", "OMTF", "BMTF", "uGMT"]
0126 
0127 # Heavy-Ion run
0128 if (process.runType.getRunType() == process.runType.hi_run):
0129     process.onlineMetaDataDigis.onlineMetaDataInputLabel = "rawDataRepacker"
0130     process.onlineMetaDataRawToDigi.onlineMetaDataInputLabel = "rawDataRepacker"
0131     process.castorDigis.InputLabel = "rawDataRepacker"
0132     process.ctppsDiamondRawToDigi.rawDataTag = "rawDataRepacker"
0133     process.ctppsPixelDigis.inputLabel = "rawDataRepacker"
0134     process.ecalDigis.cpu.InputLabel = "rawDataRepacker"
0135     process.ecalPreshowerDigis.sourceTag = "rawDataRepacker"
0136     process.hcalDigis.InputLabel = "rawDataRepacker"
0137     process.muonCSCDigis.InputObjects = "rawDataRepacker"
0138     process.muonDTDigis.inputLabel = "rawDataRepacker"
0139     process.muonRPCDigis.InputLabel = "rawDataRepacker"
0140     process.muonGEMDigis.InputLabel = "rawDataRepacker"
0141     process.scalersRawToDigi.scalersInputTag = "rawDataRepacker"
0142     process.siPixelDigis.cpu.InputLabel = "rawDataRepacker"
0143     process.siStripDigis.ProductLabel = "rawDataRepacker"
0144     process.tcdsDigis.InputLabel = "rawDataRepacker"
0145     process.tcdsRawToDigi.InputLabel = "rawDataRepacker"
0146     process.totemRPRawToDigi.rawDataTag = "rawDataRepacker"
0147     process.totemTriggerRawToDigi.rawDataTag = "rawDataRepacker"
0148     process.totemTimingRawToDigi.rawDataTag = "rawDataRepacker"
0149     process.csctfDigis.producer = "rawDataRepacker"
0150     process.dttfDigis.DTTF_FED_Source = "rawDataRepacker"
0151     process.gctDigis.inputLabel = "rawDataRepacker"
0152     process.gtDigis.DaqGtInputTag = "rawDataRepacker"
0153     process.twinMuxStage2Digis.DTTM7_FED_Source = "rawDataRepacker"
0154     process.bmtfDigis.InputLabel = "rawDataRepacker"
0155     process.omtfStage2Digis.inputLabel = "rawDataRepacker"
0156     process.emtfStage2Digis.InputLabel = "rawDataRepacker"
0157     process.gmtStage2Digis.InputLabel = "rawDataRepacker"
0158     process.caloLayer1Digis.InputLabel = "rawDataRepacker"
0159     process.caloStage1Digis.InputLabel = "rawDataRepacker"
0160     process.caloStage2Digis.InputLabel = "rawDataRepacker"
0161     process.gtStage2Digis.InputLabel = "rawDataRepacker"
0162     process.l1tStage2CaloLayer1.fedRawDataLabel = "rawDataRepacker"
0163     process.l1tStage2uGMTZeroSupp.rawData = "rawDataRepacker"
0164     process.l1tStage2uGMTZeroSuppFatEvts.rawData = "rawDataRepacker"
0165     process.l1tStage2BmtfZeroSupp.rawData = "rawDataRepacker"
0166     process.l1tStage2BmtfZeroSuppFatEvts.rawData = "rawDataRepacker"
0167     process.selfFatEventFilter.rawInput = "rawDataRepacker"
0168     process.rpcTwinMuxRawToDigi.inputTag = "rawDataRepacker"
0169     process.rpcCPPFRawToDigi.inputTag = "rawDataRepacker"
0170 
0171 #--------------------------------------------------
0172 # L1T Online DQM Schedule
0173 
0174 process.schedule = cms.Schedule(
0175     process.rawToDigiPath,
0176     process.l1tMonitorPath,
0177     process.l1tStage2MonitorClientPath,
0178 #    process.l1tMonitorEndPath,
0179     process.dqmEndPath
0180 )
0181 
0182 #--------------------------------------------------
0183 # Process Customizations
0184 
0185 from DQM.Integration.config.online_customizations_cfi import *
0186 process = customise(process)
0187 print("Final Source settings:", process.source)