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
 
 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
 
 foo
 
 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 368 of file custom_jme_cff.py.

References common_cff.Var().

Referenced by SavePatJets().

368 def AddBTaggingScores(proc, jetTableName=""):
369  """
370  Store b-tagging scores from various algortihm
371  """
372 
373  getattr(proc, jetTableName).variables.btagDeepB = BTAGVARS.btagDeepB
374  getattr(proc, jetTableName).variables.btagDeepCvL = BTAGVARS.btagDeepCvL
375  getattr(proc, jetTableName).variables.btagDeepCvB = BTAGVARS.btagDeepCvB
376  getattr(proc, jetTableName).variables.btagDeepFlavB = DEEPJETVARS.btagDeepFlavB
377  getattr(proc, jetTableName).variables.btagDeepFlavCvL = DEEPJETVARS.btagDeepFlavCvL
378  getattr(proc, jetTableName).variables.btagDeepFlavCvB = DEEPJETVARS.btagDeepFlavCvB
379 
380  run2_nanoAOD_ANY.toModify(
381  getattr(proc, jetTableName).variables,
382  btagCSVV2 = Var("bDiscriminator('pfCombinedInclusiveSecondaryVertexV2BJetTags')",float,doc=" pfCombinedInclusiveSecondaryVertexV2 b-tag discriminator (aka CSVV2)",precision=10)
383  )
384 
385  return proc
386 
def AddBTaggingScores(proc, jetTableName="")
def Var(expr, valtype, doc=None, precision=-1)
Definition: common_cff.py:16

◆ AddDeepJetGluonLQuarkScores()

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

Definition at line 387 of file custom_jme_cff.py.

Referenced by SavePatJets().

387 def AddDeepJetGluonLQuarkScores(proc, jetTableName=""):
388  """
389  Store DeepJet raw score in jetTable for gluon and light quark
390  """
391 
392  getattr(proc, jetTableName).variables.btagDeepFlavG = DEEPJETVARS.btagDeepFlavG
393  getattr(proc, jetTableName).variables.btagDeepFlavUDS = DEEPJETVARS.btagDeepFlavUDS
394  getattr(proc, jetTableName).variables.btagDeepFlavQG = DEEPJETVARS.btagDeepFlavQG
395 
396  return proc
397 
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 206 of file custom_jme_cff.py.

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

Referenced by SavePatJets().

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

References print(), and SavePatJets().

Referenced by PrepJMECustomNanoAOD().

994 def AddNewAK8CHSJets(proc, recoJA, runOnMC):
995  """
996  Store an AK8 CHS jet collection for JEC studies.
997  """
998  print("custom_jme_cff::AddNewAK8CHSJets: Make a new AK8 PF CHS jet collection for JEC studies")
999 
1000  #
1001  # Recluster AK8 CHS jets
1002  #
1003  cfg = {
1004  "jet" : "ak8pfchs",
1005  "inputCollection" : "",
1006  "genJetsCollection": "AK8GenJetsNoNu",
1007  "minPtFastjet" : 0., # Remove any pt threshold at the jet clustering stage.
1008  }
1009  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
1010 
1011  jetName = recoJetInfo.jetUpper
1012  payload = recoJetInfo.jetCorrPayload
1013 
1014  patJetFinalColl = recoJetInfo.patJetFinalCollection
1015  jetTablePrefix = "FatJetCHS"
1016  jetTableDoc = "AK8 PF CHS jets with JECs applied. Reclustered for JEC studies so only minimal info stored."
1017  ptcut = 15
1018 
1019  SavePatJets(proc,
1020  jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF=True,
1021  doCalo=False, ptcut=ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=runOnMC
1022  )
1023 
1024  return proc
1025 
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 1160 of file custom_jme_cff.py.

References print(), and SaveGenJets().

Referenced by PrepJMECustomNanoAOD().

1160 def AddNewAK8GenJetsForJEC(proc, genJA):
1161  """
1162  Make a separate AK8 Gen jet collection for JEC studies.
1163  """
1164  print("custom_jme_cff::AddNewAK8GenJetsForJEC: Add new AK8 Gen jets for JEC studies")
1165 
1166  #
1167  # Recluster AK8 Gen jet
1168  #
1169  cfg = {
1170  "jet" : "ak8gen",
1171  }
1172  genJetInfo = genJA.addGenJetCollection(proc, **cfg)
1173 
1174  genJetName = genJetInfo.jetUpper
1175  genJetAlgo = genJetInfo.jetAlgo
1176  genJetSize = genJetInfo.jetSize
1177  genJetSizeNr = genJetInfo.jetSizeNr
1178  genJetFinalColl = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1179  genJetTablePrefix = "GenJetAK8ForJEC"
1180  genJetTableDoc = "AK8 Gen jets (made with visible genparticles) with pt > 3 GeV. Reclustered for JEC studies."
1181 
1182  SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
1183 
1184  return proc
1185 
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 961 of file custom_jme_cff.py.

References print(), and SavePatJets().

Referenced by PrepJMECustomNanoAOD().

961 def AddNewAK8PuppiJetsForJEC(proc, recoJA, runOnMC):
962  """
963  Store a separate AK8 Puppi jet collection for JEC studies.
964  Only minimal info are stored
965  """
966  print("custom_jme_cff::AddNewAK8PuppiJetsForJEC: Make a new AK8 PF Puppi jet collection for JEC studies")
967 
968  #
969  # Recluster AK8 Puppi jets
970  #
971  cfg = {
972  "jet" : "ak8pfpuppi",
973  "inputCollection" : "",
974  "genJetsCollection": "AK8GenJetsNoNu",
975  "minPtFastjet" : 0., # Remove any pt threshold at the jet clustering stage.
976  }
977  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
978 
979  jetName = recoJetInfo.jetUpper
980  payload = recoJetInfo.jetCorrPayload
981 
982  patJetFinalColl = recoJetInfo.patJetFinalCollection
983  jetTablePrefix = "FatJetForJEC"
984  jetTableDoc = "AK8 PF Puppi jets with JECs applied. Reclustered for JEC studies so only minimal info stored."
985  ptcut = 15
986 
987  SavePatJets(proc,
988  jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF=True,
989  doCalo=False, ptcut=ptcut, doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=runOnMC
990  )
991 
992  return proc
993 
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 1060 of file custom_jme_cff.py.

References SaveGenJets().

Referenced by PrepJMECustomNanoAOD().

1060 def AddNewGenJets(proc, genJetInfo):
1061  """
1062  Add genJet into custom nanoAOD
1063  """
1064 
1065  genJetName = genJetInfo.jetUpper
1066  genJetAlgo = genJetInfo.jetAlgo
1067  genJetSize = genJetInfo.jetSize
1068  genJetSizeNr = genJetInfo.jetSizeNr
1069  genJetFinalColl = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1070  genJetTablePrefix = nanoInfo_genjets[genJetInfo.jet]["name"]
1071  genJetTableDoc = nanoInfo_genjets[genJetInfo.jet]["doc"]
1072 
1073  SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
1074 
1075  return proc
1076 
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 412 of file custom_jme_cff.py.

References SavePatJets().

Referenced by PrepJMECustomNanoAOD().

412 def AddNewPatJets(proc, recoJetInfo, runOnMC):
413  """
414  Add patJet into custom nanoAOD
415  """
416 
417  jetName = recoJetInfo.jetUpper
418  payload = recoJetInfo.jetCorrPayload
419  doPF = recoJetInfo.doPF
420  doCalo = recoJetInfo.doCalo
421  patJetFinalColl = recoJetInfo.patJetFinalCollection
422 
423  nanoInfoForJet = nanoInfo_recojets[recoJetInfo.jet]
424  jetTablePrefix = nanoInfoForJet["name"]
425  jetTableDoc = nanoInfoForJet["doc"]
426  ptcut = nanoInfoForJet["ptcut"] if "ptcut" in nanoInfoForJet else 8
427  doPUIDVar = nanoInfoForJet["doPUIDVar"] if "doPUIDVar" in nanoInfoForJet else False
428  doQGL = nanoInfoForJet["doQGL"] if "doQGL" in nanoInfoForJet else False
429  doBTag = nanoInfoForJet["doBTag"] if "doBTag" in nanoInfoForJet else False
430 
431  SavePatJets(proc,
432  jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF, doCalo,
433  ptcut=ptcut, doPUIDVar=doPUIDVar, doQGL=doQGL, doBTag=doBTag, runOnMC=runOnMC
434  )
435 
436  return proc
437 
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 398 of file custom_jme_cff.py.

Referenced by SavePatJets().

398 def AddParticleNetAK4Scores(proc, jetTableName=""):
399  """
400  Store ParticleNetAK4 scores in jetTable
401  """
402 
403  getattr(proc, jetTableName).variables.particleNetAK4_B = PARTICLENETAK4VARS.particleNetAK4_B
404  getattr(proc, jetTableName).variables.particleNetAK4_CvsL = PARTICLENETAK4VARS.particleNetAK4_CvsL
405  getattr(proc, jetTableName).variables.particleNetAK4_CvsB = PARTICLENETAK4VARS.particleNetAK4_CvsB
406  getattr(proc, jetTableName).variables.particleNetAK4_QvsG = PARTICLENETAK4VARS.particleNetAK4_QvsG
407  getattr(proc, jetTableName).variables.particleNetAK4_G = PARTICLENETAK4VARS.particleNetAK4_G
408  getattr(proc, jetTableName).variables.particleNetAK4_puIdDisc = PARTICLENETAK4VARS.particleNetAK4_puIdDisc
409 
410  return proc
411 
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 263 of file custom_jme_cff.py.

References PVValHelper.add().

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

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

References PVValHelper.add().

Referenced by ReclusterAK4PuppiJets(), and SavePatJets().

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

Referenced by PrepJMECustomNanoAOD().

1186 def AddVariablesForAK4GenJets(proc):
1187  proc.genJetTable.variables.nConstituents = GENJETVARS.nConstituents
1188  return proc
1189 
def AddVariablesForAK4GenJets(proc)

◆ AddVariablesForAK8GenJets()

def custom_jme_cff.AddVariablesForAK8GenJets (   proc)

Definition at line 1190 of file custom_jme_cff.py.

Referenced by PrepJMECustomNanoAOD().

1190 def AddVariablesForAK8GenJets(proc):
1191  proc.genJetAK8Table.variables.nConstituents = GENJETVARS.nConstituents
1192  return proc
1193 
1194 #===========================================================================
1195 #
1196 # Misc. functions
1197 #
1198 #===========================================================================
def AddVariablesForAK8GenJets(proc)

◆ AddVariablesForAK8PuppiJets()

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

Definition at line 1026 of file custom_jme_cff.py.

References common_cff.Var().

Referenced by PrepJMECustomNanoAOD().

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

1219 def PrepJMECustomNanoAOD(process,runOnMC):
1220 
1221 
1224  process = RemoveAllJetPtCuts(process)
1225 
1226 
1231  genJA = GenJetAdder()
1232  if runOnMC:
1233 
1236  process = AddVariablesForAK8GenJets(process)
1237 
1240  process = AddNewAK8GenJetsForJEC(process, genJA)
1241 
1244  process = ReclusterAK4GenJets(process, genJA)
1245  process = AddVariablesForAK4GenJets(process)
1246 
1249  for jetConfig in config_genjets:
1250  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
1251  genJetInfo = genJA.addGenJetCollection(process, **cfg)
1252  AddNewGenJets(process, genJetInfo)
1253 
1254 
1259  recoJA = RecoJetAdder(runOnMC=runOnMC)
1260 
1263  process = AddVariablesForAK8PuppiJets(process)
1264 
1267  process = AddNewAK8PuppiJetsForJEC(process, recoJA, runOnMC)
1268 
1271  process = AddNewAK8CHSJets(process, recoJA, runOnMC)
1272 
1275  process = ReclusterAK4CHSJets(process, recoJA, runOnMC)
1276 
1279  process = ReclusterAK4PuppiJets(process, recoJA, runOnMC)
1280 
1283  for jetConfig in config_recojets:
1284  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
1285  recoJetInfo = recoJA.addRecoJetCollection(process, **cfg)
1286  AddNewPatJets(process, recoJetInfo, runOnMC)
1287 
1288 
1293  def addAK4JetTasks(proc, addAK4CHSJetTasks, addAK4PuppiJetTasks):
1294  if addAK4CHSJetTasks:
1295  proc.nanoTableTaskCommon.add(proc.jetTask)
1296  proc.nanoTableTaskCommon.add(proc.jetTablesTask)
1297  proc.nanoTableTaskCommon.add(proc.jetForMETTask)
1298  if addAK4PuppiJetTasks:
1299  proc.nanoTableTaskCommon.add(proc.jetPuppiTask)
1300  proc.nanoTableTaskCommon.add(proc.jetPuppiTablesTask)
1301  proc.nanoTableTaskCommon.add(proc.jetPuppiForMETTask)
1302  return proc
1303 
1304  jmeNano_addAK4JetTasks_switch = cms.PSet(
1305  jmeNano_addAK4CHS_switch = cms.untracked.bool(True),
1306  jmeNano_addAK4Puppi_switch = cms.untracked.bool(False)
1307  )
1308  run2_nanoAOD_ANY.toModify(jmeNano_addAK4JetTasks_switch,
1309  jmeNano_addAK4CHS_switch = False,
1310  jmeNano_addAK4Puppi_switch = True
1311  )
1312  process = addAK4JetTasks(process,
1313  addAK4CHSJetTasks = jmeNano_addAK4JetTasks_switch.jmeNano_addAK4CHS_switch,
1314  addAK4PuppiJetTasks = jmeNano_addAK4JetTasks_switch.jmeNano_addAK4Puppi_switch,
1315  )
1316 
1317 
1320  if runOnMC:
1321  process.puTable.savePtHatMax = True
1322 
1323 
1326  if runOnMC:
1327  process.genWeightsTable.keepAllPSWeights = True
1328 
1329  return process
1330 
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 1336 of file custom_jme_cff.py.

References PrepJMECustomNanoAOD().

1336 def PrepJMECustomNanoAOD_Data(process):
1337  process = PrepJMECustomNanoAOD(process,runOnMC=False)
1338  return process
1339 
def PrepJMECustomNanoAOD(process, runOnMC)
def PrepJMECustomNanoAOD_Data(process)

◆ PrepJMECustomNanoAOD_MC()

def custom_jme_cff.PrepJMECustomNanoAOD_MC (   process)

Definition at line 1331 of file custom_jme_cff.py.

References PrepJMECustomNanoAOD().

1331 def PrepJMECustomNanoAOD_MC(process):
1332  process = PrepJMECustomNanoAOD(process,runOnMC=True)
1333 
1334  return process
1335 
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 748 of file custom_jme_cff.py.

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

Referenced by PrepJMECustomNanoAOD().

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

References print().

Referenced by PrepJMECustomNanoAOD().

1120 def ReclusterAK4GenJets(proc, genJA):
1121  """
1122  Recluster AK4 Gen jets and replace
1123  slimmedGenJets that is used as default
1124  to save AK4 Gen jets in NanoAODs.
1125  """
1126  print("custom_jme_cff::ReclusterAK4GenJets: Recluster AK4 Gen jets")
1127 
1128  #
1129  # Recluster AK4 Gen jet
1130  #
1131  cfg = {
1132  "jet" : "ak4gen",
1133  }
1134  genJetInfo = genJA.addGenJetCollection(proc, **cfg)
1135 
1136  genJetName = genJetInfo.jetUpper
1137  genJetAlgo = genJetInfo.jetAlgo
1138  genJetSize = genJetInfo.jetSize
1139  genJetSizeNr = genJetInfo.jetSizeNr
1140  selectedGenJets = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1141 
1142  #
1143  # Change jet source to the newly clustered jet collection. Set very low pt cut for jets
1144  # to be stored in the GenJet Table
1145  #
1146  proc.genJetTable.src = selectedGenJets
1147  proc.genJetTable.cut = "" # No cut specified here. Save all gen jets after clustering
1148  proc.genJetTable.doc = "AK4 Gen jets (made with visible genparticles) with pt > 3 GeV" # default pt cut after clustering is 3 GeV
1149 
1150  genJetFlavourAssociationName = "genJet{}FlavourAssociation".format(genJetName)
1151  setattr(proc, genJetFlavourAssociationName, genJetFlavourAssociation.clone(
1152  jets = proc.genJetTable.src,
1153  jetAlgorithm = supportedJetAlgos[genJetAlgo],
1154  rParam = genJetSizeNr,
1155  )
1156  )
1157  proc.jetMCTask.add(getattr(proc, genJetFlavourAssociationName))
1158  return proc
1159 
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 581 of file custom_jme_cff.py.

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

Referenced by PrepJMECustomNanoAOD().

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

Referenced by PrepJMECustomNanoAOD().

1199 def RemoveAllJetPtCuts(proc):
1200  """
1201  Remove default pt cuts for all jets set in jets_cff.py
1202  """
1203 
1204  proc.finalJets.cut = "" # 15 -> 10
1205  proc.finalJetsPuppi.cut = "" # 15 -> 10
1206  proc.finalJetsAK8.cut = "" # 170 -> 170
1207  proc.genJetTable.cut = "" # 10 -> 8
1208  proc.genJetFlavourTable.cut = "" # 10 -> 8
1209  proc.genJetAK8Table.cut = "" # 100 -> 80
1210  proc.genJetAK8FlavourTable.cut = "" # 100 -> 80
1211 
1212  return proc
1213 
1214 #===========================================================================
1215 #
1216 # CUSTOMIZATION function
1217 #
1218 #===========================================================================
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 1077 of file custom_jme_cff.py.

Referenced by AddNewAK8GenJetsForJEC(), and AddNewGenJets().

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

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

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

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

◆ btagDDX

custom_jme_cff.btagDDX

Definition at line 39 of file custom_jme_cff.py.

◆ btagDDXV2

custom_jme_cff.btagDDXV2

Definition at line 47 of file custom_jme_cff.py.

◆ btagDeepB

custom_jme_cff.btagDeepB

Definition at line 170 of file custom_jme_cff.py.

◆ bTagDeepCSV

custom_jme_cff.bTagDeepCSV

Definition at line 22 of file custom_jme_cff.py.

◆ btagDeepCvB

custom_jme_cff.btagDeepCvB

Definition at line 172 of file custom_jme_cff.py.

◆ btagDeepCvL

custom_jme_cff.btagDeepCvL

Definition at line 171 of file custom_jme_cff.py.

◆ btagDeepFlavB

custom_jme_cff.btagDeepFlavB

Definition at line 175 of file custom_jme_cff.py.

◆ btagDeepFlavC

custom_jme_cff.btagDeepFlavC

Definition at line 176 of file custom_jme_cff.py.

◆ btagDeepFlavCvB

custom_jme_cff.btagDeepFlavCvB

Definition at line 180 of file custom_jme_cff.py.

◆ btagDeepFlavCvL

custom_jme_cff.btagDeepFlavCvL

Definition at line 179 of file custom_jme_cff.py.

◆ btagDeepFlavG

custom_jme_cff.btagDeepFlavG

Definition at line 177 of file custom_jme_cff.py.

◆ btagDeepFlavQG

custom_jme_cff.btagDeepFlavQG

Definition at line 181 of file custom_jme_cff.py.

◆ btagDeepFlavUDS

custom_jme_cff.btagDeepFlavUDS

Definition at line 178 of file custom_jme_cff.py.

◆ bTagDeepJet

custom_jme_cff.bTagDeepJet

Definition at line 23 of file custom_jme_cff.py.

◆ bTagDiscriminatorsForAK4

custom_jme_cff.bTagDiscriminatorsForAK4

Definition at line 28 of file custom_jme_cff.py.

◆ btagHbb

custom_jme_cff.btagHbb

Definition at line 38 of file custom_jme_cff.py.

◆ BTAGVARS

custom_jme_cff.BTAGVARS

Definition at line 169 of file custom_jme_cff.py.

◆ CALOJETVARS

custom_jme_cff.CALOJETVARS

Definition at line 192 of file custom_jme_cff.py.

◆ chEmEF

custom_jme_cff.chEmEF

Definition at line 133 of file custom_jme_cff.py.

◆ chHEF

custom_jme_cff.chHEF

Definition at line 131 of file custom_jme_cff.py.

◆ config_genjets

custom_jme_cff.config_genjets

Definition at line 59 of file custom_jme_cff.py.

◆ config_recojets

custom_jme_cff.config_recojets

Definition at line 82 of file custom_jme_cff.py.

◆ DEEPJETVARS

custom_jme_cff.DEEPJETVARS

Definition at line 174 of file custom_jme_cff.py.

◆ doc

custom_jme_cff.doc

Definition at line 129 of file custom_jme_cff.py.

◆ emf

◆ float

custom_jme_cff.float

Definition at line 129 of file custom_jme_cff.py.

◆ foo

◆ GENJETVARS

custom_jme_cff.GENJETVARS

Definition at line 125 of file custom_jme_cff.py.

◆ hfEmEF

custom_jme_cff.hfEmEF

Definition at line 137 of file custom_jme_cff.py.

◆ hfHEF

custom_jme_cff.hfHEF

Definition at line 136 of file custom_jme_cff.py.

◆ int

custom_jme_cff.int

Definition at line 141 of file custom_jme_cff.py.

◆ muEF

custom_jme_cff.muEF

Definition at line 135 of file custom_jme_cff.py.

◆ nanoInfo_genjets

custom_jme_cff.nanoInfo_genjets

Definition at line 69 of file custom_jme_cff.py.

◆ nanoInfo_recojets

custom_jme_cff.nanoInfo_recojets

Definition at line 108 of file custom_jme_cff.py.

◆ nConstChHads

custom_jme_cff.nConstChHads

Definition at line 141 of file custom_jme_cff.py.

◆ nConstElecs

custom_jme_cff.nConstElecs

Definition at line 146 of file custom_jme_cff.py.

◆ nConstHFEMs

custom_jme_cff.nConstHFEMs

Definition at line 144 of file custom_jme_cff.py.

◆ nConstHFHads

custom_jme_cff.nConstHFHads

Definition at line 143 of file custom_jme_cff.py.

◆ nConstituents

◆ nConstMuons

custom_jme_cff.nConstMuons

Definition at line 145 of file custom_jme_cff.py.

◆ nConstNeuHads

custom_jme_cff.nConstNeuHads

Definition at line 142 of file custom_jme_cff.py.

◆ nConstPhotons

custom_jme_cff.nConstPhotons

Definition at line 147 of file custom_jme_cff.py.

◆ neEmEF

custom_jme_cff.neEmEF

Definition at line 134 of file custom_jme_cff.py.

◆ neHEF

custom_jme_cff.neHEF

Definition at line 132 of file custom_jme_cff.py.

◆ nElectrons

◆ nMuons

◆ particleNetAK4_B

custom_jme_cff.particleNetAK4_B

Definition at line 184 of file custom_jme_cff.py.

◆ particleNetAK4_CvsB

custom_jme_cff.particleNetAK4_CvsB

Definition at line 186 of file custom_jme_cff.py.

◆ particleNetAK4_CvsL

custom_jme_cff.particleNetAK4_CvsL

Definition at line 185 of file custom_jme_cff.py.

◆ particleNetAK4_G

custom_jme_cff.particleNetAK4_G

Definition at line 188 of file custom_jme_cff.py.

◆ particleNetAK4_puIdDisc

custom_jme_cff.particleNetAK4_puIdDisc

Definition at line 189 of file custom_jme_cff.py.

◆ particleNetAK4_QvsG

custom_jme_cff.particleNetAK4_QvsG

Definition at line 187 of file custom_jme_cff.py.

◆ PARTICLENETAK4VARS

custom_jme_cff.PARTICLENETAK4VARS

Definition at line 183 of file custom_jme_cff.py.

◆ PFJETVARS

custom_jme_cff.PFJETVARS

Definition at line 128 of file custom_jme_cff.py.

◆ precision

custom_jme_cff.precision

Definition at line 129 of file custom_jme_cff.py.

◆ puId_beta

custom_jme_cff.puId_beta

Definition at line 158 of file custom_jme_cff.py.

◆ puId_dR2Mean

custom_jme_cff.puId_dR2Mean

Definition at line 150 of file custom_jme_cff.py.

◆ puId_frac01

custom_jme_cff.puId_frac01

Definition at line 153 of file custom_jme_cff.py.

◆ puId_frac02

custom_jme_cff.puId_frac02

Definition at line 154 of file custom_jme_cff.py.

◆ puId_frac03

custom_jme_cff.puId_frac03

Definition at line 155 of file custom_jme_cff.py.

◆ puId_frac04

custom_jme_cff.puId_frac04

Definition at line 156 of file custom_jme_cff.py.

◆ puId_jetR

custom_jme_cff.puId_jetR

Definition at line 160 of file custom_jme_cff.py.

◆ puId_jetRchg

custom_jme_cff.puId_jetRchg

Definition at line 161 of file custom_jme_cff.py.

◆ puId_majW

custom_jme_cff.puId_majW

Definition at line 151 of file custom_jme_cff.py.

◆ puId_minW

custom_jme_cff.puId_minW

Definition at line 152 of file custom_jme_cff.py.

◆ puId_nCharged

custom_jme_cff.puId_nCharged

Definition at line 162 of file custom_jme_cff.py.

◆ puId_ptD

custom_jme_cff.puId_ptD

Definition at line 157 of file custom_jme_cff.py.

◆ puId_pull

custom_jme_cff.puId_pull

Definition at line 159 of file custom_jme_cff.py.

◆ PUIDVARS

custom_jme_cff.PUIDVARS

Definition at line 149 of file custom_jme_cff.py.

◆ qgl_axis2

custom_jme_cff.qgl_axis2

Definition at line 165 of file custom_jme_cff.py.

◆ qgl_mult

custom_jme_cff.qgl_mult

Definition at line 167 of file custom_jme_cff.py.

◆ qgl_ptD

custom_jme_cff.qgl_ptD

Definition at line 166 of file custom_jme_cff.py.

◆ QGLVARS

custom_jme_cff.QGLVARS

Definition at line 164 of file custom_jme_cff.py.

◆ rawFactor

custom_jme_cff.rawFactor

Definition at line 129 of file custom_jme_cff.py.