Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-11-26 02:34:12

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