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("PixelLumiDQM", Run3)
0007 
0008 unitTest=False
0009 if 'unitTest=True' in sys.argv:
0010     unitTest=True
0011 
0012 process.MessageLogger = cms.Service("MessageLogger",
0013     debugModules = cms.untracked.vstring('siPixelDigis', 
0014                      'sipixelEDAClient'),
0015     cout = cms.untracked.PSet(threshold = cms.untracked.string('ERROR')),
0016     destinations = cms.untracked.vstring('cout')
0017 )
0018 
0019 #----------------------------
0020 # Event Source
0021 #-----------------------------
0022 
0023 if unitTest:
0024     process.load("DQM.Integration.config.unittestinputsource_cfi")
0025     from DQM.Integration.config.unittestinputsource_cfi import options
0026 else:
0027     # for live online DQM in P5
0028     process.load("DQM.Integration.config.inputsource_cfi")
0029     from DQM.Integration.config.inputsource_cfi import options
0030 
0031 # for testing in lxplus
0032 #process.load("DQM.Integration.config.fileinputsource_cfi")
0033 #from DQM.Integration.config.fileinputsource_cfi import options
0034 
0035 ##
0036 #----------------------------
0037 # DQM Environment
0038 #-----------------------------
0039 process.load("DQMServices.Components.DQMEnvironment_cfi")
0040 
0041 #----------------------------
0042 # DQM Live Environment
0043 #-----------------------------
0044 process.load("DQM.Integration.config.environment_cfi")
0045 process.dqmEnv.subSystemFolder = "PixelLumi"
0046 process.dqmSaver.tag = "PixelLumi"
0047 process.dqmSaver.runNumber = options.runNumber
0048 process.dqmSaverPB.tag = "PixelLumi"
0049 process.dqmSaverPB.runNumber = options.runNumber
0050 
0051 if not unitTest:
0052     process.source.SelectEvents = cms.untracked.vstring("HLT_ZeroBias*","HLT_L1AlwaysTrue*", "HLT_PAZeroBias*", "HLT_PAL1AlwaysTrue*")
0053 #if (process.runType.getRunType() == process.runType.hi_run):
0054 
0055 if (process.runType.getRunType() == process.runType.cosmic_run and not unitTest):
0056     process.source.SelectEvents = ['HLT*SingleMu*']
0057 
0058 #----------------------------
0059 # Magnetic Field
0060 #-----------------------------
0061 # 3.8T field
0062 process.load('Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff')
0063 
0064 #-------------------------------------------------
0065 # GEOMETRY
0066 #-------------------------------------------------
0067 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0068 
0069 #-------------------------------------------------
0070 # GLOBALTAG
0071 #-------------------------------------------------
0072 # Condition for P5 cluster
0073 process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
0074 # Condition for lxplus: change and possibly customise the GT
0075 #from Configuration.AlCa.GlobalTag import GlobalTag as gtCustomise
0076 #process.GlobalTag = gtCustomise(process.GlobalTag, 'auto:run2_data', '')
0077 
0078 #-----------------------
0079 #  Reconstruction Modules
0080 #-----------------------
0081 # Real data raw to digi
0082 process.load("EventFilter.SiPixelRawToDigi.SiPixelRawToDigi_cfi")
0083 process.siPixelDigis.cpu.IncludeErrors = True
0084 
0085 # Local Reconstruction
0086 process.load("RecoLocalTracker.SiPixelClusterizer.SiPixelClusterizer_cfi")
0087 
0088 #----------------------------------
0089 # High Pileup Configuration Changes
0090 #----------------------------------
0091 #if (process.runType.getRunType() == process.runType.hpu_run):
0092 #    process.DQMEventStreamHttpReader.SelectEvents = cms.untracked.PSet(
0093 #        SelectEvents = cms.vstring('HLT_600Tower*','HLT_L1*','HLT_Jet*','HLT_*Cosmic*','HLT_HT*','HLT_MinBias_*','HLT_Physics*', 'HLT_ZeroBias*','HLT_HcalNZS*'))
0094 
0095 
0096 process.siPixelDigis.cpu.InputLabel = cms.InputTag("rawDataCollector")
0097 #--------------------------------
0098 # Heavy Ion Configuration Changes
0099 #--------------------------------
0100 if (process.runType.getRunType() == process.runType.hi_run):
0101     process.load('Configuration.StandardSequences.RawToDigi_Repacked_cff')
0102     process.siPixelDigis.cpu.InputLabel = "rawDataRepacker"
0103 
0104     if not unitTest:
0105         process.source.SelectEvents = ['HLT_HIL1MinimumBiasHF2AND*']
0106 
0107 
0108 #    process.DQMEventStreamHttpReader.SelectEvents = cms.untracked.PSet(
0109 #        SelectEvents = cms.vstring('HLT_HI*'))
0110 
0111 #--------------------------
0112 # Pixel DQM Source and Client
0113 #----------------------
0114 process.load("DQM.PixelLumi.PixelLumiDQM_cfi") 
0115 
0116 if process.dqmRunConfig.type.value() == "playback":
0117     process.pixel_lumi_dqm.logFileName = "pixel_lumi.txt"
0118 else:
0119     process.pixel_lumi_dqm.logFileName = "/nfshome0/dqmpro/pixel_lumi.txt"
0120 
0121 print(process.pixel_lumi_dqm.logFileName)
0122     
0123 #--------------------------
0124 # Service
0125 #--------------------------
0126 process.AdaptorConfig = cms.Service("AdaptorConfig")
0127 
0128 #--------------------------
0129 # Filters
0130 #--------------------------
0131 
0132 #--------------------------
0133 # Scheduling
0134 #--------------------------
0135 process.Reco = cms.Sequence(process.siPixelDigis*process.siPixelClusters)
0136 process.DQMmodules = cms.Sequence(process.dqmEnv*
0137   process.pixel_lumi_dqm*
0138   process.dqmSaver*
0139   process.dqmSaverPB)
0140 
0141 process.p = cms.Path(process.Reco*process.DQMmodules)
0142 
0143 ### process customizations included here
0144 from DQM.Integration.config.online_customizations_cfi import *
0145 process = customise(process)
0146 print("Final Source settings:", process.source)