Skip to content

Commit eda344f

Browse files
authored
Merge pull request #47573 from nurfikri89/from151X_202503092300_miniV6NanoV15Updates
[MiniAOD, NanoAOD] AK8 subjets pT regression nodes, Photon TrigObj & MET fixes
2 parents 931cbaa + 76dd7f8 commit eda344f

File tree

7 files changed

+54
-12
lines changed

7 files changed

+54
-12
lines changed

PhysicsTools/NanoAOD/python/jetsAK8_cff.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,12 @@ def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubl
253253
variables = cms.PSet(P4Vars,
254254
btagDeepFlavB = Var("bDiscriminator('pfDeepFlavourJetTags:probb')+bDiscriminator('pfDeepFlavourJetTags:probbb')+bDiscriminator('pfDeepFlavourJetTags:problepb')",float,doc="DeepJet b+bb+lepb tag discriminator",precision=10),
255255
btagUParTAK4B = Var("?bDiscriminator('pfUnifiedParticleTransformerAK4DiscriminatorsJetTags:BvsAll')>0?bDiscriminator('pfUnifiedParticleTransformerAK4DiscriminatorsJetTags:BvsAll'):-1",float,precision=10,doc="UnifiedParT b vs. udscg"),
256+
UParTAK4RegPtRawCorr = Var("?bDiscriminator('pfUnifiedParticleTransformerAK4JetTags:ptcorr')>0?bDiscriminator('pfUnifiedParticleTransformerAK4JetTags:ptcorr'):-1",float,precision=10,doc="UnifiedParT universal flavor-aware visible pT regression (no neutrinos), correction relative to raw jet pT"),
257+
UParTAK4RegPtRawCorrNeutrino = Var("?bDiscriminator('pfUnifiedParticleTransformerAK4JetTags:ptnu')>0?bDiscriminator('pfUnifiedParticleTransformerAK4JetTags:ptnu'):-1",float,precision=10,doc="UnifiedParT universal flavor-aware pT regression neutrino correction, relative to visible. Correction relative to raw jet pT"),
258+
UParTAK4RegPtRawRes = Var("?(bDiscriminator('pfUnifiedParticleTransformerAK4JetTags:ptreshigh')+bDiscriminator('pfUnifiedParticleTransformerAK4JetTags:ptreslow'))>0?0.5*(bDiscriminator('pfUnifiedParticleTransformerAK4JetTags:ptreshigh')-bDiscriminator('pfUnifiedParticleTransformerAK4JetTags:ptreslow')):-1",float,precision=10,doc="UnifiedParT universal flavor-aware jet pT resolution estimator, (q84 - q16)/2"),
259+
UParTAK4V1RegPtRawCorr = Var("?bDiscriminator('pfUnifiedParticleTransformerAK4V1JetTags:ptcorr')>0?bDiscriminator('pfUnifiedParticleTransformerAK4V1JetTags:ptcorr'):-1",float,precision=10,doc="UnifiedParT V1 universal flavor-aware visible pT regression (no neutrinos), correction relative to raw jet pT"),
260+
UParTAK4V1RegPtRawCorrNeutrino = Var("?bDiscriminator('pfUnifiedParticleTransformerAK4V1JetTags:ptnu')>0?bDiscriminator('pfUnifiedParticleTransformerAK4V1JetTags:ptnu'):-1",float,precision=10,doc="UnifiedParT V1 universal flavor-aware pT regression neutrino correction, relative to visible. Correction relative to raw jet pT"),
261+
UParTAK4V1RegPtRawRes = Var("?(bDiscriminator('pfUnifiedParticleTransformerAK4V1JetTags:ptreshigh')+bDiscriminator('pfUnifiedParticleTransformerAK4V1JetTags:ptreslow'))>0?0.5*(bDiscriminator('pfUnifiedParticleTransformerAK4V1JetTags:ptreshigh')-bDiscriminator('pfUnifiedParticleTransformerAK4V1JetTags:ptreslow')):-1",float,precision=10,doc="UnifiedParT V1 universal flavor-aware jet pT resolution estimator, (q84 - q16)/2"),
256262
rawFactor = Var("1.-jecFactor('Uncorrected')",float,doc="1 - Factor to get back to raw pT",precision=6),
257263
area = Var("jetArea()", float, doc="jet catchment area, for JECs",precision=10),
258264
tau1 = Var("userFloat('NjettinessAK8Subjets:tau1')",float, doc="Nsubjettiness (1 axis)",precision=10),
@@ -272,12 +278,24 @@ def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubl
272278
(run2_nanoAOD_106Xv2).toModify(
273279
subJetTable.variables,
274280
area = None,
281+
UParTAK4RegPtRawCorr = None,
282+
UParTAK4RegPtRawCorrNeutrino = None,
283+
UParTAK4RegPtRawRes = None,
284+
UParTAK4V1RegPtRawCorr = None,
285+
UParTAK4V1RegPtRawCorrNeutrino = None,
286+
UParTAK4V1RegPtRawRes = None,
275287
)
276288

277289
run3_nanoAOD_pre142X.toModify(
278290
subJetTable.variables,
279291
btagDeepFlavB = None,
280292
btagUParTAK4B = None,
293+
UParTAK4RegPtRawCorr = None,
294+
UParTAK4RegPtRawCorrNeutrino = None,
295+
UParTAK4RegPtRawRes = None,
296+
UParTAK4V1RegPtRawCorr = None,
297+
UParTAK4V1RegPtRawCorrNeutrino = None,
298+
UParTAK4V1RegPtRawRes = None,
281299
btagDeepB = Var("bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb')",float,doc="DeepCSV b+bb tag discriminator",precision=10),
282300
)
283301

PhysicsTools/NanoAOD/python/met_cff.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
name = cms.string("RawPFMET"),
3434
doc = cms.string("raw PF MET"),
3535
variables = cms.PSet(#NOTA BENE: we don't copy PTVars here!
36-
pt = Var("uncorPt", float, doc="pt", precision=10),
37-
phi = Var("uncorPhi", float, doc="phi", precision=10),
38-
sumEt = Var("uncorSumEt", float, doc="scalar sum of Et", precision=10),
36+
pt = Var("uncorPt", float, doc="pt", precision=-1),
37+
phi = Var("uncorPhi", float, doc="phi", precision=12),
38+
sumEt = Var("uncorSumEt", float, doc="scalar sum of Et", precision=12),
3939
),
4040
)
4141

@@ -74,11 +74,11 @@
7474
name = cms.string("RawPuppiMET"),
7575
doc = cms.string("raw Puppi MET"),
7676
variables = cms.PSet(#NOTA BENE: we don't copy PTVars here!
77-
pt = Var("uncorPt", float, doc="pt", precision=10),
78-
phi = Var("uncorPhi", float, doc="phi", precision=10),
79-
sumEt = Var("uncorSumEt", float, doc="scalar sum of Et", precision=10),
80-
),)
81-
77+
pt = Var("uncorPt", float, doc="pt", precision=-1),
78+
phi = Var("uncorPhi", float, doc="phi", precision=12),
79+
sumEt = Var("uncorSumEt", float, doc="scalar sum of Et", precision=12),
80+
),
81+
)
8282

8383
trkMetTable = simpleSingletonPATMETFlatTableProducer.clone(
8484
src = pfmetTable.src,
@@ -124,6 +124,6 @@
124124
)
125125

126126

127-
metTablesTask = cms.Task(pfmetTable, rawMetTable, caloMetTable, puppiMetTable, rawPuppiMetTable, trkMetTable,
127+
metTablesTask = cms.Task(pfmetTable, rawMetTable, caloMetTable, puppiMetTable, rawPuppiMetTable, trkMetTable,
128128
deepMetResolutionTuneTable, deepMetResponseTuneTable )
129129
metMCTask = cms.Task( metMCTable )

PhysicsTools/NanoAOD/python/nanoDQM_cff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def _match(name):
215215

216216
_SubJet_pre142X_plots = cms.VPSet()
217217
for plot in nanoDQM.vplots.SubJet.plots:
218-
if 'btagDeepFlavB' not in plot.name.value() and 'btagUParTAK4B' not in plot.name.value():
218+
if ('btagDeepFlavB' not in plot.name.value()) and ('btagUParTAK4B' not in plot.name.value()) and ('UParTAK4Reg' not in plot.name.value()):
219219
_SubJet_pre142X_plots.append(plot)
220220
_SubJet_pre142X_plots.extend([
221221
Plot1D('btagDeepB', 'btagDeepB', 20, -1, 1, 'Deep B+BB btag discriminator'),

PhysicsTools/NanoAOD/python/nanoDQM_cfi.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -877,6 +877,12 @@
877877
Count1D('_size', 9, -0.5, 8.5, 'slimmedJetsAK8PFPuppiSoftDropPacked::SubJets, i.e. soft-drop subjets for ak8 fat jets for boosted'),
878878
Plot1D('btagDeepFlavB', 'btagDeepFlavB', 20, -1, 1, 'DeepJet b+bb+lepb tag discriminator'),
879879
Plot1D('btagUParTAK4B', 'btagUParTAK4B', 20, -1, 1, 'UnifiedParT b vs. udscg'),
880+
Plot1D('UParTAK4RegPtRawCorr', 'UParTAK4RegPtRawCorr', 20, 0, 2, 'UnifiedParT universal flavor-aware visible pT regression (no neutrinos), correction relative to raw jet pT'),
881+
Plot1D('UParTAK4RegPtRawCorrNeutrino', 'UParTAK4RegPtRawCorrNeutrino', 20, 0, 2, 'UnifiedParT universal flavor-aware pT regression neutrino correction, relative to visible. Correction relative to raw jet pT'),
882+
Plot1D('UParTAK4RegPtRawRes', 'UParTAK4RegPtRawRes', 20, 0, 1, 'UnifiedParT universal flavor-aware jet pT resolution estimator, (q84 - q16)/2'),
883+
Plot1D('UParTAK4V1RegPtRawCorr', 'UParTAK4V1RegPtRawCorr', 20, 0, 2, 'UnifiedParT V1 universal flavor-aware visible pT regression (no neutrinos), correction relative to raw jet pT'),
884+
Plot1D('UParTAK4V1RegPtRawCorrNeutrino', 'UParTAK4V1RegPtRawCorrNeutrino', 20, 0, 2, 'UnifiedParT V1 universal flavor-aware pT regression neutrino correction, relative to visible. Correction relative to raw jet pT'),
885+
Plot1D('UParTAK4V1RegPtRawRes', 'UParTAK4V1RegPtRawRes', 20, 0, 1, 'UnifiedParT V1 universal flavor-aware jet pT resolution estimator, (q84 - q16)/2'),
880886
Plot1D('eta', 'eta', 20, -4, 4, 'eta'),
881887
Plot1D('hadronFlavour', 'hadronFlavour', 6, -0.5, 5.5, 'flavour from hadron ghost clustering'),
882888
Plot1D('mass', 'mass', 20, -200, 200, 'mass'),

PhysicsTools/NanoAOD/python/triggerObjects_cff.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ def AND(tokens):
9696
mksel("filter('hltEG175HEFilter')","hltEG175HEFilter"),
9797
mksel("filter('hltEG200HEFilter')","hltEG200HEFilter"),
9898
mksel("filter('hltHtEcal800')","hltHtEcal800"),
99+
mksel("filter('hltEG45EBTightIDTightIsoTrackIsoFilter')","hltEG45EBTightIDTightIsoTrackIsoFilter"),
100+
mksel("filter('hltEG50EBTightIDTightIsoTrackIsoFilter')","hltEG50EBTightIDTightIsoTrackIsoFilter"),
99101
mksel("filter('hltEG110EBTightIDTightIsoTrackIsoFilter')","hltEG110EBTightIDTightIsoTrackIsoFilter"),
100102
mksel("filter('hltEG120EBTightIDTightIsoTrackIsoFilter')","hltEG120EBTightIDTightIsoTrackIsoFilter"),
101103
mksel("filter('hltMu17Photon30IsoCaloIdPhotonlegTrackIsoFilter')","1mu-1photon"),

PhysicsTools/PatAlgos/python/slimming/applySubstructure_cff.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,15 @@ def applySubstructure( process, postfix="" ) :
155155
'pfDeepFlavourJetTags:probb',
156156
'pfDeepFlavourJetTags:probbb',
157157
'pfDeepFlavourJetTags:problepb',
158-
'pfUnifiedParticleTransformerAK4DiscriminatorsJetTags:BvsAll'
158+
'pfUnifiedParticleTransformerAK4DiscriminatorsJetTags:BvsAll',
159+
'pfUnifiedParticleTransformerAK4JetTags:ptcorr',
160+
'pfUnifiedParticleTransformerAK4JetTags:ptnu',
161+
'pfUnifiedParticleTransformerAK4JetTags:ptreshigh',
162+
'pfUnifiedParticleTransformerAK4JetTags:ptreslow',
163+
'pfUnifiedParticleTransformerAK4V1JetTags:ptcorr',
164+
'pfUnifiedParticleTransformerAK4V1JetTags:ptnu',
165+
'pfUnifiedParticleTransformerAK4V1JetTags:ptreshigh',
166+
'pfUnifiedParticleTransformerAK4V1JetTags:ptreslow',
159167
)
160168
)
161169
updateJetCollection(

PhysicsTools/PatAlgos/python/tools/puppiJetMETReclusteringFromMiniAOD_cff.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,15 @@ def puppiJetMETReclusterFromMiniAOD(process, runOnMC, useExistingWeights=False,
5959
'pfDeepFlavourJetTags:probb',
6060
'pfDeepFlavourJetTags:probbb',
6161
'pfDeepFlavourJetTags:problepb',
62-
'pfUnifiedParticleTransformerAK4DiscriminatorsJetTags:BvsAll'
62+
'pfUnifiedParticleTransformerAK4DiscriminatorsJetTags:BvsAll',
63+
'pfUnifiedParticleTransformerAK4JetTags:ptcorr',
64+
'pfUnifiedParticleTransformerAK4JetTags:ptnu',
65+
'pfUnifiedParticleTransformerAK4JetTags:ptreshigh',
66+
'pfUnifiedParticleTransformerAK4JetTags:ptreslow',
67+
'pfUnifiedParticleTransformerAK4V1JetTags:ptcorr',
68+
'pfUnifiedParticleTransformerAK4V1JetTags:ptnu',
69+
'pfUnifiedParticleTransformerAK4V1JetTags:ptreshigh',
70+
'pfUnifiedParticleTransformerAK4V1JetTags:ptreslow',
6371
)
6472
)
6573
process = setupPuppiAK4AK8METReclustering(process, runOnMC,

0 commit comments

Comments
 (0)