CMS 3D CMS Logo

Functions | Variables
custom_jme_cff Namespace Reference

Functions

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

Variables

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

Function Documentation

◆ AddBTaggingScores()

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

Definition at line 361 of file custom_jme_cff.py.

Referenced by SavePatJets().

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

◆ AddDeepJetGluonLQuarkScores()

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

Definition at line 376 of file custom_jme_cff.py.

Referenced by SavePatJets().

376 def AddDeepJetGluonLQuarkScores(proc, jetTableName=""):
377  """
378  Store DeepJet raw score in jetTable for gluon and light quark
379  """
380 
381  getattr(proc, jetTableName).variables.btagDeepFlavG = DEEPJETVARS.btagDeepFlavG
382  getattr(proc, jetTableName).variables.btagDeepFlavUDS = DEEPJETVARS.btagDeepFlavUDS
383  getattr(proc, jetTableName).variables.btagDeepFlavQG = DEEPJETVARS.btagDeepFlavQG
384 
385  return proc
386 
def AddDeepJetGluonLQuarkScores(proc, jetTableName="")

◆ AddJetID()

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

Definition at line 204 of file custom_jme_cff.py.

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

Referenced by SavePatJets().

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

◆ AddNewAK8CHSJets()

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

Definition at line 985 of file custom_jme_cff.py.

References print(), and SavePatJets().

Referenced by PrepJMECustomNanoAOD().

985 def AddNewAK8CHSJets(proc, recoJA, runOnMC):
986  """
987  Store an AK8 CHS jet collection for JEC studies.
988  """
989  print("custom_jme_cff::AddNewAK8CHSJets: Make a new AK8 PF CHS jet collection for JEC studies")
990 
991  #
992  # Recluster AK8 CHS jets
993  #
994  cfg = {
995  "jet" : "ak8pfchs",
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 = "FatJetCHS"
1007  jetTableDoc = "AK8 PF CHS 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 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 1151 of file custom_jme_cff.py.

References print(), and SaveGenJets().

Referenced by PrepJMECustomNanoAOD().

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

References print(), and SavePatJets().

Referenced by PrepJMECustomNanoAOD().

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

References SaveGenJets().

Referenced by PrepJMECustomNanoAOD().

1051 def AddNewGenJets(proc, genJetInfo):
1052  """
1053  Add genJet into custom nanoAOD
1054  """
1055 
1056  genJetName = genJetInfo.jetUpper
1057  genJetAlgo = genJetInfo.jetAlgo
1058  genJetSize = genJetInfo.jetSize
1059  genJetSizeNr = genJetInfo.jetSizeNr
1060  genJetFinalColl = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
1061  genJetTablePrefix = nanoInfo_genjets[genJetInfo.jet]["name"]
1062  genJetTableDoc = nanoInfo_genjets[genJetInfo.jet]["doc"]
1063 
1064  SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
1065 
1066  return proc
1067 
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 401 of file custom_jme_cff.py.

References SavePatJets().

Referenced by PrepJMECustomNanoAOD().

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

Referenced by SavePatJets().

387 def AddParticleNetAK4Scores(proc, jetTableName=""):
388  """
389  Store ParticleNetAK4 scores in jetTable
390  """
391 
392  getattr(proc, jetTableName).variables.particleNetAK4_B = PARTICLENETAK4VARS.particleNetAK4_B
393  getattr(proc, jetTableName).variables.particleNetAK4_CvsL = PARTICLENETAK4VARS.particleNetAK4_CvsL
394  getattr(proc, jetTableName).variables.particleNetAK4_CvsB = PARTICLENETAK4VARS.particleNetAK4_CvsB
395  getattr(proc, jetTableName).variables.particleNetAK4_QvsG = PARTICLENETAK4VARS.particleNetAK4_QvsG
396  getattr(proc, jetTableName).variables.particleNetAK4_G = PARTICLENETAK4VARS.particleNetAK4_G
397  getattr(proc, jetTableName).variables.particleNetAK4_puIdDisc = PARTICLENETAK4VARS.particleNetAK4_puIdDisc
398 
399  return proc
400 
def AddParticleNetAK4Scores(proc, jetTableName="")

◆ AddPileUpJetIDVars()

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

Definition at line 261 of file custom_jme_cff.py.

References PVValHelper.add().

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

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

◆ AddQGLTaggerVars()

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

Definition at line 328 of file custom_jme_cff.py.

References PVValHelper.add().

Referenced by ReclusterAK4PuppiJets(), and SavePatJets().

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

Referenced by PrepJMECustomNanoAOD().

1177 def AddVariablesForAK4GenJets(proc):
1178  proc.genJetTable.variables.nConstituents = GENJETVARS.nConstituents
1179  return proc
1180 
def AddVariablesForAK4GenJets(proc)

◆ AddVariablesForAK8GenJets()

def custom_jme_cff.AddVariablesForAK8GenJets (   proc)

Definition at line 1181 of file custom_jme_cff.py.

Referenced by PrepJMECustomNanoAOD().

1181 def AddVariablesForAK8GenJets(proc):
1182  proc.genJetAK8Table.variables.nConstituents = GENJETVARS.nConstituents
1183  return proc
1184 
1185 #===========================================================================
1186 #
1187 # Misc. functions
1188 #
1189 #===========================================================================
def AddVariablesForAK8GenJets(proc)

◆ AddVariablesForAK8PuppiJets()

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

Definition at line 1017 of file custom_jme_cff.py.

References common_cff.Var().

Referenced by PrepJMECustomNanoAOD().

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

1210 def PrepJMECustomNanoAOD(process,runOnMC):
1211 
1212 
1215  process = RemoveAllJetPtCuts(process)
1216 
1217 
1222  genJA = GenJetAdder()
1223  if runOnMC:
1224 
1227  process = AddVariablesForAK8GenJets(process)
1228 
1231  process = AddNewAK8GenJetsForJEC(process, genJA)
1232 
1235  process = ReclusterAK4GenJets(process, genJA)
1236  process = AddVariablesForAK4GenJets(process)
1237 
1240  for jetConfig in config_genjets:
1241  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
1242  genJetInfo = genJA.addGenJetCollection(process, **cfg)
1243  AddNewGenJets(process, genJetInfo)
1244 
1245 
1250  recoJA = RecoJetAdder(runOnMC=runOnMC)
1251 
1254  process = AddVariablesForAK8PuppiJets(process)
1255 
1258  process = AddNewAK8PuppiJetsForJEC(process, recoJA, runOnMC)
1259 
1262  process = AddNewAK8CHSJets(process, recoJA, runOnMC)
1263 
1266  process = ReclusterAK4CHSJets(process, recoJA, runOnMC)
1267 
1270  process = ReclusterAK4PuppiJets(process, recoJA, runOnMC)
1271 
1274  for jetConfig in config_recojets:
1275  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
1276  recoJetInfo = recoJA.addRecoJetCollection(process, **cfg)
1277  AddNewPatJets(process, recoJetInfo, runOnMC)
1278 
1279 
1284  def addAK4JetTasks(proc, addAK4CHSJetTasks, addAK4PuppiJetTasks):
1285  if addAK4CHSJetTasks:
1286  proc.nanoTableTaskCommon.add(proc.jetTask)
1287  proc.nanoTableTaskCommon.add(proc.jetTablesTask)
1288  proc.nanoTableTaskCommon.add(proc.jetForMETTask)
1289  if addAK4PuppiJetTasks:
1290  proc.nanoTableTaskCommon.add(proc.jetPuppiTask)
1291  proc.nanoTableTaskCommon.add(proc.jetPuppiTablesTask)
1292  proc.nanoTableTaskCommon.add(proc.jetPuppiForMETTask)
1293  return proc
1294 
1295  jmeNano_addAK4JetTasks_switch = cms.PSet(
1296  jmeNano_addAK4CHS_switch = cms.untracked.bool(True),
1297  jmeNano_addAK4Puppi_switch = cms.untracked.bool(False)
1298  )
1299  run2_nanoAOD_ANY.toModify(jmeNano_addAK4JetTasks_switch,
1300  jmeNano_addAK4CHS_switch = False,
1301  jmeNano_addAK4Puppi_switch = True
1302  )
1303  process = addAK4JetTasks(process,
1304  addAK4CHSJetTasks = jmeNano_addAK4JetTasks_switch.jmeNano_addAK4CHS_switch,
1305  addAK4PuppiJetTasks = jmeNano_addAK4JetTasks_switch.jmeNano_addAK4Puppi_switch,
1306  )
1307 
1308 
1311  if runOnMC:
1312  process.puTable.savePtHatMax = True
1313 
1314 
1317  if runOnMC:
1318  process.genWeightsTable.keepAllPSWeights = True
1319 
1320  return process
1321 
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 1327 of file custom_jme_cff.py.

References PrepJMECustomNanoAOD().

1327 def PrepJMECustomNanoAOD_Data(process):
1328  process = PrepJMECustomNanoAOD(process,runOnMC=False)
1329  return process
1330 
def PrepJMECustomNanoAOD(process, runOnMC)
def PrepJMECustomNanoAOD_Data(process)

◆ PrepJMECustomNanoAOD_MC()

def custom_jme_cff.PrepJMECustomNanoAOD_MC (   process)

Definition at line 1322 of file custom_jme_cff.py.

References PrepJMECustomNanoAOD().

1322 def PrepJMECustomNanoAOD_MC(process):
1323  process = PrepJMECustomNanoAOD(process,runOnMC=True)
1324 
1325  return process
1326 
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 738 of file custom_jme_cff.py.

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

Referenced by PrepJMECustomNanoAOD().

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

References print().

Referenced by PrepJMECustomNanoAOD().

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

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

Referenced by PrepJMECustomNanoAOD().

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

Referenced by PrepJMECustomNanoAOD().

1190 def RemoveAllJetPtCuts(proc):
1191  """
1192  Remove default pt cuts for all jets set in jets_cff.py
1193  """
1194 
1195  proc.finalJets.cut = "" # 15 -> 10
1196  proc.finalJetsPuppi.cut = "" # 15 -> 10
1197  proc.finalJetsAK8.cut = "" # 170 -> 170
1198  proc.genJetTable.cut = "" # 10 -> 8
1199  proc.genJetFlavourTable.cut = "" # 10 -> 8
1200  proc.genJetAK8Table.cut = "" # 100 -> 80
1201  proc.genJetAK8FlavourTable.cut = "" # 100 -> 80
1202 
1203  return proc
1204 
1205 #===========================================================================
1206 #
1207 # CUSTOMIZATION function
1208 #
1209 #===========================================================================
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 1068 of file custom_jme_cff.py.

Referenced by AddNewAK8GenJetsForJEC(), and AddNewGenJets().

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

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

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

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

Variable Documentation

◆ area

◆ bTagCSVV2

custom_jme_cff.bTagCSVV2

Definition at line 23 of file custom_jme_cff.py.

◆ btagCSVV2

custom_jme_cff.btagCSVV2

Definition at line 168 of file custom_jme_cff.py.

◆ btagDDX

custom_jme_cff.btagDDX

Definition at line 36 of file custom_jme_cff.py.

◆ btagDDXV2

custom_jme_cff.btagDDXV2

Definition at line 44 of file custom_jme_cff.py.

◆ btagDeepB

custom_jme_cff.btagDeepB

Definition at line 167 of file custom_jme_cff.py.

◆ bTagDeepCSV

custom_jme_cff.bTagDeepCSV

Definition at line 24 of file custom_jme_cff.py.

◆ btagDeepCvB

custom_jme_cff.btagDeepCvB

Definition at line 170 of file custom_jme_cff.py.

◆ btagDeepCvL

custom_jme_cff.btagDeepCvL

Definition at line 169 of file custom_jme_cff.py.

◆ btagDeepFlavB

custom_jme_cff.btagDeepFlavB

Definition at line 173 of file custom_jme_cff.py.

◆ btagDeepFlavC

custom_jme_cff.btagDeepFlavC

Definition at line 174 of file custom_jme_cff.py.

◆ btagDeepFlavCvB

custom_jme_cff.btagDeepFlavCvB

Definition at line 178 of file custom_jme_cff.py.

◆ btagDeepFlavCvL

custom_jme_cff.btagDeepFlavCvL

Definition at line 177 of file custom_jme_cff.py.

◆ btagDeepFlavG

custom_jme_cff.btagDeepFlavG

Definition at line 175 of file custom_jme_cff.py.

◆ btagDeepFlavQG

custom_jme_cff.btagDeepFlavQG

Definition at line 179 of file custom_jme_cff.py.

◆ btagDeepFlavUDS

custom_jme_cff.btagDeepFlavUDS

Definition at line 176 of file custom_jme_cff.py.

◆ bTagDeepJet

custom_jme_cff.bTagDeepJet

Definition at line 25 of file custom_jme_cff.py.

◆ bTagDiscriminatorsForAK4

custom_jme_cff.bTagDiscriminatorsForAK4

Definition at line 30 of file custom_jme_cff.py.

◆ btagHbb

custom_jme_cff.btagHbb

Definition at line 35 of file custom_jme_cff.py.

◆ BTAGVARS

custom_jme_cff.BTAGVARS

Definition at line 166 of file custom_jme_cff.py.

◆ CALOJETVARS

custom_jme_cff.CALOJETVARS

Definition at line 190 of file custom_jme_cff.py.

◆ chEmEF

custom_jme_cff.chEmEF

Definition at line 130 of file custom_jme_cff.py.

◆ chHEF

custom_jme_cff.chHEF

Definition at line 128 of file custom_jme_cff.py.

◆ config_genjets

custom_jme_cff.config_genjets

Definition at line 56 of file custom_jme_cff.py.

◆ config_recojets

custom_jme_cff.config_recojets

Definition at line 79 of file custom_jme_cff.py.

◆ DEEPJETVARS

custom_jme_cff.DEEPJETVARS

Definition at line 172 of file custom_jme_cff.py.

◆ doc

custom_jme_cff.doc

Definition at line 126 of file custom_jme_cff.py.

◆ emf

◆ float

custom_jme_cff.float

Definition at line 126 of file custom_jme_cff.py.

◆ GENJETVARS

custom_jme_cff.GENJETVARS

Definition at line 122 of file custom_jme_cff.py.

◆ hfEmEF

custom_jme_cff.hfEmEF

Definition at line 134 of file custom_jme_cff.py.

◆ hfHEF

custom_jme_cff.hfHEF

Definition at line 133 of file custom_jme_cff.py.

◆ int

custom_jme_cff.int

Definition at line 138 of file custom_jme_cff.py.

◆ muEF

custom_jme_cff.muEF

Definition at line 132 of file custom_jme_cff.py.

◆ nanoInfo_genjets

custom_jme_cff.nanoInfo_genjets

Definition at line 66 of file custom_jme_cff.py.

◆ nanoInfo_recojets

custom_jme_cff.nanoInfo_recojets

Definition at line 105 of file custom_jme_cff.py.

◆ nConstChHads

custom_jme_cff.nConstChHads

Definition at line 138 of file custom_jme_cff.py.

◆ nConstElecs

custom_jme_cff.nConstElecs

Definition at line 143 of file custom_jme_cff.py.

◆ nConstHFEMs

custom_jme_cff.nConstHFEMs

Definition at line 141 of file custom_jme_cff.py.

◆ nConstHFHads

custom_jme_cff.nConstHFHads

Definition at line 140 of file custom_jme_cff.py.

◆ nConstituents

◆ nConstMuons

custom_jme_cff.nConstMuons

Definition at line 142 of file custom_jme_cff.py.

◆ nConstNeuHads

custom_jme_cff.nConstNeuHads

Definition at line 139 of file custom_jme_cff.py.

◆ nConstPhotons

custom_jme_cff.nConstPhotons

Definition at line 144 of file custom_jme_cff.py.

◆ neEmEF

custom_jme_cff.neEmEF

Definition at line 131 of file custom_jme_cff.py.

◆ neHEF

custom_jme_cff.neHEF

Definition at line 129 of file custom_jme_cff.py.

◆ nElectrons

◆ nMuons

◆ particleNetAK4_B

custom_jme_cff.particleNetAK4_B

Definition at line 182 of file custom_jme_cff.py.

◆ particleNetAK4_CvsB

custom_jme_cff.particleNetAK4_CvsB

Definition at line 184 of file custom_jme_cff.py.

◆ particleNetAK4_CvsL

custom_jme_cff.particleNetAK4_CvsL

Definition at line 183 of file custom_jme_cff.py.

◆ particleNetAK4_G

custom_jme_cff.particleNetAK4_G

Definition at line 186 of file custom_jme_cff.py.

◆ particleNetAK4_puIdDisc

custom_jme_cff.particleNetAK4_puIdDisc

Definition at line 187 of file custom_jme_cff.py.

◆ particleNetAK4_QvsG

custom_jme_cff.particleNetAK4_QvsG

Definition at line 185 of file custom_jme_cff.py.

◆ PARTICLENETAK4VARS

custom_jme_cff.PARTICLENETAK4VARS

Definition at line 181 of file custom_jme_cff.py.

◆ PFJETVARS

custom_jme_cff.PFJETVARS

Definition at line 125 of file custom_jme_cff.py.

◆ precision

custom_jme_cff.precision

Definition at line 126 of file custom_jme_cff.py.

◆ puId_beta

custom_jme_cff.puId_beta

Definition at line 155 of file custom_jme_cff.py.

◆ puId_dR2Mean

custom_jme_cff.puId_dR2Mean

Definition at line 147 of file custom_jme_cff.py.

◆ puId_frac01

custom_jme_cff.puId_frac01

Definition at line 150 of file custom_jme_cff.py.

◆ puId_frac02

custom_jme_cff.puId_frac02

Definition at line 151 of file custom_jme_cff.py.

◆ puId_frac03

custom_jme_cff.puId_frac03

Definition at line 152 of file custom_jme_cff.py.

◆ puId_frac04

custom_jme_cff.puId_frac04

Definition at line 153 of file custom_jme_cff.py.

◆ puId_jetR

custom_jme_cff.puId_jetR

Definition at line 157 of file custom_jme_cff.py.

◆ puId_jetRchg

custom_jme_cff.puId_jetRchg

Definition at line 158 of file custom_jme_cff.py.

◆ puId_majW

custom_jme_cff.puId_majW

Definition at line 148 of file custom_jme_cff.py.

◆ puId_minW

custom_jme_cff.puId_minW

Definition at line 149 of file custom_jme_cff.py.

◆ puId_nCharged

custom_jme_cff.puId_nCharged

Definition at line 159 of file custom_jme_cff.py.

◆ puId_ptD

custom_jme_cff.puId_ptD

Definition at line 154 of file custom_jme_cff.py.

◆ puId_pull

custom_jme_cff.puId_pull

Definition at line 156 of file custom_jme_cff.py.

◆ PUIDVARS

custom_jme_cff.PUIDVARS

Definition at line 146 of file custom_jme_cff.py.

◆ qgl_axis2

custom_jme_cff.qgl_axis2

Definition at line 162 of file custom_jme_cff.py.

◆ qgl_mult

custom_jme_cff.qgl_mult

Definition at line 164 of file custom_jme_cff.py.

◆ qgl_ptD

custom_jme_cff.qgl_ptD

Definition at line 163 of file custom_jme_cff.py.

◆ QGLVARS

custom_jme_cff.QGLVARS

Definition at line 161 of file custom_jme_cff.py.

◆ rawFactor

custom_jme_cff.rawFactor

Definition at line 126 of file custom_jme_cff.py.