Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:16

0001 ################################################################################
0002 #
0003 # run_ak5L2L3_cfg.py
0004 # ------------------
0005 #
0006 # This configuration demonstrates how to run the L2L3 correction producers
0007 # for AntiKt R=0.5 CaloJets and PFJets.
0008 #
0009 # Note that you can switch between different sets of corrections
0010 # (e.g. Summer09 and Summer09_7TeV) by simply setting the below 'era'
0011 # parameter accordingly!
0012 #
0013 # The job creates 'histos.root' which contains the jet pT spectra for
0014 # calorimeter and pflow jets before and after the application of the
0015 # L2 (relative) and L3 (absolute) corrections.
0016 #
0017 ################################################################################
0018 
0019 import FWCore.ParameterSet.Config as cms
0020 
0021 #!
0022 #! PROCESS
0023 #!
0024 process = cms.Process("AK5L2L3")
0025 
0026 
0027 #!
0028 #! INPUT
0029 #!
0030 process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1000) )
0031 process.source = cms.Source(
0032     'PoolSource',
0033     fileNames = cms.untracked.vstring('/store/relval/CMSSW_7_1_0_pre1/RelValProdTTbar/GEN-SIM-RECO/START70_V5-v1/00000/14842A6B-2086-E311-B5CB-02163E00E8DA.root')
0034     )
0035 
0036 
0037 #!
0038 #! SERVICES
0039 #!
0040 process.MessageLogger = cms.Service(
0041     "MessageLogger",
0042     destinations = cms.untracked.vstring('cout'),
0043     cout         = cms.untracked.PSet(threshold = cms.untracked.string('INFO'))
0044     )
0045 process.TFileService=cms.Service("TFileService",fileName=cms.string('histos.root'))
0046 
0047 
0048 #!
0049 #! JET CORRECTION
0050 #!
0051 from JetMETCorrections.Configuration.JetCorrectionEra_cff import *
0052 JetCorrectionEra.era = 'Summer09_7TeV' # FIXME for input
0053 process.load('JetMETCorrections.Configuration.CorrectedJetProducers_cff')
0054 
0055 
0056 #!
0057 #! MAKE SOME HISTOGRAMS
0058 #!
0059 jetPtHistogram = cms.PSet(min          = cms.untracked.double(     10),
0060                           max          = cms.untracked.double(    200),
0061                           nbins        = cms.untracked.int32 (     50),
0062                           name         = cms.untracked.string('JetPt'),
0063                           description  = cms.untracked.string(     ''),
0064                           plotquantity = cms.untracked.string(   'pt')
0065                           )
0066 
0067 process.ak5CaloHistos = cms.EDAnalyzer(
0068     'CandViewHistoAnalyzer',
0069     src = cms.InputTag('ak5CaloJets'),
0070     histograms = cms.VPSet(jetPtHistogram)
0071     )
0072 process.ak5CaloL2L3Histos = cms.EDAnalyzer(
0073     'CandViewHistoAnalyzer',
0074     src = cms.InputTag('ak5CaloJetsL2L3'),
0075     histograms = cms.VPSet(jetPtHistogram)
0076     )
0077 process.ak5PFHistos = cms.EDAnalyzer(
0078     'CandViewHistoAnalyzer',
0079     src = cms.InputTag('ak5PFJets'),
0080     histograms = cms.VPSet(jetPtHistogram)
0081     )
0082 process.ak5PFL2L3Histos = cms.EDAnalyzer(
0083     'CandViewHistoAnalyzer',
0084     src = cms.InputTag('ak5PFJetsL2L3'),
0085     histograms = cms.VPSet(jetPtHistogram)
0086     )
0087 
0088 #
0089 # RUN!
0090 #
0091 process.run = cms.Path(
0092     process.ak5CaloJetsL2L3*process.ak5CaloHistos*process.ak5CaloL2L3Histos*
0093     process.ak5PFJetsL2L3*  process.ak5PFHistos*  process.ak5PFL2L3Histos
0094     )