Skip to content

Commit

Permalink
Update of PhysicsTools/NanoAOD and PhysicsTools/PatAlgos
Browse files Browse the repository at this point in the history
  • Loading branch information
lathomas committed Aug 27, 2020
1 parent 7141ffb commit 908256f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 12 additions & 1 deletion PhysicsTools/NanoAOD/python/jets_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@
ptD = cms.InputTag("bJetVars:ptD"),
genPtwNu = cms.InputTag("bJetVars:genPtwNu"),
qgl = cms.InputTag('qgtagger:qgLikelihood'),
hfsigmaEtaEta = cms.InputTag('hfjetshowershape:sigmaEtaEta'),
hfsigmaPhiPhi = cms.InputTag('hfjetshowershape:sigmaPhiPhi'),
puId94XDisc = cms.InputTag('pileupJetId94X:fullDiscriminant'),
puId102XDisc = cms.InputTag('pileupJetId102X:fullDiscriminant'),
chFPV0EF = cms.InputTag("jercVars:chargedFromPV0EnergyFraction"),
Expand All @@ -163,6 +165,8 @@
tightIdLepVeto = cms.InputTag("tightJetIdLepVeto"),
vtxNtrk = cms.InputTag("bJetVars:vtxNtrk"),
leptonPdgId = cms.InputTag("bJetVars:leptonPdgId"),
hfcentralEtaStripSize = cms.InputTag('hfjetshowershape:centralEtaStripSize'),
hfadjacentEtaStripsSize = cms.InputTag('hfjetshowershape:adjacentEtaStripsSize'),
),
)
for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016:
Expand Down Expand Up @@ -236,6 +240,10 @@
puId = Var("userInt('pileupJetId:fullId')",int,doc="Pilup ID flags with 80X (2016) training"),
jetId = Var("userInt('tightId')*2+4*userInt('tightIdLepVeto')",int,doc="Jet ID flags bit1 is loose (always false in 2017 since it does not exist), bit2 is tight, bit3 is tightLepVeto"),
qgl = Var("userFloat('qgl')",float,doc="Quark vs Gluon likelihood discriminator",precision=10),
hfsigmaEtaEta = Var("userFloat('hfsigmaEtaEta')",float,doc="sigmaEtaEta for HF jets (noise discriminating variable)",precision=10),
hfsigmaPhiPhi = Var("userFloat('hfsigmaPhiPhi')",float,doc="sigmaPhiPhi for HF jets (noise discriminating variable)",precision=10),
hfcentralEtaStripSize = Var("userInt('hfcentralEtaStripSize')", int, doc="eta size of the central tower strip in HF (noise discriminating variable) "),
hfadjacentEtaStripsSize = Var("userInt('hfadjacentEtaStripsSize')", int, doc="eta size of the strips next to the central tower strip in HF (noise discriminating variable) "),
nConstituents = Var("numberOfDaughters()",int,doc="Number of particles in the jet"),
rawFactor = Var("1.-jecFactor('Uncorrected')",float,doc="1 - Factor to get back to raw pT",precision=6),
chHEF = Var("chargedHadronEnergyFraction()", float, doc="charged Hadron Energy Fraction", precision= 6),
Expand Down Expand Up @@ -656,12 +664,15 @@
from RecoJets.JetProducers.QGTagger_cfi import QGTagger
qgtagger=QGTagger.clone(srcJets="updatedJets",srcVertexCollection="offlineSlimmedPrimaryVertices")

from RecoJets.JetProducers.HFJetShowerShape_cfi import HFJetShowerShape
hfjetshowershape=HFJetShowerShape.clone(theJets="updatedJets",theVertices="offlineSlimmedPrimaryVertices")

from RecoJets.JetProducers.PileupJetID_cfi import pileupJetId, _chsalgos_94x, _chsalgos_102x
pileupJetId94X=pileupJetId.clone(jets="updatedJets",algos = cms.VPSet(_chsalgos_94x),inputIsCorrected=True,applyJec=False,vertexes="offlineSlimmedPrimaryVertices")
pileupJetId102X=pileupJetId.clone(jets="updatedJets",algos = cms.VPSet(_chsalgos_102x),inputIsCorrected=True,applyJec=False,vertexes="offlineSlimmedPrimaryVertices")

#before cross linking
jetSequence = cms.Sequence(jetCorrFactorsNano+updatedJets+tightJetId+tightJetIdLepVeto+bJetVars+qgtagger+jercVars+pileupJetId94X+pileupJetId102X+updatedJetsWithUserData+jetCorrFactorsAK8+updatedJetsAK8+tightJetIdAK8+tightJetIdLepVetoAK8+updatedJetsAK8WithUserData+chsForSATkJets+softActivityJets+softActivityJets2+softActivityJets5+softActivityJets10+finalJets+finalJetsAK8)
jetSequence = cms.Sequence(jetCorrFactorsNano+updatedJets+tightJetId+tightJetIdLepVeto+bJetVars+qgtagger+hfjetshowershape+jercVars+pileupJetId94X+pileupJetId102X+updatedJetsWithUserData+jetCorrFactorsAK8+updatedJetsAK8+tightJetIdAK8+tightJetIdLepVetoAK8+updatedJetsAK8WithUserData+chsForSATkJets+softActivityJets+softActivityJets2+softActivityJets5+softActivityJets10+finalJets+finalJetsAK8)


_jetSequence_2016 = jetSequence.copy()
Expand Down
6 changes: 6 additions & 0 deletions PhysicsTools/PatAlgos/python/slimming/miniAOD_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ def miniAOD_customizeCommon(process):

process.patJets.userData.userFloats.src += [ cms.InputTag('QGTagger:qgLikelihood'), ]

#HF jet shower shape
process.load('RecoJets.JetProducers.HFJetShowerShape_cfi')
task.add(process.HFJetShowerShapeTask)
process.patJets.userData.userFloats.src += [ cms.InputTag('HFJetShowerShape:sigmaEtaEta'),cms.InputTag('HFJetShowerShape:sigmaPhiPhi'), ]
process.patJets.userData.userInts.src += [ cms.InputTag('HFJetShowerShape:centralEtaStripSize'),cms.InputTag('HFJetShowerShape:adjacentEtaStripsSize'), ]

## DeepCSV meta discriminators (simple arithmethic on output probabilities)
process.load('RecoBTag.Combined.deepFlavour_cff')
task.add(process.pfDeepCSVDiscriminatorsJetTags)
Expand Down

0 comments on commit 908256f

Please sign in to comment.