Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 # PYTHON configuration file for class: JetPlotsExample
0002 # Description:  Example of simple EDAnalyzer for jets.
0003 # Author: K. Kousouris
0004 # Date:  25 - August - 2008
0005 # Modified: Kalanand Mishra
0006 # Date:  11 - January - 2011 (for CMS Data Analysis School jet exercise)
0007 
0008 
0009 import FWCore.ParameterSet.Config as cms
0010 
0011 ##  ____        _                       __  __  ____ 
0012 ## |  _ \  __ _| |_ __ _    ___  _ __  |  \/  |/ ___|
0013 ## | | | |/ _` | __/ _` |  / _ \| '__| | |\/| | |    
0014 ## | |_| | (_| | || (_| | | (_) | |    | |  | | |___ 
0015 ## |____/ \__,_|\__\__,_|  \___/|_|    |_|  |_|\____|
0016             
0017 isMC = True
0018 
0019 
0020 ##   ____             __ _                       _     _           
0021 ##  / ___|___  _ __  / _(_) __ _ _   _ _ __ __ _| |__ | | ___  ___ 
0022 ## | |   / _ \| '_ \| |_| |/ _` | | | | '__/ _` | '_ \| |/ _ \/ __|
0023 ## | |__| (_) | | | |  _| | (_| | |_| | | | (_| | |_) | |  __/\__ \
0024 ##  \____\___/|_| |_|_| |_|\__, |\__,_|_|  \__,_|_.__/|_|\___||___/
0025 ##                         |___/                                   
0026 
0027 NJetsToKeep = 2
0028 
0029 inputFile = 'file:/uscms_data/d2/kalanand/dijet-Run2010A-JetMET-Nov4ReReco-9667events.root'
0030 if isMC:
0031   inputFile ='/store/mc/Fall10/QCD_Pt_80to120_TuneZ2_7TeV_pythia6/GEN-SIM-RECO/START38_V12-v1/0000/FEF4D100-4CCB-DF11-94CB-00E08178C12F.root'
0032   
0033 
0034 ##   _            _           _           
0035 ## (_)_ __   ___| |_   _  __| | ___  ___ 
0036 ## | | '_ \ / __| | | | |/ _` |/ _ \/ __|
0037 ## | | | | | (__| | |_| | (_| |  __/\__ \
0038 ## |_|_| |_|\___|_|\__,_|\__,_|\___||___/
0039     
0040 process = cms.Process("Ana")
0041 #############   Format MessageLogger #################
0042 process.load("FWCore.MessageService.MessageLogger_cfi")
0043 process.MessageLogger.cerr.FwkReport.reportEvery = 10
0044 
0045 
0046 
0047 ##  ____             _ ____                           
0048 ## |  _ \ ___   ___ | / ___|  ___  _   _ _ __ ___ ___ 
0049 ## | |_) / _ \ / _ \| \___ \ / _ \| | | | '__/ __/ _ \
0050 ## |  __/ (_) | (_) | |___) | (_) | |_| | | | (_|  __/
0051 ## |_|   \___/ \___/|_|____/ \___/ \__,_|_|  \___\___|
0052                                                    
0053 
0054 #############   Set the number of events #############
0055 process.maxEvents = cms.untracked.PSet(
0056     input = cms.untracked.int32(100)
0057 )
0058 #############   Define the source file ###############
0059 process.source = cms.Source("PoolSource",
0060     fileNames = cms.untracked.vstring(inputFile)
0061 )
0062 process.source.inputCommands = cms.untracked.vstring("keep *","drop *_MEtoEDMConverter_*_*")
0063 
0064 
0065 ##  ____  _       _       
0066 ## |  _ \| | ___ | |_ ___ 
0067 ## | |_) | |/ _ \| __/ __|
0068 ## |  __/| | (_) | |_\__ \
0069 ## |_|   |_|\___/ \__|___/
0070 
0071 #############   Calo Jets  ###########################
0072 process.calo = cms.EDAnalyzer("CaloJetPlotsExample",
0073     JetAlgorithm  = cms.string('ak4CaloJets'),
0074     HistoFileName = cms.string('CaloJetPlotsExample.root'),
0075     NJets         = cms.int32(NJetsToKeep)
0076 )
0077 #############   PF Jets    ###########################
0078 process.pf = cms.EDAnalyzer("PFJetPlotsExample",
0079     JetAlgorithm  = cms.string('ak4PFJets'),
0080     HistoFileName = cms.string('PFJetPlotsExample.root'),
0081     NJets         = cms.int32(NJetsToKeep)
0082 )
0083 #############   JPT Jets    ###########################
0084 process.jpt = cms.EDAnalyzer("JPTJetPlotsExample",
0085     JetAlgorithm  = cms.string('JetPlusTrackZSPCorJetAntiKt4'),
0086     HistoFileName = cms.string('JPTJetPlotsExample.root'),
0087     NJets         = cms.int32(NJetsToKeep)
0088 )
0089 #############   Gen Jets   ###########################
0090 if isMC:
0091     process.gen = cms.EDAnalyzer("GenJetPlotsExample",
0092         JetAlgorithm  = cms.string('ak4GenJets'),
0093         HistoFileName = cms.string('GenJetPlotsExample.root'),
0094         NJets         = cms.int32(NJetsToKeep)
0095     )
0096 
0097 #############   Path       ###########################
0098 
0099 ##  ____       _   _     
0100 ## |  _ \ __ _| |_| |__  
0101 ## | |_) / _` | __| '_ \ 
0102 ## |  __/ (_| | |_| | | |
0103 ## |_|   \__,_|\__|_| |_|
0104 
0105     
0106 if isMC:    
0107     process.p = cms.Path(process.calo*process.pf*process.jpt*process.gen)
0108 else:
0109     process.p = cms.Path(process.calo*process.pf*process.jpt)    
0110 
0111