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=None, jetSelection="pt>15 && abs(eta)<9.9", recoMetFromPFCs=None, jetCorLabelL3="ak4PFCHSL1FastL2L3Corrector", jetCorLabelRes="ak4PFCHSL1FastL2L3ResidualCorrector", CHS=False, reapplyJEC=True, jecUncFile="", computeMETSignificance=True, fixEE2017=False, fixEE2017Params=None, 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 1844 of file runMETCorrectionsAndUncertainties.py.

References runMetCorAndUncFromMiniAOD().

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

1844  postfix=""):
1845 
1846  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1847 
1848  #MET flavors
1849  runMETCorrectionsAndUncertainties(process, metType=metType,
1850  correctionLevel=["T0","T1","T2","Smear","Txy"],
1851  computeUncertainties=False,
1852  produceIntermediateCorrections=True,
1853  addToPatDefaultSequence=False,
1854  jetCollectionUnskimmed=jetCollUnskimmed,
1855  photonCollection=photonColl,
1856  electronCollection=electronColl,
1857  muonCollection=muonColl,
1858  tauCollection=tauColl,
1859  pfCandCollection =pfCandColl,
1860  autoJetCleaning=jetCleaning,
1861  jecUncertaintyFile=jecUnFile,
1862  jetSelection=jetSelection,
1863  jetFlavor=jetFlavor,
1864  recoMetFromPFCs=recoMetFromPFCs,
1865  postfix=postfix
1866  )
1867 
1868  #MET T1 uncertainties
1869  runMETCorrectionsAndUncertainties(process, metType=metType,
1870  correctionLevel=["T1"],
1871  computeUncertainties=True,
1872  produceIntermediateCorrections=False,
1873  addToPatDefaultSequence=False,
1874  jetCollectionUnskimmed=jetCollUnskimmed,
1875  photonCollection=photonColl,
1876  electronCollection=electronColl,
1877  muonCollection=muonColl,
1878  tauCollection=tauColl,
1879  pfCandCollection =pfCandColl,
1880  autoJetCleaning=jetCleaning,
1881  jecUncertaintyFile=jecUnFile,
1882  jetSelection=jetSelection,
1883  jetFlavor=jetFlavor,
1884  recoMetFromPFCs=recoMetFromPFCs,
1885  postfix=postfix
1886  )
1887 
1888  #MET T1 Smeared JER uncertainties
1889  runMETCorrectionsAndUncertainties(process, metType=metType,
1890  correctionLevel=["T1","Smear"],
1891  computeUncertainties=True,
1892  produceIntermediateCorrections=False,
1893  addToPatDefaultSequence=False,
1894  jetCollectionUnskimmed=jetCollUnskimmed,
1895  photonCollection=photonColl,
1896  electronCollection=electronColl,
1897  muonCollection=muonColl,
1898  tauCollection=tauColl,
1899  pfCandCollection =pfCandColl,
1900  autoJetCleaning=jetCleaning,
1901  jecUncertaintyFile=jecUnFile,
1902  jetSelection=jetSelection,
1903  jetFlavor=jetFlavor,
1904  recoMetFromPFCs=recoMetFromPFCs,
1905  postfix=postfix,
1906  )
1907 
1908 
1909 
1910 
1911 # 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 = None,
  jetSelection = "pt>15 && abs(eta)<9.9",
  recoMetFromPFCs = None,
  jetCorLabelL3 = "ak4PFCHSL1FastL2L3Corrector",
  jetCorLabelRes = "ak4PFCHSL1FastL2L3ResidualCorrector",
  CHS = False,
  reapplyJEC = True,
  jecUncFile = "",
  computeMETSignificance = True,
  fixEE2017 = False,
  fixEE2017Params = None,
  postfix = "" 
)

Definition at line 1935 of file runMETCorrectionsAndUncertainties.py.

Referenced by corMETFromMuonAndEG.corMETFromMuonAndEG(), nano_cff.nanoAOD_recalibrateMETs(), nano_cff.nanoAOD_runMETfixEE2017(), and runMetCorAndUncForMiniAODProduction().

1935  postfix=""):
1936 
1937  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1938 
1939  #MET T1 uncertainties
1940  runMETCorrectionsAndUncertainties(process, metType=metType,
1941  correctionLevel=["T1"],
1942  computeUncertainties=True,
1943  produceIntermediateCorrections=False,
1944  addToPatDefaultSequence=False,
1945  jetCollectionUnskimmed=jetCollUnskimmed,
1946  electronCollection=electronColl,
1947  muonCollection=muonColl,
1948  tauCollection=tauColl,
1949  photonCollection=photonColl,
1950  pfCandCollection =pfCandColl,
1951  runOnData=isData,
1952  onMiniAOD=True,
1953  reapplyJEC=reapplyJEC,
1954  reclusterJets=reclusterJets,
1955  jetSelection=jetSelection,
1956  recoMetFromPFCs=recoMetFromPFCs,
1957  autoJetCleaning=jetCleaning,
1958  manualJetConfig=manualJetConfig,
1959  jetFlavor=jetFlavor,
1960  jetCorLabelUpToL3=jetCorLabelL3,
1961  jetCorLabelL3Res=jetCorLabelRes,
1962  jecUncertaintyFile=jecUncFile,
1963  computeMETSignificance=computeMETSignificance,
1964  CHS=CHS,
1965  postfix=postfix,
1966  fixEE2017=fixEE2017,
1967  fixEE2017Params=fixEE2017Params,
1968  )
1969 
1970  #MET T1+Txy / Smear
1971  runMETCorrectionsAndUncertainties(process, metType=metType,
1972  correctionLevel=["T1","Txy"],
1973  computeUncertainties=False,
1974  produceIntermediateCorrections=True,
1975  addToPatDefaultSequence=False,
1976  jetCollectionUnskimmed=jetCollUnskimmed,
1977  electronCollection=electronColl,
1978  muonCollection=muonColl,
1979  tauCollection=tauColl,
1980  photonCollection=photonColl,
1981  pfCandCollection =pfCandColl,
1982  runOnData=isData,
1983  onMiniAOD=True,
1984  reapplyJEC=reapplyJEC,
1985  reclusterJets=reclusterJets,
1986  jetSelection=jetSelection,
1987  recoMetFromPFCs=recoMetFromPFCs,
1988  autoJetCleaning=jetCleaning,
1989  manualJetConfig=manualJetConfig,
1990  jetFlavor=jetFlavor,
1991  jetCorLabelUpToL3=jetCorLabelL3,
1992  jetCorLabelL3Res=jetCorLabelRes,
1993  jecUncertaintyFile=jecUncFile,
1994  computeMETSignificance=computeMETSignificance,
1995  CHS=CHS,
1996  postfix=postfix,
1997  fixEE2017=fixEE2017,
1998  fixEE2017Params=fixEE2017Params,
1999  )
2000  #MET T1+Smear + uncertainties
2001  runMETCorrectionsAndUncertainties(process, metType=metType,
2002  correctionLevel=["T1","Smear"],
2003  computeUncertainties=True,
2004  produceIntermediateCorrections=False,
2005  addToPatDefaultSequence=False,
2006  jetCollectionUnskimmed=jetCollUnskimmed,
2007  electronCollection=electronColl,
2008  muonCollection=muonColl,
2009  tauCollection=tauColl,
2010  photonCollection=photonColl,
2011  pfCandCollection =pfCandColl,
2012  runOnData=isData,
2013  onMiniAOD=True,
2014  reapplyJEC=reapplyJEC,
2015  reclusterJets=reclusterJets,
2016  jetSelection=jetSelection,
2017  recoMetFromPFCs=recoMetFromPFCs,
2018  autoJetCleaning=jetCleaning,
2019  manualJetConfig=manualJetConfig,
2020  jetFlavor=jetFlavor,
2021  jetCorLabelUpToL3=jetCorLabelL3,
2022  jetCorLabelL3Res=jetCorLabelRes,
2023  jecUncertaintyFile=jecUncFile,
2024  computeMETSignificance=computeMETSignificance,
2025  CHS=CHS,
2026  postfix=postfix,
2027  fixEE2017=fixEE2017,
2028  fixEE2017Params=fixEE2017Params,
2029  )

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1826 of file runMETCorrectionsAndUncertainties.py.