CMS 3D CMS Logo

Functions | Variables
custom_jme_cff Namespace Reference

Functions

def AddBTaggingScores (proc, jetTableName="")
 
def AddDeepJetGluonLQuarkScores (proc, jetTableName="")
 
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 AddRobustParTAK4Scores (proc, jetTableName="")
 
def AddUnifiedParTAK4Scores (proc, jetTableName="")
 
def AddVariablesForAK4GenJets (proc)
 
def AddVariablesForAK8GenJets (proc)
 
def AddVariablesForAK8PuppiJets (proc)
 
def ModifyAK4JetMCTable (proc)
 
def PrepJMECustomNanoAOD (process)
 
def ReclusterAK4CHSJets (proc, recoJA, runOnMC)
 
def ReclusterAK4GenJets (proc, genJA)
 
def ReclusterAK4PuppiJets (proc, recoJA, runOnMC)
 
def RecomputePuppiMET (proc)
 
def RecomputePuppiWeights (proc)
 
def RecomputePuppiWeightsAndMET (proc)
 
def RecomputePuppiWeightsMETAK8 (proc)
 
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
 
 btagDeepB
 
 bTagDeepCSV
 
 btagDeepCvB
 
 btagDeepCvL
 
 btagDeepFlavB
 
 btagDeepFlavC
 
 btagDeepFlavCvB
 
 btagDeepFlavCvL
 
 btagDeepFlavG
 
 btagDeepFlavQG
 
 btagDeepFlavUDS
 
 bTagDeepJet
 
 bTagDiscriminatorsForAK4
 
 btagRobustParTAK4B
 
 btagRobustParTAK4C
 
 btagRobustParTAK4CvB
 
 btagRobustParTAK4CvL
 
 btagRobustParTAK4G
 
 btagRobustParTAK4QG
 
 btagRobustParTAK4UDS
 
 btagUParTAK4B
 
 btagUParTAK4CvB
 
 btagUParTAK4CvL
 
 btagUParTAK4QvG
 
 btagUParTAK4SvCB
 
 btagUParTAK4SvUDG
 
 btagUParTAK4TauVJet
 
 btagUParTAK4UDG
 
 BTAGVARS
 
 CALOJETVARS
 
 chEmEF
 
 chHadMultiplicity
 
 chHEF
 
 config_genjets
 
 config_recojets
 
 DEEPJETVARS
 
 doc
 
 elMultiplicity
 
 emf
 
 float
 
 foo
 
 genJetIdx
 
 GENJETVARS
 
 hadronFlavour
 
 hfEmEF
 
 hfEMMultiplicity
 
 hfHadMultiplicity
 
 hfHEF
 
 muEF
 
 muMultiplicity
 
 nanoInfo_genjets
 
 nanoInfo_recojets
 
 nConstituents
 
 neEmEF
 
 neHadMultiplicity
 
 neHEF
 
 nElectrons
 
 nMuons
 
 particleNetAK4_B
 
 particleNetAK4_CvsB
 
 particleNetAK4_CvsL
 
 particleNetAK4_G
 
 particleNetAK4_puIdDisc
 
 particleNetAK4_QvsG
 
 PARTICLENETAK4VARS
 
 partonFlavour
 
 PFJETVARS
 
 phoMultiplicity
 
 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
 
 ROBUSTPARTAK4VARS
 
 UNIFIEDPARTAK4VARS
 
 UParTAK4RegPtRawCorr
 
 UParTAK4RegPtRawCorrNeutrino
 
 UParTAK4RegPtRawRes
 

Function Documentation

◆ AddBTaggingScores()

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

Definition at line 324 of file custom_jme_cff.py.

References common_cff.Var().

Referenced by SavePatJets().

324 def AddBTaggingScores(proc, jetTableName=""):
325  """
326  Store b-tagging scores from various algortihm
327  """
328 
329  getattr(proc, jetTableName).variables.btagDeepFlavB = DEEPJETVARS.btagDeepFlavB
330  getattr(proc, jetTableName).variables.btagDeepFlavCvL = DEEPJETVARS.btagDeepFlavCvL
331  getattr(proc, jetTableName).variables.btagDeepFlavCvB = DEEPJETVARS.btagDeepFlavCvB
332 
333  run2_nanoAOD_ANY.toModify(
334  getattr(proc, jetTableName).variables,
335  btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10),
336  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),
337  btagDeepCvL = Var("?bDiscriminator('pfDeepCSVJetTags:probc')>=0?bDiscriminator('pfDeepCSVJetTags:probc')/(bDiscriminator('pfDeepCSVJetTags:probc')+bDiscriminator('pfDeepCSVJetTags:probudsg')):-1", float,doc="DeepCSV c vs udsg discriminator",precision=10),
338  btagDeepCvB = Var("?bDiscriminator('pfDeepCSVJetTags:probc')>=0?bDiscriminator('pfDeepCSVJetTags:probc')/(bDiscriminator('pfDeepCSVJetTags:probc')+bDiscriminator('pfDeepCSVJetTags:probb')+bDiscriminator('pfDeepCSVJetTags:probbb')):-1",float,doc="DeepCSV c vs b+bb discriminator",precision=10)
339  )
340 
341  return proc
342 
def AddBTaggingScores(proc, jetTableName="")
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17

◆ AddDeepJetGluonLQuarkScores()

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

Definition at line 343 of file custom_jme_cff.py.

Referenced by SavePatJets().

343 def AddDeepJetGluonLQuarkScores(proc, jetTableName=""):
344  """
345  Store DeepJet raw score in jetTable for gluon and light quark
346  """
347 
348  getattr(proc, jetTableName).variables.btagDeepFlavG = DEEPJETVARS.btagDeepFlavG
349  getattr(proc, jetTableName).variables.btagDeepFlavUDS = DEEPJETVARS.btagDeepFlavUDS
350  getattr(proc, jetTableName).variables.btagDeepFlavQG = DEEPJETVARS.btagDeepFlavQG
351 
352  return proc
353 
def AddDeepJetGluonLQuarkScores(proc, jetTableName="")

◆ AddNewAK8CHSJets()

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

Definition at line 1017 of file custom_jme_cff.py.

References print(), and SavePatJets().

1017 def AddNewAK8CHSJets(proc, recoJA, runOnMC):
1018  """
1019  Store an AK8 CHS jet collection for JEC studies.
1020  """
1021  print("custom_jme_cff::AddNewAK8CHSJets: Make a new AK8 PF CHS jet collection for JEC studies")
1022 
1023  #
1024  # Recluster AK8 CHS jets
1025  #
1026  cfg = {
1027  "jet" : "ak8pfchs",
1028  "inputCollection" : "",
1029  "genJetsCollection": "AK8GenJetsNoNu",
1030  "minPtFastjet" : 0., # Remove any pt threshold at the jet clustering stage.
1031  }
1032  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
1033 
1034  jetName = recoJetInfo.jetUpper
1035  payload = recoJetInfo.jetCorrPayload
1036 
1037  patJetFinalColl = recoJetInfo.patJetFinalCollection
1038  jetTablePrefix = "FatJetCHS"
1039  jetTableDoc = "AK8 PF CHS jets with JECs applied. Reclustered for JEC studies so only minimal info stored."
1040  ptcut = 15
1041 
1042  SavePatJets(proc,
1043  jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF=True,
1044  doCalo=False, ptcut=ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=runOnMC
1045  )
1046 
1047  return proc
1048 
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 1184 of file custom_jme_cff.py.

References print(), and SaveGenJets().

Referenced by PrepJMECustomNanoAOD().

1184 def AddNewAK8GenJetsForJEC(proc, genJA):
1185  """
1186  Make a separate AK8 Gen jet collection for JEC studies.
1187  """
1188  print("custom_jme_cff::AddNewAK8GenJetsForJEC: Add new AK8 Gen jets for JEC studies")
1189 
1190  #
1191  # Recluster AK8 Gen jet
1192  #
1193  cfg = {
1194  "jet" : "ak8gen",
1195  "minPtFastjet" : 10.
1196  }
1197  genJetInfo = genJA.addGenJetCollection(proc, **cfg)
1198 
1199  genJetName = genJetInfo.jetUpper
1200  genJetAlgo = genJetInfo.jetAlgo
1201  genJetSize = genJetInfo.jetSize
1202  genJetSizeNr = genJetInfo.jetSizeNr
1203  genJetFinalColl = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1204  genJetTablePrefix = "GenJetAK8ForJEC"
1205  genJetTableDoc = "AK8 Gen jets (made with visible genparticles) with pt > 10 GeV. Reclustered for JEC studies."
1206 
1207  SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
1208 
1209  return proc
1210 
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 984 of file custom_jme_cff.py.

References print(), and SavePatJets().

Referenced by PrepJMECustomNanoAOD().

984 def AddNewAK8PuppiJetsForJEC(proc, recoJA, runOnMC):
985  """
986  Store a separate AK8 Puppi jet collection for JEC studies.
987  Only minimal info are stored
988  """
989  print("custom_jme_cff::AddNewAK8PuppiJetsForJEC: Make a new AK8 PF Puppi jet collection for JEC studies")
990 
991  #
992  # Recluster AK8 Puppi jets
993  #
994  cfg = {
995  "jet" : "ak8pfpuppi",
996  "inputCollection" : "",
997  "genJetsCollection": "AK8GenJetsNoNu",
998  "minPtFastjet" : 0., # Remove any pt threshold at the jet clustering stage.
999  }
1000  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
1001 
1002  jetName = recoJetInfo.jetUpper
1003  payload = recoJetInfo.jetCorrPayload
1004 
1005  patJetFinalColl = recoJetInfo.patJetFinalCollection
1006  jetTablePrefix = "FatJetForJEC"
1007  jetTableDoc = "AK8 PF Puppi jets with JECs applied. Reclustered for JEC studies so only minimal info stored."
1008  ptcut = 15
1009 
1010  SavePatJets(proc,
1011  jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF=True,
1012  doCalo=False, ptcut=ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=runOnMC
1013  )
1014 
1015  return proc
1016 
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 1083 of file custom_jme_cff.py.

References SaveGenJets().

Referenced by PrepJMECustomNanoAOD().

1083 def AddNewGenJets(proc, genJetInfo):
1084  """
1085  Add genJet into custom nanoAOD
1086  """
1087 
1088  genJetName = genJetInfo.jetUpper
1089  genJetAlgo = genJetInfo.jetAlgo
1090  genJetSize = genJetInfo.jetSize
1091  genJetSizeNr = genJetInfo.jetSizeNr
1092  genJetFinalColl = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1093  genJetTablePrefix = nanoInfo_genjets[genJetInfo.jet]["name"]
1094  genJetTableDoc = nanoInfo_genjets[genJetInfo.jet]["doc"]
1095 
1096  SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
1097 
1098  return proc
1099 
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 398 of file custom_jme_cff.py.

References SavePatJets().

Referenced by PrepJMECustomNanoAOD().

398 def AddNewPatJets(proc, recoJetInfo, runOnMC):
399  """
400  Add patJet into custom nanoAOD
401  """
402 
403  jetName = recoJetInfo.jetUpper
404  payload = recoJetInfo.jetCorrPayload
405  doPF = recoJetInfo.doPF
406  doCalo = recoJetInfo.doCalo
407  patJetFinalColl = recoJetInfo.patJetFinalCollection
408 
409  nanoInfoForJet = nanoInfo_recojets[recoJetInfo.jet]
410  jetTablePrefix = nanoInfoForJet["name"]
411  jetTableDoc = nanoInfoForJet["doc"]
412  ptcut = nanoInfoForJet["ptcut"] if "ptcut" in nanoInfoForJet else 8
413  doPUIDVar = nanoInfoForJet["doPUIDVar"] if "doPUIDVar" in nanoInfoForJet else False
414  doQGL = nanoInfoForJet["doQGL"] if "doQGL" in nanoInfoForJet else False
415  doBTag = nanoInfoForJet["doBTag"] if "doBTag" in nanoInfoForJet else False
416 
417  SavePatJets(proc,
418  jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF, doCalo,
419  ptcut=ptcut, doPUIDVar=doPUIDVar, doQGL=doQGL, doBTag=doBTag, runOnMC=runOnMC
420  )
421 
422  return proc
423 
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 384 of file custom_jme_cff.py.

Referenced by SavePatJets().

384 def AddParticleNetAK4Scores(proc, jetTableName=""):
385  """
386  Store ParticleNetAK4 scores in jetTable
387  """
388 
389  getattr(proc, jetTableName).variables.particleNetAK4_B = PARTICLENETAK4VARS.particleNetAK4_B
390  getattr(proc, jetTableName).variables.particleNetAK4_CvsL = PARTICLENETAK4VARS.particleNetAK4_CvsL
391  getattr(proc, jetTableName).variables.particleNetAK4_CvsB = PARTICLENETAK4VARS.particleNetAK4_CvsB
392  getattr(proc, jetTableName).variables.particleNetAK4_QvsG = PARTICLENETAK4VARS.particleNetAK4_QvsG
393  getattr(proc, jetTableName).variables.particleNetAK4_G = PARTICLENETAK4VARS.particleNetAK4_G
394  getattr(proc, jetTableName).variables.particleNetAK4_puIdDisc = PARTICLENETAK4VARS.particleNetAK4_puIdDisc
395 
396  return proc
397 
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 219 of file custom_jme_cff.py.

References PVValHelper.add().

Referenced by ReclusterAK4PuppiJets(), and SavePatJets().

219 def AddPileUpJetIDVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName=""):
220  """
221  Setup modules to calculate pileup jet ID input variables for PF jet
222  """
223 
224  #
225  # Calculate pileup jet ID variables
226  #
227  puJetIdVarsCalculator = "puJetIdCalculator{}".format(jetName)
228  setattr(proc, puJetIdVarsCalculator, pileupJetIdCalculator.clone(
229  jets = jetSrc,
230  vertexes = "offlineSlimmedPrimaryVertices",
231  inputIsCorrected = True,
232  applyJec = False,
233  srcConstituentWeights = "packedpuppi" if "PUPPI" in jetName.upper() else ""
234  )
235  )
236  getattr(proc,jetTaskName).add(getattr(proc, puJetIdVarsCalculator))
237 
238  #
239  # Get the variables
240  #
241  puJetIDVar = "puJetIDVar{}".format(jetName)
242  setattr(proc, puJetIDVar, cms.EDProducer("PileupJetIDVarProducer",
243  srcJet = cms.InputTag(jetSrc),
244  srcPileupJetId = cms.InputTag(puJetIdVarsCalculator)
245  )
246  )
247  getattr(proc,jetTaskName).add(getattr(proc, puJetIDVar))
248 
249  #
250  # Save variables as userFloats and userInts for each jet
251  #
252  patJetWithUserData = "{}WithUserData".format(jetSrc)
253  getattr(proc,patJetWithUserData).userFloats.puId_dR2Mean = cms.InputTag("{}:dR2Mean".format(puJetIDVar))
254  getattr(proc,patJetWithUserData).userFloats.puId_majW = cms.InputTag("{}:majW".format(puJetIDVar))
255  getattr(proc,patJetWithUserData).userFloats.puId_minW = cms.InputTag("{}:minW".format(puJetIDVar))
256  getattr(proc,patJetWithUserData).userFloats.puId_frac01 = cms.InputTag("{}:frac01".format(puJetIDVar))
257  getattr(proc,patJetWithUserData).userFloats.puId_frac02 = cms.InputTag("{}:frac02".format(puJetIDVar))
258  getattr(proc,patJetWithUserData).userFloats.puId_frac03 = cms.InputTag("{}:frac03".format(puJetIDVar))
259  getattr(proc,patJetWithUserData).userFloats.puId_frac04 = cms.InputTag("{}:frac04".format(puJetIDVar))
260  getattr(proc,patJetWithUserData).userFloats.puId_ptD = cms.InputTag("{}:ptD".format(puJetIDVar))
261  getattr(proc,patJetWithUserData).userFloats.puId_beta = cms.InputTag("{}:beta".format(puJetIDVar))
262  getattr(proc,patJetWithUserData).userFloats.puId_pull = cms.InputTag("{}:pull".format(puJetIDVar))
263  getattr(proc,patJetWithUserData).userFloats.puId_jetR = cms.InputTag("{}:jetR".format(puJetIDVar))
264  getattr(proc,patJetWithUserData).userFloats.puId_jetRchg = cms.InputTag("{}:jetRchg".format(puJetIDVar))
265  getattr(proc,patJetWithUserData).userInts.puId_nCharged = cms.InputTag("{}:nCharged".format(puJetIDVar))
266 
267  #
268  # Specfiy variables in the jet table to save in NanoAOD
269  #
270  getattr(proc,jetTableName).variables.puId_dR2Mean = PUIDVARS.puId_dR2Mean
271  getattr(proc,jetTableName).variables.puId_majW = PUIDVARS.puId_majW
272  getattr(proc,jetTableName).variables.puId_minW = PUIDVARS.puId_minW
273  getattr(proc,jetTableName).variables.puId_frac01 = PUIDVARS.puId_frac01
274  getattr(proc,jetTableName).variables.puId_frac02 = PUIDVARS.puId_frac02
275  getattr(proc,jetTableName).variables.puId_frac03 = PUIDVARS.puId_frac03
276  getattr(proc,jetTableName).variables.puId_frac04 = PUIDVARS.puId_frac04
277  getattr(proc,jetTableName).variables.puId_ptD = PUIDVARS.puId_ptD
278  getattr(proc,jetTableName).variables.puId_beta = PUIDVARS.puId_beta
279  getattr(proc,jetTableName).variables.puId_pull = PUIDVARS.puId_pull
280  getattr(proc,jetTableName).variables.puId_jetR = PUIDVARS.puId_jetR
281  getattr(proc,jetTableName).variables.puId_jetRchg = PUIDVARS.puId_jetRchg
282  getattr(proc,jetTableName).variables.puId_nCharged = PUIDVARS.puId_nCharged
283 
284  return proc
285 
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 286 of file custom_jme_cff.py.

References PVValHelper.add().

Referenced by ReclusterAK4PuppiJets(), and SavePatJets().

286 def AddQGLTaggerVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="", calculateQGLVars=False):
287  """
288  Schedule the QGTagger module to calculate input variables to the QG likelihood
289  """
290 
291  isPUPPIJet = True if "PUPPI" in jetName.upper() else False
292 
293  QGLTagger="qgtagger{}".format(jetName)
294  patJetWithUserData="{}WithUserData".format(jetSrc)
295 
296  if calculateQGLVars:
297  setattr(proc, QGLTagger, qgtagger.clone(
298  srcJets = jetSrc,
299  computeLikelihood = False,
300  )
301  )
302  if isPUPPIJet:
303  getattr(proc,QGLTagger).srcConstituentWeights = cms.InputTag("packedpuppi")
304 
305  #
306  # Save variables as userFloats and userInts for each jet
307  #
308  getattr(proc,patJetWithUserData).userFloats.qgl_axis2 = cms.InputTag(QGLTagger+":axis2")
309  getattr(proc,patJetWithUserData).userFloats.qgl_ptD = cms.InputTag(QGLTagger+":ptD")
310  getattr(proc,patJetWithUserData).userInts.qgl_mult = cms.InputTag(QGLTagger+":mult")
311 
312  #
313  # Specfiy variables in the jet table to save in NanoAOD
314  #
315  getattr(proc,jetTableName).variables.qgl_axis2 = QGLVARS.qgl_axis2
316  getattr(proc,jetTableName).variables.qgl_ptD = QGLVARS.qgl_ptD
317  getattr(proc,jetTableName).variables.qgl_mult = QGLVARS.qgl_mult
318 
319  if calculateQGLVars:
320  getattr(proc,jetTaskName).add(getattr(proc, QGLTagger))
321 
322  return proc
323 
def AddQGLTaggerVars(proc, jetName="", jetSrc="", jetTableName="", jetTaskName="", calculateQGLVars=False)
void add(std::map< std::string, TH1 *> &h, TH1 *hist)

◆ AddRobustParTAK4Scores()

def custom_jme_cff.AddRobustParTAK4Scores (   proc,
  jetTableName = "" 
)
Store RobustParTAK4 scores in jetTable

Definition at line 354 of file custom_jme_cff.py.

Referenced by SavePatJets().

354 def AddRobustParTAK4Scores(proc, jetTableName=""):
355  """
356  Store RobustParTAK4 scores in jetTable
357  """
358 
359  getattr(proc, jetTableName).variables.btagRobustParTAK4B = ROBUSTPARTAK4VARS.btagRobustParTAK4B
360  getattr(proc, jetTableName).variables.btagRobustParTAK4CvL = ROBUSTPARTAK4VARS.btagRobustParTAK4CvL
361  getattr(proc, jetTableName).variables.btagRobustParTAK4CvB = ROBUSTPARTAK4VARS.btagRobustParTAK4CvB
362 
363  return proc
364 
def AddRobustParTAK4Scores(proc, jetTableName="")

◆ AddUnifiedParTAK4Scores()

def custom_jme_cff.AddUnifiedParTAK4Scores (   proc,
  jetTableName = "" 
)
Store RobustParTAK4 scores in jetTable

Definition at line 365 of file custom_jme_cff.py.

Referenced by SavePatJets().

365 def AddUnifiedParTAK4Scores(proc, jetTableName=""):
366  """
367  Store RobustParTAK4 scores in jetTable
368  """
369 
370  getattr(proc, jetTableName).variables.btagUParTAK4B = UNIFIEDPARTAK4VARS.btagUParTAK4B
371  getattr(proc, jetTableName).variables.btagUParTAK4CvL = UNIFIEDPARTAK4VARS.btagUParTAK4CvL
372  getattr(proc, jetTableName).variables.btagUParTAK4CvB = UNIFIEDPARTAK4VARS.btagUParTAK4CvB
373  getattr(proc, jetTableName).variables.btagUParTAK4SvCB = UNIFIEDPARTAK4VARS.btagUParTAK4SvCB
374  getattr(proc, jetTableName).variables.btagUParTAK4SvUDG = UNIFIEDPARTAK4VARS.btagUParTAK4SvUDG
375  getattr(proc, jetTableName).variables.btagUParTAK4UDG = UNIFIEDPARTAK4VARS.btagUParTAK4UDG
376  getattr(proc, jetTableName).variables.btagUParTAK4QvG = UNIFIEDPARTAK4VARS.btagUParTAK4QvG
377  getattr(proc, jetTableName).variables.btagUParTAK4TauVJet = UNIFIEDPARTAK4VARS.btagUParTAK4TauVJet
378  getattr(proc, jetTableName).variables.UParTAK4RegPtRawCorr = UNIFIEDPARTAK4VARS.UParTAK4RegPtRawCorr
379  getattr(proc, jetTableName).variables.UParTAK4RegPtRawCorrNeutrino = UNIFIEDPARTAK4VARS.UParTAK4RegPtRawCorrNeutrino
380  getattr(proc, jetTableName).variables.UParTAK4RegPtRawRes = UNIFIEDPARTAK4VARS.UParTAK4RegPtRawRes
381 
382  return proc
383 
def AddUnifiedParTAK4Scores(proc, jetTableName="")

◆ AddVariablesForAK4GenJets()

def custom_jme_cff.AddVariablesForAK4GenJets (   proc)

Definition at line 1211 of file custom_jme_cff.py.

Referenced by PrepJMECustomNanoAOD().

1211 def AddVariablesForAK4GenJets(proc):
1212  proc.genJetTable.variables.nConstituents = GENJETVARS.nConstituents
1213  return proc
1214 
def AddVariablesForAK4GenJets(proc)

◆ AddVariablesForAK8GenJets()

def custom_jme_cff.AddVariablesForAK8GenJets (   proc)

Definition at line 1215 of file custom_jme_cff.py.

Referenced by PrepJMECustomNanoAOD().

1215 def AddVariablesForAK8GenJets(proc):
1216  proc.genJetAK8Table.variables.nConstituents = GENJETVARS.nConstituents
1217  return proc
1218 
def AddVariablesForAK8GenJets(proc)

◆ AddVariablesForAK8PuppiJets()

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

Definition at line 1049 of file custom_jme_cff.py.

References common_cff.Var().

Referenced by PrepJMECustomNanoAOD().

1049 def AddVariablesForAK8PuppiJets(proc):
1050  """
1051  Add more variables for AK8 PFPUPPI jets
1052  """
1053 
1054  proc.fatJetTable.variables.rawFactor.precision = 10
1055 
1056  #
1057  # These variables are not stored for AK8PFPUPPI (slimmedJetsAK8)
1058  # in MiniAOD if their pt < 170 GeV. Hence the conditional fill.
1059  #
1060  proc.fatJetTable.variables.chHEF = Var("?isPFJet()?chargedHadronEnergyFraction():-1", float, doc="charged Hadron Energy Fraction", precision = 6)
1061  proc.fatJetTable.variables.neHEF = Var("?isPFJet()?neutralHadronEnergyFraction():-1", float, doc="neutral Hadron Energy Fraction", precision = 6)
1062  proc.fatJetTable.variables.chEmEF = Var("?isPFJet()?chargedEmEnergyFraction():-1", float, doc="charged Electromagnetic Energy Fraction", precision = 6)
1063  proc.fatJetTable.variables.neEmEF = Var("?isPFJet()?neutralEmEnergyFraction():-1", float, doc="neutral Electromagnetic Energy Fraction", precision = 6)
1064  proc.fatJetTable.variables.muEF = Var("?isPFJet()?muonEnergyFraction():-1", float, doc="muon Energy Fraction", precision = 6)
1065  proc.fatJetTable.variables.hfHEF = Var("?isPFJet()?HFHadronEnergyFraction():-1", float, doc="energy fraction in forward hadronic calorimeter", precision = 6)
1066  proc.fatJetTable.variables.hfEmEF = Var("?isPFJet()?HFEMEnergyFraction():-1", float, doc="energy fraction in forward EM calorimeter", precision = 6)
1067  proc.fatJetTable.variables.chHadMultiplicity = Var("?isPFJet()?chargedHadronMultiplicity():-1","int16", doc="(Puppi-weighted) number of charged hadrons in the jet")
1068  proc.fatJetTable.variables.neHadMultiplicity = Var("?isPFJet()?neutralHadronMultiplicity():-1","int16", doc="(Puppi-weighted) number of neutral hadrons in the jet")
1069  proc.fatJetTable.variables.hfHadMultiplicity = Var("?isPFJet()?HFHadronMultiplicity():-1", "int16", doc="(Puppi-weighted) number of HF Hadrons in the jet")
1070  proc.fatJetTable.variables.hfEMMultiplicity = Var("?isPFJet()?HFEMMultiplicity():-1", "int16", doc="(Puppi-weighted) number of HF EMs in the jet")
1071  proc.fatJetTable.variables.muMultiplicity = Var("?isPFJet()?muonMultiplicity():-1", "int16", doc="(Puppi-weighted) number of muons in the jet")
1072  proc.fatJetTable.variables.elMultiplicity = Var("?isPFJet()?electronMultiplicity():-1", "int16", doc="(Puppi-weighted) number of electrons in the jet")
1073  proc.fatJetTable.variables.phoMultiplicity = Var("?isPFJet()?photonMultiplicity():-1", "int16", doc="(Puppi-weighted) number of photons in the jet")
1074 
1075  return proc
1076 #******************************************
1077 #
1078 #
1079 # Gen Jets related functions
1080 #
1081 #
1082 #******************************************
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17
def AddVariablesForAK8PuppiJets(proc)

◆ ModifyAK4JetMCTable()

def custom_jme_cff.ModifyAK4JetMCTable (   proc)

Definition at line 1219 of file custom_jme_cff.py.

Referenced by PrepJMECustomNanoAOD().

1219 def ModifyAK4JetMCTable(proc):
1220  # Remove the genjet pt selection when saving the genJetIdx, which is
1221  # the default in main Nano
1222  proc.jetMCTable.variables.genJetIdx = PFJETVARS.genJetIdx
1223  return proc
1224 
1225 #===========================================================================
1226 #
1227 # Misc. functions
1228 #
1229 #===========================================================================
def ModifyAK4JetMCTable(proc)

◆ PrepJMECustomNanoAOD()

def custom_jme_cff.PrepJMECustomNanoAOD (   process)

Definition at line 1339 of file custom_jme_cff.py.

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

1339 def PrepJMECustomNanoAOD(process):
1340 
1341  runOnMC=True
1342  if hasattr(process,"NANOEDMAODoutput") or hasattr(process,"NANOAODoutput"):
1343  runOnMC = False
1344 
1347  process = RemoveAllJetPtCuts(process)
1348 
1349 
1354  genJA = GenJetAdder()
1355  if runOnMC:
1356 
1359  process = AddVariablesForAK8GenJets(process)
1360 
1363  process = AddNewAK8GenJetsForJEC(process, genJA)
1364 
1367  process = ModifyAK4JetMCTable(process)
1368 
1371  process = ReclusterAK4GenJets(process, genJA)
1372  process = AddVariablesForAK4GenJets(process)
1373 
1376  for jetConfig in config_genjets:
1377  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
1378  genJetInfo = genJA.addGenJetCollection(process, **cfg)
1379  AddNewGenJets(process, genJetInfo)
1380 
1381 
1386  recoJA = RecoJetAdder(runOnMC=runOnMC)
1387 
1390  process = AddVariablesForAK8PuppiJets(process)
1391 
1394  process = AddNewAK8PuppiJetsForJEC(process, recoJA, runOnMC)
1395 
1398  process = ReclusterAK4CHSJets(process, recoJA, runOnMC)
1399 
1402  process = ReclusterAK4PuppiJets(process, recoJA, runOnMC)
1403 
1406  for jetConfig in config_recojets:
1407  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
1408  recoJetInfo = recoJA.addRecoJetCollection(process, **cfg)
1409  AddNewPatJets(process, recoJetInfo, runOnMC)
1410 
1411 
1416  def addAK4JetTasks(proc, addAK4CHSJetTasks, addAK4PuppiJetTasks):
1417  if addAK4CHSJetTasks:
1418  proc.nanoTableTaskCommon.add(proc.jetTask)
1419  proc.nanoTableTaskCommon.add(proc.jetTablesTask)
1420  proc.nanoTableTaskCommon.add(proc.jetForMETTask)
1421  if addAK4PuppiJetTasks:
1422  proc.nanoTableTaskCommon.add(proc.jetPuppiTask)
1423  proc.nanoTableTaskCommon.add(proc.jetPuppiTablesTask)
1424  proc.nanoTableTaskCommon.add(proc.jetPuppiForMETTask)
1425  return proc
1426 
1427  jmeNano_addAK4JetTasks_switch = cms.PSet(
1428  jmeNano_addAK4CHS_switch = cms.untracked.bool(True),
1429  jmeNano_addAK4Puppi_switch = cms.untracked.bool(False)
1430  )
1431  run2_nanoAOD_ANY.toModify(jmeNano_addAK4JetTasks_switch,
1432  jmeNano_addAK4CHS_switch = False,
1433  jmeNano_addAK4Puppi_switch = True
1434  )
1435  process = addAK4JetTasks(process,
1436  addAK4CHSJetTasks = jmeNano_addAK4JetTasks_switch.jmeNano_addAK4CHS_switch,
1437  addAK4PuppiJetTasks = jmeNano_addAK4JetTasks_switch.jmeNano_addAK4Puppi_switch,
1438  )
1439 
1440 
1443  if runOnMC:
1444  process.puTable.savePtHatMax = True
1445 
1446 
1449  if runOnMC:
1450  process.genWeightsTable.keepAllPSWeights = True
1451 
1452  return process
1453 
1454 
def ReclusterAK4CHSJets(proc, recoJA, runOnMC)
def RemoveAllJetPtCuts(proc)
def AddNewPatJets(proc, recoJetInfo, runOnMC)
def ModifyAK4JetMCTable(proc)
def ReclusterAK4GenJets(proc, genJA)
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)
def PrepJMECustomNanoAOD(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 789 of file custom_jme_cff.py.

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

Referenced by PrepJMECustomNanoAOD().

789 def ReclusterAK4CHSJets(proc, recoJA, runOnMC):
790  """
791  Recluster AK4 CHS jets and replace slimmedJets that is used as default to
792  save AK4 CHS jets in NanoAODs (for Run-2).
793  """
794  print("custom_jme_cff::ReclusterAK4CHSJets: Recluster AK4 PF CHS jets")
795 
796  from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll
797  from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK4_cff import _pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll
798 
799  bTagDiscriminatorsForAK4CHS = cms.PSet(
800  foo = cms.vstring(_pfParticleNetFromMiniAODAK4CHSCentralJetTagsAll+_pfParticleNetFromMiniAODAK4CHSForwardJetTagsAll)
801  )
802  bTagDiscriminatorsForAK4CHS = bTagDiscriminatorsForAK4CHS.foo.value()
803 
804  #
805  # Recluster AK4 CHS jets
806  #
807  cfg = {
808  "jet" : "ak4pfchs",
809  "inputCollection" : "",
810  "genJetsCollection": "AK4GenJetsNoNu",
811  "bTagDiscriminators": bTagDiscriminatorsForAK4CHS,
812  "minPtFastjet" : 0.,
813  }
814  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
815 
816  jetName = recoJetInfo.jetUpper
817  patJetFinalColl = recoJetInfo.patJetFinalCollection
818 
819  #
820  # Change the input jet source for jetCorrFactorsNano
821  # and updatedJets
822  #
823  proc.jetCorrFactorsNano.src=patJetFinalColl
824  proc.updatedJets.jetSource=patJetFinalColl
825 
826  #
827  # Change pt cut
828  #
829  finalJetsCut = ""
830  if runOnMC:
831  finalJetsCut = "(pt >= 10) || ((pt < 10) && (genJetFwdRef().backRef().isNonnull()))"
832  else:
833  finalJetsCut = "(pt >= 10)"
834 
835  proc.finalJets.cut = finalJetsCut
836  #
837  # Add a minimum pt cut for corrT1METJets.
838  #
839  proc.corrT1METJetTable.cut = "pt>=10 && pt<15 && abs(eta)<9.9"
840 
841  #
842  # Jet table cut
843  #
844  jetTableCut = "" # must not have any cut at the jetTable for AK4 CHS as it has been cross-cleaned
845  proc.jetTable.src = cms.InputTag("finalJets")
846  proc.jetTable.cut = jetTableCut
847  proc.jetMCTable.cut = jetTableCut
848  proc.jetTable.name = "JetCHS"
849 
850  #
851  # For Run-2 eras, the main AK4 jet collection in NanoAOD is the CHS collection
852  #
853  run2_nanoAOD_ANY.toModify(
854  proc.jetTable,
855  src = cms.InputTag("linkedObjects","jets"),
856  name = "Jet"
857  )
858 
859  #
860  # Jet table documentation
861  #
862  jetTableDoc = "AK4 PF CHS jets with JECs applied. Jets with pt >= 10 GeV are stored."
863  if runOnMC:
864  jetTableDoc += "For jets with pt < 10 GeV, only those matched to AK4 Gen jets are stored."
865  proc.jetTable.doc = jetTableDoc
866 
867  proc.jetTable.variables.rawFactor.precision = 10
868 
869  #
870  # Add variables
871  #
872  proc.jetTable.variables.chHadMultiplicity = PFJETVARS.chHadMultiplicity
873  proc.jetTable.variables.neHadMultiplicity = PFJETVARS.neHadMultiplicity
874  proc.jetTable.variables.hfHadMultiplicity = PFJETVARS.hfHadMultiplicity
875  proc.jetTable.variables.hfEMMultiplicity = PFJETVARS.hfEMMultiplicity
876  proc.jetTable.variables.muMultiplicity = PFJETVARS.muMultiplicity
877  proc.jetTable.variables.elMultiplicity = PFJETVARS.elMultiplicity
878  proc.jetTable.variables.phoMultiplicity = PFJETVARS.phoMultiplicity
879 
880  #
881  # Add charged energy fraction from other primary vertices
882  #
883  proc.updatedJetsWithUserData.userFloats.chFPV1EF = cms.InputTag("jercVars:chargedFromPV1EnergyFraction")
884  proc.updatedJetsWithUserData.userFloats.chFPV2EF = cms.InputTag("jercVars:chargedFromPV2EnergyFraction")
885  proc.updatedJetsWithUserData.userFloats.chFPV3EF = cms.InputTag("jercVars:chargedFromPV3EnergyFraction")
886  proc.jetTable.variables.chFPV1EF = Var("userFloat('chFPV1EF')", float, doc="charged fromPV==1 Energy Fraction (component of the total charged Energy Fraction).", precision= 6)
887  proc.jetTable.variables.chFPV2EF = Var("userFloat('chFPV2EF')", float, doc="charged fromPV==2 Energy Fraction (component of the total charged Energy Fraction).", precision= 6)
888  proc.jetTable.variables.chFPV3EF = Var("userFloat('chFPV3EF')", float, doc="charged fromPV==3 Energy Fraction (component of the total charged Energy Fraction).", precision= 6)
889 
890  #
891  # Remove these tagger branches since for CHS, we just want to store
892  # one tagger only.
893  #
894  for varNames in proc.jetTable.variables.parameterNames_():
895  if "btagDeepFlav" in varNames or "btagRobustParT" in varNames or "btagUParT" in varNames:
896  delattr(proc.jetTable.variables, varNames)
897  if "UParTAK4Reg" in varNames:
898  delattr(proc.jetTable.variables, varNames)
899  if "svIdx" in varNames or "muonIdx" in varNames:
900  delattr(proc.jetTable.variables, varNames)
901  if "nElectrons" in varNames or "nMuons" in varNames or "nSVs" in varNames:
902  delattr(proc.jetTable.variables, varNames)
903 
904  proc.jetTable.variables.btagPNetB = Var("?pt>15 && bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:BvsAll')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:BvsAll'):-1",float,precision=10,doc="ParticleNet b vs. udscg")
905  proc.jetTable.variables.btagPNetCvL = Var("?pt>15 && bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsL')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsL'):-1",float,precision=10,doc="ParticleNet c vs. udsg")
906  proc.jetTable.variables.btagPNetCvB = Var("?pt>15 && bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsB')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:CvsB'):-1",float,precision=10,doc="ParticleNet c vs. b")
907  proc.jetTable.variables.btagPNetQvG = Var("?pt>15 && abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:QvsG'):bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardDiscriminatorsJetTags:QvsG')",float,precision=10,doc="ParticleNet q (udsbc) vs. g")
908  proc.jetTable.variables.btagPNetTauVJet = Var("?pt>15 && bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:TauVsJet')>0?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralDiscriminatorsJetTags:TauVsJet'):-1",float,precision=10,doc="ParticleNet tau vs. jet")
909  proc.jetTable.variables.PNetRegPtRawCorr = Var("?pt>15 && abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptcorr'):bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptcorr')",float,precision=10,doc="ParticleNet universal flavor-aware visible pT regression (no neutrinos), correction relative to raw jet pT")
910  proc.jetTable.variables.PNetRegPtRawCorrNeutrino = Var("?pt>15 && abs(eta())<2.5?bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptnu'):bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptnu')",float,precision=10,doc="ParticleNet universal flavor-aware pT regression neutrino correction, relative to visible. To apply full regression, multiply raw jet pT by both PNetRegPtRawCorr and PNetRegPtRawCorrNeutrino.")
911  proc.jetTable.variables.PNetRegPtRawRes = Var("?pt>15 && abs(eta())<2.5?0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4CHSCentralJetTags:ptreslow')):0.5*(bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptreshigh')-bDiscriminator('pfParticleNetFromMiniAODAK4CHSForwardJetTags:ptreslow'))",float,precision=10,doc="ParticleNet universal flavor-aware jet pT resolution estimator, (q84 - q16)/2")
912 
913 
914  #Adding hf shower shape producer to the jet sequence. By default this producer is not automatically rerun at the NANOAOD step
915  #The following lines make sure it is.
916  hfJetShowerShapeforCustomNanoAOD = "hfJetShowerShapeforCustomNanoAOD"
917  setattr(proc, hfJetShowerShapeforCustomNanoAOD, hfJetShowerShape.clone(jets="updatedJets", vertices="offlineSlimmedPrimaryVertices") )
918  proc.jetUserDataTask.add(getattr(proc, hfJetShowerShapeforCustomNanoAOD))
919  proc.updatedJetsWithUserData.userFloats.hfsigmaEtaEta = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:sigmaEtaEta')
920  proc.updatedJetsWithUserData.userFloats.hfsigmaPhiPhi = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:sigmaPhiPhi')
921  proc.updatedJetsWithUserData.userInts.hfcentralEtaStripSize = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:centralEtaStripSize')
922  proc.updatedJetsWithUserData.userInts.hfadjacentEtaStripsSize = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:adjacentEtaStripsSize')
923  proc.jetTable.variables.hfsigmaEtaEta = Var("userFloat('hfsigmaEtaEta')",float,doc="sigmaEtaEta for HF jets (noise discriminating variable)",precision=10)
924  proc.jetTable.variables.hfsigmaPhiPhi = Var("userFloat('hfsigmaPhiPhi')",float,doc="sigmaPhiPhi for HF jets (noise discriminating variable)",precision=10)
925  proc.jetTable.variables.hfcentralEtaStripSize = Var("userInt('hfcentralEtaStripSize')", int, doc="eta size of the central tower strip in HF (noise discriminating variable) ")
926  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) ")
927 
928  #
929  # Since AK4 Puppi jet is the main AK4 jet collection for Run-3, disable
930  # b-jets/c-jets NN-based mass regression for AK4 CHS.
931  #
932  (~run2_nanoAOD_ANY).toReplaceWith(
933  proc.jetUserDataTask,
934  proc.jetUserDataTask.copyAndExclude([proc.bJetVars])
935  ).toReplaceWith(
936  proc.jetTablesTask,
937  proc.jetTablesTask.copyAndExclude([proc.bjetNN, proc.cjetNN])
938  ).toModify(proc.updatedJetsWithUserData.userFloats,
939  leadTrackPt = None,
940  leptonPtRelv0 = None,
941  leptonPtRelInvv0 = None,
942  leptonDeltaR = None,
943  vtxPt = None,
944  vtxMass = None,
945  vtx3dL = None,
946  vtx3deL = None,
947  ptD = None,
948  ).toModify(
949  proc.updatedJetsWithUserData.userInts,
950  vtxNtrk = None,
951  leptonPdgId = None
952  ).toModify(
953  proc.jetTable, externalVariables = cms.PSet()
954  ).toReplaceWith(
955  #
956  # For Run-3, don't need to save the low pt AK4 CHS jet table for MET
957  #
958  proc.jetForMETTask,
959  proc.jetForMETTask.copyAndExclude([proc.corrT1METJetTable])
960  )
961 
962  #
963  # Save MC-only jet variables in jet table
964  #
965  if runOnMC:
966  jetMCTableName = "jet{}MCTable".format(jetName)
967  setattr(proc, jetMCTableName, proc.jetMCTable.clone(
968  src = proc.jetTable.src,
969  name = proc.jetTable.name
970  )
971  )
972  getattr(proc,jetMCTableName).variables.genJetIdx = PFJETVARS.genJetIdx
973 
974  jetMCTableTaskName = "jet{}MCTablesTask".format(jetName)
975  setattr(proc, jetMCTableTaskName, cms.Task(getattr(proc,jetMCTableName)))
976 
977  (~run2_nanoAOD_ANY).toReplaceWith(
978  proc.nanoTableTaskFS,
979  proc.nanoTableTaskFS.copyAndAdd(getattr(proc,jetMCTableTaskName))
980  )
981 
982  return proc
983 
def ReclusterAK4CHSJets(proc, recoJA, runOnMC)
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

◆ 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 1143 of file custom_jme_cff.py.

References print().

Referenced by PrepJMECustomNanoAOD().

1143 def ReclusterAK4GenJets(proc, genJA):
1144  """
1145  Recluster AK4 Gen jets and replace
1146  slimmedGenJets that is used as default
1147  to save AK4 Gen jets in NanoAODs.
1148  """
1149  print("custom_jme_cff::ReclusterAK4GenJets: Recluster AK4 Gen jets")
1150 
1151  #
1152  # Recluster AK4 Gen jet
1153  #
1154  cfg = {
1155  "jet" : "ak4gen",
1156  "minPtFastjet" : 5.
1157  }
1158  genJetInfo = genJA.addGenJetCollection(proc, **cfg)
1159 
1160  genJetName = genJetInfo.jetUpper
1161  genJetAlgo = genJetInfo.jetAlgo
1162  genJetSize = genJetInfo.jetSize
1163  genJetSizeNr = genJetInfo.jetSizeNr
1164  selectedGenJets = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1165 
1166  #
1167  # Change jet source to the newly clustered jet collection. Set very low pt cut for jets
1168  # to be stored in the GenJet Table
1169  #
1170  proc.genJetTable.src = selectedGenJets
1171  proc.genJetTable.cut = "" # No cut specified here. Save all gen jets after clustering
1172  proc.genJetTable.doc = "AK4 Gen jets (made with visible genparticles) with pt > 5 GeV"
1173 
1174  genJetFlavourAssociationName = "genJet{}FlavourAssociation".format(genJetName)
1175  setattr(proc, genJetFlavourAssociationName, genJetFlavourAssociation.clone(
1176  jets = proc.genJetTable.src,
1177  jetAlgorithm = supportedJetAlgos[genJetAlgo],
1178  rParam = genJetSizeNr,
1179  )
1180  )
1181  proc.jetMCTask.add(getattr(proc, genJetFlavourAssociationName))
1182  return proc
1183 
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 568 of file custom_jme_cff.py.

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

Referenced by PrepJMECustomNanoAOD().

568 def ReclusterAK4PuppiJets(proc, recoJA, runOnMC):
569  """
570  Recluster AK4 Puppi jets and replace slimmedJetsPuppi
571  that is used as default to save AK4 Puppi jets in NanoAODs.
572  """
573  print("custom_jme_cff::ReclusterAK4PuppiJets: Recluster AK4 PF Puppi jets")
574 
575  #
576  # Recluster AK4 Puppi jets
577  #
578  cfg = {
579  "jet" : "ak4pfpuppi",
580  "inputCollection" : "",
581  "genJetsCollection": "AK4GenJetsNoNu",
582  "bTagDiscriminators": bTagDiscriminatorsForAK4,
583  "minPtFastjet" : 0.,
584  }
585  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
586 
587  jetName = recoJetInfo.jetUpper
588  patJetFinalColl = recoJetInfo.patJetFinalCollection
589 
590  #
591  # Change the input jet source for jetCorrFactorsNano
592  # and updatedJets
593  #
594  proc.jetPuppiCorrFactorsNano.src=patJetFinalColl
595  proc.updatedJetsPuppi.jetSource=patJetFinalColl
596 
597  #
598  # Change pt cut
599  #
600  finalJetsPuppiCut = ""
601  if runOnMC:
602  finalJetsPuppiCut = "(pt >= 8) || ((pt < 8) && (genJetFwdRef().backRef().isNonnull()))"
603  else:
604  finalJetsPuppiCut = "(pt >= 8)"
605 
606  proc.finalJetsPuppi.cut = finalJetsPuppiCut
607  #
608  # Add a minimum pt cut for corrT1METJets.
609  #
610  proc.corrT1METJetPuppiTable.cut = "pt>=8 && pt<15 && abs(eta)<9.9"
611 
612  #
613  # Jet table
614  #
615  # For Run-2 eras, the main AK4 jet collection in NanoAOD is the CHS collection
616  run2_nanoAOD_ANY.toModify(
617  proc.jetTable, name = "Jet"
618  ).toModify(
619  # So need to change the table name for AK4 puppi here
620  proc.jetPuppiTable,
621  name = "JetPuppi",
622  src = cms.InputTag("finalJetsPuppi")
623  )
624 
625  #
626  # Jet table documentation
627  #
628  jetPuppiTableDoc = "AK4 PF Puppi jets with JECs applied. Jets with pt >= 8 GeV are stored."
629  if runOnMC:
630  jetPuppiTableDoc += "For jets with pt < 8 GeV, only those matched to AK4 Gen jets are stored."
631  proc.jetPuppiTable.doc = jetPuppiTableDoc
632 
633  proc.jetPuppiTable.variables.rawFactor.precision = 10
634 
635  #
636  # Add variables
637  #
638  proc.jetPuppiTable.variables.chHadMultiplicity = PFJETVARS.chHadMultiplicity
639  proc.jetPuppiTable.variables.neHadMultiplicity = PFJETVARS.neHadMultiplicity
640  proc.jetPuppiTable.variables.hfHadMultiplicity = PFJETVARS.hfHadMultiplicity
641  proc.jetPuppiTable.variables.hfEMMultiplicity = PFJETVARS.hfEMMultiplicity
642  proc.jetPuppiTable.variables.muMultiplicity = PFJETVARS.muMultiplicity
643  proc.jetPuppiTable.variables.elMultiplicity = PFJETVARS.elMultiplicity
644  proc.jetPuppiTable.variables.phoMultiplicity = PFJETVARS.phoMultiplicity
645 
646  #
647  #
648  #
649 
650  from PhysicsTools.NanoAOD.patJetPFConstituentVarProducer_cfi import patJetPFConstituentVarProducer
651  jetPFConstituentVarName = "jetPFConstituentVar{}".format(jetName)
652  setattr(proc, jetPFConstituentVarName, patJetPFConstituentVarProducer.clone(
653  jets = "updatedJetsPuppi",
654  puppi_value_map = 'packedpuppi',
655  fallback_puppi_weight = False,
656  )
657  )
658  proc.jetPuppiTask.add(getattr(proc, jetPFConstituentVarName))
659  proc.updatedJetsPuppiWithUserData.userFloats.leadConstNeHadEF = cms.InputTag(jetPFConstituentVarName+':leadConstNeHadEF')
660  proc.updatedJetsPuppiWithUserData.userFloats.leadConstChHadEF = cms.InputTag(jetPFConstituentVarName+':leadConstChHadEF')
661  proc.updatedJetsPuppiWithUserData.userFloats.leadConstPhotonEF = cms.InputTag(jetPFConstituentVarName+':leadConstPhotonEF')
662  proc.updatedJetsPuppiWithUserData.userFloats.leadConstElectronEF = cms.InputTag(jetPFConstituentVarName+':leadConstElectronEF')
663  proc.updatedJetsPuppiWithUserData.userFloats.leadConstMuonEF = cms.InputTag(jetPFConstituentVarName+':leadConstMuonEF')
664  proc.updatedJetsPuppiWithUserData.userFloats.leadConstHFHADEF = cms.InputTag(jetPFConstituentVarName+':leadConstHFHADEF')
665  proc.updatedJetsPuppiWithUserData.userFloats.leadConstHFEMEF = cms.InputTag(jetPFConstituentVarName+':leadConstHFEMEF')
666  proc.updatedJetsPuppiWithUserData.userFloats.leadConstNeHadPuppiWeight = cms.InputTag(jetPFConstituentVarName+':leadConstNeHadPuppiWeight')
667  proc.updatedJetsPuppiWithUserData.userFloats.leadConstChHadPuppiWeight = cms.InputTag(jetPFConstituentVarName+':leadConstChHadPuppiWeight')
668  proc.updatedJetsPuppiWithUserData.userFloats.leadConstPhotonPuppiWeight = cms.InputTag(jetPFConstituentVarName+':leadConstPhotonPuppiWeight')
669  proc.updatedJetsPuppiWithUserData.userFloats.leadConstElectronPuppiWeight = cms.InputTag(jetPFConstituentVarName+':leadConstElectronPuppiWeight')
670  proc.updatedJetsPuppiWithUserData.userFloats.leadConstMuonPuppiWeight = cms.InputTag(jetPFConstituentVarName+':leadConstMuonPuppiWeight')
671  proc.updatedJetsPuppiWithUserData.userFloats.leadConstHFHADPuppiWeight = cms.InputTag(jetPFConstituentVarName+':leadConstHFHADPuppiWeight')
672  proc.updatedJetsPuppiWithUserData.userFloats.leadConstHFEMPuppiWeight = cms.InputTag(jetPFConstituentVarName+':leadConstHFEMPuppiWeight')
673  proc.jetPuppiTable.variables.leadConstNeHadEF = Var("userFloat('leadConstNeHadEF')",float,doc="Leading PF neutral hadron constituent energy fraction w.r.t jet raw energy",precision=10)
674  proc.jetPuppiTable.variables.leadConstChHadEF = Var("userFloat('leadConstChHadEF')",float,doc="Leading PF charged hadron constituent energy fraction w.r.t jet raw energy",precision=10)
675  proc.jetPuppiTable.variables.leadConstPhotonEF = Var("userFloat('leadConstPhotonEF')",float,doc="Leading PF photon constituent energy fraction w.r.t jet raw energy",precision=10)
676  proc.jetPuppiTable.variables.leadConstElectronEF = Var("userFloat('leadConstElectronEF')",float,doc="Leading PF electron constituent energy fraction w.r.t jet raw energy",precision=10)
677  proc.jetPuppiTable.variables.leadConstMuonEF = Var("userFloat('leadConstMuonEF')",float,doc="Leading PF muon constituent energy fraction w.r.t jet raw energy",precision=10)
678  proc.jetPuppiTable.variables.leadConstHFHADEF = Var("userFloat('leadConstHFHADEF')",float,doc="Leading PF HF HAD constituent energy fraction w.r.t jet raw energy",precision=10)
679  proc.jetPuppiTable.variables.leadConstHFEMEF = Var("userFloat('leadConstHFEMEF')",float,doc="Leading PF HF EM constituent energy fraction w.r.t jet raw energy",precision=10)
680  proc.jetPuppiTable.variables.leadConstNeHadPuppiWeight = Var("userFloat('leadConstNeHadPuppiWeight')",float,doc="Leading PF neutral hadron constituent puppi weight",precision=10)
681  proc.jetPuppiTable.variables.leadConstChHadPuppiWeight = Var("userFloat('leadConstChHadPuppiWeight')",float,doc="Leading PF charged hadron constituent puppi weight",precision=10)
682  proc.jetPuppiTable.variables.leadConstPhotonPuppiWeight = Var("userFloat('leadConstPhotonPuppiWeight')",float,doc="Leading PF photon constituent puppi weight",precision=10)
683  proc.jetPuppiTable.variables.leadConstElectronPuppiWeight = Var("userFloat('leadConstElectronPuppiWeight')",float,doc="Leading PF electron constituent puppi weight",precision=10)
684  proc.jetPuppiTable.variables.leadConstMuonPuppiWeight = Var("userFloat('leadConstMuonPuppiWeight')",float,doc="Leading PF muon constituent puppi weight",precision=10)
685  proc.jetPuppiTable.variables.leadConstHFHADPuppiWeight = Var("userFloat('leadConstHFHADPuppiWeight')",float,doc="Leading PF HF HAD constituent puppi weight",precision=10)
686  proc.jetPuppiTable.variables.leadConstHFEMPuppiWeight = Var("userFloat('leadConstHFEMPuppiWeight')",float,doc="Leading PF HF EM constituent puppi weight",precision=10)
687 
688 
689  #
690  # Add Pileup Jet ID for Puppi jets
691  #
692  from RecoJets.JetProducers.PileupJetID_cfi import pileupJetIdPuppi
693  pileupJetIdName = "pileupJetId{}".format(jetName)
694  setattr(proc, pileupJetIdName, pileupJetIdPuppi.clone(
695  jets = "updatedJetsPuppi",
696  srcConstituentWeights = "packedpuppi",
697  vertexes = "offlineSlimmedPrimaryVertices",
698  inputIsCorrected=True,
699  applyJec=False
700  )
701  )
702  proc.jetPuppiTask.add(getattr(proc, pileupJetIdName))
703  proc.updatedJetsPuppiWithUserData.userFloats.puIdDisc = cms.InputTag(pileupJetIdName+':fullDiscriminant')
704  proc.jetPuppiTable.variables.puIdDisc = Var("userFloat('puIdDisc')", float, doc="Pileup ID BDT discriminant with 133X Winter24 PuppiV18 training",precision=10)
705 
706 
707  #
708  # Add variables for pileup jet ID studies.
709  #
710  proc = AddPileUpJetIDVars(proc,
711  jetName = jetName,
712  jetSrc = "updatedJetsPuppi",
713  jetTableName = "jetPuppiTable",
714  jetTaskName = "jetPuppiTask"
715  )
716  #
717  # Add variables for quark guon likelihood tagger studies.
718  # Save variables as userFloats and userInts in each jet
719  #
720  proc = AddQGLTaggerVars(proc,
721  jetName = jetName,
722  jetSrc = "updatedJetsPuppi",
723  jetTableName = "jetPuppiTable",
724  jetTaskName = "jetPuppiTask",
725  calculateQGLVars=True
726  )
727  #
728  # Save DeepJet b-tagging and c-tagging variables
729  #
730  proc.jetPuppiTable.variables.btagDeepFlavB = DEEPJETVARS.btagDeepFlavB
731  proc.jetPuppiTable.variables.btagDeepFlavCvL = DEEPJETVARS.btagDeepFlavCvL
732  proc.jetPuppiTable.variables.btagDeepFlavCvB = DEEPJETVARS.btagDeepFlavCvB
733  #
734  # Save DeepJet raw score for gluon and light quarks
735  #
736  proc.jetPuppiTable.variables.btagDeepFlavG = DEEPJETVARS.btagDeepFlavG
737  proc.jetPuppiTable.variables.btagDeepFlavUDS = DEEPJETVARS.btagDeepFlavUDS
738  proc.jetPuppiTable.variables.btagDeepFlavQG = DEEPJETVARS.btagDeepFlavQG
739  #
740  # Save RobustParTAK4 b-tagging and c-tagging variables
741  #
742  proc.jetPuppiTable.variables.btagRobustParTAK4B = ROBUSTPARTAK4VARS.btagRobustParTAK4B
743  proc.jetPuppiTable.variables.btagRobustParTAK4CvL = ROBUSTPARTAK4VARS.btagRobustParTAK4CvL
744  proc.jetPuppiTable.variables.btagRobustParTAK4CvB = ROBUSTPARTAK4VARS.btagRobustParTAK4CvB
745  #
746  # Save UnifiedParTAK4 b-tagging and c-tagging variables
747  #
748  proc.jetPuppiTable.variables.btagUParTAK4B = UNIFIEDPARTAK4VARS.btagUParTAK4B
749  proc.jetPuppiTable.variables.btagUParTAK4CvL = UNIFIEDPARTAK4VARS.btagUParTAK4CvL
750  proc.jetPuppiTable.variables.btagUParTAK4CvB = UNIFIEDPARTAK4VARS.btagUParTAK4CvB
751  proc.jetPuppiTable.variables.btagUParTAK4SvCB = UNIFIEDPARTAK4VARS.btagUParTAK4SvCB
752  proc.jetPuppiTable.variables.btagUParTAK4SvUDG = UNIFIEDPARTAK4VARS.btagUParTAK4SvUDG
753  proc.jetPuppiTable.variables.btagUParTAK4UDG = UNIFIEDPARTAK4VARS.btagUParTAK4UDG
754  proc.jetPuppiTable.variables.btagUParTAK4QvG = UNIFIEDPARTAK4VARS.btagUParTAK4QvG
755  proc.jetPuppiTable.variables.btagUParTAK4TauVJet = UNIFIEDPARTAK4VARS.btagUParTAK4TauVJet
756  proc.jetPuppiTable.variables.UParTAK4RegPtRawCorr = UNIFIEDPARTAK4VARS.UParTAK4RegPtRawCorr
757  proc.jetPuppiTable.variables.UParTAK4RegPtRawCorrNeutrino = UNIFIEDPARTAK4VARS.UParTAK4RegPtRawCorrNeutrino
758  proc.jetPuppiTable.variables.UParTAK4RegPtRawRes = UNIFIEDPARTAK4VARS.UParTAK4RegPtRawRes
759  #
760  # For Run-2 eras, don't need to save the low pt AK4 Puppi jet table for MET
761  #
762  run2_nanoAOD_ANY.toReplaceWith(
763  proc.jetPuppiForMETTask,
764  proc.jetPuppiForMETTask.copyAndExclude([proc.corrT1METJetPuppiTable])
765  )
766 
767  #
768  # Save MC-only jet variables in jet table
769  #
770  if runOnMC:
771  jetMCTableName = "jet{}MCTable".format(jetName)
772  setattr(proc, jetMCTableName, proc.jetMCTable.clone(
773  src = proc.jetPuppiTable.src,
774  name = proc.jetPuppiTable.name
775  )
776  )
777  getattr(proc,jetMCTableName).variables.genJetIdx = PFJETVARS.genJetIdx
778 
779  jetMCTableTaskName = "jet{}MCTablesTask".format(jetName)
780  setattr(proc, jetMCTableTaskName, cms.Task(getattr(proc,jetMCTableName)))
781 
782  run2_nanoAOD_ANY.toReplaceWith(
783  proc.nanoTableTaskFS,
784  proc.nanoTableTaskFS.copyAndAdd( getattr(proc,jetMCTableTaskName))
785  )
786 
787  return proc
788 
def Var(expr, valtype, doc=None, precision=-1, lazyEval=False)
Definition: common_cff.py:17
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="")

◆ RecomputePuppiMET()

def custom_jme_cff.RecomputePuppiMET (   proc)
Recompute PuppiMET. This is useful when puppi weights are recomputed.

Definition at line 1255 of file custom_jme_cff.py.

References runMETCorrectionsAndUncertainties.runMetCorAndUncFromMiniAOD().

Referenced by RecomputePuppiWeightsAndMET().

1255 def RecomputePuppiMET(proc):
1256  """
1257  Recompute PuppiMET. This is useful when puppi weights are recomputed.
1258  """
1259  runOnMC=True
1260  if hasattr(proc,"NANOEDMAODoutput") or hasattr(proc,"NANOAODoutput"):
1261  runOnMC = False
1262 
1263  from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMetCorAndUncFromMiniAOD
1264  runMetCorAndUncFromMiniAOD(proc, isData=not(runOnMC),
1265  jetCollUnskimmed='updatedJetsPuppi',metType='Puppi',postfix='Puppi',jetFlavor='AK4PFPuppi',
1266  puppiProducerLabel='packedpuppi',puppiProducerForMETLabel='packedpuppiNoLep',
1267  recoMetFromPFCs=True
1268  )
1269  return proc
1270 
1271 #===========================================================================
1272 #
1273 # Functions to setup recomputation of Puppi weights and recluster PuppiMET
1274 # and AK8 Puppi jets (slimmedJetsAK8)
1275 #
1276 #===========================================================================
def runMetCorAndUncFromMiniAOD(process, metType="PF", jetCollUnskimmed="slimmedJets", photonColl="slimmedPhotons", electronColl="slimmedElectrons", muonColl="slimmedMuons", tauColl="slimmedTaus", pfCandColl="packedPFCandidates", jetFlavor="AK4PFchs", jetCleaning="LepClean", isData=False, manualJetConfig=False, reclusterJets=None, jetSelection="pt>15 && abs(eta)<9.9", recoMetFromPFCs=None, jetCorLabelL3="ak4PFCHSL1FastL2L3Corrector", jetCorLabelRes="ak4PFCHSL1FastL2L3ResidualCorrector", CHS=False, puppiProducerLabel="puppi", puppiProducerForMETLabel="puppiNoLep", reapplyJEC=True, jecUncFile="", computeMETSignificance=True, fixEE2017=False, fixEE2017Params=None, extractDeepMETs=False, campaign="", era="", postfix="")
def RecomputePuppiMET(proc)

◆ RecomputePuppiWeights()

def custom_jme_cff.RecomputePuppiWeights (   proc)
Setup packedpuppi and packedpuppiNoLep to recompute puppi weights

Definition at line 1245 of file custom_jme_cff.py.

Referenced by RecomputePuppiWeightsAndMET().

1245 def RecomputePuppiWeights(proc):
1246  """
1247  Setup packedpuppi and packedpuppiNoLep to recompute puppi weights
1248  """
1249  if hasattr(proc,"packedpuppi"):
1250  proc.packedpuppi.useExistingWeights = False
1251  if hasattr(proc,"packedpuppiNoLep"):
1252  proc.packedpuppiNoLep.useExistingWeights = False
1253  return proc
1254 
def RecomputePuppiWeights(proc)

◆ RecomputePuppiWeightsAndMET()

def custom_jme_cff.RecomputePuppiWeightsAndMET (   proc)
Recompute Puppi weights and PuppiMET.

Definition at line 1277 of file custom_jme_cff.py.

References RecomputePuppiMET(), and RecomputePuppiWeights().

Referenced by RecomputePuppiWeightsMETAK8().

1277 def RecomputePuppiWeightsAndMET(proc):
1278  """
1279  Recompute Puppi weights and PuppiMET.
1280  """
1281 
1282  proc = RecomputePuppiWeights(proc)
1283  proc = RecomputePuppiMET(proc)
1284 
1285  return proc
1286 
def RecomputePuppiWeightsAndMET(proc)
def RecomputePuppiWeights(proc)
def RecomputePuppiMET(proc)

◆ RecomputePuppiWeightsMETAK8()

def custom_jme_cff.RecomputePuppiWeightsMETAK8 (   proc)
Recompute Puppi weights and PuppiMET and rebuild slimmedJetsAK8.

Definition at line 1287 of file custom_jme_cff.py.

References RecomputePuppiWeightsAndMET(), and puppiJetMETReclusteringFromMiniAOD_cff.setupPuppiAK4AK8METReclustering().

1287 def RecomputePuppiWeightsMETAK8(proc):
1288  """
1289  Recompute Puppi weights and PuppiMET and rebuild slimmedJetsAK8.
1290  """
1291  runOnMC=True
1292  if hasattr(proc,"NANOEDMAODoutput") or hasattr(proc,"NANOAODoutput"):
1293  runOnMC = False
1294 
1295  proc = RecomputePuppiWeightsAndMET(proc)
1296 
1297  from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetJetTagsAll as pfParticleNetJetTagsAll
1298  from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetMassRegressionOutputs as pfParticleNetMassRegressionOutputs
1299  from RecoBTag.ONNXRuntime.pfParticleNet_cff import _pfParticleNetMassCorrelatedJetTagsAll as pfParticleNetMassCorrelatedJetTagsAll
1300  from RecoBTag.ONNXRuntime.pfParticleNetFromMiniAODAK8_cff import _pfParticleNetFromMiniAODAK8JetTagsAll as pfParticleNetFromMiniAODAK8JetTagsAll
1301  from RecoBTag.ONNXRuntime.pfGlobalParticleTransformerAK8_cff import _pfGlobalParticleTransformerAK8JetTagsAll as pfGlobalParticleTransformerAK8JetTagsAll
1302 
1303  btagDiscriminatorsAK8 = cms.PSet(names = cms.vstring(
1304  pfParticleNetMassCorrelatedJetTagsAll+
1305  pfGlobalParticleTransformerAK8JetTagsAll+
1306  pfParticleNetFromMiniAODAK8JetTagsAll+
1307  pfParticleNetJetTagsAll+
1308  pfParticleNetMassRegressionOutputs
1309  )
1310  )
1311 
1312  btagDiscriminatorsAK8Subjets = cms.PSet(names = cms.vstring(
1313  'pfDeepFlavourJetTags:probb',
1314  'pfDeepFlavourJetTags:probbb',
1315  'pfDeepFlavourJetTags:problepb',
1316  'pfUnifiedParticleTransformerAK4DiscriminatorsJetTags:BvsAll'
1317  )
1318  )
1319 
1320  run3_nanoAOD_pre142X.toModify(btagDiscriminatorsAK8Subjets,
1321  names = cms.vstring('pfDeepCSVJetTags:probb','pfDeepCSVJetTags:probbb')
1322  )
1323 
1324  from PhysicsTools.PatAlgos.tools.puppiJetMETReclusteringFromMiniAOD_cff import setupPuppiAK4AK8METReclustering
1325  proc = setupPuppiAK4AK8METReclustering(proc, runOnMC=runOnMC, useExistingWeights=False,
1326  reclusterAK4MET=False, # Already setup to recluster AK4 Puppi jets and PuppiMET
1327  reclusterAK8=True,
1328  btagDiscriminatorsAK8=btagDiscriminatorsAK8,
1329  btagDiscriminatorsAK8Subjets=btagDiscriminatorsAK8Subjets
1330  )
1331 
1332  return proc
1333 
1334 #===========================================================================
1335 #
1336 # CUSTOMIZATION function
1337 #
1338 #===========================================================================
def RecomputePuppiWeightsMETAK8(proc)
def RecomputePuppiWeightsAndMET(proc)
def setupPuppiAK4AK8METReclustering(process, runOnMC, useExistingWeights=False, reclusterAK4MET=True, reclusterAK8=True, btagDiscriminatorsAK4=None, btagDiscriminatorsAK8=None, btagDiscriminatorsAK8Subjets=None)

◆ RemoveAllJetPtCuts()

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

Definition at line 1230 of file custom_jme_cff.py.

Referenced by PrepJMECustomNanoAOD().

1230 def RemoveAllJetPtCuts(proc):
1231  """
1232  Remove default pt cuts for all jets set in jets_cff.py
1233  """
1234 
1235  proc.finalJets.cut = "" # 15 -> 10
1236  proc.finalJetsPuppi.cut = "" # 15 -> 10
1237  proc.finalJetsAK8.cut = "" # 170 -> 170
1238  proc.genJetTable.cut = "" # 10 -> 8
1239  proc.genJetFlavourTable.cut = "" # 10 -> 8
1240  proc.genJetAK8Table.cut = "" # 100 -> 80
1241  proc.genJetAK8FlavourTable.cut = "" # 100 -> 80
1242 
1243  return proc
1244 
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 1100 of file custom_jme_cff.py.

Referenced by AddNewAK8GenJetsForJEC(), and AddNewGenJets().

1100 def SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False):
1101  """
1102  Schedule modules for a given genJet collection and save its variables into custom NanoAOD
1103  """
1104 
1105  genJetTableName = "jet{}Table".format(genJetName)
1106  setattr(proc, genJetTableName, genJetTable.clone(
1107  src = genJetFinalColl,
1108  cut = "", # No cut specified here. Save all gen jets after clustering
1109  name = genJetTablePrefix,
1110  doc = genJetTableDoc,
1111  variables = GENJETVARS
1112  )
1113  )
1114 
1115  genJetFlavourAssociationName = "genJet{}FlavourAssociation".format(genJetName)
1116  setattr(proc, genJetFlavourAssociationName, genJetFlavourAssociation.clone(
1117  jets = getattr(proc,genJetTableName).src,
1118  jetAlgorithm = supportedJetAlgos[genJetAlgo],
1119  rParam = genJetSizeNr,
1120  )
1121  )
1122 
1123  genJetFlavourTableName = "genJet{}FlavourTable".format(genJetName)
1124  setattr(proc, genJetFlavourTableName, genJetFlavourTable.clone(
1125  name = getattr(proc,genJetTableName).name,
1126  src = getattr(proc,genJetTableName).src,
1127  cut = getattr(proc,genJetTableName).cut,
1128  jetFlavourInfos = genJetFlavourAssociationName,
1129  )
1130  )
1131 
1132  genJetTaskName = "genJet{}Task".format(genJetName)
1133  setattr(proc, genJetTaskName, cms.Task(
1134  getattr(proc,genJetTableName),
1135  getattr(proc,genJetFlavourAssociationName),
1136  getattr(proc,genJetFlavourTableName)
1137  )
1138  )
1139  proc.jetMCTask.add(getattr(proc,genJetTaskName))
1140 
1141  return proc
1142 
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 425 of file custom_jme_cff.py.

References AddBTaggingScores(), AddDeepJetGluonLQuarkScores(), AddParticleNetAK4Scores(), AddPileUpJetIDVars(), AddQGLTaggerVars(), AddRobustParTAK4Scores(), and AddUnifiedParTAK4Scores().

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

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

Variable Documentation

◆ area

◆ bTagCSVV2

custom_jme_cff.bTagCSVV2

Definition at line 18 of file custom_jme_cff.py.

◆ btagDeepB

custom_jme_cff.btagDeepB

Definition at line 161 of file custom_jme_cff.py.

◆ bTagDeepCSV

custom_jme_cff.bTagDeepCSV

Definition at line 19 of file custom_jme_cff.py.

◆ btagDeepCvB

custom_jme_cff.btagDeepCvB

Definition at line 163 of file custom_jme_cff.py.

◆ btagDeepCvL

custom_jme_cff.btagDeepCvL

Definition at line 162 of file custom_jme_cff.py.

◆ btagDeepFlavB

custom_jme_cff.btagDeepFlavB

Definition at line 166 of file custom_jme_cff.py.

◆ btagDeepFlavC

custom_jme_cff.btagDeepFlavC

Definition at line 167 of file custom_jme_cff.py.

◆ btagDeepFlavCvB

custom_jme_cff.btagDeepFlavCvB

Definition at line 171 of file custom_jme_cff.py.

◆ btagDeepFlavCvL

custom_jme_cff.btagDeepFlavCvL

Definition at line 170 of file custom_jme_cff.py.

◆ btagDeepFlavG

custom_jme_cff.btagDeepFlavG

Definition at line 168 of file custom_jme_cff.py.

◆ btagDeepFlavQG

custom_jme_cff.btagDeepFlavQG

Definition at line 172 of file custom_jme_cff.py.

◆ btagDeepFlavUDS

custom_jme_cff.btagDeepFlavUDS

Definition at line 169 of file custom_jme_cff.py.

◆ bTagDeepJet

custom_jme_cff.bTagDeepJet

Definition at line 20 of file custom_jme_cff.py.

◆ bTagDiscriminatorsForAK4

custom_jme_cff.bTagDiscriminatorsForAK4

Definition at line 29 of file custom_jme_cff.py.

◆ btagRobustParTAK4B

custom_jme_cff.btagRobustParTAK4B

Definition at line 175 of file custom_jme_cff.py.

◆ btagRobustParTAK4C

custom_jme_cff.btagRobustParTAK4C

Definition at line 176 of file custom_jme_cff.py.

◆ btagRobustParTAK4CvB

custom_jme_cff.btagRobustParTAK4CvB

Definition at line 180 of file custom_jme_cff.py.

◆ btagRobustParTAK4CvL

custom_jme_cff.btagRobustParTAK4CvL

Definition at line 179 of file custom_jme_cff.py.

◆ btagRobustParTAK4G

custom_jme_cff.btagRobustParTAK4G

Definition at line 177 of file custom_jme_cff.py.

◆ btagRobustParTAK4QG

custom_jme_cff.btagRobustParTAK4QG

Definition at line 181 of file custom_jme_cff.py.

◆ btagRobustParTAK4UDS

custom_jme_cff.btagRobustParTAK4UDS

Definition at line 178 of file custom_jme_cff.py.

◆ btagUParTAK4B

custom_jme_cff.btagUParTAK4B

Definition at line 184 of file custom_jme_cff.py.

◆ btagUParTAK4CvB

custom_jme_cff.btagUParTAK4CvB

Definition at line 186 of file custom_jme_cff.py.

◆ btagUParTAK4CvL

custom_jme_cff.btagUParTAK4CvL

Definition at line 185 of file custom_jme_cff.py.

◆ btagUParTAK4QvG

custom_jme_cff.btagUParTAK4QvG

Definition at line 190 of file custom_jme_cff.py.

◆ btagUParTAK4SvCB

custom_jme_cff.btagUParTAK4SvCB

Definition at line 187 of file custom_jme_cff.py.

◆ btagUParTAK4SvUDG

custom_jme_cff.btagUParTAK4SvUDG

Definition at line 188 of file custom_jme_cff.py.

◆ btagUParTAK4TauVJet

custom_jme_cff.btagUParTAK4TauVJet

Definition at line 191 of file custom_jme_cff.py.

◆ btagUParTAK4UDG

custom_jme_cff.btagUParTAK4UDG

Definition at line 189 of file custom_jme_cff.py.

◆ BTAGVARS

custom_jme_cff.BTAGVARS

Definition at line 160 of file custom_jme_cff.py.

◆ CALOJETVARS

custom_jme_cff.CALOJETVARS

Definition at line 205 of file custom_jme_cff.py.

◆ chEmEF

custom_jme_cff.chEmEF

Definition at line 120 of file custom_jme_cff.py.

◆ chHadMultiplicity

custom_jme_cff.chHadMultiplicity

Definition at line 128 of file custom_jme_cff.py.

◆ chHEF

custom_jme_cff.chHEF

Definition at line 118 of file custom_jme_cff.py.

◆ config_genjets

custom_jme_cff.config_genjets

Definition at line 46 of file custom_jme_cff.py.

◆ config_recojets

custom_jme_cff.config_recojets

Definition at line 69 of file custom_jme_cff.py.

◆ DEEPJETVARS

custom_jme_cff.DEEPJETVARS

Definition at line 165 of file custom_jme_cff.py.

◆ doc

custom_jme_cff.doc

Definition at line 123 of file custom_jme_cff.py.

◆ elMultiplicity

custom_jme_cff.elMultiplicity

Definition at line 133 of file custom_jme_cff.py.

◆ emf

◆ float

custom_jme_cff.float

Definition at line 123 of file custom_jme_cff.py.

◆ foo

◆ genJetIdx

custom_jme_cff.genJetIdx

Definition at line 138 of file custom_jme_cff.py.

◆ GENJETVARS

custom_jme_cff.GENJETVARS

Definition at line 112 of file custom_jme_cff.py.

◆ hadronFlavour

◆ hfEmEF

custom_jme_cff.hfEmEF

Definition at line 124 of file custom_jme_cff.py.

◆ hfEMMultiplicity

custom_jme_cff.hfEMMultiplicity

Definition at line 131 of file custom_jme_cff.py.

◆ hfHadMultiplicity

custom_jme_cff.hfHadMultiplicity

Definition at line 130 of file custom_jme_cff.py.

◆ hfHEF

custom_jme_cff.hfHEF

Definition at line 123 of file custom_jme_cff.py.

◆ muEF

custom_jme_cff.muEF

Definition at line 122 of file custom_jme_cff.py.

◆ muMultiplicity

custom_jme_cff.muMultiplicity

Definition at line 132 of file custom_jme_cff.py.

◆ nanoInfo_genjets

custom_jme_cff.nanoInfo_genjets

Definition at line 56 of file custom_jme_cff.py.

◆ nanoInfo_recojets

custom_jme_cff.nanoInfo_recojets

Definition at line 95 of file custom_jme_cff.py.

◆ nConstituents

◆ neEmEF

custom_jme_cff.neEmEF

Definition at line 121 of file custom_jme_cff.py.

◆ neHadMultiplicity

custom_jme_cff.neHadMultiplicity

Definition at line 129 of file custom_jme_cff.py.

◆ neHEF

custom_jme_cff.neHEF

Definition at line 119 of file custom_jme_cff.py.

◆ nElectrons

◆ nMuons

◆ particleNetAK4_B

custom_jme_cff.particleNetAK4_B

Definition at line 197 of file custom_jme_cff.py.

◆ particleNetAK4_CvsB

custom_jme_cff.particleNetAK4_CvsB

Definition at line 199 of file custom_jme_cff.py.

◆ particleNetAK4_CvsL

custom_jme_cff.particleNetAK4_CvsL

Definition at line 198 of file custom_jme_cff.py.

◆ particleNetAK4_G

custom_jme_cff.particleNetAK4_G

Definition at line 201 of file custom_jme_cff.py.

◆ particleNetAK4_puIdDisc

custom_jme_cff.particleNetAK4_puIdDisc

Definition at line 202 of file custom_jme_cff.py.

◆ particleNetAK4_QvsG

custom_jme_cff.particleNetAK4_QvsG

Definition at line 200 of file custom_jme_cff.py.

◆ PARTICLENETAK4VARS

custom_jme_cff.PARTICLENETAK4VARS

Definition at line 196 of file custom_jme_cff.py.

◆ partonFlavour

◆ PFJETVARS

custom_jme_cff.PFJETVARS

Definition at line 115 of file custom_jme_cff.py.

◆ phoMultiplicity

custom_jme_cff.phoMultiplicity

Definition at line 134 of file custom_jme_cff.py.

◆ precision

custom_jme_cff.precision

Definition at line 123 of file custom_jme_cff.py.

◆ puId_beta

custom_jme_cff.puId_beta

Definition at line 149 of file custom_jme_cff.py.

◆ puId_dR2Mean

custom_jme_cff.puId_dR2Mean

Definition at line 141 of file custom_jme_cff.py.

◆ puId_frac01

custom_jme_cff.puId_frac01

Definition at line 144 of file custom_jme_cff.py.

◆ puId_frac02

custom_jme_cff.puId_frac02

Definition at line 145 of file custom_jme_cff.py.

◆ puId_frac03

custom_jme_cff.puId_frac03

Definition at line 146 of file custom_jme_cff.py.

◆ puId_frac04

custom_jme_cff.puId_frac04

Definition at line 147 of file custom_jme_cff.py.

◆ puId_jetR

custom_jme_cff.puId_jetR

Definition at line 151 of file custom_jme_cff.py.

◆ puId_jetRchg

custom_jme_cff.puId_jetRchg

Definition at line 152 of file custom_jme_cff.py.

◆ puId_majW

custom_jme_cff.puId_majW

Definition at line 142 of file custom_jme_cff.py.

◆ puId_minW

custom_jme_cff.puId_minW

Definition at line 143 of file custom_jme_cff.py.

◆ puId_nCharged

custom_jme_cff.puId_nCharged

Definition at line 153 of file custom_jme_cff.py.

◆ puId_ptD

custom_jme_cff.puId_ptD

Definition at line 148 of file custom_jme_cff.py.

◆ puId_pull

custom_jme_cff.puId_pull

Definition at line 150 of file custom_jme_cff.py.

◆ PUIDVARS

custom_jme_cff.PUIDVARS

Definition at line 140 of file custom_jme_cff.py.

◆ qgl_axis2

custom_jme_cff.qgl_axis2

Definition at line 156 of file custom_jme_cff.py.

◆ qgl_mult

custom_jme_cff.qgl_mult

Definition at line 158 of file custom_jme_cff.py.

◆ qgl_ptD

custom_jme_cff.qgl_ptD

Definition at line 157 of file custom_jme_cff.py.

◆ QGLVARS

custom_jme_cff.QGLVARS

Definition at line 155 of file custom_jme_cff.py.

◆ rawFactor

custom_jme_cff.rawFactor

Definition at line 116 of file custom_jme_cff.py.

◆ ROBUSTPARTAK4VARS

custom_jme_cff.ROBUSTPARTAK4VARS

Definition at line 174 of file custom_jme_cff.py.

◆ UNIFIEDPARTAK4VARS

custom_jme_cff.UNIFIEDPARTAK4VARS

Definition at line 183 of file custom_jme_cff.py.

◆ UParTAK4RegPtRawCorr

custom_jme_cff.UParTAK4RegPtRawCorr

Definition at line 192 of file custom_jme_cff.py.

◆ UParTAK4RegPtRawCorrNeutrino

custom_jme_cff.UParTAK4RegPtRawCorrNeutrino

Definition at line 193 of file custom_jme_cff.py.

◆ UParTAK4RegPtRawRes

custom_jme_cff.UParTAK4RegPtRawRes

Definition at line 194 of file custom_jme_cff.py.