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 = 'False'
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 #
0041 # BeamHaloData producer
0042 #
0043 process.load("Configuration.StandardSequences.GeometryRecoDB_cff")
0044 process.load("Configuration.StandardSequences.Reconstruction_cff")
0045 process.load("Configuration/StandardSequences/MagneticField_cff")
0046 process.load("Configuration/StandardSequences/FrontierConditions_GlobalTag_cff")
0047 process.load("RecoMET/Configuration/RecoMET_BeamHaloId_cff")
0048 process.GlobalTag.globaltag ='GR_R_42_V19::All'
0049 
0050 # the task - JetMET objects
0051 if iscosmics =="True":
0052   process.load("DQMOffline.JetMET.jetMETDQMOfflineSourceCosmic_cff")
0053 else:
0054   process.load("DQMOffline.JetMET.jetMETDQMOfflineSource_cff")
0055 
0056 process.jetMETAnalyzer.OutputMEsInRootFile = cms.bool(True)
0057 process.jetMETAnalyzer.OutputFileName = cms.string("jetMETMonitoring_%s.root" % jobname)
0058 
0059 process.jetMETAnalyzer.TriggerResultsLabel = cms.InputTag("TriggerResults","",trigger_set)
0060 process.jetMETAnalyzer.processname = cms.string(trigger_set)
0061 
0062 #event cleanup stuff
0063 process.jetMETAnalyzer.doPrimaryVertexCheck   = cms.bool(False)
0064 #process.jetMETAnalyzer.doHLTPhysicsOn         = cms.bool(False)
0065 process.jetMETAnalyzer.tightBHFiltering       = cms.bool(False)
0066 
0067 process.jetMETAnalyzer.caloMETAnalysis.doPrimaryVertexCheck   = cms.bool(False)
0068 #process.jetMETAnalyzer.caloMETAnalysis.doHLTPhysicsOn         = cms.bool(False)
0069 process.jetMETAnalyzer.caloMETAnalysis.tightBHFiltering       = cms.bool(False)
0070 process.jetMETAnalyzer.caloMETAnalysis.tightJetIDFiltering    = cms.int32(-1) #-1 off, 0 minimal, 1 loose, 2 tight
0071 
0072 process.jetMETAnalyzer.caloMETNoHFAnalysis.doPrimaryVertexCheck   = cms.bool(False)
0073 #process.jetMETAnalyzer.caloMETNoHFAnalysis.doHLTPhysicsOn         = cms.bool(False)
0074 process.jetMETAnalyzer.caloMETNoHFAnalysis.tightBHFiltering       = cms.bool(False)
0075 process.jetMETAnalyzer.caloMETNoHFAnalysis.tightJetIDFiltering    = cms.int32(-1) #-1 off, 0 minimal, 1 loose, 2 tight
0076 
0077 process.jetMETAnalyzer.caloMETHOAnalysis.doPrimaryVertexCheck   = cms.bool(False)
0078 #process.jetMETAnalyzer.caloMETHOAnalysis.doHLTPhysicsOn         = cms.bool(False)
0079 process.jetMETAnalyzer.caloMETHOAnalysis.tightBHFiltering       = cms.bool(False)
0080 process.jetMETAnalyzer.caloMETHOAnalysis.tightJetIDFiltering    = cms.int32(-1) #-1 off, 0 minimal, 1 loose, 2 tight
0081 
0082 process.jetMETAnalyzer.caloMETNoHFHOAnalysis.doPrimaryVertexCheck   = cms.bool(False)
0083 #process.jetMETAnalyzer.caloMETNoHFHOAnalysis.doHLTPhysicsOn         = cms.bool(False)
0084 process.jetMETAnalyzer.caloMETNoHFHOAnalysis.tightBHFiltering       = cms.bool(False)
0085 process.jetMETAnalyzer.caloMETNoHFHOAnalysis.tightJetIDFiltering    = cms.int32(-1) #-1 off, 0 minimal, 1 loose, 2 tight
0086 
0087 process.jetMETAnalyzer.pfMETAnalysis.doPrimaryVertexCheck   = cms.bool(False)
0088 #process.jetMETAnalyzer.pfMETAnalysis.doHLTPhysicsOn         = cms.bool(False)
0089 process.jetMETAnalyzer.pfMETAnalysis.tightBHFiltering       = cms.bool(False)
0090 process.jetMETAnalyzer.pfMETAnalysis.tightJetIDFiltering    = cms.int32(-1) #-1 off, 0 minimal, 1 loose, 2 tight
0091 
0092 process.jetMETAnalyzer.tcMETAnalysis.doPrimaryVertexCheck   = cms.bool(False)
0093 #process.jetMETAnalyzer.tcMETAnalysis.doHLTPhysicsOn         = cms.bool(False)
0094 process.jetMETAnalyzer.tcMETAnalysis.tightBHFiltering       = cms.bool(False)
0095 process.jetMETAnalyzer.tcMETAnalysis.tightJetIDFiltering    = cms.int32(-1) #-1 off, 0 minimal, 1 loose, 2 tight
0096 
0097 process.jetMETAnalyzer.mucorrMETAnalysis.doPrimaryVertexCheck   = cms.bool(False)
0098 #process.jetMETAnalyzer.mucorrMETAnalysis.doHLTPhysicsOn         = cms.bool(False)
0099 process.jetMETAnalyzer.mucorrMETAnalysis.tightBHFiltering       = cms.bool(False)
0100 process.jetMETAnalyzer.mucorrMETAnalysis.tightJetIDFiltering    = cms.int32(-1) #-1 off, 0 minimal, 1 loose, 2 tight
0101 
0102 
0103 if allhist=="True":
0104   process.jetMETAnalyzer.DoJetPtAnalysis = cms.untracked.bool(True)
0105   process.jetMETAnalyzer.DoJetPtCleaning = cms.untracked.bool(True)
0106   process.jetMETAnalyzer.DoIterativeCone = cms.untracked.bool(True)
0107 
0108 process.jetMETAnalyzer.caloMETAnalysis.verbose = cms.int32(0)
0109 
0110 if allhist=="True":
0111   process.jetMETAnalyzer.caloMETAnalysis.allSelection       = cms.bool(True)
0112   process.jetMETAnalyzer.caloMETNoHFAnalysis.allSelection   = cms.bool(True)
0113   process.jetMETAnalyzer.caloMETHOAnalysis.allSelection     = cms.bool(True)
0114   process.jetMETAnalyzer.caloMETNoHFHOAnalysis.allSelection = cms.bool(True)
0115   process.jetMETAnalyzer.pfMETAnalysis.allSelection         = cms.bool(True)
0116   process.jetMETAnalyzer.tcMETAnalysis.allSelection         = cms.bool(True)
0117   process.jetMETAnalyzer.mucorrMETAnalysis.allSelection     = cms.bool(True)
0118 
0119 # the task - JetMET trigger
0120 process.load("DQMOffline.Trigger.JetMETHLTOfflineSource_cfi")
0121 
0122 # check # of bins
0123 process.load("DQMServices.Components.DQMStoreStats_cfi")
0124 
0125 # for igprof
0126 #process.IgProfService = cms.Service("IgProfService",
0127 #  reportFirstEvent            = cms.untracked.int32(0),
0128 #  reportEventInterval         = cms.untracked.int32(25),
0129 #  reportToFileAtPostEvent     = cms.untracked.string("| gzip -c > igdqm.%I.gz")
0130 #)
0131 
0132 #
0133 # /Wmunu/Summer09-MC_31X_V3-v1/GEN-SIM-RECO
0134 #process.source = cms.Source("PoolSource",
0135 #    fileNames = cms.untracked.vstring(*inputfiles))
0136 
0137 #Load files from text
0138 #import FWCore.Python.FileUtils as FileUtils
0139 import FWCore.Utilities.FileUtils as FileUtils
0140 readFiles = cms.untracked.vstring( FileUtils.loadListFromFile ('inputfile_MinimumBias_ReReco_122294.txt') )
0141 
0142 #Extend the list if needed...
0143 #readFiles.extend( FileUtils.loadListFromFile ('moreInfoIwant.txt') )
0144 
0145 #Read the input files
0146 process.source = cms.Source ("PoolSource",fileNames = readFiles)
0147 
0148 #
0149 process.source.inputCommands = cms.untracked.vstring('keep *', 'drop *_MEtoEDMConverter_*_*')
0150 #
0151 process.maxEvents = cms.untracked.PSet(
0152     input = cms.untracked.int32( nevents )
0153 )
0154 process.Timing = cms.Service("Timing")
0155 
0156 ## # Comment this out or reconfigure to see error messages 
0157 process.MessageLogger = cms.Service("MessageLogger",
0158     debugModules = cms.untracked.vstring('jetMETAnalyzer'),
0159     cout = cms.untracked.PSet(
0160         default = cms.untracked.PSet(
0161             limit = cms.untracked.int32(0)
0162         ),
0163         jetMETAnalyzer = cms.untracked.PSet(
0164             limit = cms.untracked.int32(100)
0165         ),
0166         noLineBreaks = cms.untracked.bool(True),
0167         DEBUG = cms.untracked.PSet(
0168             limit = cms.untracked.int32(0)
0169         ),
0170         threshold = cms.untracked.string('DEBUG')
0171     ),
0172     categories = cms.untracked.vstring('jetMETAnalyzer'),
0173     destinations = cms.untracked.vstring('cout')
0174 )
0175 
0176 
0177 process.options = cms.untracked.PSet(
0178     wantSummary = cms.untracked.bool(True)
0179 )
0180 
0181 process.FEVT = cms.OutputModule("PoolOutputModule",
0182     outputCommands = cms.untracked.vstring('keep *_MEtoEDMConverter_*_*'),
0183     #outputCommands = cms.untracked.vstring('keep *'),
0184     fileName = cms.untracked.string("reco_DQM_%s.root" % jobname)
0185 )
0186 
0187 process.options = cms.untracked.PSet(
0188     wantSummary = cms.untracked.bool(True) ## default is false
0189 
0190 )
0191 
0192 if iscosmics=="True":
0193   process.p = cms.Path(  process.BeamHaloId
0194                        * process.jetMETHLTOfflineSource
0195                        #                    * process.jetMETDQMOfflineSource
0196                        * process.jetMETDQMOfflineSourceCosmic
0197                        * process.MEtoEDMConverter
0198                        * process.dqmStoreStats)
0199 else:
0200   process.p = cms.Path(  process.BeamHaloId
0201                        * process.jetMETHLTOfflineSource
0202                        * process.jetMETDQMOfflineSource
0203                        #                    * process.jetMETDQMOfflineSourceCosmic
0204                        * process.MEtoEDMConverter
0205                        * process.dqmStoreStats)
0206   
0207 process.outpath = cms.EndPath(process.FEVT)
0208 process.DQM.collectorHost = ''
0209