Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:21:38

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("myprocess")
0004 process.TFileService=cms.Service("TFileService",fileName=cms.string('JECplots.root'))
0005 ##-------------------- Communicate with the DB -----------------------
0006 process.load('Configuration.StandardSequences.Services_cff')
0007 #process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
0008 #process.GlobalTag.globaltag = 'START38_V13::All'
0009 
0010 
0011 ##-------------------- Import the JEC services -----------------------
0012 process.load('JetMETCorrections.Configuration.DefaultJEC_cff')
0013 
0014 
0015 from CondCore.DBCommon.CondDBSetup_cfi import *
0016 process.jec = cms.ESSource("PoolDBESSource",CondDBSetup,
0017                            connect = cms.string("frontier://FrontierPrep/CMS_COND_PHYSICSTOOLS"),                                    
0018                    toGet =  cms.VPSet(
0019                        cms.PSet(record = cms.string("JetCorrectionsRecord"),
0020                                 tag = cms.string("JetCorrectorParametersCollection_Jec11_V10_AK5Calo"),
0021                                 label=cms.untracked.string("AK5Calo")),
0022                        cms.PSet(record = cms.string("JetCorrectionsRecord"),
0023                                 tag = cms.string("JetCorrectorParametersCollection_Jec11_V10_AK5PF"),
0024                                 label=cms.untracked.string("AK5PF")),                                   
0025                        cms.PSet(record = cms.string("JetCorrectionsRecord"),
0026                                 tag = cms.string("JetCorrectorParametersCollection_Jec11_V10_AK5PFchs"),
0027                                 label=cms.untracked.string("AK5PF")),                                   
0028                        cms.PSet(record = cms.string("JetCorrectionsRecord"),
0029                                 tag = cms.string("JetCorrectorParametersCollection_Jec11_V10_AK5JPT"),
0030                                 label=cms.untracked.string("AK5JPT")),
0031                       # cms.PSet(record = cms.string("JetCorrectionsRecord"),
0032                       #          tag = cms.string("JetCorrectorParametersCollection_Jec11_V3_IC5Calo"),
0033                       #          label=cms.untracked.string("IC5Calo")),
0034                       # cms.PSet(record = cms.string("JetCorrectionsRecord"),
0035                       #          tag = cms.string("JetCorrectorParametersCollection_Jec11_V3_KT6Calo"),
0036                       #          label=cms.untracked.string("KT6Calo")),
0037                        ## cms.PSet(record = cms.string("JetCorrectionsRecord"),
0038                        ##          tag = cms.string("JetCorrectorParametersCollection_Jec11_V3_KT4Calo"),
0039                        ##          label=cms.untracked.string("KT4Calo")),
0040                        ## cms.PSet(record = cms.string("JetCorrectionsRecord"),
0041                        ##          tag = cms.string("JetCorrectorParametersCollection_Jec11_V3_AK7Calo"),
0042                        ##          label=cms.untracked.string("AK7Calo")),
0043                        )
0044                    
0045                    )
0046 es_prefer_jec = cms.ESPrefer("PoolDBESSource","jec")
0047 
0048 
0049 
0050 
0051 
0052 
0053 ##-------------------- Define the source  ----------------------------
0054 process.maxEvents = cms.untracked.PSet(
0055         input = cms.untracked.int32(1)
0056         )
0057 process.source = cms.Source("EmptySource")
0058 
0059 ##-------------------- User analyzer  --------------------------------
0060 process.ak5calol2l3Residuall5l7  = cms.EDAnalyzer('FactorizedJetCorrectorDemo',
0061     levels                   = cms.vstring( 'L2Relative', 'L3Absolute', 'L5Flavor_gJ', 'L7Parton_gJ'),
0062     UncertaintyTag           = cms.string('Uncertainty'),
0063     UncertaintyFile          = cms.string(''),
0064     PayloadName              = cms.string('AK5Calo'),
0065     NHistoPoints             = cms.int32(10000),
0066     NGraphPoints             = cms.int32(500),
0067     EtaMin                   = cms.double(-5),
0068     EtaMax                   = cms.double(5),
0069     PtMin                    = cms.double(10),
0070     PtMax                    = cms.double(1000),
0071     #--- eta values for JEC vs pt plots ----
0072     VEta                     = cms.vdouble(0.0,1.0,2.0,3.0,4.0),
0073     #--- corrected pt values for JEC vs eta plots ----
0074     VPt                      = cms.vdouble(20,30,50,100,200),
0075     Debug                    = cms.untracked.bool(True)
0076 )
0077 
0078 process.p = cms.Path(process.ak5calol2l3Residuall5l7)
0079