CMS 3D CMS Logo

Classes | Functions | Variables
runMETCorrectionsAndUncertainties Namespace Reference

Classes

class  RunMETCorrectionsAndUncertainties
 

Functions

def isValidInputTag (input)
 
def runMetCorAndUncForMiniAODProduction (process, metType="PF", jetCollUnskimmed="patJets", photonColl="selectedPatPhotons", electronColl="selectedPatElectrons", muonColl="selectedPatMuons", tauColl="selectedPatTaus", pfCandColl="particleFlow", jetCleaning="LepClean", jetSelection="pt>15 && abs(eta)<9.9", jecUnFile="", jetFlavor="AK4PFchs", recoMetFromPFCs=False, postfix="")
 
def runMetCorAndUncFromMiniAOD (process, metType="PF", jetCollUnskimmed="slimmedJets", photonColl="slimmedPhotons", electronColl="slimmedElectrons", muonColl="slimmedMuons", tauColl="slimmedTaus", pfCandColl="packedPFCandidates", jetFlavor="AK4PFchs", jetCleaning="LepClean", isData=False, manualJetConfig=False, reclusterJets=False, jetSelection="pt>15 && abs(eta)<9.9", recoMetFromPFCs=False, jetCorLabelL3="ak4PFCHSL1FastL2L3Corrector", jetCorLabelRes="ak4PFCHSL1FastL2L3ResidualCorrector", CHS=False, reapplyJEC=True, jecUncFile="", postfix="")
 

Variables

 runMETCorrectionsAndUncertainties
 

Function Documentation

def runMETCorrectionsAndUncertainties.isValidInputTag (   input)

Definition at line 9 of file runMETCorrectionsAndUncertainties.py.

Referenced by runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.createMVAMETModule(), runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.getMETUncertainties(), and runMETCorrectionsAndUncertainties.RunMETCorrectionsAndUncertainties.jetCleaning().

9 def isValidInputTag(input):
10  input_str = input
11  if isinstance(input, cms.InputTag):
12  input_str = input.value()
13  if input is None or input_str == '""':
14  return False
15  else:
16  return True
17 
18 
def runMETCorrectionsAndUncertainties.runMetCorAndUncForMiniAODProduction (   process,
  metType = "PF",
  jetCollUnskimmed = "patJets",
  photonColl = "selectedPatPhotons",
  electronColl = "selectedPatElectrons",
  muonColl = "selectedPatMuons",
  tauColl = "selectedPatTaus",
  pfCandColl = "particleFlow",
  jetCleaning = "LepClean",
  jetSelection = "pt>15 && abs(eta)<9.9",
  jecUnFile = "",
  jetFlavor = "AK4PFchs",
  recoMetFromPFCs = False,
  postfix = "" 
)

Definition at line 1701 of file runMETCorrectionsAndUncertainties.py.

References runMetCorAndUncFromMiniAOD().

Referenced by extraSlimmedMETs_MuEGFixMoriond2017.addExtraMETCollections(), corMETFromMuonAndEG.corMETFromMuonAndEG(), and miniAOD_tools.miniAOD_customizeCommon().

1701  postfix=""):
1702 
1703  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1704 
1705  #MET flavors
1706  runMETCorrectionsAndUncertainties(process, metType=metType,
1707  correctionLevel=["T0","T1","T2","Smear","Txy"],
1708  computeUncertainties=False,
1709  produceIntermediateCorrections=True,
1710  addToPatDefaultSequence=False,
1711  jetCollectionUnskimmed=jetCollUnskimmed,
1712  photonCollection=photonColl,
1713  electronCollection=electronColl,
1714  muonCollection=muonColl,
1715  tauCollection=tauColl,
1716  pfCandCollection =pfCandColl,
1717  autoJetCleaning=jetCleaning,
1718  jecUncertaintyFile=jecUnFile,
1719  jetSelection=jetSelection,
1720  jetFlavor=jetFlavor,
1721  recoMetFromPFCs=recoMetFromPFCs,
1722  postfix=postfix
1723  )
1724 
1725  #MET T1 uncertainties
1726  runMETCorrectionsAndUncertainties(process, metType=metType,
1727  correctionLevel=["T1"],
1728  computeUncertainties=True,
1729  produceIntermediateCorrections=False,
1730  addToPatDefaultSequence=False,
1731  jetCollectionUnskimmed=jetCollUnskimmed,
1732  photonCollection=photonColl,
1733  electronCollection=electronColl,
1734  muonCollection=muonColl,
1735  tauCollection=tauColl,
1736  pfCandCollection =pfCandColl,
1737  autoJetCleaning=jetCleaning,
1738  jecUncertaintyFile=jecUnFile,
1739  jetSelection=jetSelection,
1740  jetFlavor=jetFlavor,
1741  recoMetFromPFCs=recoMetFromPFCs,
1742  postfix=postfix
1743  )
1744 
1745  #MET T1 Smeared JER uncertainties
1746  runMETCorrectionsAndUncertainties(process, metType=metType,
1747  correctionLevel=["T1","Smear"],
1748  computeUncertainties=True,
1749  produceIntermediateCorrections=False,
1750  addToPatDefaultSequence=False,
1751  jetCollectionUnskimmed=jetCollUnskimmed,
1752  photonCollection=photonColl,
1753  electronCollection=electronColl,
1754  muonCollection=muonColl,
1755  tauCollection=tauColl,
1756  pfCandCollection =pfCandColl,
1757  autoJetCleaning=jetCleaning,
1758  jecUncertaintyFile=jecUnFile,
1759  jetSelection=jetSelection,
1760  jetFlavor=jetFlavor,
1761  recoMetFromPFCs=recoMetFromPFCs,
1762  postfix=postfix,
1763  )
1764 
1765 
1766 
1767 
1768 # miniAOD reproduction ===========================
def runMETCorrectionsAndUncertainties.runMetCorAndUncFromMiniAOD (   process,
  metType = "PF",
  jetCollUnskimmed = "slimmedJets",
  photonColl = "slimmedPhotons",
  electronColl = "slimmedElectrons",
  muonColl = "slimmedMuons",
  tauColl = "slimmedTaus",
  pfCandColl = "packedPFCandidates",
  jetFlavor = "AK4PFchs",
  jetCleaning = "LepClean",
  isData = False,
  manualJetConfig = False,
  reclusterJets = False,
  jetSelection = "pt>15 && abs(eta)<9.9",
  recoMetFromPFCs = False,
  jetCorLabelL3 = "ak4PFCHSL1FastL2L3Corrector",
  jetCorLabelRes = "ak4PFCHSL1FastL2L3ResidualCorrector",
  CHS = False,
  reapplyJEC = True,
  jecUncFile = "",
  postfix = "" 
)

Definition at line 1789 of file runMETCorrectionsAndUncertainties.py.

Referenced by corMETFromMuonAndEG.corMETFromMuonAndEG(), and runMetCorAndUncForMiniAODProduction().

1789  postfix=""):
1790 
1791  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1792 
1793  #MET T1 uncertainties
1794  runMETCorrectionsAndUncertainties(process, metType=metType,
1795  correctionLevel=["T1"],
1796  computeUncertainties=True,
1797  produceIntermediateCorrections=False,
1798  addToPatDefaultSequence=False,
1799  jetCollectionUnskimmed=jetCollUnskimmed,
1800  electronCollection=electronColl,
1801  muonCollection=muonColl,
1802  tauCollection=tauColl,
1803  photonCollection=photonColl,
1804  pfCandCollection =pfCandColl,
1805  runOnData=isData,
1806  onMiniAOD=True,
1807  reapplyJEC=reapplyJEC,
1808  reclusterJets=reclusterJets,
1809  jetSelection=jetSelection,
1810  recoMetFromPFCs=recoMetFromPFCs,
1811  autoJetCleaning=jetCleaning,
1812  manualJetConfig=manualJetConfig,
1813  jetFlavor=jetFlavor,
1814  jetCorLabelUpToL3=jetCorLabelL3,
1815  jetCorLabelL3Res=jetCorLabelRes,
1816  jecUncertaintyFile=jecUncFile,
1817  CHS=CHS,
1818  postfix=postfix,
1819  )
1820 
1821  #MET T1+Txy / Smear
1822  runMETCorrectionsAndUncertainties(process, metType=metType,
1823  correctionLevel=["T1","Txy"],
1824  computeUncertainties=False,
1825  produceIntermediateCorrections=True,
1826  addToPatDefaultSequence=False,
1827  jetCollectionUnskimmed=jetCollUnskimmed,
1828  electronCollection=electronColl,
1829  muonCollection=muonColl,
1830  tauCollection=tauColl,
1831  photonCollection=photonColl,
1832  pfCandCollection =pfCandColl,
1833  runOnData=isData,
1834  onMiniAOD=True,
1835  reapplyJEC=reapplyJEC,
1836  reclusterJets=reclusterJets,
1837  jetSelection=jetSelection,
1838  recoMetFromPFCs=recoMetFromPFCs,
1839  autoJetCleaning=jetCleaning,
1840  manualJetConfig=manualJetConfig,
1841  jetFlavor=jetFlavor,
1842  jetCorLabelUpToL3=jetCorLabelL3,
1843  jetCorLabelL3Res=jetCorLabelRes,
1844  jecUncertaintyFile=jecUncFile,
1845  CHS=CHS,
1846  postfix=postfix,
1847  )
1848  #MET T1+Smear + uncertainties
1849  runMETCorrectionsAndUncertainties(process, metType=metType,
1850  correctionLevel=["T1","Smear"],
1851  computeUncertainties=True,
1852  produceIntermediateCorrections=False,
1853  addToPatDefaultSequence=False,
1854  jetCollectionUnskimmed=jetCollUnskimmed,
1855  electronCollection=electronColl,
1856  muonCollection=muonColl,
1857  tauCollection=tauColl,
1858  photonCollection=photonColl,
1859  pfCandCollection =pfCandColl,
1860  runOnData=isData,
1861  onMiniAOD=True,
1862  reapplyJEC=reapplyJEC,
1863  reclusterJets=reclusterJets,
1864  jetSelection=jetSelection,
1865  recoMetFromPFCs=recoMetFromPFCs,
1866  autoJetCleaning=jetCleaning,
1867  manualJetConfig=manualJetConfig,
1868  jetFlavor=jetFlavor,
1869  jetCorLabelUpToL3=jetCorLabelL3,
1870  jetCorLabelL3Res=jetCorLabelRes,
1871  jecUncertaintyFile=jecUncFile,
1872  CHS=CHS,
1873  postfix=postfix,
1874  )

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1683 of file runMETCorrectionsAndUncertainties.py.