CMS 3D CMS Logo

Functions | Variables
custom_jme_cff Namespace Reference

Functions

def AddBTaggingScores (proc, jetTableName="")
 
def AddDeepJetGluonLQuarkScores (proc, jetTableName="")
 
def AddJetID (proc, jetName="", jetSrc="", jetTableName="", jetTaskName="")
 
def AddNewAK8CHSJets (proc, recoJA, runOnMC)
 
def AddNewAK8GenJetsForJEC (proc, genJA)
 
def AddNewAK8PuppiJetsForJEC (proc, recoJA, runOnMC)
 
def AddNewGenJets (proc, genJetInfo)
 
def AddNewPatJets (proc, recoJetInfo, runOnMC)
 
def AddParticleNetAK4Scores (proc, jetTableName="")
 
def AddPileUpJetIDVars (proc, jetName="", jetSrc="", jetTableName="", jetTaskName="")
 
def AddQGLTaggerVars (proc, jetName="", jetSrc="", jetTableName="", jetTaskName="", calculateQGLVars=False)
 
def AddVariablesForAK4GenJets (proc)
 
def AddVariablesForAK8GenJets (proc)
 
def AddVariablesForAK8PuppiJets (proc)
 
def PrepJMECustomNanoAOD (process, runOnMC)
 
def PrepJMECustomNanoAOD_Data (process)
 
def PrepJMECustomNanoAOD_MC (process)
 
def ReclusterAK4CHSJets (proc, recoJA, runOnMC)
 
def ReclusterAK4GenJets (proc, genJA)
 
def ReclusterAK4PuppiJets (proc, recoJA, runOnMC)
 
def RemoveAllJetPtCuts (proc)
 
def SaveGenJets (proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
 
def SavePatJets (proc, jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF, doCalo, ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=False)
 

Variables

 area
 
 bTagCSVV2
 
 btagCSVV2
 
 btagDDX
 
 btagDDXV2
 
 btagDeepB
 
 bTagDeepCSV
 
 btagDeepCvB
 
 btagDeepCvL
 
 btagDeepFlavB
 
 btagDeepFlavC
 
 btagDeepFlavCvB
 
 btagDeepFlavCvL
 
 btagDeepFlavG
 
 btagDeepFlavQG
 
 btagDeepFlavUDS
 
 bTagDeepJet
 
 bTagDiscriminatorsForAK4
 
 btagHbb
 
 BTAGVARS
 
 CALOJETVARS
 
 chEmEF
 
 chHEF
 
 config_genjets
 
 config_recojets
 
 DEEPJETVARS
 
 doc
 
 emf
 
 float
 
 GENJETVARS
 
 hfEmEF
 
 hfHEF
 
 int
 
 muEF
 
 nanoInfo_genjets
 
 nanoInfo_recojets
 
 nConstChHads
 
 nConstElecs
 
 nConstHFEMs
 
 nConstHFHads
 
 nConstituents
 
 nConstMuons
 
 nConstNeuHads
 
 nConstPhotons
 
 neEmEF
 
 neHEF
 
 nElectrons
 
 nMuons
 
 particleNetAK4_B
 
 particleNetAK4_CvsB
 
 particleNetAK4_CvsL
 
 particleNetAK4_G
 
 particleNetAK4_puIdDisc
 
 particleNetAK4_QvsG
 
 PARTICLENETAK4VARS
 
 PFJETVARS
 
 precision
 
 puId_beta
 
 puId_dR2Mean
 
 puId_frac01
 
 puId_frac02
 
 puId_frac03
 
 puId_frac04
 
 puId_jetR
 
 puId_jetRchg
 
 puId_majW
 
 puId_minW
 
 puId_nCharged
 
 puId_ptD
 
 puId_pull
 
 PUIDVARS
 
 qgl_axis2
 
 qgl_mult
 
 qgl_ptD
 
 QGLVARS
 
 rawFactor
 

Function Documentation

◆ AddBTaggingScores()

def custom_jme_cff.AddBTaggingScores (   proc,
  jetTableName = "" 
)
Store b-tagging scores from various algortihm

Definition at line 366 of file custom_jme_cff.py.

Referenced by SavePatJets().

366 def AddBTaggingScores(proc, jetTableName=""):
367  """
368  Store b-tagging scores from various algortihm
369  """
370 
371  getattr(proc, jetTableName).variables.btagDeepB = BTAGVARS.btagDeepB
372  getattr(proc, jetTableName).variables.btagCSVV2 = BTAGVARS.btagCSVV2
373  getattr(proc, jetTableName).variables.btagDeepCvL = BTAGVARS.btagDeepCvL
374  getattr(proc, jetTableName).variables.btagDeepCvB = BTAGVARS.btagDeepCvB
375  getattr(proc, jetTableName).variables.btagDeepFlavB = DEEPJETVARS.btagDeepFlavB
376  getattr(proc, jetTableName).variables.btagDeepFlavCvL = DEEPJETVARS.btagDeepFlavCvL
377  getattr(proc, jetTableName).variables.btagDeepFlavCvB = DEEPJETVARS.btagDeepFlavCvB
378 
379  return proc
380 
def AddBTaggingScores(proc, jetTableName="")

◆ AddDeepJetGluonLQuarkScores()

def custom_jme_cff.AddDeepJetGluonLQuarkScores (   proc,
  jetTableName = "" 
)
Store DeepJet raw score in jetTable for gluon and light quark

Definition at line 381 of file custom_jme_cff.py.

Referenced by SavePatJets().

381 def AddDeepJetGluonLQuarkScores(proc, jetTableName=""):
382  """
383  Store DeepJet raw score in jetTable for gluon and light quark
384  """
385 
386  getattr(proc, jetTableName).variables.btagDeepFlavG = DEEPJETVARS.btagDeepFlavG
387  getattr(proc, jetTableName).variables.btagDeepFlavUDS = DEEPJETVARS.btagDeepFlavUDS
388  getattr(proc, jetTableName).variables.btagDeepFlavQG = DEEPJETVARS.btagDeepFlavQG
389 
390  return proc
391 
def AddDeepJetGluonLQuarkScores(proc, jetTableName="")

◆ AddJetID()

def custom_jme_cff.AddJetID (   proc,
  jetName = "",
  jetSrc = "",
  jetTableName = "",
  jetTaskName = "" 
)
Setup modules to calculate PF jet ID

Definition at line 204 of file custom_jme_cff.py.

References PVValHelper.add(), and common_cff.Var().

Referenced by SavePatJets().

204 def AddJetID(proc, jetName="", jetSrc="", jetTableName="", jetTaskName=""):
205  """
206  Setup modules to calculate PF jet ID
207  """
208 
209  isPUPPIJet = True if "PUPPI" in jetName.upper() else False
210 
211  looseJetId = "looseJetId{}".format(jetName)
212  setattr(proc, looseJetId, proc.looseJetId.clone(
213  src = jetSrc,
214  filterParams = proc.looseJetId.filterParams.clone(
215  version = "WINTER16"
216  ),
217  )
218  )
219 
220  tightJetId = "tightJetId{}".format(jetName)
221  setattr(proc, tightJetId, proc.tightJetId.clone(
222  src = jetSrc,
223  filterParams = proc.tightJetId.filterParams.clone(
224  version = "RUN2UL{}".format("PUPPI" if isPUPPIJet else "CHS")
225  ),
226  )
227  )
228 
229  tightJetIdLepVeto = "tightJetIdLepVeto{}".format(jetName)
230  setattr(proc, tightJetIdLepVeto, proc.tightJetIdLepVeto.clone(
231  src = jetSrc,
232  filterParams = proc.tightJetIdLepVeto.filterParams.clone(
233  version = "RUN2UL{}".format("PUPPI" if isPUPPIJet else "CHS")
234  ),
235  )
236  )
237 
238  run2_jme_2016.toModify(
239  getattr(proc, tightJetId).filterParams, version = "RUN2UL16{}".format("PUPPI" if isPUPPIJet else "CHS")
240  ).toModify(
241  getattr(proc, tightJetIdLepVeto).filterParams, version = "RUN2UL16{}".format("PUPPI" if isPUPPIJet else "CHS")
242  )
243 
244  #
245  # Save variables as userInts in each jet
246  #
247  patJetWithUserData = "{}WithUserData".format(jetSrc)
248  getattr(proc, patJetWithUserData).userInts.tightId = cms.InputTag(tightJetId)
249  getattr(proc, patJetWithUserData).userInts.tightIdLepVeto = cms.InputTag(tightJetIdLepVeto)
250 
251  #
252  # Specfiy variables in the jetTable to save in NanoAOD
253  #
254  getattr(proc, jetTableName).variables.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")
255 
256  getattr(proc,jetTaskName).add(getattr(proc, tightJetId))
257  getattr(proc,jetTaskName).add(getattr(proc, tightJetIdLepVeto))
258 
259  return proc
260 
def Var(expr, valtype, doc=None, precision=-1)
Definition: common_cff.py:16
def AddJetID(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="")
void add(std::map< std::string, TH1 *> &h, TH1 *hist)

◆ AddNewAK8CHSJets()

def custom_jme_cff.AddNewAK8CHSJets (   proc,
  recoJA,
  runOnMC 
)
Store an AK8 CHS jet collection for JEC studies.

Definition at line 990 of file custom_jme_cff.py.

References print(), and SavePatJets().

Referenced by PrepJMECustomNanoAOD().

990 def AddNewAK8CHSJets(proc, recoJA, runOnMC):
991  """
992  Store an AK8 CHS jet collection for JEC studies.
993  """
994  print("custom_jme_cff::AddNewAK8CHSJets: Make a new AK8 PF CHS jet collection for JEC studies")
995 
996  #
997  # Recluster AK8 CHS jets
998  #
999  cfg = {
1000  "jet" : "ak8pfchs",
1001  "inputCollection" : "",
1002  "genJetsCollection": "AK8GenJetsNoNu",
1003  "minPtFastjet" : 0., # Remove any pt threshold at the jet clustering stage.
1004  }
1005  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
1006 
1007  jetName = recoJetInfo.jetUpper
1008  payload = recoJetInfo.jetCorrPayload
1009 
1010  patJetFinalColl = recoJetInfo.patJetFinalCollection
1011  jetTablePrefix = "FatJetCHS"
1012  jetTableDoc = "AK8 PF CHS jets with JECs applied. Reclustered for JEC studies so only minimal info stored."
1013  ptcut = 15
1014 
1015  SavePatJets(proc,
1016  jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF=True,
1017  doCalo=False, ptcut=ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=runOnMC
1018  )
1019 
1020  return proc
1021 
def AddNewAK8CHSJets(proc, recoJA, runOnMC)
def SavePatJets(proc, jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF, doCalo, ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=False)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ AddNewAK8GenJetsForJEC()

def custom_jme_cff.AddNewAK8GenJetsForJEC (   proc,
  genJA 
)
Make a separate AK8 Gen jet collection for JEC studies.

Definition at line 1156 of file custom_jme_cff.py.

References print(), and SaveGenJets().

Referenced by PrepJMECustomNanoAOD().

1156 def AddNewAK8GenJetsForJEC(proc, genJA):
1157  """
1158  Make a separate AK8 Gen jet collection for JEC studies.
1159  """
1160  print("custom_jme_cff::AddNewAK8GenJetsForJEC: Add new AK8 Gen jets for JEC studies")
1161 
1162  #
1163  # Recluster AK8 Gen jet
1164  #
1165  cfg = {
1166  "jet" : "ak8gen",
1167  }
1168  genJetInfo = genJA.addGenJetCollection(proc, **cfg)
1169 
1170  genJetName = genJetInfo.jetUpper
1171  genJetAlgo = genJetInfo.jetAlgo
1172  genJetSize = genJetInfo.jetSize
1173  genJetSizeNr = genJetInfo.jetSizeNr
1174  genJetFinalColl = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1175  genJetTablePrefix = "GenJetAK8ForJEC"
1176  genJetTableDoc = "AK8 Gen jets (made with visible genparticles) with pt > 3 GeV. Reclustered for JEC studies."
1177 
1178  SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
1179 
1180  return proc
1181 
def AddNewAK8GenJetsForJEC(proc, genJA)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)

◆ AddNewAK8PuppiJetsForJEC()

def custom_jme_cff.AddNewAK8PuppiJetsForJEC (   proc,
  recoJA,
  runOnMC 
)
Store a separate AK8 Puppi jet collection for JEC studies.
Only minimal info are stored

Definition at line 957 of file custom_jme_cff.py.

References print(), and SavePatJets().

Referenced by PrepJMECustomNanoAOD().

957 def AddNewAK8PuppiJetsForJEC(proc, recoJA, runOnMC):
958  """
959  Store a separate AK8 Puppi jet collection for JEC studies.
960  Only minimal info are stored
961  """
962  print("custom_jme_cff::AddNewAK8PuppiJetsForJEC: Make a new AK8 PF Puppi jet collection for JEC studies")
963 
964  #
965  # Recluster AK8 Puppi jets
966  #
967  cfg = {
968  "jet" : "ak8pfpuppi",
969  "inputCollection" : "",
970  "genJetsCollection": "AK8GenJetsNoNu",
971  "minPtFastjet" : 0., # Remove any pt threshold at the jet clustering stage.
972  }
973  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
974 
975  jetName = recoJetInfo.jetUpper
976  payload = recoJetInfo.jetCorrPayload
977 
978  patJetFinalColl = recoJetInfo.patJetFinalCollection
979  jetTablePrefix = "FatJetForJEC"
980  jetTableDoc = "AK8 PF Puppi jets with JECs applied. Reclustered for JEC studies so only minimal info stored."
981  ptcut = 15
982 
983  SavePatJets(proc,
984  jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF=True,
985  doCalo=False, ptcut=ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=runOnMC
986  )
987 
988  return proc
989 
def SavePatJets(proc, jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF, doCalo, ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=False)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def AddNewAK8PuppiJetsForJEC(proc, recoJA, runOnMC)

◆ AddNewGenJets()

def custom_jme_cff.AddNewGenJets (   proc,
  genJetInfo 
)
Add genJet into custom nanoAOD

Definition at line 1056 of file custom_jme_cff.py.

References SaveGenJets().

Referenced by PrepJMECustomNanoAOD().

1056 def AddNewGenJets(proc, genJetInfo):
1057  """
1058  Add genJet into custom nanoAOD
1059  """
1060 
1061  genJetName = genJetInfo.jetUpper
1062  genJetAlgo = genJetInfo.jetAlgo
1063  genJetSize = genJetInfo.jetSize
1064  genJetSizeNr = genJetInfo.jetSizeNr
1065  genJetFinalColl = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1066  genJetTablePrefix = nanoInfo_genjets[genJetInfo.jet]["name"]
1067  genJetTableDoc = nanoInfo_genjets[genJetInfo.jet]["doc"]
1068 
1069  SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
1070 
1071  return proc
1072 
def AddNewGenJets(proc, genJetInfo)
def SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)

◆ AddNewPatJets()

def custom_jme_cff.AddNewPatJets (   proc,
  recoJetInfo,
  runOnMC 
)
Add patJet into custom nanoAOD

Definition at line 406 of file custom_jme_cff.py.

References SavePatJets().

Referenced by PrepJMECustomNanoAOD().

406 def AddNewPatJets(proc, recoJetInfo, runOnMC):
407  """
408  Add patJet into custom nanoAOD
409  """
410 
411  jetName = recoJetInfo.jetUpper
412  payload = recoJetInfo.jetCorrPayload
413  doPF = recoJetInfo.doPF
414  doCalo = recoJetInfo.doCalo
415  patJetFinalColl = recoJetInfo.patJetFinalCollection
416 
417  nanoInfoForJet = nanoInfo_recojets[recoJetInfo.jet]
418  jetTablePrefix = nanoInfoForJet["name"]
419  jetTableDoc = nanoInfoForJet["doc"]
420  ptcut = nanoInfoForJet["ptcut"] if "ptcut" in nanoInfoForJet else 8
421  doPUIDVar = nanoInfoForJet["doPUIDVar"] if "doPUIDVar" in nanoInfoForJet else False
422  doQGL = nanoInfoForJet["doQGL"] if "doQGL" in nanoInfoForJet else False
423  doBTag = nanoInfoForJet["doBTag"] if "doBTag" in nanoInfoForJet else False
424 
425  SavePatJets(proc,
426  jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF, doCalo,
427  ptcut=ptcut, doPUIDVar=doPUIDVar, doQGL=doQGL, doBTag=doBTag, runOnMC=runOnMC
428  )
429 
430  return proc
431 
def AddNewPatJets(proc, recoJetInfo, runOnMC)
def SavePatJets(proc, jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF, doCalo, ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=False)

◆ AddParticleNetAK4Scores()

def custom_jme_cff.AddParticleNetAK4Scores (   proc,
  jetTableName = "" 
)
Store ParticleNetAK4 scores in jetTable

Definition at line 392 of file custom_jme_cff.py.

Referenced by SavePatJets().

392 def AddParticleNetAK4Scores(proc, jetTableName=""):
393  """
394  Store ParticleNetAK4 scores in jetTable
395  """
396 
397  getattr(proc, jetTableName).variables.particleNetAK4_B = PARTICLENETAK4VARS.particleNetAK4_B
398  getattr(proc, jetTableName).variables.particleNetAK4_CvsL = PARTICLENETAK4VARS.particleNetAK4_CvsL
399  getattr(proc, jetTableName).variables.particleNetAK4_CvsB = PARTICLENETAK4VARS.particleNetAK4_CvsB
400  getattr(proc, jetTableName).variables.particleNetAK4_QvsG = PARTICLENETAK4VARS.particleNetAK4_QvsG
401  getattr(proc, jetTableName).variables.particleNetAK4_G = PARTICLENETAK4VARS.particleNetAK4_G
402  getattr(proc, jetTableName).variables.particleNetAK4_puIdDisc = PARTICLENETAK4VARS.particleNetAK4_puIdDisc
403 
404  return proc
405 
def AddParticleNetAK4Scores(proc, jetTableName="")

◆ AddPileUpJetIDVars()

def custom_jme_cff.AddPileUpJetIDVars (   proc,
  jetName = "",
  jetSrc = "",
  jetTableName = "",
  jetTaskName = "" 
)
Setup modules to calculate pileup jet ID input variables for PF jet

Definition at line 261 of file custom_jme_cff.py.

References PVValHelper.add().

Referenced by ReclusterAK4CHSJets(), ReclusterAK4PuppiJets(), and SavePatJets().

261 def AddPileUpJetIDVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName=""):
262  """
263  Setup modules to calculate pileup jet ID input variables for PF jet
264  """
265 
266  #
267  # Calculate pileup jet ID variables
268  #
269  puJetIdVarsCalculator = "puJetIdCalculator{}".format(jetName)
270  setattr(proc, puJetIdVarsCalculator, pileupJetIdCalculator.clone(
271  jets = jetSrc,
272  vertexes = "offlineSlimmedPrimaryVertices",
273  inputIsCorrected = True,
274  applyJec = False,
275  usePuppi = True if "PUPPI" in jetName.upper() else False
276  )
277  )
278  getattr(proc,jetTaskName).add(getattr(proc, puJetIdVarsCalculator))
279 
280  #
281  # Get the variables
282  #
283  puJetIDVar = "puJetIDVar{}".format(jetName)
284  setattr(proc, puJetIDVar, cms.EDProducer("PileupJetIDVarProducer",
285  srcJet = cms.InputTag(jetSrc),
286  srcPileupJetId = cms.InputTag(puJetIdVarsCalculator)
287  )
288  )
289  getattr(proc,jetTaskName).add(getattr(proc, puJetIDVar))
290 
291  #
292  # Save variables as userFloats and userInts for each jet
293  #
294  patJetWithUserData = "{}WithUserData".format(jetSrc)
295  getattr(proc,patJetWithUserData).userFloats.puId_dR2Mean = cms.InputTag("{}:dR2Mean".format(puJetIDVar))
296  getattr(proc,patJetWithUserData).userFloats.puId_majW = cms.InputTag("{}:majW".format(puJetIDVar))
297  getattr(proc,patJetWithUserData).userFloats.puId_minW = cms.InputTag("{}:minW".format(puJetIDVar))
298  getattr(proc,patJetWithUserData).userFloats.puId_frac01 = cms.InputTag("{}:frac01".format(puJetIDVar))
299  getattr(proc,patJetWithUserData).userFloats.puId_frac02 = cms.InputTag("{}:frac02".format(puJetIDVar))
300  getattr(proc,patJetWithUserData).userFloats.puId_frac03 = cms.InputTag("{}:frac03".format(puJetIDVar))
301  getattr(proc,patJetWithUserData).userFloats.puId_frac04 = cms.InputTag("{}:frac04".format(puJetIDVar))
302  getattr(proc,patJetWithUserData).userFloats.puId_ptD = cms.InputTag("{}:ptD".format(puJetIDVar))
303  getattr(proc,patJetWithUserData).userFloats.puId_beta = cms.InputTag("{}:beta".format(puJetIDVar))
304  getattr(proc,patJetWithUserData).userFloats.puId_pull = cms.InputTag("{}:pull".format(puJetIDVar))
305  getattr(proc,patJetWithUserData).userFloats.puId_jetR = cms.InputTag("{}:jetR".format(puJetIDVar))
306  getattr(proc,patJetWithUserData).userFloats.puId_jetRchg = cms.InputTag("{}:jetRchg".format(puJetIDVar))
307  getattr(proc,patJetWithUserData).userInts.puId_nCharged = cms.InputTag("{}:nCharged".format(puJetIDVar))
308 
309  #
310  # Specfiy variables in the jet table to save in NanoAOD
311  #
312  getattr(proc,jetTableName).variables.puId_dR2Mean = PUIDVARS.puId_dR2Mean
313  getattr(proc,jetTableName).variables.puId_majW = PUIDVARS.puId_majW
314  getattr(proc,jetTableName).variables.puId_minW = PUIDVARS.puId_minW
315  getattr(proc,jetTableName).variables.puId_frac01 = PUIDVARS.puId_frac01
316  getattr(proc,jetTableName).variables.puId_frac02 = PUIDVARS.puId_frac02
317  getattr(proc,jetTableName).variables.puId_frac03 = PUIDVARS.puId_frac03
318  getattr(proc,jetTableName).variables.puId_frac04 = PUIDVARS.puId_frac04
319  getattr(proc,jetTableName).variables.puId_ptD = PUIDVARS.puId_ptD
320  getattr(proc,jetTableName).variables.puId_beta = PUIDVARS.puId_beta
321  getattr(proc,jetTableName).variables.puId_pull = PUIDVARS.puId_pull
322  getattr(proc,jetTableName).variables.puId_jetR = PUIDVARS.puId_jetR
323  getattr(proc,jetTableName).variables.puId_jetRchg = PUIDVARS.puId_jetRchg
324  getattr(proc,jetTableName).variables.puId_nCharged = PUIDVARS.puId_nCharged
325 
326  return proc
327 
void add(std::map< std::string, TH1 *> &h, TH1 *hist)
def AddPileUpJetIDVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="")

◆ AddQGLTaggerVars()

def custom_jme_cff.AddQGLTaggerVars (   proc,
  jetName = "",
  jetSrc = "",
  jetTableName = "",
  jetTaskName = "",
  calculateQGLVars = False 
)
Schedule the QGTagger module to calculate input variables to the QG likelihood

Definition at line 328 of file custom_jme_cff.py.

References PVValHelper.add().

Referenced by ReclusterAK4PuppiJets(), and SavePatJets().

328 def AddQGLTaggerVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="", calculateQGLVars=False):
329  """
330  Schedule the QGTagger module to calculate input variables to the QG likelihood
331  """
332 
333  isPUPPIJet = True if "PUPPI" in jetName.upper() else False
334 
335  QGLTagger="qgtagger{}".format(jetName)
336  patJetWithUserData="{}WithUserData".format(jetSrc)
337 
338  if calculateQGLVars:
339  setattr(proc, QGLTagger, qgtagger.clone(
340  srcJets = jetSrc,
341  computeLikelihood = False,
342  )
343  )
344  if isPUPPIJet:
345  getattr(proc,QGLTagger).srcConstituentWeights = cms.InputTag("packedPFCandidatespuppi")
346 
347  #
348  # Save variables as userFloats and userInts for each jet
349  #
350  getattr(proc,patJetWithUserData).userFloats.qgl_axis2 = cms.InputTag(QGLTagger+":axis2")
351  getattr(proc,patJetWithUserData).userFloats.qgl_ptD = cms.InputTag(QGLTagger+":ptD")
352  getattr(proc,patJetWithUserData).userInts.qgl_mult = cms.InputTag(QGLTagger+":mult")
353 
354  #
355  # Specfiy variables in the jet table to save in NanoAOD
356  #
357  getattr(proc,jetTableName).variables.qgl_axis2 = QGLVARS.qgl_axis2
358  getattr(proc,jetTableName).variables.qgl_ptD = QGLVARS.qgl_ptD
359  getattr(proc,jetTableName).variables.qgl_mult = QGLVARS.qgl_mult
360 
361  if calculateQGLVars:
362  getattr(proc,jetTaskName).add(getattr(proc, QGLTagger))
363 
364  return proc
365 
def AddQGLTaggerVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="", calculateQGLVars=False)
void add(std::map< std::string, TH1 *> &h, TH1 *hist)

◆ AddVariablesForAK4GenJets()

def custom_jme_cff.AddVariablesForAK4GenJets (   proc)

Definition at line 1182 of file custom_jme_cff.py.

Referenced by PrepJMECustomNanoAOD().

1182 def AddVariablesForAK4GenJets(proc):
1183  proc.genJetTable.variables.nConstituents = GENJETVARS.nConstituents
1184  return proc
1185 
def AddVariablesForAK4GenJets(proc)

◆ AddVariablesForAK8GenJets()

def custom_jme_cff.AddVariablesForAK8GenJets (   proc)

Definition at line 1186 of file custom_jme_cff.py.

Referenced by PrepJMECustomNanoAOD().

1186 def AddVariablesForAK8GenJets(proc):
1187  proc.genJetAK8Table.variables.nConstituents = GENJETVARS.nConstituents
1188  return proc
1189 
1190 #===========================================================================
1191 #
1192 # Misc. functions
1193 #
1194 #===========================================================================
def AddVariablesForAK8GenJets(proc)

◆ AddVariablesForAK8PuppiJets()

def custom_jme_cff.AddVariablesForAK8PuppiJets (   proc)
Add more variables for AK8 PFPUPPI jets

Definition at line 1022 of file custom_jme_cff.py.

References common_cff.Var().

Referenced by PrepJMECustomNanoAOD().

1022 def AddVariablesForAK8PuppiJets(proc):
1023  """
1024  Add more variables for AK8 PFPUPPI jets
1025  """
1026 
1027  proc.fatJetTable.variables.rawFactor.precision = 10
1028 
1029  #
1030  # These variables are not stored for AK8PFPUPPI (slimmedJetsAK8)
1031  # in MiniAOD if their pt < 170 GeV. Hence the conditional fill.
1032  #
1033  proc.fatJetTable.variables.chHEF = Var("?isPFJet()?chargedHadronEnergyFraction():-1", float, doc="charged Hadron Energy Fraction", precision = 6)
1034  proc.fatJetTable.variables.neHEF = Var("?isPFJet()?neutralHadronEnergyFraction():-1", float, doc="neutral Hadron Energy Fraction", precision = 6)
1035  proc.fatJetTable.variables.chEmEF = Var("?isPFJet()?chargedEmEnergyFraction():-1", float, doc="charged Electromagnetic Energy Fraction", precision = 6)
1036  proc.fatJetTable.variables.neEmEF = Var("?isPFJet()?neutralEmEnergyFraction():-1", float, doc="neutral Electromagnetic Energy Fraction", precision = 6)
1037  proc.fatJetTable.variables.muEF = Var("?isPFJet()?muonEnergyFraction():-1", float, doc="muon Energy Fraction", precision = 6)
1038  proc.fatJetTable.variables.hfHEF = Var("?isPFJet()?HFHadronEnergyFraction():-1", float, doc="energy fraction in forward hadronic calorimeter", precision = 6)
1039  proc.fatJetTable.variables.hfEmEF = Var("?isPFJet()?HFEMEnergyFraction():-1", float, doc="energy fraction in forward EM calorimeter", precision = 6)
1040  proc.fatJetTable.variables.nConstChHads = Var("?isPFJet()?chargedHadronMultiplicity():-1",int, doc="number of charged hadrons in the jet")
1041  proc.fatJetTable.variables.nConstNeuHads = Var("?isPFJet()?neutralHadronMultiplicity():-1",int, doc="number of neutral hadrons in the jet")
1042  proc.fatJetTable.variables.nConstHFHads = Var("?isPFJet()?HFHadronMultiplicity():-1", int, doc="number of HF Hadrons in the jet")
1043  proc.fatJetTable.variables.nConstHFEMs = Var("?isPFJet()?HFEMMultiplicity():-1", int, doc="number of HF EMs in the jet")
1044  proc.fatJetTable.variables.nConstMuons = Var("?isPFJet()?muonMultiplicity():-1", int, doc="number of muons in the jet")
1045  proc.fatJetTable.variables.nConstElecs = Var("?isPFJet()?electronMultiplicity():-1", int, doc="number of electrons in the jet")
1046  proc.fatJetTable.variables.nConstPhotons = Var("?isPFJet()?photonMultiplicity():-1", int, doc="number of photons in the jet")
1047 
1048  return proc
1049 #******************************************
1050 #
1051 #
1052 # Gen Jets related functions
1053 #
1054 #
1055 #******************************************
def Var(expr, valtype, doc=None, precision=-1)
Definition: common_cff.py:16
def AddVariablesForAK8PuppiJets(proc)

◆ PrepJMECustomNanoAOD()

def custom_jme_cff.PrepJMECustomNanoAOD (   process,
  runOnMC 
)

Definition at line 1215 of file custom_jme_cff.py.

References AddNewAK8CHSJets(), AddNewAK8GenJetsForJEC(), AddNewAK8PuppiJetsForJEC(), AddNewGenJets(), AddNewPatJets(), AddVariablesForAK4GenJets(), AddVariablesForAK8GenJets(), AddVariablesForAK8PuppiJets(), ReclusterAK4CHSJets(), ReclusterAK4GenJets(), ReclusterAK4PuppiJets(), and RemoveAllJetPtCuts().

Referenced by PrepJMECustomNanoAOD_Data(), and PrepJMECustomNanoAOD_MC().

1215 def PrepJMECustomNanoAOD(process,runOnMC):
1216 
1217 
1220  process = RemoveAllJetPtCuts(process)
1221 
1222 
1227  genJA = GenJetAdder()
1228  if runOnMC:
1229 
1232  process = AddVariablesForAK8GenJets(process)
1233 
1236  process = AddNewAK8GenJetsForJEC(process, genJA)
1237 
1240  process = ReclusterAK4GenJets(process, genJA)
1241  process = AddVariablesForAK4GenJets(process)
1242 
1245  for jetConfig in config_genjets:
1246  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
1247  genJetInfo = genJA.addGenJetCollection(process, **cfg)
1248  AddNewGenJets(process, genJetInfo)
1249 
1250 
1255  recoJA = RecoJetAdder(runOnMC=runOnMC)
1256 
1259  process = AddVariablesForAK8PuppiJets(process)
1260 
1263  process = AddNewAK8PuppiJetsForJEC(process, recoJA, runOnMC)
1264 
1267  process = AddNewAK8CHSJets(process, recoJA, runOnMC)
1268 
1271  process = ReclusterAK4CHSJets(process, recoJA, runOnMC)
1272 
1275  process = ReclusterAK4PuppiJets(process, recoJA, runOnMC)
1276 
1279  for jetConfig in config_recojets:
1280  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
1281  recoJetInfo = recoJA.addRecoJetCollection(process, **cfg)
1282  AddNewPatJets(process, recoJetInfo, runOnMC)
1283 
1284 
1289  def addAK4JetTasks(proc, addAK4CHSJetTasks, addAK4PuppiJetTasks):
1290  if addAK4CHSJetTasks:
1291  proc.nanoTableTaskCommon.add(proc.jetTask)
1292  proc.nanoTableTaskCommon.add(proc.jetTablesTask)
1293  proc.nanoTableTaskCommon.add(proc.jetForMETTask)
1294  if addAK4PuppiJetTasks:
1295  proc.nanoTableTaskCommon.add(proc.jetPuppiTask)
1296  proc.nanoTableTaskCommon.add(proc.jetPuppiTablesTask)
1297  proc.nanoTableTaskCommon.add(proc.jetPuppiForMETTask)
1298  return proc
1299 
1300  jmeNano_addAK4JetTasks_switch = cms.PSet(
1301  jmeNano_addAK4CHS_switch = cms.untracked.bool(True),
1302  jmeNano_addAK4Puppi_switch = cms.untracked.bool(False)
1303  )
1304  run2_nanoAOD_ANY.toModify(jmeNano_addAK4JetTasks_switch,
1305  jmeNano_addAK4CHS_switch = False,
1306  jmeNano_addAK4Puppi_switch = True
1307  )
1308  process = addAK4JetTasks(process,
1309  addAK4CHSJetTasks = jmeNano_addAK4JetTasks_switch.jmeNano_addAK4CHS_switch,
1310  addAK4PuppiJetTasks = jmeNano_addAK4JetTasks_switch.jmeNano_addAK4Puppi_switch,
1311  )
1312 
1313 
1316  if runOnMC:
1317  process.puTable.savePtHatMax = True
1318 
1319 
1322  if runOnMC:
1323  process.genWeightsTable.keepAllPSWeights = True
1324 
1325  return process
1326 
def ReclusterAK4CHSJets(proc, recoJA, runOnMC)
def RemoveAllJetPtCuts(proc)
def PrepJMECustomNanoAOD(process, runOnMC)
def AddNewPatJets(proc, recoJetInfo, runOnMC)
def ReclusterAK4GenJets(proc, genJA)
def AddNewAK8CHSJets(proc, recoJA, runOnMC)
def AddNewAK8GenJetsForJEC(proc, genJA)
def ReclusterAK4PuppiJets(proc, recoJA, runOnMC)
def AddNewAK8PuppiJetsForJEC(proc, recoJA, runOnMC)
def AddNewGenJets(proc, genJetInfo)
def AddVariablesForAK4GenJets(proc)
def AddVariablesForAK8PuppiJets(proc)
def AddVariablesForAK8GenJets(proc)

◆ PrepJMECustomNanoAOD_Data()

def custom_jme_cff.PrepJMECustomNanoAOD_Data (   process)

Definition at line 1332 of file custom_jme_cff.py.

References PrepJMECustomNanoAOD().

1332 def PrepJMECustomNanoAOD_Data(process):
1333  process = PrepJMECustomNanoAOD(process,runOnMC=False)
1334  return process
1335 
def PrepJMECustomNanoAOD(process, runOnMC)
def PrepJMECustomNanoAOD_Data(process)

◆ PrepJMECustomNanoAOD_MC()

def custom_jme_cff.PrepJMECustomNanoAOD_MC (   process)

Definition at line 1327 of file custom_jme_cff.py.

References PrepJMECustomNanoAOD().

1327 def PrepJMECustomNanoAOD_MC(process):
1328  process = PrepJMECustomNanoAOD(process,runOnMC=True)
1329 
1330  return process
1331 
def PrepJMECustomNanoAOD(process, runOnMC)
def PrepJMECustomNanoAOD_MC(process)

◆ ReclusterAK4CHSJets()

def custom_jme_cff.ReclusterAK4CHSJets (   proc,
  recoJA,
  runOnMC 
)
Recluster AK4 CHS jets and replace slimmedJets that is used as default to
save AK4 CHS jets in NanoAODs (for Run-2).

Definition at line 743 of file custom_jme_cff.py.

References AddPileUpJetIDVars(), print(), and common_cff.Var().

Referenced by PrepJMECustomNanoAOD().

743 def ReclusterAK4CHSJets(proc, recoJA, runOnMC):
744  """
745  Recluster AK4 CHS jets and replace slimmedJets that is used as default to
746  save AK4 CHS jets in NanoAODs (for Run-2).
747  """
748  print("custom_jme_cff::ReclusterAK4CHSJets: Recluster AK4 PF CHS jets")
749 
750  #
751  # Recluster AK4 CHS jets
752  #
753  cfg = {
754  "jet" : "ak4pfchs",
755  "inputCollection" : "",
756  "genJetsCollection": "AK4GenJetsNoNu",
757  "bTagDiscriminators": bTagDiscriminatorsForAK4,
758  "minPtFastjet" : 0.,
759  }
760  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
761 
762  jetName = recoJetInfo.jetUpper
763  patJetFinalColl = recoJetInfo.patJetFinalCollection
764 
765  #
766  # Change the input jet source for jetCorrFactorsNano
767  # and updatedJets
768  #
769  proc.jetCorrFactorsNano.src=patJetFinalColl
770  proc.updatedJets.jetSource=patJetFinalColl
771 
772  #
773  # Change pt cut
774  #
775  finalJetsCut = ""
776  if runOnMC:
777  finalJetsCut = "(pt >= 8) || ((pt < 8) && (genJetFwdRef().backRef().isNonnull()))"
778  else:
779  finalJetsCut = "(pt >= 8)"
780 
781  proc.finalJets.cut = finalJetsCut
782  #
783  # Add a minimum pt cut for corrT1METJets.
784  #
785  proc.corrT1METJetTable.cut = "pt>=8 && pt<15 && abs(eta)<9.9"
786 
787  #
788  # Jet table cut
789  #
790  jetTableCut = "" # must not have any cut at the jetTable for AK4 CHS as it has been cross-cleaned
791  proc.jetTable.src = cms.InputTag("finalJets")
792  proc.jetTable.cut = jetTableCut
793  proc.jetMCTable.cut = jetTableCut
794  proc.jetTable.name = "JetCHS"
795 
796  #
797  # For Run-2 eras, the main AK4 jet collection in NanoAOD is the CHS collection
798  #
799  run2_nanoAOD_ANY.toModify(
800  proc.jetTable,
801  src = cms.InputTag("linkedObjects","jets"),
802  name = "Jet"
803  )
804 
805  #
806  # Jet table documentation
807  #
808  jetTableDoc = "AK4 PF CHS jets with JECs applied. Jets with pt >= 8 GeV are stored."
809  if runOnMC:
810  jetTableDoc += "For jets with pt < 8 GeV, only those matched to AK4 Gen jets are stored."
811  proc.jetTable.doc = jetTableDoc
812 
813  proc.jetTable.variables.rawFactor.precision = 10
814 
815  #
816  # Add variables
817  #
818  proc.jetTable.variables.hfHEF = PFJETVARS.hfHEF
819  proc.jetTable.variables.hfEmEF = PFJETVARS.hfEmEF
820  proc.jetTable.variables.nConstChHads = PFJETVARS.nConstChHads
821  proc.jetTable.variables.nConstNeuHads = PFJETVARS.nConstNeuHads
822  proc.jetTable.variables.nConstHFHads = PFJETVARS.nConstHFHads
823  proc.jetTable.variables.nConstHFEMs = PFJETVARS.nConstHFEMs
824  proc.jetTable.variables.nConstMuons = PFJETVARS.nConstMuons
825  proc.jetTable.variables.nConstElecs = PFJETVARS.nConstElecs
826  proc.jetTable.variables.nConstPhotons = PFJETVARS.nConstPhotons
827 
828  #
829  # Add charged energy fraction from other primary vertices
830  #
831  proc.updatedJetsWithUserData.userFloats.chFPV1EF = cms.InputTag("jercVars:chargedFromPV1EnergyFraction")
832  proc.updatedJetsWithUserData.userFloats.chFPV2EF = cms.InputTag("jercVars:chargedFromPV2EnergyFraction")
833  proc.updatedJetsWithUserData.userFloats.chFPV3EF = cms.InputTag("jercVars:chargedFromPV3EnergyFraction")
834  proc.jetTable.variables.chFPV1EF = Var("userFloat('chFPV1EF')", float, doc="charged fromPV==1 Energy Fraction (component of the total charged Energy Fraction).", precision= 6)
835  proc.jetTable.variables.chFPV2EF = Var("userFloat('chFPV2EF')", float, doc="charged fromPV==2 Energy Fraction (component of the total charged Energy Fraction).", precision= 6)
836  proc.jetTable.variables.chFPV3EF = Var("userFloat('chFPV3EF')", float, doc="charged fromPV==3 Energy Fraction (component of the total charged Energy Fraction).", precision= 6)
837 
838  #
839  # Add variables for pileup jet ID studies.
840  #
841  proc = AddPileUpJetIDVars(proc,
842  jetName = jetName,
843  jetSrc = "updatedJets",
844  jetTableName = "jetTable",
845  jetTaskName = "jetTask"
846  )
847  #
848  # Add variables for quark guon likelihood tagger studies.
849  # Save variables as userFloats and userInts in each jet
850  #
851  proc.updatedJetsWithUserData.userFloats.qgl_axis2 = cms.InputTag("qgtagger:axis2")
852  proc.updatedJetsWithUserData.userFloats.qgl_ptD = cms.InputTag("qgtagger:ptD")
853  proc.updatedJetsWithUserData.userInts.qgl_mult = cms.InputTag("qgtagger:mult")
854  #
855  # Save quark gluon likelihood input variables variables
856  #
857  proc.jetTable.variables.qgl_axis2 = QGLVARS.qgl_axis2
858  proc.jetTable.variables.qgl_ptD = QGLVARS.qgl_ptD
859  proc.jetTable.variables.qgl_mult = QGLVARS.qgl_mult
860  #
861  # Save standard b-tagging and c-tagging variables
862  #
863  proc.jetTable.variables.btagDeepB = BTAGVARS.btagDeepB
864  proc.jetTable.variables.btagCSVV2 = BTAGVARS.btagCSVV2
865  proc.jetTable.variables.btagDeepCvL = BTAGVARS.btagDeepCvL
866  proc.jetTable.variables.btagDeepCvB = BTAGVARS.btagDeepCvB
867  #
868  # Save DeepJet b-tagging and c-tagging variables
869  #
870  proc.jetTable.variables.btagDeepFlavB = DEEPJETVARS.btagDeepFlavB
871  proc.jetTable.variables.btagDeepFlavCvL = DEEPJETVARS.btagDeepFlavCvL
872  proc.jetTable.variables.btagDeepFlavCvB = DEEPJETVARS.btagDeepFlavCvB
873  #
874  # Save DeepJet raw score for gluon and light quarks
875  #
876  proc.jetTable.variables.btagDeepFlavG = DEEPJETVARS.btagDeepFlavG
877  proc.jetTable.variables.btagDeepFlavUDS = DEEPJETVARS.btagDeepFlavUDS
878  proc.jetTable.variables.btagDeepFlavQG = DEEPJETVARS.btagDeepFlavQG
879  #
880  # Add ParticleNetAK4 scores
881  #
882  proc.jetTable.variables.particleNetAK4_B = PARTICLENETAK4VARS.particleNetAK4_B
883  proc.jetTable.variables.particleNetAK4_CvsL = PARTICLENETAK4VARS.particleNetAK4_CvsL
884  proc.jetTable.variables.particleNetAK4_CvsB = PARTICLENETAK4VARS.particleNetAK4_CvsB
885  proc.jetTable.variables.particleNetAK4_QvsG = PARTICLENETAK4VARS.particleNetAK4_QvsG
886  proc.jetTable.variables.particleNetAK4_G = PARTICLENETAK4VARS.particleNetAK4_G
887  proc.jetTable.variables.particleNetAK4_puIdDisc = PARTICLENETAK4VARS.particleNetAK4_puIdDisc
888 
889  #Adding hf shower shape producer to the jet sequence. By default this producer is not automatically rerun at the NANOAOD step
890  #The following lines make sure it is.
891  hfJetShowerShapeforCustomNanoAOD = "hfJetShowerShapeforCustomNanoAOD"
892  setattr(proc, hfJetShowerShapeforCustomNanoAOD, hfJetShowerShape.clone(jets="updatedJets", vertices="offlineSlimmedPrimaryVertices") )
893  proc.jetUserDataTask.add(getattr(proc, hfJetShowerShapeforCustomNanoAOD))
894  proc.updatedJetsWithUserData.userFloats.hfsigmaEtaEta = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:sigmaEtaEta')
895  proc.updatedJetsWithUserData.userFloats.hfsigmaPhiPhi = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:sigmaPhiPhi')
896  proc.updatedJetsWithUserData.userInts.hfcentralEtaStripSize = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:centralEtaStripSize')
897  proc.updatedJetsWithUserData.userInts.hfadjacentEtaStripsSize = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:adjacentEtaStripsSize')
898  proc.jetTable.variables.hfsigmaEtaEta = Var("userFloat('hfsigmaEtaEta')",float,doc="sigmaEtaEta for HF jets (noise discriminating variable)",precision=10)
899  proc.jetTable.variables.hfsigmaPhiPhi = Var("userFloat('hfsigmaPhiPhi')",float,doc="sigmaPhiPhi for HF jets (noise discriminating variable)",precision=10)
900  proc.jetTable.variables.hfcentralEtaStripSize = Var("userInt('hfcentralEtaStripSize')", int, doc="eta size of the central tower strip in HF (noise discriminating variable) ")
901  proc.jetTable.variables.hfadjacentEtaStripsSize = Var("userInt('hfadjacentEtaStripsSize')", int, doc="eta size of the strips next to the central tower strip in HF (noise discriminating variable) ")
902 
903  #
904  # Since AK4 Puppi jet is the main AK4 jet collection for Run-3, disable
905  # b-jets/c-jets NN-based mass regression for AK4 CHS.
906  #
907  (~run2_nanoAOD_ANY).toReplaceWith(
908  proc.jetUserDataTask,
909  proc.jetUserDataTask.copyAndExclude([proc.bJetVars])
910  ).toReplaceWith(
911  proc.jetTablesTask,
912  proc.jetTablesTask.copyAndExclude([proc.bjetNN, proc.cjetNN])
913  ).toModify(proc.updatedJetsWithUserData.userFloats,
914  leadTrackPt = None,
915  leptonPtRelv0 = None,
916  leptonPtRelInvv0 = None,
917  leptonDeltaR = None,
918  vtxPt = None,
919  vtxMass = None,
920  vtx3dL = None,
921  vtx3deL = None,
922  ptD = None,
923  ).toModify(
924  proc.updatedJetsWithUserData.userInts,
925  vtxNtrk = None,
926  leptonPdgId = None
927  ).toModify(
928  proc.jetTable, externalVariables = cms.PSet()
929  ).toReplaceWith(
930  #
931  # For Run-3, don't need to save the low pt AK4 CHS jet table for MET
932  #
933  proc.jetForMETTask,
934  proc.jetForMETTask.copyAndExclude([proc.corrT1METJetTable])
935  )
936 
937  #
938  # Save MC-only jet variables in jet table
939  #
940  if runOnMC:
941  jetMCTableName = "jet{}MCTable".format(jetName)
942  setattr(proc, jetMCTableName, proc.jetMCTable.clone(
943  src = proc.jetTable.src,
944  name = proc.jetTable.name
945  )
946  )
947  jetMCTableTaskName = "jet{}MCTablesTask".format(jetName)
948  setattr(proc, jetMCTableTaskName, cms.Task(getattr(proc,jetMCTableName)))
949 
950  (~run2_nanoAOD_ANY).toReplaceWith(
951  proc.nanoTableTaskFS,
952  proc.nanoTableTaskFS.copyAndAdd(getattr(proc,jetMCTableTaskName))
953  )
954 
955  return proc
956 
def ReclusterAK4CHSJets(proc, recoJA, runOnMC)
def Var(expr, valtype, doc=None, precision=-1)
Definition: common_cff.py:16
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def AddPileUpJetIDVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="")

◆ ReclusterAK4GenJets()

def custom_jme_cff.ReclusterAK4GenJets (   proc,
  genJA 
)
Recluster AK4 Gen jets and replace
slimmedGenJets that is used as default
to save AK4 Gen jets in NanoAODs.

Definition at line 1116 of file custom_jme_cff.py.

References print().

Referenced by PrepJMECustomNanoAOD().

1116 def ReclusterAK4GenJets(proc, genJA):
1117  """
1118  Recluster AK4 Gen jets and replace
1119  slimmedGenJets that is used as default
1120  to save AK4 Gen jets in NanoAODs.
1121  """
1122  print("custom_jme_cff::ReclusterAK4GenJets: Recluster AK4 Gen jets")
1123 
1124  #
1125  # Recluster AK4 Gen jet
1126  #
1127  cfg = {
1128  "jet" : "ak4gen",
1129  }
1130  genJetInfo = genJA.addGenJetCollection(proc, **cfg)
1131 
1132  genJetName = genJetInfo.jetUpper
1133  genJetAlgo = genJetInfo.jetAlgo
1134  genJetSize = genJetInfo.jetSize
1135  genJetSizeNr = genJetInfo.jetSizeNr
1136  selectedGenJets = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1137 
1138  #
1139  # Change jet source to the newly clustered jet collection. Set very low pt cut for jets
1140  # to be stored in the GenJet Table
1141  #
1142  proc.genJetTable.src = selectedGenJets
1143  proc.genJetTable.cut = "" # No cut specified here. Save all gen jets after clustering
1144  proc.genJetTable.doc = "AK4 Gen jets (made with visible genparticles) with pt > 3 GeV" # default pt cut after clustering is 3 GeV
1145 
1146  genJetFlavourAssociationName = "genJet{}FlavourAssociation".format(genJetName)
1147  setattr(proc, genJetFlavourAssociationName, genJetFlavourAssociation.clone(
1148  jets = proc.genJetTable.src,
1149  jetAlgorithm = supportedJetAlgos[genJetAlgo],
1150  rParam = genJetSizeNr,
1151  )
1152  )
1153  proc.jetMCTask.add(getattr(proc, genJetFlavourAssociationName))
1154  return proc
1155 
def ReclusterAK4GenJets(proc, genJA)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ ReclusterAK4PuppiJets()

def custom_jme_cff.ReclusterAK4PuppiJets (   proc,
  recoJA,
  runOnMC 
)
Recluster AK4 Puppi jets and replace slimmedJetsPuppi
that is used as default to save AK4 Puppi jets in NanoAODs.

Definition at line 575 of file custom_jme_cff.py.

References AddPileUpJetIDVars(), AddQGLTaggerVars(), and print().

Referenced by PrepJMECustomNanoAOD().

575 def ReclusterAK4PuppiJets(proc, recoJA, runOnMC):
576  """
577  Recluster AK4 Puppi jets and replace slimmedJetsPuppi
578  that is used as default to save AK4 Puppi jets in NanoAODs.
579  """
580  print("custom_jme_cff::ReclusterAK4PuppiJets: Recluster AK4 PF Puppi jets")
581 
582  #
583  # Recluster AK4 Puppi jets
584  #
585  cfg = {
586  "jet" : "ak4pfpuppi",
587  "inputCollection" : "",
588  "genJetsCollection": "AK4GenJetsNoNu",
589  "bTagDiscriminators": bTagDiscriminatorsForAK4,
590  "minPtFastjet" : 0.,
591  }
592  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
593 
594  jetName = recoJetInfo.jetUpper
595  patJetFinalColl = recoJetInfo.patJetFinalCollection
596 
597  #
598  # Set the jetID for UL 16 era
599  #
600  run2_jme_2016.toModify(
601  proc.tightJetPuppiId.filterParams, version = "RUN2UL16PUPPI"
602  ).toModify(
603  proc.tightJetIdLepVeto.filterParams, version = "RUN2UL16PUPPI"
604  )
605 
606  #
607  # Change the input jet source for jetCorrFactorsNano
608  # and updatedJets
609  #
610  proc.jetPuppiCorrFactorsNano.src=patJetFinalColl
611  proc.updatedJetsPuppi.jetSource=patJetFinalColl
612 
613  #
614  # Change pt cut
615  #
616  finalJetsPuppiCut = ""
617  if runOnMC:
618  finalJetsPuppiCut = "(pt >= 8) || ((pt < 8) && (genJetFwdRef().backRef().isNonnull()))"
619  else:
620  finalJetsPuppiCut = "(pt >= 8)"
621 
622  proc.finalJetsPuppi.cut = finalJetsPuppiCut
623  #
624  # Add a minimum pt cut for corrT1METJets.
625  #
626  proc.corrT1METJetPuppiTable.cut = "pt>=8 && pt<15 && abs(eta)<9.9"
627 
628  #
629  # Jet table
630  #
631  # For Run-2 eras, the main AK4 jet collection in NanoAOD is the CHS collection
632  run2_nanoAOD_ANY.toModify(
633  proc.jetTable, name = "Jet"
634  ).toModify(
635  # So need to change the table name for AK4 puppi here
636  proc.jetPuppiTable,
637  name = "JetPuppi",
638  src = cms.InputTag("finalJetsPuppi")
639  )
640 
641  #
642  # Jet table documentation
643  #
644  jetPuppiTableDoc = "AK4 PF Puppi jets with JECs applied. Jets with pt >= 8 GeV are stored."
645  if runOnMC:
646  jetPuppiTableDoc += "For jets with pt < 8 GeV, only those matched to AK4 Gen jets are stored."
647  proc.jetPuppiTable.doc = jetPuppiTableDoc
648 
649  proc.jetPuppiTable.variables.rawFactor.precision = 10
650 
651  #
652  # Add variables
653  #
654  proc.jetPuppiTable.variables.hfHEF = PFJETVARS.hfHEF
655  proc.jetPuppiTable.variables.hfEmEF = PFJETVARS.hfEmEF
656  proc.jetPuppiTable.variables.nConstChHads = PFJETVARS.nConstChHads
657  proc.jetPuppiTable.variables.nConstNeuHads = PFJETVARS.nConstNeuHads
658  proc.jetPuppiTable.variables.nConstHFHads = PFJETVARS.nConstHFHads
659  proc.jetPuppiTable.variables.nConstHFEMs = PFJETVARS.nConstHFEMs
660  proc.jetPuppiTable.variables.nConstMuons = PFJETVARS.nConstMuons
661  proc.jetPuppiTable.variables.nConstElecs = PFJETVARS.nConstElecs
662  proc.jetPuppiTable.variables.nConstPhotons = PFJETVARS.nConstPhotons
663 
664  #
665  # Add variables for pileup jet ID studies.
666  #
667 
668  proc = AddPileUpJetIDVars(proc,
669  jetName = jetName,
670  jetSrc = "updatedJetsPuppi",
671  jetTableName = "jetPuppiTable",
672  jetTaskName = "jetPuppiTask"
673  )
674  #
675  # Add variables for quark guon likelihood tagger studies.
676  # Save variables as userFloats and userInts in each jet
677  #
678  proc = AddQGLTaggerVars(proc,
679  jetName = jetName,
680  jetSrc = "updatedJetsPuppi",
681  jetTableName = "jetPuppiTable",
682  jetTaskName = "jetPuppiTask",
683  calculateQGLVars=True
684  )
685  #
686  # Save standard b-tagging and c-tagging variables
687  #
688  proc.jetPuppiTable.variables.btagDeepB = BTAGVARS.btagDeepB
689  proc.jetPuppiTable.variables.btagCSVV2 = BTAGVARS.btagCSVV2
690  proc.jetPuppiTable.variables.btagDeepCvL = BTAGVARS.btagDeepCvL
691  proc.jetPuppiTable.variables.btagDeepCvB = BTAGVARS.btagDeepCvB
692  #
693  # Save DeepJet b-tagging and c-tagging variables
694  #
695  proc.jetPuppiTable.variables.btagDeepFlavB = DEEPJETVARS.btagDeepFlavB
696  proc.jetPuppiTable.variables.btagDeepFlavCvL = DEEPJETVARS.btagDeepFlavCvL
697  proc.jetPuppiTable.variables.btagDeepFlavCvB = DEEPJETVARS.btagDeepFlavCvB
698  #
699  # Save DeepJet raw score for gluon and light quarks
700  #
701  proc.jetPuppiTable.variables.btagDeepFlavG = DEEPJETVARS.btagDeepFlavG
702  proc.jetPuppiTable.variables.btagDeepFlavUDS = DEEPJETVARS.btagDeepFlavUDS
703  proc.jetPuppiTable.variables.btagDeepFlavQG = DEEPJETVARS.btagDeepFlavQG
704  #
705  # Add ParticleNetAK4 scores
706  #
707  proc.jetPuppiTable.variables.particleNetAK4_B = PARTICLENETAK4VARS.particleNetAK4_B
708  proc.jetPuppiTable.variables.particleNetAK4_CvsL = PARTICLENETAK4VARS.particleNetAK4_CvsL
709  proc.jetPuppiTable.variables.particleNetAK4_CvsB = PARTICLENETAK4VARS.particleNetAK4_CvsB
710  proc.jetPuppiTable.variables.particleNetAK4_QvsG = PARTICLENETAK4VARS.particleNetAK4_QvsG
711  proc.jetPuppiTable.variables.particleNetAK4_G = PARTICLENETAK4VARS.particleNetAK4_G
712  proc.jetPuppiTable.variables.particleNetAK4_puIdDisc = PARTICLENETAK4VARS.particleNetAK4_puIdDisc
713 
714  #
715  # For Run-2 eras, don't need to save the low pt AK4 Puppi jet table for MET
716  #
717  run2_nanoAOD_ANY.toReplaceWith(
718  proc.jetPuppiForMETTask,
719  proc.jetPuppiForMETTask.copyAndExclude([proc.corrT1METJetPuppiTable])
720  )
721 
722  #
723  # Save MC-only jet variables in jet table
724  #
725  if runOnMC:
726 
727  jetMCTableName = "jet{}MCTable".format(jetName)
728  setattr(proc, jetMCTableName, proc.jetMCTable.clone(
729  src = proc.jetPuppiTable.src,
730  name = proc.jetPuppiTable.name
731  )
732  )
733  jetMCTableTaskName = "jet{}MCTablesTask".format(jetName)
734  setattr(proc, jetMCTableTaskName, cms.Task(getattr(proc,jetMCTableName)))
735 
736  run2_nanoAOD_ANY.toReplaceWith(
737  proc.nanoTableTaskFS,
738  proc.nanoTableTaskFS.copyAndAdd( getattr(proc,jetMCTableTaskName))
739  )
740 
741  return proc
742 
def AddQGLTaggerVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="", calculateQGLVars=False)
def ReclusterAK4PuppiJets(proc, recoJA, runOnMC)
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47
def AddPileUpJetIDVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="")

◆ RemoveAllJetPtCuts()

def custom_jme_cff.RemoveAllJetPtCuts (   proc)
Remove default pt cuts for all jets set in jets_cff.py

Definition at line 1195 of file custom_jme_cff.py.

Referenced by PrepJMECustomNanoAOD().

1195 def RemoveAllJetPtCuts(proc):
1196  """
1197  Remove default pt cuts for all jets set in jets_cff.py
1198  """
1199 
1200  proc.finalJets.cut = "" # 15 -> 10
1201  proc.finalJetsPuppi.cut = "" # 15 -> 10
1202  proc.finalJetsAK8.cut = "" # 170 -> 170
1203  proc.genJetTable.cut = "" # 10 -> 8
1204  proc.genJetFlavourTable.cut = "" # 10 -> 8
1205  proc.genJetAK8Table.cut = "" # 100 -> 80
1206  proc.genJetAK8FlavourTable.cut = "" # 100 -> 80
1207 
1208  return proc
1209 
1210 #===========================================================================
1211 #
1212 # CUSTOMIZATION function
1213 #
1214 #===========================================================================
def RemoveAllJetPtCuts(proc)

◆ SaveGenJets()

def custom_jme_cff.SaveGenJets (   proc,
  genJetName,
  genJetAlgo,
  genJetSizeNr,
  genJetFinalColl,
  genJetTablePrefix,
  genJetTableDoc,
  runOnMC = False 
)
Schedule modules for a given genJet collection and save its variables into custom NanoAOD

Definition at line 1073 of file custom_jme_cff.py.

Referenced by AddNewAK8GenJetsForJEC(), and AddNewGenJets().

1073 def SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False):
1074  """
1075  Schedule modules for a given genJet collection and save its variables into custom NanoAOD
1076  """
1077 
1078  genJetTableName = "jet{}Table".format(genJetName)
1079  setattr(proc, genJetTableName, genJetTable.clone(
1080  src = genJetFinalColl,
1081  cut = "", # No cut specified here. Save all gen jets after clustering
1082  name = genJetTablePrefix,
1083  doc = genJetTableDoc,
1084  variables = GENJETVARS
1085  )
1086  )
1087 
1088  genJetFlavourAssociationName = "genJet{}FlavourAssociation".format(genJetName)
1089  setattr(proc, genJetFlavourAssociationName, genJetFlavourAssociation.clone(
1090  jets = getattr(proc,genJetTableName).src,
1091  jetAlgorithm = supportedJetAlgos[genJetAlgo],
1092  rParam = genJetSizeNr,
1093  )
1094  )
1095 
1096  genJetFlavourTableName = "genJet{}FlavourTable".format(genJetName)
1097  setattr(proc, genJetFlavourTableName, genJetFlavourTable.clone(
1098  name = getattr(proc,genJetTableName).name,
1099  src = getattr(proc,genJetTableName).src,
1100  cut = getattr(proc,genJetTableName).cut,
1101  jetFlavourInfos = genJetFlavourAssociationName,
1102  )
1103  )
1104 
1105  genJetTaskName = "genJet{}Task".format(genJetName)
1106  setattr(proc, genJetTaskName, cms.Task(
1107  getattr(proc,genJetTableName),
1108  getattr(proc,genJetFlavourAssociationName),
1109  getattr(proc,genJetFlavourTableName)
1110  )
1111  )
1112  proc.jetMCTask.add(getattr(proc,genJetTaskName))
1113 
1114  return proc
1115 
def SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)

◆ SavePatJets()

def custom_jme_cff.SavePatJets (   proc,
  jetName,
  payload,
  patJetFinalColl,
  jetTablePrefix,
  jetTableDoc,
  doPF,
  doCalo,
  ptcut,
  doPUIDVar = False,
  doQGL = False,
  doBTag = False,
  runOnMC = False 
)
Schedule modules for a given patJet collection and save its variables into custom NanoAOD

Definition at line 433 of file custom_jme_cff.py.

References AddBTaggingScores(), AddDeepJetGluonLQuarkScores(), AddJetID(), AddParticleNetAK4Scores(), AddPileUpJetIDVars(), AddQGLTaggerVars(), and common_cff.Var().

Referenced by AddNewAK8CHSJets(), AddNewAK8PuppiJetsForJEC(), and AddNewPatJets().

433  doPF, doCalo, ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=False):
434  """
435  Schedule modules for a given patJet collection and save its variables into custom NanoAOD
436  """
437 
438  #
439  # Setup jet correction factors
440  #
441  jetCorrFactors = "jetCorrFactorsNano{}".format(jetName)
442  setattr(proc, jetCorrFactors, jetCorrFactorsNano.clone(
443  src = patJetFinalColl,
444  payload = payload,
445  )
446  )
447 
448  #
449  # Update jets
450  #
451  srcJets = "updatedJets{}".format(jetName)
452  setattr(proc, srcJets, updatedJets.clone(
453  jetSource = patJetFinalColl,
454  jetCorrFactorsSource = [jetCorrFactors],
455  )
456  )
457 
458  #
459  # Setup UserDataEmbedder
460  #
461  srcJetsWithUserData = "updatedJets{}WithUserData".format(jetName)
462  setattr(proc, srcJetsWithUserData, cms.EDProducer("PATJetUserDataEmbedder",
463  src = cms.InputTag(srcJets),
464  userFloats = cms.PSet(),
465  userInts = cms.PSet(),
466  )
467  )
468 
469  #
470  # Filter jets with pt cut
471  #
472  finalJetsCut = "(pt >= {ptcut:.0f})".format(ptcut=ptcut)
473  if runOnMC:
474  finalJetsCut = "(pt >= {ptcut:.0f}) || ((pt < {ptcut:.0f}) && (genJetFwdRef().backRef().isNonnull()))".format(ptcut=ptcut)
475 
476  finalJetsForTable = "finalJets{}".format(jetName)
477  setattr(proc, finalJetsForTable, finalJets.clone(
478  src = srcJetsWithUserData,
479  cut = finalJetsCut
480  )
481  )
482 
483  #
484  # Save jets in table
485  #
486  tableContent = PFJETVARS
487  if doCalo:
488  tableContent = CALOJETVARS
489 
490  jetTableCutDefault = "" #Don't apply any cuts for the table.
491 
492  jetTableDocDefault = jetTableDoc + " with JECs applied. Jets with pt >= {ptcut:.0f} GeV are stored.".format(ptcut=ptcut)
493  if runOnMC:
494  jetTableDocDefault += "For jets with pt < {ptcut:.0f} GeV, only those matched to gen jets are stored.".format(ptcut=ptcut)
495 
496  if doCalo:
497  jetTableDocDefault = jetTableDoc
498 
499  jetTableName = "jet{}Table".format(jetName)
500  setattr(proc,jetTableName, simpleCandidateFlatTableProducer.clone(
501  src = cms.InputTag(finalJetsForTable),
502  cut = cms.string(jetTableCutDefault),
503  name = cms.string(jetTablePrefix),
504  doc = cms.string(jetTableDocDefault),
505  variables = cms.PSet(tableContent)
506  )
507  )
508  getattr(proc,jetTableName).variables.pt.precision=10
509  getattr(proc,jetTableName).variables.rawFactor.precision=10
510 
511  #
512  # Save MC-only jet variables in table
513  #
514  jetMCTableName = "jet{}MCTable".format(jetName)
515  setattr(proc, jetMCTableName, simpleCandidateFlatTableProducer.clone(
516  src = cms.InputTag(finalJetsForTable),
517  cut = getattr(proc,jetTableName).cut,
518  name = cms.string(jetTablePrefix),
519  extension = cms.bool(True), # this is an extension table
520  variables = cms.PSet(
521  partonFlavour = Var("partonFlavour()", int, doc="flavour from parton matching"),
522  hadronFlavour = Var("hadronFlavour()", int, doc="flavour from hadron ghost clustering"),
523  genJetIdx = Var("?genJetFwdRef().backRef().isNonnull()?genJetFwdRef().backRef().key():-1", int, doc="index of matched gen jet"),
524  )
525  )
526  )
527 
528  #
529  # Define the jet modules Task first
530  #
531  jetTaskName = "jet{}Task".format(jetName)
532  setattr(proc, jetTaskName, cms.Task(
533  getattr(proc,jetCorrFactors),
534  getattr(proc,srcJets),
535  getattr(proc,srcJetsWithUserData),
536  getattr(proc,finalJetsForTable)
537  )
538  )
539  proc.nanoTableTaskCommon.add(getattr(proc,jetTaskName))
540 
541  #
542  # Define the jet tables Task
543  #
544  jetTableTaskName = "jet{}TablesTask".format(jetName)
545  setattr(proc, jetTableTaskName, cms.Task(getattr(proc,jetTableName)))
546  proc.nanoTableTaskCommon.add(getattr(proc,jetTableTaskName))
547 
548  jetMCTableTaskName = "jet{}MCTablesTask".format(jetName)
549  setattr(proc, jetMCTableTaskName, cms.Task(getattr(proc,jetMCTableName)))
550  if runOnMC:
551  proc.nanoTableTaskFS.add(getattr(proc,jetMCTableTaskName))
552 
553  #
554  # Schedule plugins to calculate Jet ID, PileUp Jet ID input variables, and Quark-Gluon Likehood input variables.
555  #
556  if doPF:
557  proc = AddJetID(proc, jetName=jetName, jetSrc=srcJets, jetTableName=jetTableName, jetTaskName=jetTaskName)
558  if doPUIDVar:
559  proc = AddPileUpJetIDVars(proc, jetName=jetName, jetSrc=srcJets, jetTableName=jetTableName, jetTaskName=jetTaskName)
560  if doQGL:
561  proc = AddQGLTaggerVars(proc,jetName=jetName, jetSrc=srcJets, jetTableName=jetTableName, jetTaskName=jetTaskName, calculateQGLVars=True)
562 
563  #
564  # Save b-tagging algorithm scores. Should only be done for jet collection with b-tagging
565  # calculated when reclustered or collection saved with b-tagging info in MiniAOD
566  #
567  if doBTag:
568  AddBTaggingScores(proc,jetTableName=jetTableName)
569  AddDeepJetGluonLQuarkScores(proc,jetTableName=jetTableName)
570  AddParticleNetAK4Scores(proc,jetTableName=jetTableName)
571 
572  return proc
573 
574 
def AddBTaggingScores(proc, jetTableName="")
def AddQGLTaggerVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="", calculateQGLVars=False)
def Var(expr, valtype, doc=None, precision=-1)
Definition: common_cff.py:16
def AddDeepJetGluonLQuarkScores(proc, jetTableName="")
def AddJetID(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="")
def AddParticleNetAK4Scores(proc, jetTableName="")
def AddPileUpJetIDVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="")

Variable Documentation

◆ area

◆ bTagCSVV2

custom_jme_cff.bTagCSVV2

Definition at line 23 of file custom_jme_cff.py.

◆ btagCSVV2

custom_jme_cff.btagCSVV2

Definition at line 168 of file custom_jme_cff.py.

◆ btagDDX

custom_jme_cff.btagDDX

Definition at line 36 of file custom_jme_cff.py.

◆ btagDDXV2

custom_jme_cff.btagDDXV2

Definition at line 44 of file custom_jme_cff.py.

◆ btagDeepB

custom_jme_cff.btagDeepB

Definition at line 167 of file custom_jme_cff.py.

◆ bTagDeepCSV

custom_jme_cff.bTagDeepCSV

Definition at line 24 of file custom_jme_cff.py.

◆ btagDeepCvB

custom_jme_cff.btagDeepCvB

Definition at line 170 of file custom_jme_cff.py.

◆ btagDeepCvL

custom_jme_cff.btagDeepCvL

Definition at line 169 of file custom_jme_cff.py.

◆ btagDeepFlavB

custom_jme_cff.btagDeepFlavB

Definition at line 173 of file custom_jme_cff.py.

◆ btagDeepFlavC

custom_jme_cff.btagDeepFlavC

Definition at line 174 of file custom_jme_cff.py.

◆ btagDeepFlavCvB

custom_jme_cff.btagDeepFlavCvB

Definition at line 178 of file custom_jme_cff.py.

◆ btagDeepFlavCvL

custom_jme_cff.btagDeepFlavCvL

Definition at line 177 of file custom_jme_cff.py.

◆ btagDeepFlavG

custom_jme_cff.btagDeepFlavG

Definition at line 175 of file custom_jme_cff.py.

◆ btagDeepFlavQG

custom_jme_cff.btagDeepFlavQG

Definition at line 179 of file custom_jme_cff.py.

◆ btagDeepFlavUDS

custom_jme_cff.btagDeepFlavUDS

Definition at line 176 of file custom_jme_cff.py.

◆ bTagDeepJet

custom_jme_cff.bTagDeepJet

Definition at line 25 of file custom_jme_cff.py.

◆ bTagDiscriminatorsForAK4

custom_jme_cff.bTagDiscriminatorsForAK4

Definition at line 30 of file custom_jme_cff.py.

◆ btagHbb

custom_jme_cff.btagHbb

Definition at line 35 of file custom_jme_cff.py.

◆ BTAGVARS

custom_jme_cff.BTAGVARS

Definition at line 166 of file custom_jme_cff.py.

◆ CALOJETVARS

custom_jme_cff.CALOJETVARS

Definition at line 190 of file custom_jme_cff.py.

◆ chEmEF

custom_jme_cff.chEmEF

Definition at line 130 of file custom_jme_cff.py.

◆ chHEF

custom_jme_cff.chHEF

Definition at line 128 of file custom_jme_cff.py.

◆ config_genjets

custom_jme_cff.config_genjets

Definition at line 56 of file custom_jme_cff.py.

◆ config_recojets

custom_jme_cff.config_recojets

Definition at line 79 of file custom_jme_cff.py.

◆ DEEPJETVARS

custom_jme_cff.DEEPJETVARS

Definition at line 172 of file custom_jme_cff.py.

◆ doc

custom_jme_cff.doc

Definition at line 126 of file custom_jme_cff.py.

◆ emf

◆ float

custom_jme_cff.float

Definition at line 126 of file custom_jme_cff.py.

◆ GENJETVARS

custom_jme_cff.GENJETVARS

Definition at line 122 of file custom_jme_cff.py.

◆ hfEmEF

custom_jme_cff.hfEmEF

Definition at line 134 of file custom_jme_cff.py.

◆ hfHEF

custom_jme_cff.hfHEF

Definition at line 133 of file custom_jme_cff.py.

◆ int

custom_jme_cff.int

Definition at line 138 of file custom_jme_cff.py.

◆ muEF

custom_jme_cff.muEF

Definition at line 132 of file custom_jme_cff.py.

◆ nanoInfo_genjets

custom_jme_cff.nanoInfo_genjets

Definition at line 66 of file custom_jme_cff.py.

◆ nanoInfo_recojets

custom_jme_cff.nanoInfo_recojets

Definition at line 105 of file custom_jme_cff.py.

◆ nConstChHads

custom_jme_cff.nConstChHads

Definition at line 138 of file custom_jme_cff.py.

◆ nConstElecs

custom_jme_cff.nConstElecs

Definition at line 143 of file custom_jme_cff.py.

◆ nConstHFEMs

custom_jme_cff.nConstHFEMs

Definition at line 141 of file custom_jme_cff.py.

◆ nConstHFHads

custom_jme_cff.nConstHFHads

Definition at line 140 of file custom_jme_cff.py.

◆ nConstituents

◆ nConstMuons

custom_jme_cff.nConstMuons

Definition at line 142 of file custom_jme_cff.py.

◆ nConstNeuHads

custom_jme_cff.nConstNeuHads

Definition at line 139 of file custom_jme_cff.py.

◆ nConstPhotons

custom_jme_cff.nConstPhotons

Definition at line 144 of file custom_jme_cff.py.

◆ neEmEF

custom_jme_cff.neEmEF

Definition at line 131 of file custom_jme_cff.py.

◆ neHEF

custom_jme_cff.neHEF

Definition at line 129 of file custom_jme_cff.py.

◆ nElectrons

◆ nMuons

◆ particleNetAK4_B

custom_jme_cff.particleNetAK4_B

Definition at line 182 of file custom_jme_cff.py.

◆ particleNetAK4_CvsB

custom_jme_cff.particleNetAK4_CvsB

Definition at line 184 of file custom_jme_cff.py.

◆ particleNetAK4_CvsL

custom_jme_cff.particleNetAK4_CvsL

Definition at line 183 of file custom_jme_cff.py.

◆ particleNetAK4_G

custom_jme_cff.particleNetAK4_G

Definition at line 186 of file custom_jme_cff.py.

◆ particleNetAK4_puIdDisc

custom_jme_cff.particleNetAK4_puIdDisc

Definition at line 187 of file custom_jme_cff.py.

◆ particleNetAK4_QvsG

custom_jme_cff.particleNetAK4_QvsG

Definition at line 185 of file custom_jme_cff.py.

◆ PARTICLENETAK4VARS

custom_jme_cff.PARTICLENETAK4VARS

Definition at line 181 of file custom_jme_cff.py.

◆ PFJETVARS

custom_jme_cff.PFJETVARS

Definition at line 125 of file custom_jme_cff.py.

◆ precision

custom_jme_cff.precision

Definition at line 126 of file custom_jme_cff.py.

◆ puId_beta

custom_jme_cff.puId_beta

Definition at line 155 of file custom_jme_cff.py.

◆ puId_dR2Mean

custom_jme_cff.puId_dR2Mean

Definition at line 147 of file custom_jme_cff.py.

◆ puId_frac01

custom_jme_cff.puId_frac01

Definition at line 150 of file custom_jme_cff.py.

◆ puId_frac02

custom_jme_cff.puId_frac02

Definition at line 151 of file custom_jme_cff.py.

◆ puId_frac03

custom_jme_cff.puId_frac03

Definition at line 152 of file custom_jme_cff.py.

◆ puId_frac04

custom_jme_cff.puId_frac04

Definition at line 153 of file custom_jme_cff.py.

◆ puId_jetR

custom_jme_cff.puId_jetR

Definition at line 157 of file custom_jme_cff.py.

◆ puId_jetRchg

custom_jme_cff.puId_jetRchg

Definition at line 158 of file custom_jme_cff.py.

◆ puId_majW

custom_jme_cff.puId_majW

Definition at line 148 of file custom_jme_cff.py.

◆ puId_minW

custom_jme_cff.puId_minW

Definition at line 149 of file custom_jme_cff.py.

◆ puId_nCharged

custom_jme_cff.puId_nCharged

Definition at line 159 of file custom_jme_cff.py.

◆ puId_ptD

custom_jme_cff.puId_ptD

Definition at line 154 of file custom_jme_cff.py.

◆ puId_pull

custom_jme_cff.puId_pull

Definition at line 156 of file custom_jme_cff.py.

◆ PUIDVARS

custom_jme_cff.PUIDVARS

Definition at line 146 of file custom_jme_cff.py.

◆ qgl_axis2

custom_jme_cff.qgl_axis2

Definition at line 162 of file custom_jme_cff.py.

◆ qgl_mult

custom_jme_cff.qgl_mult

Definition at line 164 of file custom_jme_cff.py.

◆ qgl_ptD

custom_jme_cff.qgl_ptD

Definition at line 163 of file custom_jme_cff.py.

◆ QGLVARS

custom_jme_cff.QGLVARS

Definition at line 161 of file custom_jme_cff.py.

◆ rawFactor

custom_jme_cff.rawFactor

Definition at line 126 of file custom_jme_cff.py.