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

References runMetCorAndUncFromMiniAOD().

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

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

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

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

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1827 of file runMETCorrectionsAndUncertainties.py.