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

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

10 def isValidInputTag(input):
11  input_str = input
12  if isinstance(input, cms.InputTag):
13  input_str = input.value()
14  if input is None or input_str == '""':
15  return False
16  else:
17  return True
18 
19 
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 1758 of file runMETCorrectionsAndUncertainties.py.

References runMetCorAndUncFromMiniAOD().

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

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

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

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

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1740 of file runMETCorrectionsAndUncertainties.py.