Skip to content

Commit

Permalink
Merge pull request #33824 from nurfikri89/from120X_202105201100_nano_…
Browse files Browse the repository at this point in the history
…jercVars_PuId

[NanoAOD, JMENanoAOD] Remove jercVars variables, update puId config
  • Loading branch information
cmsbuild authored May 26, 2021
2 parents 6714a87 + 8677d78 commit 7971fe9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
17 changes: 15 additions & 2 deletions PhysicsTools/NanoAOD/python/custom_jme_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,10 +681,23 @@ def ReclusterAK4CHSJets(proc, recoJA, runOnMC):
proc.jetSequence.insert(proc.jetSequence.index(proc.pileupJetId94X), getattr(proc, pileupJetId80X))

proc.updatedJetsWithUserData.userInts.puId80XfullId = cms.InputTag('pileupJetId80X:fullId')
run2_jme_2016.toModify(proc.updatedJetsWithUserData.userFloats, puId80XDisc = cms.InputTag("pileupJetId80X:fullDiscriminant"))
proc.updatedJetsWithUserData.userFloats.puId80XDisc = cms.InputTag("pileupJetId80X:fullDiscriminant")

proc.jetTable.variables.puId = Var("userInt('puId80XfullId')", int, doc="Pilup ID flags with 80X (2016) training")
run2_jme_2016.toModify(proc.jetTable.variables, puIdDisc = Var("userFloat('puId80XDisc')",float,doc="Pilup ID discriminant with 80X (2016) training",precision=10))
run2_jme_2016.toModify(proc.jetTable.variables, puId = Var("userInt('puId80XfullId')",int,doc="Pileup ID flags with 80X (2016) training"))

for modifier in run2_nanoAOD_94X2016, run2_nanoAOD_94XMiniAODv1, run2_nanoAOD_94XMiniAODv2, run2_nanoAOD_102Xv1:
modifier.toModify(proc.jetTable.variables, puId = Var("userInt('puId80XfullId')", int, doc="Pileup ID flags with 80X (2016) training"))

#
# Add charged energy fraction from other primary vertices
#
proc.updatedJetsWithUserData.userFloats.chFPV1EF = cms.InputTag("jercVars:chargedFromPV1EnergyFraction")
proc.updatedJetsWithUserData.userFloats.chFPV2EF = cms.InputTag("jercVars:chargedFromPV2EnergyFraction")
proc.updatedJetsWithUserData.userFloats.chFPV3EF = cms.InputTag("jercVars:chargedFromPV3EnergyFraction")
proc.jetTable.variables.chFPV1EF = Var("userFloat('chFPV1EF')", float, doc="charged fromPV==1 Energy Fraction (component of the total charged Energy Fraction).", precision= 6)
proc.jetTable.variables.chFPV2EF = Var("userFloat('chFPV2EF')", float, doc="charged fromPV==2 Energy Fraction (component of the total charged Energy Fraction).", precision= 6)
proc.jetTable.variables.chFPV3EF = Var("userFloat('chFPV3EF')", float, doc="charged fromPV==3 Energy Fraction (component of the total charged Energy Fraction).", precision= 6)

#
# Add variables for pileup jet ID studies.
Expand Down
6 changes: 0 additions & 6 deletions PhysicsTools/NanoAOD/python/jets_cff.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,6 @@
puId106XUL17Disc = cms.InputTag('pileupJetId106XUL17:fullDiscriminant'),
puId106XUL18Disc = cms.InputTag('pileupJetId106XUL18:fullDiscriminant'),
chFPV0EF = cms.InputTag("jercVars:chargedFromPV0EnergyFraction"),
chFPV1EF = cms.InputTag("jercVars:chargedFromPV1EnergyFraction"),
chFPV2EF = cms.InputTag("jercVars:chargedFromPV2EnergyFraction"),
chFPV3EF = cms.InputTag("jercVars:chargedFromPV3EnergyFraction"),
),
userInts = cms.PSet(
tightId = cms.InputTag("tightJetId"),
Expand Down Expand Up @@ -248,9 +245,6 @@
neEmEF = Var("neutralEmEnergyFraction()", float, doc="neutral Electromagnetic Energy Fraction", precision= 6),
muEF = Var("muonEnergyFraction()", float, doc="muon Energy Fraction", precision= 6),
chFPV0EF = Var("userFloat('chFPV0EF')", float, doc="charged fromPV==0 Energy Fraction (energy excluded from CHS jets). Previously called betastar.", precision= 6),
chFPV1EF = Var("userFloat('chFPV1EF')", float, doc="charged fromPV==1 Energy Fraction (component of the total charged Energy Fraction).", precision= 6),
chFPV2EF = Var("userFloat('chFPV2EF')", float, doc="charged fromPV==2 Energy Fraction (component of the total charged Energy Fraction).", precision= 6),
chFPV3EF = Var("userFloat('chFPV3EF')", float, doc="charged fromPV==3 Energy Fraction (component of the total charged Energy Fraction).", precision= 6),
)
)

Expand Down
3 changes: 0 additions & 3 deletions PhysicsTools/NanoAOD/python/nanoDQM_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,6 @@
Plot1D('cRegRes', 'cRegRes', 20, 0.05, 0.4, 'res on pt corrected with c-jet regression'),
Plot1D('chEmEF', 'chEmEF', 20, 0, 1, 'charged Electromagnetic Energy Fraction'),
Plot1D('chFPV0EF', 'chFPV0EF', 20, 0, 2, 'charged fromPV==0 Energy Fraction (energy excluded from CHS jets). Previously called betastar.'),
Plot1D('chFPV1EF', 'chFPV1EF', 20, 0, 1, 'charged fromPV==1 Energy Fraction (component of the total charged Energy Fraction).'),
Plot1D('chFPV2EF', 'chFPV2EF', 20, 0, 1, 'charged fromPV==2 Energy Fraction (component of the total charged Energy Fraction).'),
Plot1D('chFPV3EF', 'chFPV3EF', 20, 0, 1, 'charged fromPV==3 Energy Fraction (component of the total charged Energy Fraction).'),
Plot1D('chHEF', 'chHEF', 20, 0, 2, 'charged Hadron Energy Fraction'),
Plot1D('cleanmask', 'cleanmask', 2, -0.5, 1.5, 'simple cleaning mask with priority to leptons'),
NoPlot('electronIdx1'),
Expand Down

0 comments on commit 7971fe9

Please sign in to comment.