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="", jetSequenceName="")
 
def AddNewGenJets (proc, genJetInfo)
 
def AddNewPatJets (proc, recoJetInfo, runOnMC)
 
def AddParticleNetAK4Scores (proc, jetTableName="")
 
def AddPileUpJetIDVars (proc, jetName="", jetSrc="", jetTableName="", jetSequenceName="")
 
def AddQGLTaggerVars (proc, jetName="", jetSrc="", jetTableName="", jetSequenceName="", 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 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
 
 btagDeepB
 
 bTagDeepCSV
 
 btagDeepCvL
 
 btagDeepFlavB
 
 btagDeepFlavC
 
 btagDeepFlavG
 
 btagDeepFlavUDS
 
 bTagDeepJet
 
 bTagDiscriminatorsForAK4
 
 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_puIdDisc
 
 particleNetAK4_QvsG
 
 PARTICLENETAK4VARS
 
 PFJETVARS
 
 precision
 
 puId_beta
 
 puId_dR2Mean
 
 puId_frac01
 
 puId_frac02
 
 puId_frac03
 
 puId_frac04
 
 puId_jetR
 
 puId_jetRchg
 
 puId_majW
 
 puId_minW
 
 puId_nCharged
 
 puId_ptD
 
 puId_pull
 
 PUIDVARS
 
 qgl_axis2
 
 qgl_mult
 
 qgl_ptD
 
 QGLVARS
 
 rawFactor
 

Function Documentation

◆ AddBTaggingScores()

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

Definition at line 366 of file custom_jme_cff.py.

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

Referenced by SavePatJets().

◆ AddDeepJetGluonLQuarkScores()

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

Definition at line 379 of file custom_jme_cff.py.

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

Referenced by SavePatJets().

◆ AddJetID()

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

Definition at line 205 of file custom_jme_cff.py.

205 def AddJetID(proc, jetName="", jetSrc="", jetTableName="", jetSequenceName=""):
206  """
207  Setup modules to calculate PF jet ID
208  """
209 
210  isPUPPIJet = True if "Puppi" in jetName else False
211 
212  looseJetId = "looseJetId{}".format(jetName)
213  setattr(proc, looseJetId, proc.looseJetId.clone(
214  src = jetSrc,
215  filterParams=proc.looseJetId.filterParams.clone(
216  version ="WINTER16"
217  ),
218  )
219  )
220 
221  tightJetId = "tightJetId{}".format(jetName)
222  setattr(proc, tightJetId, proc.tightJetId.clone(
223  src = jetSrc,
224  filterParams=proc.tightJetId.filterParams.clone(
225  version = "SUMMER18{}".format("PUPPI" if isPUPPIJet else "")
226  ),
227  )
228  )
229 
230  tightJetIdLepVeto = "tightJetIdLepVeto{}".format(jetName)
231  setattr(proc, tightJetIdLepVeto, proc.tightJetIdLepVeto.clone(
232  src = jetSrc,
233  filterParams=proc.tightJetIdLepVeto.filterParams.clone(
234  version = "SUMMER18{}".format("PUPPI" if isPUPPIJet else "")
235  ),
236  )
237  )
238  run2_jme_2016.toModify(getattr(proc, tightJetId) .filterParams, version = "WINTER16" )
239  run2_jme_2016.toModify(getattr(proc, tightJetIdLepVeto) .filterParams, version = "WINTER16" )
240  run2_jme_2017.toModify(getattr(proc, tightJetId) .filterParams, version = "WINTER17{}".format("PUPPI" if isPUPPIJet else ""))
241  run2_jme_2017.toModify(getattr(proc, tightJetIdLepVeto) .filterParams, version = "WINTER17{}".format("PUPPI" if isPUPPIJet else ""))
242 
243  #
244  # Save variables as userInts in each jet
245  #
246  patJetWithUserData = "{}WithUserData".format(jetSrc)
247  getattr(proc, patJetWithUserData).userInts.tightId = cms.InputTag(tightJetId)
248  getattr(proc, patJetWithUserData).userInts.tightIdLepVeto = cms.InputTag(tightJetIdLepVeto)
249  run2_jme_2016.toModify(getattr(proc, patJetWithUserData).userInts, looseId = cms.InputTag(looseJetId))
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  run2_jme_2016.toModify(getattr(proc, jetTableName).variables, jetId = Var("userInt('tightIdLepVeto')*4+userInt('tightId')*2+userInt('looseId')",int, doc="Jet ID flags bit1 is loose, bit2 is tight, bit3 is tightLepVeto"))
256 
257  getattr(proc,jetSequenceName).insert(getattr(proc,jetSequenceName).index(getattr(proc, jetSrc))+1, getattr(proc, tightJetId))
258  getattr(proc,jetSequenceName).insert(getattr(proc,jetSequenceName).index(getattr(proc, tightJetId))+1, getattr(proc, tightJetIdLepVeto))
259 
260  setattr(proc,"_"+jetSequenceName+"_2016", getattr(proc,jetSequenceName).copy())
261  getattr(proc,"_"+jetSequenceName+"_2016").insert(getattr(proc, "_"+jetSequenceName+"_2016").index(getattr(proc, tightJetId)), getattr(proc, looseJetId))
262  run2_jme_2016.toReplaceWith(getattr(proc,jetSequenceName), getattr(proc, "_"+jetSequenceName+"_2016"))
263 
264  return proc
265 

References filterCSVwithJSON.copy, edm::eventsetup::heterocontainer.insert(), and common_cff.Var().

Referenced by SavePatJets().

◆ AddNewGenJets()

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

Definition at line 724 of file custom_jme_cff.py.

724 def AddNewGenJets(proc, genJetInfo):
725  """
726  Add genJet into custom nanoAOD
727  """
728 
729  genJetName = genJetInfo.jetUpper
730  genJetAlgo = genJetInfo.jetAlgo
731  genJetSize = genJetInfo.jetSize
732  genJetSizeNr = genJetInfo.jetSizeNr
733  genJetFinalColl = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
734  genJetTablePrefix = nanoInfo_genjets[genJetInfo.jet]["name"]
735  genJetTableDoc = nanoInfo_genjets[genJetInfo.jet]["doc"]
736 
737  SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
738 
739  return proc
740 

References SaveGenJets().

Referenced by PrepJMECustomNanoAOD().

◆ AddNewPatJets()

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

Definition at line 402 of file custom_jme_cff.py.

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

References SavePatJets().

Referenced by PrepJMECustomNanoAOD().

◆ AddParticleNetAK4Scores()

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

Definition at line 389 of file custom_jme_cff.py.

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

Referenced by SavePatJets().

◆ AddPileUpJetIDVars()

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

Definition at line 266 of file custom_jme_cff.py.

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

References edm::eventsetup::heterocontainer.insert().

Referenced by ReclusterAK4CHSJets(), and SavePatJets().

◆ AddQGLTaggerVars()

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

Definition at line 333 of file custom_jme_cff.py.

333 def AddQGLTaggerVars(proc, jetName="", jetSrc="", jetTableName="", jetSequenceName="", calculateQGLVars=False):
334  """
335  Schedule the QGTagger module to calculate input variables to the QG likelihood
336  """
337 
338  QGLTagger="qgtagger{}".format(jetName)
339  patJetWithUserData="{}WithUserData".format(jetSrc)
340 
341  if calculateQGLVars:
342  setattr(proc, QGLTagger, qgtagger.clone(
343  srcJets=jetSrc
344  )
345  )
346 
347  #
348  # Save variables as userFloats and userInts for each jet
349  #
350  getattr(proc,patJetWithUserData).userFloats.qgl_axis2 = cms.InputTag(QGLTagger+":axis2")
351  getattr(proc,patJetWithUserData).userFloats.qgl_ptD = cms.InputTag(QGLTagger+":ptD")
352  getattr(proc,patJetWithUserData).userInts.qgl_mult = cms.InputTag(QGLTagger+":mult")
353 
354  #
355  # Specfiy variables in the jet table to save in NanoAOD
356  #
357  getattr(proc,jetTableName).variables.qgl_axis2 = QGLVARS.qgl_axis2
358  getattr(proc,jetTableName).variables.qgl_ptD = QGLVARS.qgl_ptD
359  getattr(proc,jetTableName).variables.qgl_mult = QGLVARS.qgl_mult
360 
361  if calculateQGLVars:
362  getattr(proc,jetSequenceName).insert(getattr(proc,jetSequenceName).index(getattr(proc, jetSrc))+1, getattr(proc, QGLTagger))
363 
364  return proc
365 

References edm::eventsetup::heterocontainer.insert().

Referenced by SavePatJets().

◆ AddVariablesForAK4GenJets()

def custom_jme_cff.AddVariablesForAK4GenJets (   proc)

Definition at line 824 of file custom_jme_cff.py.

824 def AddVariablesForAK4GenJets(proc):
825  proc.genJetTable.variables.nConstituents = GENJETVARS.nConstituents
826  return proc
827 

Referenced by PrepJMECustomNanoAOD().

◆ AddVariablesForAK8GenJets()

def custom_jme_cff.AddVariablesForAK8GenJets (   proc)

Definition at line 828 of file custom_jme_cff.py.

828 def AddVariablesForAK8GenJets(proc):
829  proc.genJetAK8Table.variables.nConstituents = GENJETVARS.nConstituents
830  return proc
831 
832 #===========================================================================
833 #
834 # Misc. functions
835 #
836 #===========================================================================

Referenced by PrepJMECustomNanoAOD().

◆ AddVariablesForAK8PuppiJets()

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

Definition at line 692 of file custom_jme_cff.py.

693  """
694  Add more variables for AK8 PFPUPPI jets
695  """
696 
697  #
698  # These variables are not stored for AK8PFCHS (slimmedJetsAK8)
699  # in MiniAOD if their pt < 170 GeV. Hence the conditional fill.
700  #
701  proc.fatJetTable.variables.chHEF = Var("?isPFJet()?chargedHadronEnergyFraction():-1", float, doc="charged Hadron Energy Fraction", precision = 6)
702  proc.fatJetTable.variables.neHEF = Var("?isPFJet()?neutralHadronEnergyFraction():-1", float, doc="neutral Hadron Energy Fraction", precision = 6)
703  proc.fatJetTable.variables.chEmEF = Var("?isPFJet()?chargedEmEnergyFraction():-1", float, doc="charged Electromagnetic Energy Fraction", precision = 6)
704  proc.fatJetTable.variables.neEmEF = Var("?isPFJet()?neutralEmEnergyFraction():-1", float, doc="neutral Electromagnetic Energy Fraction", precision = 6)
705  proc.fatJetTable.variables.muEF = Var("?isPFJet()?muonEnergyFraction():-1", float, doc="muon Energy Fraction", precision = 6)
706  proc.fatJetTable.variables.hfHEF = Var("?isPFJet()?HFHadronEnergyFraction():-1", float, doc="energy fraction in forward hadronic calorimeter", precision = 6)
707  proc.fatJetTable.variables.hfEmEF = Var("?isPFJet()?HFEMEnergyFraction():-1", float, doc="energy fraction in forward EM calorimeter", precision = 6)
708  proc.fatJetTable.variables.nConstChHads = Var("?isPFJet()?chargedHadronMultiplicity():-1",int, doc="number of charged hadrons in the jet")
709  proc.fatJetTable.variables.nConstNeuHads = Var("?isPFJet()?neutralHadronMultiplicity():-1",int, doc="number of neutral hadrons in the jet")
710  proc.fatJetTable.variables.nConstHFHads = Var("?isPFJet()?HFHadronMultiplicity():-1", int, doc="number of HF Hadrons in the jet")
711  proc.fatJetTable.variables.nConstHFEMs = Var("?isPFJet()?HFEMMultiplicity():-1", int, doc="number of HF EMs in the jet")
712  proc.fatJetTable.variables.nConstMuons = Var("?isPFJet()?muonMultiplicity():-1", int, doc="number of muons in the jet")
713  proc.fatJetTable.variables.nConstElecs = Var("?isPFJet()?electronMultiplicity():-1", int, doc="number of electrons in the jet")
714  proc.fatJetTable.variables.nConstPhotons = Var("?isPFJet()?photonMultiplicity():-1", int, doc="number of photons in the jet")
715 
716  return proc
717 #******************************************
718 #
719 #
720 # Gen Jets related functions
721 #
722 #
723 #******************************************

References common_cff.Var().

Referenced by PrepJMECustomNanoAOD().

◆ PrepJMECustomNanoAOD()

def custom_jme_cff.PrepJMECustomNanoAOD (   process,
  runOnMC 
)

Definition at line 856 of file custom_jme_cff.py.

856 def PrepJMECustomNanoAOD(process,runOnMC):
857 
858 
861  process = RemoveAllJetPtCuts(process)
862 
863 
868  genJA = GenJetAdder()
869  if runOnMC:
870 
873  process = AddVariablesForAK8GenJets(process)
874 
877  process = ReclusterAK4GenJets(process, genJA)
878  process = AddVariablesForAK4GenJets(process)
879 
882  for jetConfig in config_genjets:
883  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
884  genJetInfo = genJA.addGenJetCollection(process, **cfg)
885  AddNewGenJets(process, genJetInfo)
886 
887 
892  recoJA = RecoJetAdder(runOnMC=runOnMC)
893 
896  process = AddVariablesForAK8PuppiJets(process)
897 
900  process = ReclusterAK4CHSJets(process, recoJA, runOnMC)
901 
904  for jetConfig in config_recojets:
905  cfg = { k : v for k, v in jetConfig.items() if k != "enabled"}
906  recoJetInfo = recoJA.addRecoJetCollection(process, **cfg)
907  AddNewPatJets(process, recoJetInfo, runOnMC)
908 
909 
912  if runOnMC:
913  process.puTable.savePtHatMax = True
914 
915  return process
916 

References AddNewGenJets(), AddNewPatJets(), AddVariablesForAK4GenJets(), AddVariablesForAK8GenJets(), AddVariablesForAK8PuppiJets(), ReclusterAK4CHSJets(), ReclusterAK4GenJets(), and RemoveAllJetPtCuts().

Referenced by PrepJMECustomNanoAOD_Data(), and PrepJMECustomNanoAOD_MC().

◆ PrepJMECustomNanoAOD_Data()

def custom_jme_cff.PrepJMECustomNanoAOD_Data (   process)

Definition at line 921 of file custom_jme_cff.py.

921 def PrepJMECustomNanoAOD_Data(process):
922  PrepJMECustomNanoAOD(process,runOnMC=False)
923  return process

References PrepJMECustomNanoAOD().

◆ PrepJMECustomNanoAOD_MC()

def custom_jme_cff.PrepJMECustomNanoAOD_MC (   process)

Definition at line 917 of file custom_jme_cff.py.

917 def PrepJMECustomNanoAOD_MC(process):
918  PrepJMECustomNanoAOD(process,runOnMC=True)
919  return process
920 

References PrepJMECustomNanoAOD().

◆ 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.  

Definition at line 570 of file custom_jme_cff.py.

570 def ReclusterAK4CHSJets(proc, recoJA, runOnMC):
571  """
572  Recluster AK4 CHS jets and replace slimmedJets
573  that is used as default to save AK4 CHS jets
574  in NanoAODs.
575  """
576  print("custom_jme_cff::ReclusterAK4CHSJets: Recluster AK4 PF CHS jets")
577 
578  #
579  # Recluster AK4 CHS jets
580  #
581  cfg = {
582  "jet" : "ak4pfchs",
583  "inputCollection" : "",
584  "genJetsCollection": "AK4GenJetsNoNu",
585  "bTagDiscriminators": bTagDiscriminatorsForAK4
586  }
587  recoJetInfo = recoJA.addRecoJetCollection(proc, **cfg)
588 
589  jetName = recoJetInfo.jetUpper
590  patJetFinalColl = "selectedUpdatedPatJets{}Final".format(jetName)
591 
592  #
593  # Change the input jet source for jetCorrFactorsNano
594  # and updatedJets
595  #
596  proc.jetCorrFactorsNano.src=patJetFinalColl
597  proc.updatedJets.jetSource=patJetFinalColl
598 
599  #
600  # Change pt cut
601  #
602  proc.finalJets.cut = "pt > 2"
603  proc.simpleCleanerTable.jetSel = "pt > 10" # Change this from 15 -> 10
604 
605  #
606  # Add variables
607  #
608  proc.jetTable.variables.hfHEF = PFJETVARS.hfHEF
609  proc.jetTable.variables.hfEmEF = PFJETVARS.hfEmEF
610  proc.jetTable.variables.nConstChHads = PFJETVARS.nConstChHads
611  proc.jetTable.variables.nConstNeuHads = PFJETVARS.nConstNeuHads
612  proc.jetTable.variables.nConstHFHads = PFJETVARS.nConstHFHads
613  proc.jetTable.variables.nConstHFEMs = PFJETVARS.nConstHFEMs
614  proc.jetTable.variables.nConstMuons = PFJETVARS.nConstMuons
615  proc.jetTable.variables.nConstElecs = PFJETVARS.nConstElecs
616  proc.jetTable.variables.nConstPhotons = PFJETVARS.nConstPhotons
617 
618  proc.jetTable.doc = cms.string("AK4 PF CHS Jets with JECs applied, after basic selection (pt > 2)")
619 
620  #
621  # Setup pileup jet ID with 80X training.
622  #
623  pileupJetId80X = "pileupJetId80X"
624  setattr(proc, pileupJetId80X, pileupJetId.clone(
625  jets="updatedJets",
626  algos=cms.VPSet(_chsalgos_81x),
627  inputIsCorrected=True,
628  applyJec=False,
629  vertexes="offlineSlimmedPrimaryVertices"
630  )
631  )
632  proc.jetSequence.insert(proc.jetSequence.index(proc.pileupJetId94X), getattr(proc, pileupJetId80X))
633 
634  proc.updatedJetsWithUserData.userInts.puId80XfullId = cms.InputTag('pileupJetId80X:fullId')
635  run2_jme_2016.toModify(proc.updatedJetsWithUserData.userFloats, puId80XDisc = cms.InputTag("pileupJetId80X:fullDiscriminant"))
636 
637  proc.jetTable.variables.puId = Var("userInt('puId80XfullId')", int, doc="Pilup ID flags with 80X (2016) training")
638  run2_jme_2016.toModify(proc.jetTable.variables, puIdDisc = Var("userFloat('puId80XDisc')",float,doc="Pilup ID discriminant with 80X (2016) training",precision=10))
639 
640  #
641  # Add variables for pileup jet ID studies.
642  #
643  proc = AddPileUpJetIDVars(proc,
644  jetName="",
645  jetSrc="updatedJets",
646  jetTableName="jetTable",
647  jetSequenceName="jetSequence"
648  )
649  #
650  # Add variables for quark guon likelihood tagger studies.
651  # Save variables as userFloats and userInts in each jet
652  #
653  proc.updatedJetsWithUserData.userFloats.qgl_axis2 = cms.InputTag("qgtagger:axis2")
654  proc.updatedJetsWithUserData.userFloats.qgl_ptD = cms.InputTag("qgtagger:ptD")
655  proc.updatedJetsWithUserData.userInts.qgl_mult = cms.InputTag("qgtagger:mult")
656  #
657  # Specfiy variables in the jetTable to save in NanoAOD
658  #
659  proc.jetTable.variables.qgl_axis2 = QGLVARS.qgl_axis2
660  proc.jetTable.variables.qgl_ptD = QGLVARS.qgl_ptD
661  proc.jetTable.variables.qgl_mult = QGLVARS.qgl_mult
662  #
663  # Save DeepJet raw score for gluon and light quarks
664  #
665  proc.jetTable.variables.btagDeepFlavG = DEEPJETVARS.btagDeepFlavG
666  proc.jetTable.variables.btagDeepFlavUDS = DEEPJETVARS.btagDeepFlavUDS
667  #
668  # Add ParticleNetAK4 scores
669  #
670  proc.jetTable.variables.particleNetAK4_B = PARTICLENETAK4VARS.particleNetAK4_B
671  proc.jetTable.variables.particleNetAK4_CvsL = PARTICLENETAK4VARS.particleNetAK4_CvsL
672  proc.jetTable.variables.particleNetAK4_CvsB = PARTICLENETAK4VARS.particleNetAK4_CvsB
673  proc.jetTable.variables.particleNetAK4_QvsG = PARTICLENETAK4VARS.particleNetAK4_QvsG
674  proc.jetTable.variables.particleNetAK4_puIdDisc = PARTICLENETAK4VARS.particleNetAK4_puIdDisc
675 
676  #Adding hf shower shape producer to the jet sequence. By default this producer is not automatically rerun at the NANOAOD step
677  #The following lines make sure it is.
678  hfJetShowerShapeforCustomNanoAOD = "hfJetShowerShapeforCustomNanoAOD"
679  setattr(proc, hfJetShowerShapeforCustomNanoAOD, hfJetShowerShapeforNanoAOD.clone(jets="updatedJets",vertices="offlineSlimmedPrimaryVertices") )
680  proc.jetSequence.insert(proc.jetSequence.index(proc.updatedJetsWithUserData), getattr(proc, hfJetShowerShapeforCustomNanoAOD))
681  proc.updatedJetsWithUserData.userFloats.hfsigmaEtaEta = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:sigmaEtaEta')
682  proc.updatedJetsWithUserData.userFloats.hfsigmaPhiPhi = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:sigmaPhiPhi')
683  proc.updatedJetsWithUserData.userInts.hfcentralEtaStripSize = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:centralEtaStripSize')
684  proc.updatedJetsWithUserData.userInts.hfadjacentEtaStripsSize = cms.InputTag('hfJetShowerShapeforCustomNanoAOD:adjacentEtaStripsSize')
685  proc.jetTable.variables.hfsigmaEtaEta = Var("userFloat('hfsigmaEtaEta')",float,doc="sigmaEtaEta for HF jets (noise discriminating variable)",precision=10)
686  proc.jetTable.variables.hfsigmaPhiPhi = Var("userFloat('hfsigmaPhiPhi')",float,doc="sigmaPhiPhi for HF jets (noise discriminating variable)",precision=10)
687  proc.jetTable.variables.hfcentralEtaStripSize = Var("userInt('hfcentralEtaStripSize')", int, doc="eta size of the central tower strip in HF (noise discriminating variable) ")
688  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) ")
689 
690  return proc
691 

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

Referenced by PrepJMECustomNanoAOD().

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

784 def ReclusterAK4GenJets(proc, genJA):
785  """
786  Recluster AK4 Gen jets and replace
787  slimmedGenJets that is used as default
788  to save AK4 Gen jets in NanoAODs.
789  """
790  print("custom_jme_cff::ReclusterAK4GenJets: Recluster AK4 Gen jets")
791 
792  #
793  # Recluster AK4 Gen jet
794  #
795  cfg = {
796  "jet" : "ak4gen",
797  }
798  genJetInfo = genJA.addGenJetCollection(proc, **cfg)
799 
800  genJetName = genJetInfo.jetUpper
801  genJetAlgo = genJetInfo.jetAlgo
802  genJetSize = genJetInfo.jetSize
803  genJetSizeNr = genJetInfo.jetSizeNr
804  selectedPatGenJets = "{}{}{}".format(genJetAlgo.upper(), genJetSize, "GenJetsNoNu")
805 
806  #
807  # Change jet source to the newly clustered jet collection. Set very low pt cut for jets
808  # to be stored in the GenJet Table
809  #
810  proc.genJetTable.src = selectedPatGenJets
811  proc.genJetTable.cut = "pt > 1"
812  proc.genJetTable.doc ="AK4 Gen jets (made with visible genparticles)"
813 
814  genJetFlavourAssociationThisJet = "genJet{}FlavourAssociation".format(genJetName)
815  setattr(proc, genJetFlavourAssociationThisJet, genJetFlavourAssociation.clone(
816  jets = proc.genJetTable.src,
817  jetAlgorithm = supportedJetAlgos[genJetAlgo],
818  rParam = genJetSizeNr,
819  )
820  )
821  proc.jetMC.insert(proc.jetMC.index(proc.genJetFlavourTable), getattr(proc, genJetFlavourAssociationThisJet))
822  return proc
823 

References print().

Referenced by PrepJMECustomNanoAOD().

◆ RemoveAllJetPtCuts()

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

Definition at line 837 of file custom_jme_cff.py.

837 def RemoveAllJetPtCuts(proc):
838  """
839  Remove default pt cuts for all jets set in jets_cff.py
840  """
841 
842  proc.finalJets.cut = "" # 15 -> 10
843  proc.finalJetsAK8.cut = "" # 170 -> 170
844  proc.genJetTable.cut = "" # 10 -> 8
845  proc.genJetFlavourTable.cut = "" # 10 -> 8
846  proc.genJetAK8Table.cut = "" # 100 -> 80
847  proc.genJetAK8FlavourTable.cut = "" # 100 -> 80
848 
849  return proc
850 
851 #===========================================================================
852 #
853 # CUSTOMIZATION function
854 #
855 #===========================================================================

Referenced by PrepJMECustomNanoAOD().

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

741 def SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False):
742  """
743  Schedule modules for a given genJet collection and save its variables into custom NanoAOD
744  """
745 
746  genJetTableThisJet = "jet{}Table".format(genJetName)
747  setattr(proc, genJetTableThisJet, genJetTable.clone(
748  src = genJetFinalColl,
749  cut = "pt > 1",
750  name = genJetTablePrefix,
751  doc = genJetTableDoc,
752  variables = GENJETVARS
753  )
754  )
755 
756  genJetFlavourAssociationThisJet = "genJet{}FlavourAssociation".format(genJetName)
757  setattr(proc, genJetFlavourAssociationThisJet, genJetFlavourAssociation.clone(
758  jets = getattr(proc,genJetTableThisJet).src,
759  jetAlgorithm = supportedJetAlgos[genJetAlgo],
760  rParam = genJetSizeNr,
761  )
762  )
763 
764  genJetFlavourTableThisJet = "genJet{}FlavourTable".format(genJetName)
765  setattr(proc, genJetFlavourTableThisJet, genJetFlavourTable.clone(
766  name = getattr(proc,genJetTableThisJet).name,
767  src = getattr(proc,genJetTableThisJet).src,
768  cut = getattr(proc,genJetTableThisJet).cut,
769  jetFlavourInfos = genJetFlavourAssociationThisJet,
770  )
771  )
772 
773  genJetSequenceName = "genJet{}Sequence".format(genJetName)
774  setattr(proc, genJetSequenceName, cms.Sequence(
775  getattr(proc,genJetTableThisJet)+
776  getattr(proc,genJetFlavourAssociationThisJet)+
777  getattr(proc,genJetFlavourTableThisJet)
778  )
779  )
780  proc.nanoSequenceMC.insert(proc.nanoSequenceMC.index(proc.jetMC)+1, getattr(proc,genJetSequenceName))
781 
782  return proc
783 

Referenced by AddNewGenJets().

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

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

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

Referenced by AddNewPatJets().

Variable Documentation

◆ area

custom_jme_cff.area

◆ bTagCSVV2

custom_jme_cff.bTagCSVV2

Definition at line 21 of file custom_jme_cff.py.

◆ btagCSVV2

custom_jme_cff.btagCSVV2

Definition at line 174 of file custom_jme_cff.py.

◆ btagDeepB

custom_jme_cff.btagDeepB

Definition at line 173 of file custom_jme_cff.py.

◆ bTagDeepCSV

custom_jme_cff.bTagDeepCSV

Definition at line 22 of file custom_jme_cff.py.

◆ btagDeepCvL

custom_jme_cff.btagDeepCvL

Definition at line 175 of file custom_jme_cff.py.

◆ btagDeepFlavB

custom_jme_cff.btagDeepFlavB

Definition at line 178 of file custom_jme_cff.py.

◆ btagDeepFlavC

custom_jme_cff.btagDeepFlavC

Definition at line 179 of file custom_jme_cff.py.

◆ btagDeepFlavG

custom_jme_cff.btagDeepFlavG

Definition at line 180 of file custom_jme_cff.py.

◆ btagDeepFlavUDS

custom_jme_cff.btagDeepFlavUDS

Definition at line 181 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.

◆ BTAGVARS

custom_jme_cff.BTAGVARS

Definition at line 172 of file custom_jme_cff.py.

◆ CALOJETVARS

custom_jme_cff.CALOJETVARS

Definition at line 191 of file custom_jme_cff.py.

◆ chEmEF

custom_jme_cff.chEmEF

Definition at line 136 of file custom_jme_cff.py.

◆ chHEF

custom_jme_cff.chHEF

Definition at line 134 of file custom_jme_cff.py.

◆ config_genjets

custom_jme_cff.config_genjets

Definition at line 36 of file custom_jme_cff.py.

◆ config_recojets

custom_jme_cff.config_recojets

Definition at line 59 of file custom_jme_cff.py.

◆ DEEPJETVARS

custom_jme_cff.DEEPJETVARS

Definition at line 177 of file custom_jme_cff.py.

◆ doc

custom_jme_cff.doc

Definition at line 139 of file custom_jme_cff.py.

◆ emf

custom_jme_cff.emf

◆ float

custom_jme_cff.float

Definition at line 139 of file custom_jme_cff.py.

◆ GENJETVARS

custom_jme_cff.GENJETVARS

Definition at line 128 of file custom_jme_cff.py.

◆ hfEmEF

custom_jme_cff.hfEmEF

Definition at line 140 of file custom_jme_cff.py.

◆ hfHEF

custom_jme_cff.hfHEF

Definition at line 139 of file custom_jme_cff.py.

◆ int

custom_jme_cff.int

Definition at line 144 of file custom_jme_cff.py.

◆ muEF

custom_jme_cff.muEF

Definition at line 138 of file custom_jme_cff.py.

◆ nanoInfo_genjets

custom_jme_cff.nanoInfo_genjets

Definition at line 46 of file custom_jme_cff.py.

◆ nanoInfo_recojets

custom_jme_cff.nanoInfo_recojets

Definition at line 96 of file custom_jme_cff.py.

◆ nConstChHads

custom_jme_cff.nConstChHads

Definition at line 144 of file custom_jme_cff.py.

◆ nConstElecs

custom_jme_cff.nConstElecs

Definition at line 149 of file custom_jme_cff.py.

◆ nConstHFEMs

custom_jme_cff.nConstHFEMs

Definition at line 147 of file custom_jme_cff.py.

◆ nConstHFHads

custom_jme_cff.nConstHFHads

Definition at line 146 of file custom_jme_cff.py.

◆ nConstituents

custom_jme_cff.nConstituents

◆ nConstMuons

custom_jme_cff.nConstMuons

Definition at line 148 of file custom_jme_cff.py.

◆ nConstNeuHads

custom_jme_cff.nConstNeuHads

Definition at line 145 of file custom_jme_cff.py.

◆ nConstPhotons

custom_jme_cff.nConstPhotons

Definition at line 150 of file custom_jme_cff.py.

◆ neEmEF

custom_jme_cff.neEmEF

Definition at line 137 of file custom_jme_cff.py.

◆ neHEF

custom_jme_cff.neHEF

Definition at line 135 of file custom_jme_cff.py.

◆ nElectrons

custom_jme_cff.nElectrons

◆ nMuons

custom_jme_cff.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_puIdDisc

custom_jme_cff.particleNetAK4_puIdDisc

Definition at line 188 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 131 of file custom_jme_cff.py.

◆ precision

custom_jme_cff.precision

Definition at line 139 of file custom_jme_cff.py.

◆ puId_beta

custom_jme_cff.puId_beta

Definition at line 161 of file custom_jme_cff.py.

◆ puId_dR2Mean

custom_jme_cff.puId_dR2Mean

Definition at line 153 of file custom_jme_cff.py.

◆ puId_frac01

custom_jme_cff.puId_frac01

Definition at line 156 of file custom_jme_cff.py.

◆ puId_frac02

custom_jme_cff.puId_frac02

Definition at line 157 of file custom_jme_cff.py.

◆ puId_frac03

custom_jme_cff.puId_frac03

Definition at line 158 of file custom_jme_cff.py.

◆ puId_frac04

custom_jme_cff.puId_frac04

Definition at line 159 of file custom_jme_cff.py.

◆ puId_jetR

custom_jme_cff.puId_jetR

Definition at line 163 of file custom_jme_cff.py.

◆ puId_jetRchg

custom_jme_cff.puId_jetRchg

Definition at line 164 of file custom_jme_cff.py.

◆ puId_majW

custom_jme_cff.puId_majW

Definition at line 154 of file custom_jme_cff.py.

◆ puId_minW

custom_jme_cff.puId_minW

Definition at line 155 of file custom_jme_cff.py.

◆ puId_nCharged

custom_jme_cff.puId_nCharged

Definition at line 165 of file custom_jme_cff.py.

◆ puId_ptD

custom_jme_cff.puId_ptD

Definition at line 160 of file custom_jme_cff.py.

◆ puId_pull

custom_jme_cff.puId_pull

Definition at line 162 of file custom_jme_cff.py.

◆ PUIDVARS

custom_jme_cff.PUIDVARS

Definition at line 152 of file custom_jme_cff.py.

◆ qgl_axis2

custom_jme_cff.qgl_axis2

Definition at line 168 of file custom_jme_cff.py.

◆ qgl_mult

custom_jme_cff.qgl_mult

Definition at line 170 of file custom_jme_cff.py.

◆ qgl_ptD

custom_jme_cff.qgl_ptD

Definition at line 169 of file custom_jme_cff.py.

◆ QGLVARS

custom_jme_cff.QGLVARS

Definition at line 167 of file custom_jme_cff.py.

◆ rawFactor

custom_jme_cff.rawFactor

Definition at line 132 of file custom_jme_cff.py.

custom_jme_cff.AddDeepJetGluonLQuarkScores
def AddDeepJetGluonLQuarkScores(proc, jetTableName="")
Definition: custom_jme_cff.py:379
custom_jme_cff.AddPileUpJetIDVars
def AddPileUpJetIDVars(proc, jetName="", jetSrc="", jetTableName="", jetSequenceName="")
Definition: custom_jme_cff.py:266
custom_jme_cff.ReclusterAK4GenJets
def ReclusterAK4GenJets(proc, genJA)
Definition: custom_jme_cff.py:784
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
custom_jme_cff.AddVariablesForAK8PuppiJets
def AddVariablesForAK8PuppiJets(proc)
Definition: custom_jme_cff.py:692
custom_jme_cff.AddNewGenJets
def AddNewGenJets(proc, genJetInfo)
Definition: custom_jme_cff.py:724
custom_jme_cff.PrepJMECustomNanoAOD_MC
def PrepJMECustomNanoAOD_MC(process)
Definition: custom_jme_cff.py:917
common_cff.Var
def Var(expr, valtype, compression=None, doc=None, mcOnly=False, precision=-1)
Definition: common_cff.py:20
custom_jme_cff.AddVariablesForAK4GenJets
def AddVariablesForAK4GenJets(proc)
Definition: custom_jme_cff.py:824
custom_jme_cff.AddVariablesForAK8GenJets
def AddVariablesForAK8GenJets(proc)
Definition: custom_jme_cff.py:828
custom_jme_cff.AddBTaggingScores
def AddBTaggingScores(proc, jetTableName="")
Definition: custom_jme_cff.py:366
custom_jme_cff.SaveGenJets
def SaveGenJets(proc, genJetName, genJetAlgo, genJetSizeNr, genJetFinalColl, genJetTablePrefix, genJetTableDoc, runOnMC=False)
Definition: custom_jme_cff.py:741
custom_jme_cff.AddParticleNetAK4Scores
def AddParticleNetAK4Scores(proc, jetTableName="")
Definition: custom_jme_cff.py:389
custom_jme_cff.PrepJMECustomNanoAOD
def PrepJMECustomNanoAOD(process, runOnMC)
Definition: custom_jme_cff.py:856
custom_jme_cff.RemoveAllJetPtCuts
def RemoveAllJetPtCuts(proc)
Definition: custom_jme_cff.py:837
custom_jme_cff.ReclusterAK4CHSJets
def ReclusterAK4CHSJets(proc, recoJA, runOnMC)
Definition: custom_jme_cff.py:570
custom_jme_cff.PrepJMECustomNanoAOD_Data
def PrepJMECustomNanoAOD_Data(process)
Definition: custom_jme_cff.py:921
print
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:46
custom_jme_cff.AddJetID
def AddJetID(proc, jetName="", jetSrc="", jetTableName="", jetSequenceName="")
Definition: custom_jme_cff.py:205
custom_jme_cff.AddQGLTaggerVars
def AddQGLTaggerVars(proc, jetName="", jetSrc="", jetTableName="", jetSequenceName="", calculateQGLVars=False)
Definition: custom_jme_cff.py:333
custom_jme_cff.AddNewPatJets
def AddNewPatJets(proc, recoJetInfo, runOnMC)
Definition: custom_jme_cff.py:402
format
edm::eventsetup::heterocontainer::insert
bool insert(Storage &iStorage, ItemType *iItem, const IdTag &iIdTag)
Definition: HCMethods.h:50
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
custom_jme_cff.SavePatJets
def SavePatJets(proc, jetName, payload, patJetFinalColl, jetTablePrefix, jetTableDoc, doPF, doCalo, ptcut="", doPUIDVar=False, doQGL=False, doBTag=False, runOnMC=False)
Definition: custom_jme_cff.py:435