Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 ################################################################################
0002 #
0003 # JetCorrectionServices_cff
0004 # -------------------------
0005 #
0006 # Define most relevant jet correction services
0007 # for AntiKt R=0.5 CaloJets, PFJets, JPTJets and TrackJets
0008 #
0009 ################################################################################
0010 import FWCore.ParameterSet.Config as cms
0011 
0012 # This is now pulled from the Global Tag. For testing purposes, you can
0013 # continue to use this file but it is no longer on by default.
0014 #from JetMETCorrections.Configuration.JetCorrectionCondDB_cff import *
0015 
0016 
0017 #
0018 # SINGLE LEVEL CORRECTION SERVICES
0019 #
0020 
0021 # L1 (Offset) Correction Service
0022 ak4CaloL1Offset = cms.ESProducer(
0023     'L1OffsetCorrectionESProducer',
0024     level = cms.string('L1Offset'),
0025     algorithm = cms.string('AK5Calo'),
0026     vertexCollection = cms.string('offlinePrimaryVertices'),
0027     minVtxNdof = cms.int32(4)
0028     )
0029 
0030 ak4PFL1Offset = ak4CaloL1Offset.clone(algorithm = 'AK4PF')
0031 ak4PFCHSL1Offset = ak4CaloL1Offset.clone(algorithm = 'AK4PFchs')
0032 ak4JPTL1Offset = ak4CaloL1Offset.clone(algorithm = 'AK4JPT')
0033 
0034 # L1 (JPT Offset) Correction Service
0035 ak4L1JPTOffset = cms.ESProducer(
0036     'L1JPTOffsetCorrectionESProducer',
0037     level = cms.string('L1JPTOffset'),
0038     algorithm = cms.string('AK4JPT'),
0039     offsetService = cms.string('ak4CaloL1Offset')
0040     )
0041 
0042 # L1 (Fastjet PU Subtraction) Correction Service
0043 ak4CaloL1Fastjet = cms.ESProducer(
0044     'L1FastjetCorrectionESProducer',
0045     level       = cms.string('L1FastJet'),
0046     algorithm   = cms.string('AK5Calo'),
0047     srcRho      = cms.InputTag( 'fixedGridRhoFastjetAllCalo'  )
0048     )
0049 ak4PFL1Fastjet = cms.ESProducer(
0050     'L1FastjetCorrectionESProducer',
0051     level       = cms.string('L1FastJet'),
0052     algorithm   = cms.string('AK4PF'),
0053     srcRho      = cms.InputTag( 'fixedGridRhoFastjetAll' )
0054     )
0055 ak4PFCHSL1Fastjet = cms.ESProducer(
0056     'L1FastjetCorrectionESProducer',
0057     level       = cms.string('L1FastJet'),
0058     algorithm   = cms.string('AK4PFchs'),
0059     srcRho      = cms.InputTag( 'fixedGridRhoFastjetAll' )
0060     )
0061 
0062 ak4L1JPTFastjet = cms.ESProducer(
0063     'L1JPTOffsetCorrectionESProducer',
0064     level = cms.string('L1JPTOffset'),
0065     algorithm = cms.string('AK4JPT'),
0066     offsetService = cms.string('ak4CaloL1Fastjet')
0067     )
0068 
0069 
0070 # L2 (relative eta-conformity) Correction Services
0071 ak4CaloL2Relative = cms.ESProducer(
0072     'LXXXCorrectionESProducer',
0073     level     = cms.string('L2Relative'),
0074     algorithm = cms.string('AK5Calo')
0075     )
0076 ak4PFL2Relative = ak4CaloL2Relative.clone( algorithm = 'AK4PF' )
0077 ak4PFCHSL2Relative = ak4CaloL2Relative.clone( algorithm = 'AK4PFchs' )
0078 ak4JPTL2Relative = ak4CaloL2Relative.clone( algorithm = 'AK4JPT' )
0079 ak4TrackL2Relative = ak4CaloL2Relative.clone( algorithm = 'AK5TRK' )
0080 
0081 # L3 (absolute) Correction Services
0082 ak4CaloL3Absolute = cms.ESProducer(
0083     'LXXXCorrectionESProducer',
0084     level     = cms.string('L3Absolute'),
0085     algorithm = cms.string('AK5Calo')
0086     )
0087 ak4PFL3Absolute     = ak4CaloL3Absolute.clone( algorithm = 'AK4PF' )
0088 ak4PFCHSL3Absolute     = ak4CaloL3Absolute.clone( algorithm = 'AK4PFchs' )
0089 ak4JPTL3Absolute    = ak4CaloL3Absolute.clone( algorithm = 'AK4JPT' )
0090 ak4TrackL3Absolute  = ak4CaloL3Absolute.clone( algorithm = 'AK5TRK' )
0091 
0092 # Residual Correction Services
0093 ak4CaloResidual = cms.ESProducer(
0094     'LXXXCorrectionESProducer',
0095     level     = cms.string('L2L3Residual'),
0096     algorithm = cms.string('AK5Calo')
0097     )
0098 ak4PFResidual  = ak4CaloResidual.clone( algorithm = 'AK4PF' )
0099 ak4PFCHSResidual  = ak4CaloResidual.clone( algorithm = 'AK4PFchs' )
0100 ak4JPTResidual = ak4CaloResidual.clone( algorithm = 'AK4JPT' )
0101 
0102 # L6 (semileptonically decaying b-jet) Correction Services
0103 ak4CaloL6SLB = cms.ESProducer(
0104     'L6SLBCorrectionESProducer',
0105     level               = cms.string('L6SLB'),
0106     algorithm           = cms.string(''),
0107     addMuonToJet        = cms.bool(True),
0108     srcBTagInfoElectron = cms.InputTag('ak4CaloJetsSoftElectronTagInfos'),
0109     srcBTagInfoMuon     = cms.InputTag('ak4CaloJetsSoftMuonTagInfos')
0110     )
0111 ak4PFL6SLB = cms.ESProducer(
0112     'L6SLBCorrectionESProducer',
0113     level               = cms.string('L6SLB'),
0114     algorithm           = cms.string(''),
0115     addMuonToJet        = cms.bool(False),
0116     srcBTagInfoElectron = cms.InputTag('ak4PFJetsSoftElectronTagInfos'),
0117     srcBTagInfoMuon     = cms.InputTag('ak4PFJetsSoftMuonTagInfos')
0118     )
0119 
0120 
0121 #
0122 # MULTIPLE LEVEL CORRECTION SERVICES
0123 #
0124 
0125 # L2L3 CORRECTION SERVICES
0126 ak4CaloL2L3 = cms.ESProducer(
0127     'JetCorrectionESChain',
0128     correctors = cms.vstring('ak4CaloL2Relative','ak4CaloL3Absolute')
0129     )
0130 ak4PFL2L3 = cms.ESProducer(
0131     'JetCorrectionESChain',
0132     correctors = cms.vstring('ak4PFL2Relative','ak4PFL3Absolute')
0133     )
0134 ak4PFCHSL2L3 = cms.ESProducer(
0135     'JetCorrectionESChain',
0136     correctors = cms.vstring('ak4PFCHSL2Relative','ak4PFCHSL3Absolute')
0137     )
0138 #--- JPT needs the L1JPTOffset to account for the ZSP changes.
0139 #--- L1JPTOffset is NOT the same as L1Offset !!!!!
0140 ak4JPTL2L3 = cms.ESProducer(
0141     'JetCorrectionESChain',
0142     correctors = cms.vstring('ak4L1JPTOffset','ak4JPTL2Relative','ak4JPTL3Absolute')
0143     )
0144 ak4TrackL2L3 = cms.ESProducer(
0145     'JetCorrectionESChain',
0146     correctors = cms.vstring('ak4TrackL2Relative','ak4TrackL3Absolute')
0147     )
0148 
0149 # L2L3Residual CORRECTION SERVICES
0150 ak4CaloL2L3Residual = cms.ESProducer(
0151     'JetCorrectionESChain',
0152     correctors = cms.vstring('ak4CaloL2Relative','ak4CaloL3Absolute','ak4CaloResidual')
0153     )
0154 ak4PFL2L3Residual = cms.ESProducer(
0155     'JetCorrectionESChain',
0156     correctors = cms.vstring('ak4PFL2Relative','ak4PFL3Absolute','ak4PFResidual')
0157     )
0158 ak4PFCHSL2L3Residual = cms.ESProducer(
0159     'JetCorrectionESChain',
0160     correctors = cms.vstring('ak4PFCHSL2Relative','ak4PFCHSL3Absolute','ak4PFCHSResidual')
0161     )
0162 #--- JPT needs the L1JPTOffset to account for the ZSP changes.
0163 #--- L1JPTOffset is NOT the same as L1Offset !!!!!
0164 ak4JPTL2L3Residual = cms.ESProducer(
0165     'JetCorrectionESChain',
0166     correctors = cms.vstring('ak4L1JPTOffset','ak4JPTL2Relative','ak4JPTL3Absolute','ak4JPTResidual')
0167     )
0168 
0169 # L1L2L3 CORRECTION SERVICES
0170 ak4CaloL1L2L3 = cms.ESProducer(
0171     'JetCorrectionESChain',
0172     correctors = cms.vstring('ak4CaloL1Offset','ak4CaloL2Relative','ak4CaloL3Absolute')
0173     )
0174 ak4PFL1L2L3 = cms.ESProducer(
0175     'JetCorrectionESChain',
0176     correctors = cms.vstring('ak4PFL1Offset','ak4PFL2Relative','ak4PFL3Absolute')
0177     )
0178 ak4PFCHSL1L2L3 = cms.ESProducer(
0179     'JetCorrectionESChain',
0180     correctors = cms.vstring('ak4PFCHSL1Offset','ak4PFCHSL2Relative','ak4PFCHSL3Absolute')
0181     )
0182 #--- JPT needs the L1JPTOffset to account for the ZSP changes.
0183 #--- L1JPTOffset is NOT the same as L1Offset !!!!!
0184 ak4JPTL1L2L3 = cms.ESProducer(
0185     'JetCorrectionESChain',
0186     correctors = cms.vstring('ak4L1JPTOffset','ak4JPTL2Relative','ak4JPTL3Absolute')
0187     )
0188 
0189 # L1L2L3Residual CORRECTION SERVICES
0190 ak4CaloL1L2L3Residual = cms.ESProducer(
0191     'JetCorrectionESChain',
0192     correctors = cms.vstring('ak4CaloL1Offset','ak4CaloL2Relative','ak4CaloL3Absolute','ak4CaloResidual')
0193     )
0194 ak4PFL1L2L3Residual = cms.ESProducer(
0195     'JetCorrectionESChain',
0196     correctors = cms.vstring('ak4PFL1Offset','ak4PFL2Relative','ak4PFL3Absolute','ak4PFResidual')
0197     )
0198 ak4PFCHSL1L2L3Residual = cms.ESProducer(
0199     'JetCorrectionESChain',
0200     correctors = cms.vstring('ak4PFCHSL1Offset','ak4PFCHSL2Relative','ak4PFCHSL3Absolute','ak4PFCHSResidual')
0201     )
0202 #--- JPT needs the L1JPTOffset to account for the ZSP changes.
0203 #--- L1JPTOffset is NOT the same as L1Offset !!!!!
0204 ak4JPTL1L2L3Residual = cms.ESProducer(
0205     'JetCorrectionESChain',
0206     correctors = cms.vstring('ak4L1JPTOffset','ak4JPTL2Relative','ak4JPTL3Absolute','ak4JPTResidual')
0207     )
0208 
0209 # L1L2L3 CORRECTION SERVICES WITH FASTJET
0210 ak4CaloL1FastL2L3 = ak4CaloL2L3.clone()
0211 ak4CaloL1FastL2L3.correctors.insert(0,'ak4CaloL1Fastjet')
0212 ak4PFL1FastL2L3 = ak4PFL2L3.clone()
0213 ak4PFL1FastL2L3.correctors.insert(0,'ak4PFL1Fastjet')
0214 ak4PFCHSL1FastL2L3 = ak4PFCHSL2L3.clone()
0215 ak4PFCHSL1FastL2L3.correctors.insert(0,'ak4PFCHSL1Fastjet')
0216 #--- JPT needs the L1JPTOffset to account for the ZSP changes.
0217 #--- L1JPTOffset is NOT the same as L1Offset !!!!!
0218 ak4JPTL1FastL2L3 = cms.ESProducer(
0219     'JetCorrectionESChain',
0220     correctors = cms.vstring('ak4L1JPTFastjet','ak4JPTL2Relative','ak4JPTL3Absolute')
0221     )
0222 
0223 # L1L2L3Residual CORRECTION SERVICES WITH FASTJET
0224 ak4CaloL1FastL2L3Residual = cms.ESProducer(
0225     'JetCorrectionESChain',
0226     correctors = cms.vstring('ak4CaloL1Fastjet','ak4CaloL2Relative','ak4CaloL3Absolute','ak4CaloResidual')
0227     )
0228 ak4PFL1FastL2L3Residual = cms.ESProducer(
0229     'JetCorrectionESChain',
0230     correctors = cms.vstring('ak4PFL1Fastjet','ak4PFL2Relative','ak4PFL3Absolute','ak4PFResidual')
0231     )
0232 ak4PFCHSL1FastL2L3Residual = cms.ESProducer(
0233     'JetCorrectionESChain',
0234     correctors = cms.vstring('ak4PFCHSL1Fastjet','ak4PFCHSL2Relative','ak4PFCHSL3Absolute','ak4PFCHSResidual')
0235     )
0236 #--- JPT needs the L1JPTOffset to account for the ZSP changes.
0237 #--- L1JPTOffset is NOT the same as L1Offset !!!!!
0238 ak4JPTL1FastL2L3Residual = cms.ESProducer(
0239     'JetCorrectionESChain',
0240     correctors = cms.vstring('ak4L1JPTFastjet','ak4JPTL2Relative','ak4JPTL3Absolute','ak4JPTResidual')
0241     )
0242 
0243 # L2L3L6 CORRECTION SERVICES
0244 ak4CaloL2L3L6 = ak4CaloL2L3.clone()
0245 ak4CaloL2L3L6.correctors.append('ak4CaloL6SLB')
0246 ak4PFL2L3L6 = ak4PFL2L3.clone()
0247 ak4PFL2L3L6.correctors.append('ak4PFL6SLB')
0248 
0249 # L1L2L3L6 CORRECTION SERVICES
0250 ak4CaloL1FastL2L3L6 = ak4CaloL1FastL2L3.clone()
0251 ak4CaloL1FastL2L3L6.correctors.append('ak4CaloL6SLB')
0252 ak4PFL1FastL2L3L6 = ak4PFL1FastL2L3.clone()
0253 ak4PFL1FastL2L3L6.correctors.append('ak4PFL6SLB')