Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:34:59

0001 # PYTHON configuration file.
0002 # Description:  Example of applying L2+L3+L5 jet corrections.
0003 # Author: K. Kousouris
0004 # Date:  02 - September - 2009
0005 import FWCore.ParameterSet.Config as cms
0006 
0007 process = cms.Process("Ana")
0008 process.load("FWCore.MessageService.MessageLogger_cfi")
0009 #############   Set the number of events #############
0010 process.maxEvents = cms.untracked.PSet(
0011     input = cms.untracked.int32(100)
0012 )
0013 #############   Define the source file ###############
0014 process.source = cms.Source("PoolSource",
0015     fileNames = cms.untracked.vstring('/store/relval/CMSSW_3_1_2/RelValQCD_FlatPt_15_3000/GEN-SIM-RECO/MC_31X_V3-v1/0007/9E83A122-E978-DE11-9D04-001D09F23C73.root')
0016 )
0017 #############   Define the L2 correction service #####
0018 process.L2RelativeJetCorrector = cms.ESSource("L2RelativeCorrectionService", 
0019     tagName = cms.string('Summer09_L2Relative_SC5Calo'),
0020     label = cms.string('L2RelativeJetCorrector')
0021 )
0022 #############   Define the L3 correction service #####
0023 process.L3AbsoluteJetCorrector = cms.ESSource("L3AbsoluteCorrectionService", 
0024     tagName = cms.string('Summer09_L3Absolute_SC5Calo'),
0025     label = cms.string('L3AbsoluteJetCorrector')
0026 )
0027 #############   Define the L5 correction service #####
0028 process.L5JetCorrector = cms.ESSource("L5FlavorCorrectionService",
0029     section = cms.string('bJ'), 
0030     tagName = cms.string('L5Flavor_IC5'),# IMPORTANT: the L5 correction was derived from IC5 but it is the same for all algos
0031     label = cms.string('L5FlavorJetCorrector')
0032 )
0033 #############   Define the chain corrector service ###
0034 process.L2L3L5JetCorrector = cms.ESSource("JetCorrectionServiceChain",  
0035     correctors = cms.vstring('L2RelativeJetCorrector','L3AbsoluteJetCorrector','L5FlavorJetCorrector'),
0036     label = cms.string('L2L3L5JetCorrector')
0037 )
0038 #############   Define the chain corrector module ####
0039 process.L2L3L5CorJet = cms.EDProducer("CaloJetCorrectionProducer",
0040     src = cms.InputTag("sisCone5CaloJets"),
0041     correctors = cms.vstring('L2L3L5JetCorrector')
0042 )
0043 # set the record's IOV. Must be defined once. Choose ANY correction service. #
0044 process.prefer("L2L3L5JetCorrector") 
0045 #############   Plots of corrected Jet collection ####
0046 process.plots = cms.EDAnalyzer("CaloJetPlotsExample",
0047     JetAlgorithm  = cms.string('L2L3L5CorJet'),
0048     HistoFileName = cms.string('L2L3L5CaloJetCorExample.root'),
0049     NJets         = cms.int32(100)
0050 )
0051 #############   Path       ###########################
0052 process.p = cms.Path(process.L2L3L5CorJet * process.plots)
0053 #############   Format MessageLogger #################
0054 process.MessageLogger.cerr.FwkReport.reportEvery = 10