Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:12:55

0001 from __future__ import print_function
0002 import os
0003 import FWCore.ParameterSet.Config as cms
0004 
0005 #
0006 # --- [cosmic sequence (default=True)?]
0007 iscosmics = 'True'
0008 print('iscosmics (default=True) = '+str(iscosmics))
0009 # --- [name of job & output file (default=test)?]
0010 jobname = 'test'
0011 print('jobname (default=test) = '+str(jobname))
0012 #
0013 # --- [number of events (default=1000)]
0014 nevents = 1000
0015 print('nevents (default=1000)  = '+str(nevents))
0016 #
0017 # --- [turn on all histograms (default=True)?]
0018 allhist = 'True'
0019 print('allhist (default=True) = '+str(allhist))
0020 #
0021 #--- [trigger set (default=HLT)]
0022 trigger_set = 'HLT'
0023 print('trigger set name (default=HLT) = '+str(trigger_set))
0024 
0025 #-----
0026 process = cms.Process("test")
0027 process.load("CondCore.DBCommon.CondDBSetup_cfi")
0028 
0029 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0030 process.load("Configuration.StandardSequences.MagneticField_cff")
0031 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0032 
0033 #
0034 # DQM
0035 #
0036 process.load("DQMServices.Core.DQM_cfg")
0037 
0038 process.load("DQMServices.Components.MEtoEDMConverter_cfi")
0039 
0040 #
0041 # HCALNoise module
0042 #
0043 process.load("RecoMET.METProducers.hcalnoiseinfoproducer_cfi")
0044 process.hcalnoise.refillRefVectors = cms.bool(True)
0045 process.hcalnoise.hcalNoiseRBXCollName = "hcalnoise"
0046 process.hcalnoise.requirePedestals = cms.bool(False)
0047 
0048 #
0049 # BeamHaloData producer
0050 #
0051 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0052 process.load("Configuration/StandardSequences/MagneticField_cff")
0053 process.load("Configuration/StandardSequences/FrontierConditions_GlobalTag_cff")
0054 process.load("RecoMET/Configuration/RecoMET_BeamHaloId_cff")
0055 process.GlobalTag.globaltag ='GR09_R_34X_V2::All'
0056 
0057 # the task - JetMET objects
0058 if iscosmics =="True":
0059   process.load("DQMOffline.JetMET.jetMETDQMOfflineSourceCosmic_cff")
0060 else:
0061   process.load("DQMOffline.JetMET.jetMETDQMOfflineSource_cff")
0062 
0063 process.jetMETAnalyzer.OutputMEsInRootFile = cms.bool(True)
0064 process.jetMETAnalyzer.OutputFileName = cms.string("jetMETMonitoring_test.root")
0065 process.jetMETAnalyzer.TriggerResultsLabel = cms.InputTag("TriggerResults","",trigger_set)
0066 process.jetMETAnalyzer.processname = cms.string(trigger_set)
0067 
0068 if allhist=="True":
0069   process.jetMETAnalyzer.DoJetPtAnalysis = cms.untracked.bool(True)
0070   process.jetMETAnalyzer.DoJetPtCleaning = cms.untracked.bool(True)
0071   process.jetMETAnalyzer.DoIterativeCone = cms.untracked.bool(True)
0072 
0073 process.jetMETAnalyzer.caloMETAnalysis.verbose = cms.int32(0)
0074 
0075 if allhist=="True":
0076   process.jetMETAnalyzer.caloMETAnalysis.allSelection       = cms.bool(True)
0077   process.jetMETAnalyzer.caloMETNoHFAnalysis.allSelection   = cms.bool(True)
0078   process.jetMETAnalyzer.caloMETHOAnalysis.allSelection     = cms.bool(True)
0079   process.jetMETAnalyzer.caloMETNoHFHOAnalysis.allSelection = cms.bool(True)
0080   process.jetMETAnalyzer.pfMETAnalysis.allSelection         = cms.bool(True)
0081   process.jetMETAnalyzer.tcMETAnalysis.allSelection         = cms.bool(True)
0082   process.jetMETAnalyzer.mucorrMETAnalysis.allSelection     = cms.bool(True)
0083 
0084 # the task - JetMET trigger
0085 process.load("DQMOffline.Trigger.JetMETHLTOfflineSource_cfi")
0086 
0087 # check # of bins
0088 process.load("DQMServices.Components.DQMStoreStats_cfi")
0089 
0090 # for igprof
0091 #process.IgProfService = cms.Service("IgProfService",
0092 #  reportFirstEvent            = cms.untracked.int32(0),
0093 #  reportEventInterval         = cms.untracked.int32(25),
0094 #  reportToFileAtPostEvent     = cms.untracked.string("| gzip -c > igdqm.%I.gz")
0095 #)
0096 
0097 #
0098 # /Wmunu/Summer09-MC_31X_V3-v1/GEN-SIM-RECO
0099 #process.source = cms.Source("PoolSource",
0100 #    fileNames = cms.untracked.vstring(*inputfiles))
0101 
0102 #Load files from text
0103 #import FWCore.Python.FileUtils as FileUtils
0104 import FWCore.Utilities.FileUtils as FileUtils
0105 readFiles = cms.untracked.vstring( FileUtils.loadListFromFile ('filelist_ExpressPhysics_121964.txt') )
0106 
0107 #Extend the list if needed...
0108 #readFiles.extend( FileUtils.loadListFromFile ('moreInfoIwant.txt') )
0109 
0110 #Read the input files
0111 process.source = cms.Source ("PoolSource",fileNames = readFiles)
0112 
0113 #
0114 process.source.inputCommands = cms.untracked.vstring('keep *', 'drop *_MEtoEDMConverter_*_*')
0115 #
0116 process.maxEvents = cms.untracked.PSet(
0117     input = cms.untracked.int32( nevents )
0118 )
0119 process.Timing = cms.Service("Timing")
0120 
0121 ## # Comment this out or reconfigure to see error messages 
0122 process.MessageLogger = cms.Service("MessageLogger",
0123     debugModules = cms.untracked.vstring('jetMETAnalyzer'),
0124     cout = cms.untracked.PSet(
0125         default = cms.untracked.PSet(
0126             limit = cms.untracked.int32(0)
0127         ),
0128         jetMETAnalyzer = cms.untracked.PSet(
0129             limit = cms.untracked.int32(100)
0130         ),
0131         noLineBreaks = cms.untracked.bool(True),
0132         DEBUG = cms.untracked.PSet(
0133             limit = cms.untracked.int32(0)
0134         ),
0135         threshold = cms.untracked.string('DEBUG')
0136     ),
0137     categories = cms.untracked.vstring('jetMETAnalyzer'),
0138     destinations = cms.untracked.vstring('cout')
0139 )
0140 
0141 
0142 process.options = cms.untracked.PSet(
0143     wantSummary = cms.untracked.bool(True)
0144 )
0145 
0146 process.FEVT = cms.OutputModule("PoolOutputModule",
0147     outputCommands = cms.untracked.vstring('keep *_MEtoEDMConverter_*_*'),
0148     #outputCommands = cms.untracked.vstring('keep *'),
0149     fileName = cms.untracked.string("reco_DQM_test.root")
0150 )
0151 
0152 process.options = cms.untracked.PSet(
0153     wantSummary = cms.untracked.bool(True) ## default is false
0154 
0155 )
0156 
0157 if iscosmics=="True":
0158   process.p = cms.Path(process.hcalnoise
0159                        * process.BeamHaloId
0160                        * process.jetMETHLTOfflineSource
0161                        #                    * process.jetMETDQMOfflineSource
0162                        * process.jetMETDQMOfflineSourceCosmic
0163                        * process.MEtoEDMConverter
0164                        * process.dqmStoreStats)
0165 else:
0166   process.p = cms.Path(process.hcalnoise
0167                        * process.BeamHaloId
0168                        * process.jetMETHLTOfflineSource
0169                        * process.jetMETDQMOfflineSource
0170                        #                    * process.jetMETDQMOfflineSourceCosmic
0171                        * process.MEtoEDMConverter
0172                        * process.dqmStoreStats)
0173   
0174 process.outpath = cms.EndPath(process.FEVT)
0175 process.DQM.collectorHost = ''
0176