Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nConstituents to fat jets. #32930

Merged
merged 3 commits into from May 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions PhysicsTools/NanoAOD/python/jets_cff.py
Expand Up @@ -229,7 +229,7 @@
puId = Var("userInt('pileupJetId:fullId')",int,doc="Pileup ID flags for pre-UL trainings"),
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),
nConstituents = Var("numberOfDaughters()",int,doc="Number of particles in the jet"),
nConstituents = Var("numberOfDaughters()","uint8",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),
neHEF = Var("neutralHadronEnergyFraction()", float, doc="neutral Hadron Energy Fraction", precision= 6),
Expand Down Expand Up @@ -463,8 +463,7 @@

# btagDeepC = Var("bDiscriminator('pfDeepCSVJetTags:probc')",float,doc="CMVA V2 btag discriminator",precision=10),
#puIdDisc = Var("userFloat('pileupJetId:fullDiscriminant')",float,doc="Pileup ID discriminant",precision=10),
# 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),
nConstituents = Var("numberOfDaughters()","uint8",doc="Number of particles in the jet"),
),
externalVariables = cms.PSet(
lsf3 = ExtVar(cms.InputTag("lepInJetVars:lsf3"),float, doc="Lepton Subjet Fraction (3 subjets)",precision=10),
Expand Down Expand Up @@ -493,6 +492,7 @@
run2_miniAOD_80XLegacy.toModify( fatJetTable.variables, tau4 = None)
run2_miniAOD_80XLegacy.toModify( fatJetTable.variables, n2b1 = None)
run2_miniAOD_80XLegacy.toModify( fatJetTable.variables, n3b1 = None)
(run2_nanoAOD_106Xv1 & ~run2_nanoAOD_devel).toModify( fatJetTable.variables, nConstituents = None)
for modifier in run2_miniAOD_80XLegacy, run2_nanoAOD_94X2016:
modifier.toModify( fatJetTable.variables, jetId = Var("userInt('tightId')*2+userInt('looseId')",int,doc="Jet ID flags bit1 is loose, bit2 is tight"))

Expand Down
11 changes: 11 additions & 0 deletions PhysicsTools/NanoAOD/python/nanoDQM_cff.py
Expand Up @@ -66,6 +66,17 @@

run2_miniAOD_80XLegacy.toModify(nanoDQM.vplots, IsoTrack = None)

## no-change policy in run2_nanoAOD_106Xv1 (nanoAOD-v8)
from Configuration.Eras.Modifier_run2_nanoAOD_106Xv1_cff import run2_nanoAOD_106Xv1
from Configuration.Eras.Modifier_run2_nanoAOD_devel_cff import run2_nanoAOD_devel
_fatjet_plots_nom = copy.deepcopy(nanoDQM.vplots.FatJet.plots)
_fatjet_plots_106Xv1 = cms.VPSet()
for plot in _fatjet_plots_nom:
if (plot.name.value() != "nConstituents"):
_fatjet_plots_106Xv1.append(plot)
(run2_nanoAOD_106Xv1 & ~run2_nanoAOD_devel).toModify(nanoDQM.vplots.FatJet, plots = _fatjet_plots_106Xv1 )


## MC
nanoDQMMC = nanoDQM.clone()
nanoDQMMC.vplots.Electron.sels.Prompt = cms.string("genPartFlav == 1")
Expand Down
1 change: 1 addition & 0 deletions PhysicsTools/NanoAOD/python/nanoDQM_cfi.py
Expand Up @@ -162,6 +162,7 @@
NoPlot('muonIdx3SJ'),
Plot1D('n2b1', 'n2b1', 20, 0, 1, 'N2 (beta=1)'),
Plot1D('n3b1', 'n3b1', 20, 0, 5, 'N3 (beta=1)'),
Plot1D('nConstituents', 'nConstituents', 20, 0, 80, 'Number of particles in the jet'),
Plot1D('nBHadrons', 'nBHadrons', 4, -0.5, 3.5, 'number of b-hadrons'),
Plot1D('nCHadrons', 'nCHadrons', 4, -0.5, 3.5, 'number of c-hadrons'),
Plot1D('particleNetMD_QCD', 'particleNetMD_QCD', 20, 0, 1, 'Mass-decorrelated ParticleNet tagger raw QCD score'),
Expand Down