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 plotting jet correction uncertainty.
0003 # Author: Kalanand Mishra, Fermilab
0004 # Date:  14 - January - 2011
0005 
0006 import FWCore.ParameterSet.Config as cms
0007 
0008 ##  ____        _                       __  __  ____ 
0009 ## |  _ \  __ _| |_ __ _    ___  _ __  |  \/  |/ ___|
0010 ## | | | |/ _` | __/ _` |  / _ \| '__| | |\/| | |    
0011 ## | |_| | (_| | || (_| | | (_) | |    | |  | | |___ 
0012 ## |____/ \__,_|\__\__,_|  \___/|_|    |_|  |_|\____|
0013             
0014 isMC = True
0015 
0016 
0017 ##   ____             __ _                       _     _           
0018 ##  / ___|___  _ __  / _(_) __ _ _   _ _ __ __ _| |__ | | ___  ___ 
0019 ## | |   / _ \| '_ \| |_| |/ _` | | | | '__/ _` | '_ \| |/ _ \/ __|
0020 ## | |__| (_) | | | |  _| | (_| | |_| | | | (_| | |_) | |  __/\__ \
0021 ##  \____\___/|_| |_|_| |_|\__, |\__,_|_|  \__,_|_.__/|_|\___||___/
0022 ##                         |___/                                   
0023 
0024 GLOBAL_TAG = 'GR_R_38X_V15::All'
0025 inputFile = 'file:/uscms_data/d2/kalanand/dijet-Run2010A-JetMET-Nov4ReReco-9667events.root'
0026 if isMC:
0027     GLOBAL_TAG = 'START38_V14::All'    
0028     inputFile ='/store/mc/Fall10/QCD_Pt_80to120_TuneZ2_7TeV_pythia6/GEN-SIM-RECO/START38_V12-v1/0000/FEF4D100-4CCB-DF11-94CB-00E08178C12F.root'
0029 
0030 
0031 ##   _            _           _           
0032 ## (_)_ __   ___| |_   _  __| | ___  ___ 
0033 ## | | '_ \ / __| | | | |/ _` |/ _ \/ __|
0034 ## | | | | | (__| | |_| | (_| |  __/\__ \
0035 ## |_|_| |_|\___|_|\__,_|\__,_|\___||___/
0036 
0037                                         
0038 process = cms.Process("Ana")
0039 process.load('Configuration.StandardSequences.Services_cff')
0040 process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0041 process.GlobalTag.globaltag = GLOBAL_TAG
0042 process.TFileService=cms.Service("TFileService",fileName=cms.string('JECplots.root'))
0043 
0044 ##-------------------- Import the JEC services -----------------------
0045 process.load('JetMETCorrections.Configuration.DefaultJEC_cff')
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(1)
0057 )
0058 #############   Define the source file ###############
0059 process.source = cms.Source("PoolSource",
0060     fileNames = cms.untracked.vstring(inputFile)
0061 )
0062 
0063 
0064 
0065 ##  ____  _       _       
0066 ## |  _ \| | ___ | |_ ___ 
0067 ## | |_) | |/ _ \| __/ __|
0068 ## |  __/| | (_) | |_\__ \
0069 ## |_|   |_|\___/ \__|___/
0070 
0071 ####################################################### 
0072 #############   calo jets ##
0073 process.ak5calol2l3  = cms.EDAnalyzer('JetCorrectorDemo',
0074     JetCorrectionService     = cms.string('ak5CaloL2L3Residual'),
0075     UncertaintyTag           = cms.string('Uncertainty'),
0076     UncertaintyFile          = cms.string(''),
0077     PayloadName              = cms.string('AK5Calo'),
0078     NHistoPoints             = cms.int32(10000),
0079     NGraphPoints             = cms.int32(500),
0080     EtaMin                   = cms.double(-5),
0081     EtaMax                   = cms.double(5),
0082     PtMin                    = cms.double(10),
0083     PtMax                    = cms.double(1000),
0084     #--- eta values for JEC vs pt plots ----
0085     VEta                     = cms.vdouble(0.0,1.0,2.0,3.0,4.0),
0086     #--- corrected pt values for JEC vs eta plots ----
0087     VPt                      = cms.vdouble(20,30,50,100,200),
0088     Debug                    = cms.untracked.bool(False),
0089     UseCondDB                = cms.untracked.bool(True)
0090 )
0091 
0092 
0093 #############   pf jets ##
0094 process.ak5pfl2l3  = cms.EDAnalyzer('JetCorrectorDemo',
0095     JetCorrectionService     = cms.string('ak5PFL2L3Residual'),
0096     UncertaintyTag           = cms.string('Uncertainty'),
0097     UncertaintyFile          = cms.string(''),
0098     PayloadName              = cms.string('AK5PF'),
0099     NHistoPoints             = cms.int32(10000),
0100     NGraphPoints             = cms.int32(500),
0101     EtaMin                   = cms.double(-5),
0102     EtaMax                   = cms.double(5),
0103     PtMin                    = cms.double(10),
0104     PtMax                    = cms.double(1000),
0105     #--- eta values for JEC vs pt plots ----
0106     VEta                     = cms.vdouble(0.0,1.0,2.0,3.0,4.0),
0107     #--- corrected pt values for JEC vs eta plots ----
0108     VPt                      = cms.vdouble(20,30,50,100,200),
0109     Debug                    = cms.untracked.bool(False),
0110     UseCondDB                = cms.untracked.bool(True)
0111 )
0112 
0113 
0114 #############   jpt jets ##
0115 process.ak5jptl2l3  = cms.EDAnalyzer('JetCorrectorDemo',
0116     JetCorrectionService     = cms.string('ak4JPTL2L3Residual'),
0117     UncertaintyTag           = cms.string('Uncertainty'),
0118     UncertaintyFile          = cms.string(''),
0119     PayloadName              = cms.string('AK5JPT'),
0120     NHistoPoints             = cms.int32(10000),
0121     NGraphPoints             = cms.int32(500),
0122     EtaMin                   = cms.double(-5),
0123     EtaMax                   = cms.double(5),
0124     PtMin                    = cms.double(10),
0125     PtMax                    = cms.double(1000),
0126     #--- eta values for JEC vs pt plots ----
0127     VEta                     = cms.vdouble(0.0,1.0,2.0,3.0,4.0),
0128     #--- corrected pt values for JEC vs eta plots ----
0129     VPt                      = cms.vdouble(20,30,50,100,200),
0130     Debug                    = cms.untracked.bool(False),
0131     UseCondDB                = cms.untracked.bool(True)
0132 )
0133 
0134 
0135 ##  ____       _   _     
0136 ## |  _ \ __ _| |_| |__  
0137 ## | |_) / _` | __| '_ \ 
0138 ## |  __/ (_| | |_| | | |
0139 ## |_|   \__,_|\__|_| |_|
0140 
0141 
0142 #############   Path       ###########################
0143 process.p = cms.Path(
0144     process.ak5calol2l3 +
0145     process.ak5pfl2l3 +
0146     process.ak5jptl2l3 
0147     )
0148