1 import FWCore.ParameterSet.Config
as cms
5 from PhysicsTools.NanoAOD.simpleCandidateFlatTableProducer_cfi
import simpleCandidateFlatTableProducer
10 jetCorrFactorsAK8 = patJetCorrFactors.clone(src=
'slimmedJetsAK8',
11 levels = cms.vstring(
'L1FastJet',
15 payload = cms.string(
'AK8PFPuppi'),
16 primaryVertices = cms.InputTag(
"offlineSlimmedPrimaryVertices"),
20 updatedJetsAK8 = updatedPatJets.clone(
22 jetSource=
'slimmedJetsAK8',
23 jetCorrFactorsSource=cms.VInputTag(cms.InputTag(
"jetCorrFactorsAK8") ),
29 looseJetIdAK8 = cms.EDProducer(
"PatJetIDValueMapProducer",
30 filterParams=cms.PSet(
31 version = cms.string(
'WINTER16'),
32 quality = cms.string(
'LOOSE'),
34 src = cms.InputTag(
"updatedJetsAK8")
36 tightJetIdAK8 = cms.EDProducer(
"PatJetIDValueMapProducer",
37 filterParams=cms.PSet(
38 version = cms.string(
'RUN3WINTER22PUPPI'),
39 quality = cms.string(
'TIGHT'),
41 src = cms.InputTag(
"updatedJetsAK8")
43 tightJetIdLepVetoAK8 = cms.EDProducer(
"PatJetIDValueMapProducer",
44 filterParams=cms.PSet(
45 version = cms.string(
'RUN3WINTER22PUPPI'),
46 quality = cms.string(
'TIGHTLEPVETO'),
48 src = cms.InputTag(
"updatedJetsAK8")
51 run2_jme_2016.toModify(
52 tightJetIdAK8.filterParams, version =
"RUN2UL16PUPPI" 54 tightJetIdLepVetoAK8.filterParams, version =
"RUN2UL16PUPPI" 57 (run2_jme_2017 | run2_jme_2018).toModify(
58 tightJetIdAK8.filterParams, version =
"RUN2ULPUPPI" 60 tightJetIdLepVetoAK8.filterParams, version =
"RUN2ULPUPPI" 63 run3_jme_Winter22runsBCDEprompt.toModify(
64 tightJetIdAK8.filterParams, version =
"RUN3WINTER22PUPPIrunsBCDEprompt" 66 tightJetIdLepVetoAK8.filterParams, version =
"RUN3WINTER22PUPPIrunsBCDEprompt" 69 updatedJetsAK8WithUserData = cms.EDProducer(
"PATJetUserDataEmbedder",
70 src = cms.InputTag(
"updatedJetsAK8"),
71 userFloats = cms.PSet(),
73 tightId = cms.InputTag(
"tightJetIdAK8"),
74 tightIdLepVeto = cms.InputTag(
"tightJetIdLepVetoAK8"),
78 finalJetsAK8 = cms.EDFilter(
"PATJetRefSelector",
79 src = cms.InputTag(
"updatedJetsAK8WithUserData"),
80 cut = cms.string(
"pt > 170")
84 lepInAK8JetVars = cms.EDProducer(
"LepInJetProducer",
85 src = cms.InputTag(
"updatedJetsAK8WithUserData"),
86 srcEle = cms.InputTag(
"finalElectrons"),
87 srcMu = cms.InputTag(
"finalMuons")
90 fatJetTable = simpleCandidateFlatTableProducer.clone(
91 src = cms.InputTag(
"finalJetsAK8"),
92 cut = cms.string(
" pt > 170"),
93 name = cms.string(
"FatJet"),
94 doc = cms.string(
"slimmedJetsAK8, i.e. ak8 fat jets for boosted analysis"),
95 variables = cms.PSet(P4Vars,
96 jetId =
Var(
"userInt('tightId')*2+4*userInt('tightIdLepVeto')",
"uint8",doc=
"Jet ID flags bit1 is loose (always false in 2017 since it does not exist), bit2 is tight, bit3 is tightLepVeto"),
97 area =
Var(
"jetArea()", float, doc=
"jet catchment area, for JECs",precision=10),
98 rawFactor =
Var(
"1.-jecFactor('Uncorrected')",float,doc=
"1 - Factor to get back to raw pT",precision=6),
99 tau1 =
Var(
"userFloat('NjettinessAK8Puppi:tau1')",float, doc=
"Nsubjettiness (1 axis)",precision=10),
100 tau2 =
Var(
"userFloat('NjettinessAK8Puppi:tau2')",float, doc=
"Nsubjettiness (2 axis)",precision=10),
101 tau3 =
Var(
"userFloat('NjettinessAK8Puppi:tau3')",float, doc=
"Nsubjettiness (3 axis)",precision=10),
102 tau4 =
Var(
"userFloat('NjettinessAK8Puppi:tau4')",float, doc=
"Nsubjettiness (4 axis)",precision=10),
103 n2b1 =
Var(
"?hasUserFloat('nb1AK8PuppiSoftDrop:ecfN2')?userFloat('nb1AK8PuppiSoftDrop:ecfN2'):-99999.", float, doc=
"N2 with beta=1 (for jets with raw pT>250 GeV)", precision=10),
104 n3b1 =
Var(
"?hasUserFloat('nb1AK8PuppiSoftDrop:ecfN3')?userFloat('nb1AK8PuppiSoftDrop:ecfN3'):-99999.", float, doc=
"N3 with beta=1 (for jets with raw pT>250 GeV)", precision=10),
105 msoftdrop =
Var(
"groomedMass('SoftDropPuppi')",float, doc=
"Corrected soft drop mass with PUPPI",precision=10),
106 btagDeepB =
Var(
"?(bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb'))>=0?bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb'):-1",float,doc=
"DeepCSV b+bb tag discriminator",precision=10),
107 btagHbb =
Var(
"bDiscriminator('pfBoostedDoubleSecondaryVertexAK8BJetTags')",float,doc=
"Higgs to BB tagger discriminator",precision=10),
108 btagDDBvLV2 =
Var(
"bDiscriminator('pfMassIndependentDeepDoubleBvLV2JetTags:probHbb')",float,doc=
"DeepDoubleX V2(mass-decorrelated) discriminator for H(Z)->bb vs QCD",precision=10),
109 btagDDCvLV2 =
Var(
"bDiscriminator('pfMassIndependentDeepDoubleCvLV2JetTags:probHcc')",float,doc=
"DeepDoubleX V2 (mass-decorrelated) discriminator for H(Z)->cc vs QCD",precision=10),
110 btagDDCvBV2 =
Var(
"bDiscriminator('pfMassIndependentDeepDoubleCvBV2JetTags:probHcc')",float,doc=
"DeepDoubleX V2 (mass-decorrelated) discriminator for H(Z)->cc vs H(Z)->bb",precision=10),
111 particleNetWithMass_QCD =
Var(
"bDiscriminator('pfParticleNetJetTags:probQCDbb')+bDiscriminator('pfParticleNetJetTags:probQCDcc')+bDiscriminator('pfParticleNetJetTags:probQCDb')+bDiscriminator('pfParticleNetJetTags:probQCDc')+bDiscriminator('pfParticleNetJetTags:probQCDothers')",float,doc=
"ParticleNet tagger (w/ mass) QCD(bb,cc,b,c,others) sum",precision=10),
112 particleNetWithMass_TvsQCD =
Var(
"bDiscriminator('pfParticleNetDiscriminatorsJetTags:TvsQCD')",float,doc=
"ParticleNet tagger (w/ mass) top vs QCD discriminator",precision=10),
113 particleNetWithMass_WvsQCD =
Var(
"bDiscriminator('pfParticleNetDiscriminatorsJetTags:WvsQCD')",float,doc=
"ParticleNet tagger (w/ mass) W vs QCD discriminator",precision=10),
114 particleNetWithMass_ZvsQCD =
Var(
"bDiscriminator('pfParticleNetDiscriminatorsJetTags:ZvsQCD')",float,doc=
"ParticleNet tagger (w/ mass) Z vs QCD discriminator",precision=10),
115 particleNetWithMass_H4qvsQCD =
Var(
"bDiscriminator('pfParticleNetDiscriminatorsJetTags:H4qvsQCD')",float,doc=
"ParticleNet tagger (w/ mass) H(->VV->qqqq) vs QCD discriminator",precision=10),
116 particleNetWithMass_HbbvsQCD =
Var(
"bDiscriminator('pfParticleNetDiscriminatorsJetTags:HbbvsQCD')",float,doc=
"ParticleNet tagger (w/mass) H(->bb) vs QCD discriminator",precision=10),
117 particleNetWithMass_HccvsQCD =
Var(
"bDiscriminator('pfParticleNetDiscriminatorsJetTags:HccvsQCD')",float,doc=
"ParticleNet tagger (w/mass) H(->cc) vs QCD discriminator",precision=10),
118 particleNet_QCD =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD2hf')+bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD1hf')+bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD0hf')",float,doc=
"ParticleNet tagger QCD(0+1+2HF) sum",precision=10),
119 particleNet_QCD2HF =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD2hf')",float,doc=
"ParticleNet tagger QCD 2 HF (b/c) score",precision=10),
120 particleNet_QCD1HF =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD1hf')",float,doc=
"ParticleNet tagger QCD 1 HF (b/c) score",precision=10),
121 particleNet_QCD0HF =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:probQCD0hf')",float,doc=
"ParticleNet tagger QCD 0 HF (b/c) score",precision=10),
122 particleNet_massCorr =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8JetTags:masscorr')",float,doc=
"ParticleNet mass regression, relative correction to JEC-corrected jet mass (no softdrop)",precision=10),
123 particleNet_XbbVsQCD =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HbbvsQCD')",float,doc=
"ParticleNet X->bb vs. QCD score: Xbb/(Xbb+QCD)",precision=10),
124 particleNet_XccVsQCD =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HccvsQCD')",float,doc=
"ParticleNet X->cc vs. QCD score: Xcc/(Xcc+QCD)",precision=10),
125 particleNet_XqqVsQCD =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HqqvsQCD')",float,doc=
"ParticleNet X->qq (uds) vs. QCD score: Xqq/(Xqq+QCD)",precision=10),
126 particleNet_XggVsQCD =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HggvsQCD')",float,doc=
"ParticleNet X->gg vs. QCD score: Xgg/(Xgg+QCD)",precision=10),
127 particleNet_XttVsQCD =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HttvsQCD')",float,doc=
"ParticleNet X->tau_h tau_h vs. QCD score: Xtt/(Xtt+QCD)",precision=10),
128 particleNet_XtmVsQCD =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HtmvsQCD')",float,doc=
"ParticleNet X->mu tau_h vs. QCD score: Xtm/(Xtm+QCD)",precision=10),
129 particleNet_XteVsQCD =
Var(
"bDiscriminator('pfParticleNetFromMiniAODAK8DiscriminatorsJetTags:HtevsQCD')",float,doc=
"ParticleNet X->e tau_h vs. QCD score: Xte/(Xte+QCD)",precision=10),
130 subJetIdx1 =
Var(
"?nSubjetCollections()>0 && subjets('SoftDropPuppi').size()>0?subjets('SoftDropPuppi')[0].key():-1",
"int16",
131 doc=
"index of first subjet"),
132 subJetIdx2 =
Var(
"?nSubjetCollections()>0 && subjets('SoftDropPuppi').size()>1?subjets('SoftDropPuppi')[1].key():-1",
"int16",
133 doc=
"index of second subjet"),
134 nConstituents =
Var(
"numberOfDaughters()",
"uint8",doc=
"Number of particles in the jet"),
136 externalVariables = cms.PSet(
137 lsf3 =
ExtVar(cms.InputTag(
"lepInAK8JetVars:lsf3"),float, doc=
"Lepton Subjet Fraction (3 subjets)",precision=10),
138 muonIdx3SJ =
ExtVar(cms.InputTag(
"lepInAK8JetVars:muIdx3SJ"),
"int16", doc=
"index of muon matched to jet"),
139 electronIdx3SJ =
ExtVar(cms.InputTag(
"lepInAK8JetVars:eleIdx3SJ"),
"int16",doc=
"index of electron matched to jet"),
143 run2_nanoAOD_ANY.toModify(
144 fatJetTable.variables,
145 btagCSVV2 =
Var(
"bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=
" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10)
147 (run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
149 fatJetTable.variables,
150 particleNet_QCD =
None,
151 particleNet_QCD2HF =
None,
152 particleNet_QCD1HF =
None,
153 particleNet_QCD0HF =
None,
154 particleNet_massCorr =
None,
155 particleNet_XbbVsQCD =
None,
156 particleNet_XccVsQCD =
None,
157 particleNet_XqqVsQCD =
None,
158 particleNet_XggVsQCD =
None,
159 particleNet_XttVsQCD =
None,
160 particleNet_XtmVsQCD =
None,
161 particleNet_XteVsQCD =
None,
164 (run2_nanoAOD_106Xv2 | run3_nanoAOD_122 | run3_nanoAOD_124).toModify(
165 fatJetTable.variables,
168 deepTag_TvsQCD =
Var(
"bDiscriminator('pfDeepBoostedDiscriminatorsJetTags:TvsQCD')",float,doc=
"DeepBoostedJet tagger top vs QCD discriminator",precision=10),
169 deepTag_WvsQCD =
Var(
"bDiscriminator('pfDeepBoostedDiscriminatorsJetTags:WvsQCD')",float,doc=
"DeepBoostedJet tagger W vs QCD discriminator",precision=10),
170 deepTag_ZvsQCD =
Var(
"bDiscriminator('pfDeepBoostedDiscriminatorsJetTags:ZvsQCD')",float,doc=
"DeepBoostedJet tagger Z vs QCD discriminator",precision=10),
171 deepTag_H =
Var(
"bDiscriminator('pfDeepBoostedJetTags:probHbb')+bDiscriminator('pfDeepBoostedJetTags:probHcc')+bDiscriminator('pfDeepBoostedJetTags:probHqqqq')",float,doc=
"DeepBoostedJet tagger H(bb,cc,4q) sum",precision=10),
172 deepTag_QCD =
Var(
"bDiscriminator('pfDeepBoostedJetTags:probQCDbb')+bDiscriminator('pfDeepBoostedJetTags:probQCDcc')+bDiscriminator('pfDeepBoostedJetTags:probQCDb')+bDiscriminator('pfDeepBoostedJetTags:probQCDc')+bDiscriminator('pfDeepBoostedJetTags:probQCDothers')",float,doc=
"DeepBoostedJet tagger QCD(bb,cc,b,c,others) sum",precision=10),
173 deepTag_QCDothers =
Var(
"bDiscriminator('pfDeepBoostedJetTags:probQCDothers')",float,doc=
"DeepBoostedJet tagger QCDothers value",precision=10),
174 deepTagMD_TvsQCD =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:TvsQCD')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger top vs QCD discriminator",precision=10),
175 deepTagMD_WvsQCD =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:WvsQCD')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger W vs QCD discriminator",precision=10),
176 deepTagMD_ZvsQCD =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZvsQCD')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger Z vs QCD discriminator",precision=10),
177 deepTagMD_ZHbbvsQCD =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZHbbvsQCD')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger Z/H->bb vs QCD discriminator",precision=10),
178 deepTagMD_ZbbvsQCD =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZbbvsQCD')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger Z->bb vs QCD discriminator",precision=10),
179 deepTagMD_HbbvsQCD =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:HbbvsQCD')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger H->bb vs QCD discriminator",precision=10),
180 deepTagMD_ZHccvsQCD =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ZHccvsQCD')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger Z/H->cc vs QCD discriminator",precision=10),
181 deepTagMD_H4qvsQCD =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:H4qvsQCD')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger H->4q vs QCD discriminator",precision=10),
182 deepTagMD_bbvsLight =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:bbvsLight')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->bb vs light flavour discriminator",precision=10),
183 deepTagMD_ccvsLight =
Var(
"bDiscriminator('pfMassDecorrelatedDeepBoostedDiscriminatorsJetTags:ccvsLight')",float,doc=
"Mass-decorrelated DeepBoostedJet tagger Z/H/gluon->cc vs light flavour discriminator",precision=10),
184 particleNetLegacy_mass =
Var(
"bDiscriminator('pfParticleNetMassRegressionJetTags:mass')",float,doc=
"ParticleNet Legacy Run-2 mass regression",precision=10),
185 particleNetLegacy_Xbb =
Var(
"bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probXbb')",float,doc=
"Mass-decorrelated ParticleNet Legacy Run-2 tagger raw X->bb score. For X->bb vs QCD tagging, use Xbb/(Xbb+QCD)",precision=10),
186 particleNetLegacy_Xcc =
Var(
"bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probXcc')",float,doc=
"Mass-decorrelated ParticleNet Legacy Run-2 tagger raw X->cc score. For X->cc vs QCD tagging, use Xcc/(Xcc+QCD)",precision=10),
187 particleNetLegacy_Xqq =
Var(
"bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probXqq')",float,doc=
"Mass-decorrelated ParticleNet Legacy Run-2 tagger raw X->qq (uds) score. For X->qq vs QCD tagging, use Xqq/(Xqq+QCD). For W vs QCD tagging, use (Xcc+Xqq)/(Xcc+Xqq+QCD)",precision=10),
188 particleNetLegacy_QCD =
Var(
"bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDbb')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDcc')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDb')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDc')+bDiscriminator('pfMassDecorrelatedParticleNetJetTags:probQCDothers')",float,doc=
"Mass-decorrelated ParticleNet Legacy Run-2 tagger raw QCD score",precision=10),
198 def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubleX, addDeepDoubleXV2, addParticleNetMassLegacy, addParticleNet, jecPayload):
199 _btagDiscriminators=[]
201 print(
"Updating process to run DeepCSV btag to AK8 jets")
202 _btagDiscriminators += [
'pfDeepCSVJetTags:probb',
'pfDeepCSVJetTags:probbb']
203 if addDeepBoostedJet:
204 print(
"Updating process to run DeepBoostedJet on datasets before 103X")
206 _btagDiscriminators += pfDeepBoostedJetTagsAll
208 print(
"Updating process to run ParticleNet joint classification and mass regression")
209 from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff
import _pfParticleNetFromMiniAODAK8JetTagsAll
as pfParticleNetFromMiniAODAK8JetTagsAll
210 _btagDiscriminators += pfParticleNetFromMiniAODAK8JetTagsAll
211 if addParticleNetMassLegacy:
213 _btagDiscriminators += _pfParticleNetMassRegressionOutputs
215 print(
"Updating process to run DeepDoubleX on datasets before 104X")
216 _btagDiscriminators += [
'pfDeepDoubleBvLJetTags:probHbb', \
217 'pfDeepDoubleCvLJetTags:probHcc', \
218 'pfDeepDoubleCvBJetTags:probHcc', \
219 'pfMassIndependentDeepDoubleBvLJetTags:probHbb',
'pfMassIndependentDeepDoubleCvLJetTags:probHcc',
'pfMassIndependentDeepDoubleCvBJetTags:probHcc']
221 print(
"Updating process to run DeepDoubleXv2 on datasets before 11X")
222 _btagDiscriminators += [
223 'pfMassIndependentDeepDoubleBvLV2JetTags:probHbb',
224 'pfMassIndependentDeepDoubleCvLV2JetTags:probHcc',
225 'pfMassIndependentDeepDoubleCvBV2JetTags:probHcc' 227 if len(_btagDiscriminators)==0:
return process
228 print(
"Will recalculate the following discriminators on AK8 jets: "+
", ".
join(_btagDiscriminators))
231 jetSource = cms.InputTag(
'slimmedJetsAK8'),
232 pvSource = cms.InputTag(
'offlineSlimmedPrimaryVertices'),
233 svSource = cms.InputTag(
'slimmedSecondaryVertices'),
235 jetCorrections = (jecPayload.value(), cms.vstring([
'L1FastJet',
'L2Relative',
'L3Absolute',
'L2L3Residual']),
'None'),
236 btagDiscriminators = _btagDiscriminators,
237 postfix=
'AK8WithDeepInfo',
240 process.jetCorrFactorsAK8.src=
"selectedUpdatedPatJetsAK8WithDeepInfo" 241 process.updatedJetsAK8.jetSource=
"selectedUpdatedPatJetsAK8WithDeepInfo" 244 nanoAOD_addDeepInfoAK8_switch = cms.PSet(
245 nanoAOD_addDeepBTag_switch = cms.untracked.bool(
False),
246 nanoAOD_addDeepBoostedJet_switch = cms.untracked.bool(
False),
247 nanoAOD_addDeepDoubleX_switch = cms.untracked.bool(
False),
248 nanoAOD_addDeepDoubleXV2_switch = cms.untracked.bool(
False),
249 nanoAOD_addParticleNet_switch = cms.untracked.bool(
False),
250 nanoAOD_addParticleNetMassLegacy_switch = cms.untracked.bool(
False),
251 jecPayload = cms.untracked.string(
'AK8PFPuppi')
257 run2_nanoAOD_106Xv2.toModify(
258 nanoAOD_addDeepInfoAK8_switch,
259 nanoAOD_addParticleNet_switch =
True,
260 nanoAOD_addParticleNetMassLegacy_switch =
True 267 subJetTable = simpleCandidateFlatTableProducer.clone(
268 src = cms.InputTag(
"slimmedJetsAK8PFPuppiSoftDropPacked",
"SubJets"),
269 name = cms.string(
"SubJet"),
270 doc = cms.string(
"slimmedJetsAK8, i.e. ak8 fat jets for boosted analysis"),
271 variables = cms.PSet(P4Vars,
272 btagDeepB =
Var(
"bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb')",float,doc=
"DeepCSV b+bb tag discriminator",precision=10),
273 rawFactor =
Var(
"1.-jecFactor('Uncorrected')",float,doc=
"1 - Factor to get back to raw pT",precision=6),
274 tau1 =
Var(
"userFloat('NjettinessAK8Subjets:tau1')",float, doc=
"Nsubjettiness (1 axis)",precision=10),
275 tau2 =
Var(
"userFloat('NjettinessAK8Subjets:tau2')",float, doc=
"Nsubjettiness (2 axis)",precision=10),
276 tau3 =
Var(
"userFloat('NjettinessAK8Subjets:tau3')",float, doc=
"Nsubjettiness (3 axis)",precision=10),
277 tau4 =
Var(
"userFloat('NjettinessAK8Subjets:tau4')",float, doc=
"Nsubjettiness (4 axis)",precision=10),
278 n2b1 =
Var(
"userFloat('nb1AK8PuppiSoftDropSubjets:ecfN2')", float, doc=
"N2 with beta=1", precision=10),
279 n3b1 =
Var(
"userFloat('nb1AK8PuppiSoftDropSubjets:ecfN3')", float, doc=
"N3 with beta=1", precision=10),
283 run2_nanoAOD_ANY.toModify(
284 subJetTable.variables,
285 btagCSVV2 =
Var(
"bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=
" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10)
289 fatJetTable.variables.pt.precision=10
290 subJetTable.variables.pt.precision=10
292 jetAK8UserDataTask = cms.Task(tightJetIdAK8,tightJetIdLepVetoAK8)
293 jetAK8Task = cms.Task(jetCorrFactorsAK8,updatedJetsAK8,jetAK8UserDataTask,updatedJetsAK8WithUserData,finalJetsAK8)
296 jetAK8LepTask = cms.Task(lepInAK8JetVars)
298 jetAK8TablesTask = cms.Task(fatJetTable,subJetTable)
def ExtVar(tag, valtype, doc=None, precision=-1)
def Var(expr, valtype, doc=None, precision=-1)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
def nanoAOD_addDeepInfoAK8(process, addDeepBTag, addDeepBoostedJet, addDeepDoubleX, addDeepDoubleXV2, addParticleNetMassLegacy, addParticleNet, jecPayload)
static std::string join(char **cmd)