Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:33:08

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("EnergyScale")
0004 
0005 ## Declare input
0006 from PhysicsTools.PatExamples.samplesCERN_cff import *
0007 
0008 process.source = cms.Source("PoolSource",
0009   fileNames = ttbarJets
0010 )
0011 
0012 process.maxEvents = cms.untracked.PSet(
0013     input = cms.untracked.int32( -1 )
0014 )
0015 
0016 ## Message logger configuration
0017 process.load("FWCore.MessageLogger.MessageLogger_cfi")
0018 
0019 ## Select good jets
0020 from PhysicsTools.PatAlgos.selectionLayer1.jetSelector_cfi import *
0021 ## use this selection of calorimeter based jets
0022 process.goodJets = selectedPatJets.clone(
0023     src="cleanPatJets",
0024     cut = 'abs(eta) < 3 & pt > 30. &'
0025     'emEnergyFraction > 0.01       &'
0026     'jetID.fHPD < 0.98             &'
0027     'jetID.n90Hits > 1'    
0028 )
0029 
0030 ## use this selection of particle flow jets
0031 #process. goodJets   = selectedPatJets.clone(
0032 #    src = 'cleanPatJetsAK5PF',
0033 #    cut = 'abs(eta) < 2.4 & pt > 30.          &'
0034 #    'chargedHadronEnergyFraction > 0.0  &'
0035 #    'neutralHadronEnergyFraction/corrFactor("raw") < 0.99 &'
0036 #    'chargedEmEnergyFraction/corrFactor("raw")     < 0.99 &'
0037 #    'neutralEmEnergyFraction/corrFactor("raw")     < 0.99 &'
0038 #    'chargedMultiplicity > 0            &'
0039 #    'nConstituents > 0'
0040 #)
0041 
0042 ## Analyze jets
0043 from PhysicsTools.PatExamples.PatJetAnalyzer_cfi import analyzePatJets
0044 process.Uncorrected = analyzePatJets.clone(src = 'goodJets', corrLevel='raw')
0045 process.L2Relative  = analyzePatJets.clone(src = 'goodJets', corrLevel='rel')
0046 process.L3Absolute  = analyzePatJets.clone(src = 'goodJets', corrLevel='abs')
0047 
0048 ## Define output file
0049 process.TFileService = cms.Service("TFileService",
0050   fileName = cms.string('analyzeJetEnergyScale.root')
0051 )
0052 
0053 process.p = cms.Path(
0054     process.goodJets    * 
0055     process.Uncorrected *
0056     process.L2Relative  *
0057     process.L3Absolute
0058 
0059 )