Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-03-08 02:27:16

0001 from __future__ import print_function
0002 import FWCore.ParameterSet.Config as cms
0003 import sys
0004 
0005 from Configuration.Eras.Era_Run3_cff import Run3
0006 process = cms.Process("CSCDQMLIVE", Run3)
0007 
0008 #-------------------------------------------------
0009 # DQM Module Configuration
0010 #-------------------------------------------------
0011 
0012 process.load("DQM.CSCMonitorModule.csc_dqm_sourceclient_cfi")
0013 process.dqmCSCClient.EventProcessor.BINCHECKER_MODE_DDU = False
0014 process.dqmCSCClient.EventProcessor.EFF_COLD_SIGFAIL = 2.0
0015 process.dqmCSCClient.EventProcessor.EFF_HOT_THRESHOLD = 2.0
0016 process.dqmCSCClient.EventProcessor.EFF_HOT_SIGFAIL = 10.0
0017 process.dqmCSCClient.EventProcessor.EFF_NODATA_THRESHOLD = 0.99
0018 process.dqmCSCClient.EventProcessor.PREBOOK_ALL_HISTOS = True
0019 
0020 #process.dqmCSCClient.FractUpdateEventFreq = cms.untracked.uint32(100)
0021 #process.dqmCSCClient.effParameters.threshold_hot = cms.untracked.double(10.0)
0022 #process.dqmCSCClient.effParameters.sigfail_cold = cms.untracked.double(3.0)
0023 
0024 #-------------------------------------------------
0025 # Offline DQM Module Configuration
0026 #-------------------------------------------------
0027 
0028 process.load("DQMOffline.Muon.CSCMonitor_cfi")
0029 process.load("Configuration/StandardSequences/MagneticField_cff")
0030 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
0031 process.load("Configuration.StandardSequences.Reconstruction_cff")
0032 process.csc2DRecHits.readBadChambers = False
0033 
0034 #----------------------------
0035 # Event Source
0036 #-----------------------------
0037 
0038 unitTest=False
0039 if 'unitTest=True' in sys.argv:
0040   unitTest=True
0041 
0042 if unitTest:
0043   process.load("DQM.Integration.config.unittestinputsource_cfi")
0044   from DQM.Integration.config.unittestinputsource_cfi import options
0045 else:
0046   # for live online DQM in P5
0047   process.load("DQM.Integration.config.inputsource_cfi")
0048   from DQM.Integration.config.inputsource_cfi import options
0049 
0050 # for testing in lxplus
0051 #process.load("DQM.Integration.config.fileinputsource_cfi")
0052 #from DQM.Integration.config.fileinputsource_cfi import options
0053 
0054 #----------------------------
0055 # DQM Environment
0056 #-----------------------------
0057 
0058 #----------------------------
0059 # DQM Playback Environment
0060 #-----------------------------
0061 
0062 process.load("DQM.Integration.config.environment_cfi")
0063 process.dqmEnv.subSystemFolder    = "CSC"
0064 process.dqmSaver.tag = "CSC"
0065 process.dqmSaver.runNumber = options.runNumber
0066 process.dqmSaverPB.tag = "CSC"
0067 process.dqmSaverPB.runNumber = options.runNumber
0068 
0069 
0070 #process.DQM.collectorHost = 'pccmsdqm02.cern.ch'
0071 #process.DQM.collectorHost = 'localhost'
0072 
0073 #-----------------------------
0074 # Magnetic Field
0075 #-----------------------------
0076 
0077 #process.load("Configuration.GlobalRuns.ForceZeroTeslaField_cff")
0078 
0079 #-------------------------------------------------
0080 # GEOMETRY
0081 #-------------------------------------------------
0082 
0083 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0084 
0085 #-------------------------------------------------
0086 # Global Tag
0087 #-------------------------------------------------
0088 # Condition for P5 cluster
0089 process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
0090 
0091 
0092 #--------------------------------------
0093 # Post-LS1 CSC configuraton parameters
0094 #--------------------------------------
0095 """Customise digi/reco geometry to use unganged ME1/a channels"""
0096 process.CSCGeometryESModule.useGangedStripsInME1a = False
0097 process.idealForDigiCSCGeometry.useGangedStripsInME1a = False
0098 
0099 """Settings for the upgrade raw vs offline condition channel translation"""
0100 process.CSCIndexerESProducer.AlgoName=cms.string("CSCIndexerPostls1")
0101 process.CSCChannelMapperESProducer.AlgoName=cms.string("CSCChannelMapperPostls1")
0102 
0103 process.csc2DRecHits.readBadChannels = False
0104 process.csc2DRecHits.CSCUseGasGainCorrections = False
0105 
0106 
0107 """ Pick up upgrade condions data directly from DB tags using ESPrefer's.
0108 Might be useful when dealing with a global tag that doesn't include
0109 'unganged' CSC conditions.
0110 """
0111 """
0112 myconds = [
0113         ('CSCDBGainsRcd', 'CSCDBGains_ungangedME11A_mc'),
0114         ('CSCDBNoiseMatrixRcd', 'CSCDBNoiseMatrix_ungangedME11A_mc'),
0115         ('CSCDBCrosstalkRcd', 'CSCDBCrosstalk_ungangedME11A_mc'),
0116         ('CSCDBPedestalsRcd', 'CSCDBPedestals_ungangedME11A_mc'),
0117         ('CSCDBGasGainCorrectionRcd', 'CSCDBGasGainCorrection_ungangedME11A_mc')
0118         ('CSCDBChipSpeedCorrectionRcd', 'CSCDBChipSpeedCorrection_ungangedME11A_mc')
0119 ]
0120 
0121 from CalibMuon.Configuration.getCSCConditions_frontier_cff import cscConditions
0122 for (classname, tag) in myconds:
0123       print classname, tag
0124       sourcename = 'unganged_' + classname
0125       process.__setattr__(sourcename, cscConditions.clone())
0126       process.__getattribute__(sourcename).toGet = cms.VPSet( cms.PSet( record = cms.string(classname), tag = cms.string(tag)) )
0127       process.__getattribute__(sourcename).connect = cms.string('frontier://FrontierProd/CMS_COND_CSC_000')
0128       process.__setattr__('esp_' + classname, cms.ESPrefer("PoolDBESSource", sourcename) )
0129 
0130 del cscConditions
0131 """
0132 #---------------------------------------
0133 
0134 
0135 # Condition for lxplus: change and possibly customise the GT
0136 #from Configuration.AlCa.GlobalTag import GlobalTag as gtCustomise
0137 #process.GlobalTag = gtCustomise(process.GlobalTag, 'auto:run2_data', '')
0138 
0139 #--------------------------
0140 # Service
0141 #--------------------------
0142 process.AdaptorConfig = cms.Service("AdaptorConfig")
0143 
0144 #--------------------------
0145 # Message Logger
0146 #--------------------------
0147 
0148 MessageLogger = cms.Service("MessageLogger",
0149 
0150 # suppressInfo = cms.untracked.vstring('source'),
0151   suppressInfo = cms.untracked.vstring('*'),
0152   cout = cms.untracked.PSet(
0153     threshold = cms.untracked.string('INFO'),
0154     WARNING = cms.untracked.PSet(
0155       limit = cms.untracked.int32(0)
0156     ),
0157     noLineBreaks = cms.untracked.bool(False)
0158   ),
0159   detailedInfo = cms.untracked.PSet(
0160     threshold = cms.untracked.string('INFO')
0161   ),
0162   critical = cms.untracked.PSet(
0163     threshold = cms.untracked.string('ERROR')
0164   ),
0165   debugModules = cms.untracked.vstring('CSCMonitormodule'),
0166 #  destinations = cms.untracked.vstring('detailedInfo',
0167 #    'critical',
0168 #    'cout')
0169 
0170 )
0171 
0172 #--------------------------
0173 # Sequences
0174 #--------------------------
0175 
0176 #process.p = cms.Path(process.dqmCSCClient+process.dqmEnv+process.dqmSaver+process.dqmSaverPB)
0177 process.p = cms.Path(process.dqmCSCClient * process.muonCSCDigis * process.csc2DRecHits * process.cscSegments * process.cscMonitor + process.dqmEnv + process.dqmSaver + process.dqmSaverPB)
0178 
0179 
0180 process.castorDigis.InputLabel = "rawDataCollector"
0181 process.csctfDigis.producer = "rawDataCollector"
0182 process.dttfDigis.DTTF_FED_Source = "rawDataCollector"
0183 process.ecalDigis.cpu.InputLabel = "rawDataCollector"
0184 process.ecalPreshowerDigis.sourceTag = "rawDataCollector"
0185 process.gctDigis.inputLabel = "rawDataCollector"
0186 process.gtDigis.DaqGtInputTag = "rawDataCollector"
0187 process.gtEvmDigis.EvmGtInputTag = "rawDataCollector"
0188 process.hcalDigis.InputLabel = "rawDataCollector"
0189 process.muonCSCDigis.InputObjects = "rawDataCollector"
0190 process.muonDTDigis.inputLabel = "rawDataCollector"
0191 process.muonRPCDigis.InputLabel = "rawDataCollector"
0192 process.scalersRawToDigi.scalersInputTag = "rawDataCollector"
0193 process.siPixelDigis.cpu.InputLabel = "rawDataCollector"
0194 process.siStripDigis.ProductLabel = "rawDataCollector"
0195 process.cscMonitor.FEDRawDataCollectionTag = "rawDataCollector"
0196 process.dqmCSCClient.InputObjects = "rawDataCollector"
0197 
0198 #--------------------------------------------------
0199 # Heavy Ion Specific Fed Raw Data Collection Label
0200 #--------------------------------------------------
0201 
0202 print("Running with run type = ", process.runType.getRunType())
0203 
0204 if (process.runType.getRunType() == process.runType.hi_run):
0205     process.castorDigis.InputLabel = "rawDataRepacker"
0206     process.csctfDigis.producer = "rawDataRepacker"
0207     process.dttfDigis.DTTF_FED_Source = "rawDataRepacker"
0208     process.ecalDigis.cpu.InputLabel = "rawDataRepacker"
0209     process.ecalPreshowerDigis.sourceTag = "rawDataRepacker"
0210     process.gctDigis.inputLabel = "rawDataRepacker"
0211     process.gtDigis.DaqGtInputTag = "rawDataRepacker"
0212     process.gtEvmDigis.EvmGtInputTag = "rawDataRepacker"
0213     process.hcalDigis.InputLabel = "rawDataRepacker"
0214     process.muonCSCDigis.InputObjects = "rawDataRepacker"
0215     process.muonDTDigis.inputLabel = "rawDataRepacker"
0216     process.muonRPCDigis.InputLabel = "rawDataRepacker"
0217     process.scalersRawToDigi.scalersInputTag = "rawDataRepacker"
0218     process.siPixelDigis.cpu.InputLabel = "rawDataRepacker"
0219     process.siStripDigis.ProductLabel = "rawDataRepacker"
0220     process.cscMonitor.FEDRawDataCollectionTag = "rawDataRepacker"
0221     process.dqmCSCClient.InputObjects = "rawDataRepacker"
0222 
0223 
0224 ### process customizations included here
0225 from DQM.Integration.config.online_customizations_cfi import *
0226 print("Final Source settings:", process.source)
0227 process = customise(process)
0228