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

References runMetCorAndUncFromMiniAOD().

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

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

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

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

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1739 of file runMETCorrectionsAndUncertainties.py.