Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:25:28

0001 # PYTHON configuration file.
0002 # Description:  Example of dijet ratio plot
0003 #               with corrected and uncorrected jets
0004 # Author: Kalanand Mishra
0005 # Date:  22 - November - 2009 
0006 
0007 import FWCore.ParameterSet.Config as cms
0008 
0009 process = cms.Process("Ana")
0010 process.load("FWCore.MessageService.MessageLogger_cfi")
0011 #############   Set the number of events #############
0012 process.maxEvents = cms.untracked.PSet(
0013     input = cms.untracked.int32(1000)
0014 )
0015 #############   Define the source file ###############
0016 process.source = cms.Source("PoolSource",
0017     fileNames = cms.untracked.vstring(
0018     '/store/mc/Summer09/QCDFlat_Pt15to3000/GEN-SIM-RECO/MC_31X_V9_7TeV-v1/0000/FABD2A94-C0D3-DE11-B6FD-00237DA13C2E.root')
0019 )
0020 process.source.inputCommands = cms.untracked.vstring("keep *","drop *_MEtoEDMConverter_*_*")
0021 
0022 #############   Include the jet corrections ##########
0023 process.load("JetMETCorrections.Configuration.L2L3Corrections_Summer09_7TeV_ReReco332_cff")
0024 # set the record's IOV. Must be defined once. Choose ANY correction service. #
0025 process.prefer("L2L3JetCorrectorAK5Calo")
0026 
0027 #############   User analyzer (calo jets) ##
0028 process.DijetRatioCaloJets = cms.EDAnalyzer("DijetRatioCaloJets",
0029     # Uncorrected CaloJets
0030     UnCorrectedJets           = cms.string('ak5CaloJets'),
0031     # Corrected CaloJets                                          
0032     CorrectedJets  = cms.string('L2L3CorJetAK5Calo'), 
0033     # Name of the output ROOT file containing the histograms 
0034     HistoFileName = cms.untracked.string('DijetRatioCaloJets.root')
0035 )
0036 
0037 #############   User analyzer (PF jets) ##
0038 process.DijetRatioPFJets = cms.EDAnalyzer("DijetRatioPFJets",
0039     # Uncorrected PFJets
0040     UnCorrectedJets          = cms.string('ak5PFJets'),
0041     # Corrected PFJets                                          
0042     CorrectedJets = cms.string('L2L3CorJetAK5PF'), 
0043     # Name of the output ROOT file containing the histograms 
0044     HistoFileName = cms.untracked.string('DijetRatioPFJets.root')
0045 )
0046 
0047 
0048 #############   User analyzer (gen jets) ##
0049 # ak5GenJets are NOT there: First load the needed modules
0050 process.load("RecoJets.Configuration.GenJetParticles_cff")
0051 process.load("RecoJets.JetProducers.ak5GenJets_cfi")
0052 process.DijetRatioGenJets = cms.EDAnalyzer("DijetRatioGenJets",
0053     # Uncorrected GenJets
0054     UnCorrectedJets          = cms.string('ak5GenJets'),
0055     # Corrected GenJets  == Uncorrected GenJets   
0056     CorrectedJets  = cms.string('ak5GenJets'), 
0057     # Name of the output ROOT file containing the histograms 
0058     HistoFileName = cms.untracked.string('DijetRatioGenJets.root')
0059 )
0060 
0061 
0062 #############   Path       ###########################
0063 process.p = cms.Path(process.L2L3CorJetAK5Calo * process.DijetRatioCaloJets)
0064 process.p2 = cms.Path(process.L2L3CorJetAK5PF * process.DijetRatioPFJets)
0065 process.p3 = cms.Path(process.genParticlesForJets *
0066                          process.ak5GenJets * process.DijetRatioGenJets)
0067 #############   Format MessageLogger #################
0068 process.MessageLogger.cerr.FwkReport.reportEvery = 10
0069