File indexing completed on 2024-11-26 02:34:12
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 import os
0015 import FWCore.ParameterSet.Config as cms
0016
0017
0018 iscosmics = (os.environ.get('COSMIC_MODE','True'))
0019 print('iscosmics (default=True) = '+str(iscosmics))
0020
0021
0022 jobname = (os.environ.get('JOB_NAME','test'))
0023 print('jobname (default=test) = '+str(jobname))
0024
0025
0026 nevents = int(os.environ.get('NEVENTS','1000'))
0027 print('nevents (default=1000) = '+str(nevents))
0028
0029
0030 allhist = (os.environ.get('ALL_HISTS','True'))
0031 print('allhist (default=True) = '+str(allhist))
0032
0033
0034 read_from_file = (os.environ.get('READ_LIST_FROM_FILE','False'))
0035 print('read list of input files from a text file (default=False) = '+str(read_from_file))
0036
0037
0038 trigger_set = (os.environ.get('TRIGGER_SET','HLT'))
0039 print('trigger set name (default=HLT) = '+str(trigger_set))
0040
0041
0042 inputfiles = []
0043 if read_from_file=="True":
0044
0045 filename = (os.environ.get('INPUTFILES_LIST','inputfile_list_default.txt'))
0046 file=open(filename)
0047 print(file.read())
0048 f = open(filename)
0049 try:
0050 for line in f:
0051 inputfiles.append(line)
0052 finally:
0053 f.close()
0054 else:
0055 inputfiles = os.environ.get('INPUTFILES',
0056 '/store/data/BeamCommissioning09/MinimumBias/RECO/Dec19thReReco_341_v1/0001/02EC80FB-FEEC-DE11-B28D-00261894389E.root').split(",")
0057
0058
0059
0060 print('List of input files')
0061 print(inputfiles)
0062
0063
0064
0065
0066 process = cms.Process("test")
0067 process.load("CondCore.DBCommon.CondDBSetup_cfi")
0068
0069 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0070 process.load("Configuration.StandardSequences.MagneticField_cff")
0071 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0072
0073
0074
0075
0076 process.load("DQMServices.Core.DQM_cfg")
0077
0078 process.load("DQMServices.Components.MEtoEDMConverter_cfi")
0079
0080
0081
0082
0083 process.load("RecoMET.METProducers.hcalnoiseinfoproducer_cfi")
0084 process.hcalnoise.refillRefVectors = cms.bool(True)
0085 process.hcalnoise.hcalNoiseRBXCollName = "hcalnoise"
0086 process.hcalnoise.requirePedestals = cms.bool(False)
0087
0088
0089
0090
0091 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0092 process.load("Configuration/StandardSequences/MagneticField_cff")
0093 process.load("Configuration/StandardSequences/FrontierConditions_GlobalTag_cff")
0094 process.load("RecoMET/Configuration/RecoMET_BeamHaloId_cff")
0095 process.GlobalTag.globaltag ='GR09_R_34X_V2::All'
0096
0097
0098 if iscosmics =="True":
0099 process.load("DQMOffline.JetMET.jetMETDQMOfflineSourceCosmic_cff")
0100 else:
0101 process.load("DQMOffline.JetMET.jetMETDQMOfflineSource_cff")
0102
0103 process.jetMETAnalyzer.OutputMEsInRootFile = cms.bool(True)
0104 process.jetMETAnalyzer.OutputFileName = cms.string("jetMETMonitoring_%s.root" % jobname)
0105 process.jetMETAnalyzer.TriggerResultsLabel = cms.InputTag("TriggerResults","",trigger_set)
0106 process.jetMETAnalyzer.processname = cms.string(trigger_set)
0107
0108
0109
0110 if allhist=="True":
0111 process.jetMETAnalyzer.DoJetPtAnalysis = cms.untracked.bool(True)
0112 process.jetMETAnalyzer.DoJetPtCleaning = cms.untracked.bool(True)
0113 process.jetMETAnalyzer.DoIterativeCone = cms.untracked.bool(True)
0114
0115
0116
0117 if allhist=="True":
0118 process.jetMETAnalyzer.caloMETAnalysis.allSelection = cms.bool(True)
0119 process.jetMETAnalyzer.caloMETNoHFAnalysis.allSelection = cms.bool(True)
0120 process.jetMETAnalyzer.caloMETHOAnalysis.allSelection = cms.bool(True)
0121 process.jetMETAnalyzer.caloMETNoHFHOAnalysis.allSelection = cms.bool(True)
0122 process.jetMETAnalyzer.pfMETAnalysis.allSelection = cms.bool(True)
0123 process.jetMETAnalyzer.tcMETAnalysis.allSelection = cms.bool(True)
0124 process.jetMETAnalyzer.mucorrMETAnalysis.allSelection = cms.bool(True)
0125
0126
0127 process.load("DQMOffline.Trigger.JetMETHLTOfflineSource_cfi")
0128
0129
0130 process.load("DQMServices.Components.DQMStoreStats_cfi")
0131
0132
0133
0134
0135
0136
0137
0138
0139
0140
0141 process.source = cms.Source("PoolSource",
0142 fileNames = cms.untracked.vstring(*inputfiles))
0143
0144
0145 process.source.inputCommands = cms.untracked.vstring('keep *', 'drop *_MEtoEDMConverter_*_*')
0146
0147
0148 process.maxEvents = cms.untracked.PSet(
0149 input = cms.untracked.int32( nevents )
0150 )
0151 process.Timing = cms.Service("Timing")
0152
0153
0154 process.MessageLogger = cms.Service("MessageLogger",
0155 debugModules = cms.untracked.vstring('jetMETAnalyzer'),
0156 cout = cms.untracked.PSet(
0157 default = cms.untracked.PSet(
0158 limit = cms.untracked.int32(0)
0159 ),
0160 jetMETAnalyzer = cms.untracked.PSet(
0161 limit = cms.untracked.int32(100)
0162 ),
0163 noLineBreaks = cms.untracked.bool(True),
0164 DEBUG = cms.untracked.PSet(
0165 limit = cms.untracked.int32(0)
0166 ),
0167 threshold = cms.untracked.string('DEBUG')
0168 ),
0169 categories = cms.untracked.vstring('jetMETAnalyzer'),
0170 destinations = cms.untracked.vstring('cout')
0171 )
0172
0173
0174 process.options = cms.untracked.PSet(
0175 wantSummary = cms.untracked.bool(True)
0176 )
0177
0178 process.FEVT = cms.OutputModule("PoolOutputModule",
0179 outputCommands = cms.untracked.vstring('keep *_MEtoEDMConverter_*_*'),
0180
0181 fileName = cms.untracked.string("reco_DQM_%s.root" % jobname)
0182 )
0183
0184 process.options = cms.untracked.PSet(
0185 wantSummary = cms.untracked.bool(True)
0186
0187 )
0188
0189 if iscosmics=="True":
0190 process.p = cms.Path(process.hcalnoise
0191 * process.BeamHaloId
0192 * process.jetMETHLTOfflineSource
0193
0194 * process.jetMETDQMOfflineSourceCosmic
0195 * process.MEtoEDMConverter
0196 * process.dqmStoreStats)
0197 else:
0198 process.p = cms.Path(process.hcalnoise
0199 * process.BeamHaloId
0200 * process.jetMETHLTOfflineSource
0201 * process.jetMETDQMOfflineSource
0202
0203 * process.MEtoEDMConverter
0204 * process.dqmStoreStats)
0205
0206 process.outpath = cms.EndPath(process.FEVT)
0207 process.DQM.collectorHost = ''
0208
0209