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 1751 of file runMETCorrectionsAndUncertainties.py.

References runMetCorAndUncFromMiniAOD().

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

1751  postfix=""):
1752 
1753  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1754 
1755  #MET flavors
1756  runMETCorrectionsAndUncertainties(process, metType=metType,
1757  correctionLevel=["T0","T1","T2","Smear","Txy"],
1758  computeUncertainties=False,
1759  produceIntermediateCorrections=True,
1760  addToPatDefaultSequence=False,
1761  jetCollectionUnskimmed=jetCollUnskimmed,
1762  photonCollection=photonColl,
1763  electronCollection=electronColl,
1764  muonCollection=muonColl,
1765  tauCollection=tauColl,
1766  pfCandCollection =pfCandColl,
1767  autoJetCleaning=jetCleaning,
1768  jecUncertaintyFile=jecUnFile,
1769  jetSelection=jetSelection,
1770  jetFlavor=jetFlavor,
1771  recoMetFromPFCs=recoMetFromPFCs,
1772  postfix=postfix
1773  )
1774 
1775  #MET T1 uncertainties
1776  runMETCorrectionsAndUncertainties(process, metType=metType,
1777  correctionLevel=["T1"],
1778  computeUncertainties=True,
1779  produceIntermediateCorrections=False,
1780  addToPatDefaultSequence=False,
1781  jetCollectionUnskimmed=jetCollUnskimmed,
1782  photonCollection=photonColl,
1783  electronCollection=electronColl,
1784  muonCollection=muonColl,
1785  tauCollection=tauColl,
1786  pfCandCollection =pfCandColl,
1787  autoJetCleaning=jetCleaning,
1788  jecUncertaintyFile=jecUnFile,
1789  jetSelection=jetSelection,
1790  jetFlavor=jetFlavor,
1791  recoMetFromPFCs=recoMetFromPFCs,
1792  postfix=postfix
1793  )
1794 
1795  #MET T1 Smeared JER uncertainties
1796  runMETCorrectionsAndUncertainties(process, metType=metType,
1797  correctionLevel=["T1","Smear"],
1798  computeUncertainties=True,
1799  produceIntermediateCorrections=False,
1800  addToPatDefaultSequence=False,
1801  jetCollectionUnskimmed=jetCollUnskimmed,
1802  photonCollection=photonColl,
1803  electronCollection=electronColl,
1804  muonCollection=muonColl,
1805  tauCollection=tauColl,
1806  pfCandCollection =pfCandColl,
1807  autoJetCleaning=jetCleaning,
1808  jecUncertaintyFile=jecUnFile,
1809  jetSelection=jetSelection,
1810  jetFlavor=jetFlavor,
1811  recoMetFromPFCs=recoMetFromPFCs,
1812  postfix=postfix,
1813  )
1814 
1815 
1816 
1817 
1818 # 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 1839 of file runMETCorrectionsAndUncertainties.py.

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

1839  postfix=""):
1840 
1841  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1842 
1843  #MET T1 uncertainties
1844  runMETCorrectionsAndUncertainties(process, metType=metType,
1845  correctionLevel=["T1"],
1846  computeUncertainties=True,
1847  produceIntermediateCorrections=False,
1848  addToPatDefaultSequence=False,
1849  jetCollectionUnskimmed=jetCollUnskimmed,
1850  electronCollection=electronColl,
1851  muonCollection=muonColl,
1852  tauCollection=tauColl,
1853  photonCollection=photonColl,
1854  pfCandCollection =pfCandColl,
1855  runOnData=isData,
1856  onMiniAOD=True,
1857  reapplyJEC=reapplyJEC,
1858  reclusterJets=reclusterJets,
1859  jetSelection=jetSelection,
1860  recoMetFromPFCs=recoMetFromPFCs,
1861  autoJetCleaning=jetCleaning,
1862  manualJetConfig=manualJetConfig,
1863  jetFlavor=jetFlavor,
1864  jetCorLabelUpToL3=jetCorLabelL3,
1865  jetCorLabelL3Res=jetCorLabelRes,
1866  jecUncertaintyFile=jecUncFile,
1867  CHS=CHS,
1868  postfix=postfix,
1869  )
1870 
1871  #MET T1+Txy / Smear
1872  runMETCorrectionsAndUncertainties(process, metType=metType,
1873  correctionLevel=["T1","Txy"],
1874  computeUncertainties=False,
1875  produceIntermediateCorrections=True,
1876  addToPatDefaultSequence=False,
1877  jetCollectionUnskimmed=jetCollUnskimmed,
1878  electronCollection=electronColl,
1879  muonCollection=muonColl,
1880  tauCollection=tauColl,
1881  photonCollection=photonColl,
1882  pfCandCollection =pfCandColl,
1883  runOnData=isData,
1884  onMiniAOD=True,
1885  reapplyJEC=reapplyJEC,
1886  reclusterJets=reclusterJets,
1887  jetSelection=jetSelection,
1888  recoMetFromPFCs=recoMetFromPFCs,
1889  autoJetCleaning=jetCleaning,
1890  manualJetConfig=manualJetConfig,
1891  jetFlavor=jetFlavor,
1892  jetCorLabelUpToL3=jetCorLabelL3,
1893  jetCorLabelL3Res=jetCorLabelRes,
1894  jecUncertaintyFile=jecUncFile,
1895  CHS=CHS,
1896  postfix=postfix,
1897  )
1898  #MET T1+Smear + uncertainties
1899  runMETCorrectionsAndUncertainties(process, metType=metType,
1900  correctionLevel=["T1","Smear"],
1901  computeUncertainties=True,
1902  produceIntermediateCorrections=False,
1903  addToPatDefaultSequence=False,
1904  jetCollectionUnskimmed=jetCollUnskimmed,
1905  electronCollection=electronColl,
1906  muonCollection=muonColl,
1907  tauCollection=tauColl,
1908  photonCollection=photonColl,
1909  pfCandCollection =pfCandColl,
1910  runOnData=isData,
1911  onMiniAOD=True,
1912  reapplyJEC=reapplyJEC,
1913  reclusterJets=reclusterJets,
1914  jetSelection=jetSelection,
1915  recoMetFromPFCs=recoMetFromPFCs,
1916  autoJetCleaning=jetCleaning,
1917  manualJetConfig=manualJetConfig,
1918  jetFlavor=jetFlavor,
1919  jetCorLabelUpToL3=jetCorLabelL3,
1920  jetCorLabelL3Res=jetCorLabelRes,
1921  jecUncertaintyFile=jecUncFile,
1922  CHS=CHS,
1923  postfix=postfix,
1924  )

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1733 of file runMETCorrectionsAndUncertainties.py.