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

◆ isValidInputTag()

def runMETCorrectionsAndUncertainties.isValidInputTag (   input)

Definition at line 10 of file runMETCorrectionsAndUncertainties.py.

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 

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

◆ runMetCorAndUncForMiniAODProduction()

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

1933 def runMetCorAndUncForMiniAODProduction(process, metType="PF",
1934  jetCollUnskimmed="patJets",
1935  photonColl="selectedPatPhotons",
1936  electronColl="selectedPatElectrons",
1937  muonColl="selectedPatMuons",
1938  tauColl="selectedPatTaus",
1939  pfCandColl = "particleFlow",
1940  jetCleaning="LepClean",
1941  jetSelection="pt>15 && abs(eta)<9.9", jecUnFile="",
1942  jetFlavor="AK4PFchs",
1943  recoMetFromPFCs=False,
1944  postfix=""):
1945 
1946  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1947 
1948  #MET flavors
1949  runMETCorrectionsAndUncertainties(process, metType=metType,
1950  correctionLevel=["T0","T1","T2","Smear","Txy"],
1951  computeUncertainties=False,
1952  produceIntermediateCorrections=True,
1953  addToPatDefaultSequence=False,
1954  jetCollectionUnskimmed=jetCollUnskimmed,
1955  photonCollection=photonColl,
1956  electronCollection=electronColl,
1957  muonCollection=muonColl,
1958  tauCollection=tauColl,
1959  pfCandCollection =pfCandColl,
1960  autoJetCleaning=jetCleaning,
1961  jecUncertaintyFile=jecUnFile,
1962  jetSelection=jetSelection,
1963  jetFlavor=jetFlavor,
1964  recoMetFromPFCs=recoMetFromPFCs,
1965  postfix=postfix
1966  )
1967 
1968  #MET T1 uncertainties
1969  runMETCorrectionsAndUncertainties(process, metType=metType,
1970  correctionLevel=["T1"],
1971  computeUncertainties=True,
1972  produceIntermediateCorrections=False,
1973  addToPatDefaultSequence=False,
1974  jetCollectionUnskimmed=jetCollUnskimmed,
1975  photonCollection=photonColl,
1976  electronCollection=electronColl,
1977  muonCollection=muonColl,
1978  tauCollection=tauColl,
1979  pfCandCollection =pfCandColl,
1980  autoJetCleaning=jetCleaning,
1981  jecUncertaintyFile=jecUnFile,
1982  jetSelection=jetSelection,
1983  jetFlavor=jetFlavor,
1984  recoMetFromPFCs=recoMetFromPFCs,
1985  postfix=postfix
1986  )
1987 
1988  #MET T1 Smeared JER uncertainties
1989  runMETCorrectionsAndUncertainties(process, metType=metType,
1990  correctionLevel=["T1","Smear"],
1991  computeUncertainties=True,
1992  produceIntermediateCorrections=False,
1993  addToPatDefaultSequence=False,
1994  jetCollectionUnskimmed=jetCollUnskimmed,
1995  photonCollection=photonColl,
1996  electronCollection=electronColl,
1997  muonCollection=muonColl,
1998  tauCollection=tauColl,
1999  pfCandCollection =pfCandColl,
2000  autoJetCleaning=jetCleaning,
2001  jecUncertaintyFile=jecUnFile,
2002  jetSelection=jetSelection,
2003  jetFlavor=jetFlavor,
2004  recoMetFromPFCs=recoMetFromPFCs,
2005  postfix=postfix,
2006  )
2007 
2008 
2009 
2010 
2011 # miniAOD reproduction ===========================
2012 

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

◆ runMetCorAndUncFromMiniAOD()

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

2013 def runMetCorAndUncFromMiniAOD(process, metType="PF",
2014  jetCollUnskimmed="slimmedJets",
2015  photonColl="slimmedPhotons",
2016  electronColl="slimmedElectrons",
2017  muonColl="slimmedMuons",
2018  tauColl="slimmedTaus",
2019  pfCandColl = "packedPFCandidates",
2020  jetFlavor="AK4PFchs",
2021  jetCleaning="LepClean",
2022  isData=False,
2023  manualJetConfig=False,
2024  reclusterJets=None,
2025  jetSelection="pt>15 && abs(eta)<9.9",
2026  recoMetFromPFCs=None,
2027  jetCorLabelL3="ak4PFCHSL1FastL2L3Corrector",
2028  jetCorLabelRes="ak4PFCHSL1FastL2L3ResidualCorrector",
2029 
2030  CHS=False,
2031  reapplyJEC=True,
2032  jecUncFile="",
2033  computeMETSignificance=True,
2034  fixEE2017=False,
2035  fixEE2017Params=None,
2036  postfix=""):
2037 
2038  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2039 
2040  #MET T1 uncertainties
2041  runMETCorrectionsAndUncertainties(process, metType=metType,
2042  correctionLevel=["T1"],
2043  computeUncertainties=True,
2044  produceIntermediateCorrections=False,
2045  addToPatDefaultSequence=False,
2046  jetCollectionUnskimmed=jetCollUnskimmed,
2047  electronCollection=electronColl,
2048  muonCollection=muonColl,
2049  tauCollection=tauColl,
2050  photonCollection=photonColl,
2051  pfCandCollection =pfCandColl,
2052  runOnData=isData,
2053  onMiniAOD=True,
2054  reapplyJEC=reapplyJEC,
2055  reclusterJets=reclusterJets,
2056  jetSelection=jetSelection,
2057  recoMetFromPFCs=recoMetFromPFCs,
2058  autoJetCleaning=jetCleaning,
2059  manualJetConfig=manualJetConfig,
2060  jetFlavor=jetFlavor,
2061  jetCorLabelUpToL3=jetCorLabelL3,
2062  jetCorLabelL3Res=jetCorLabelRes,
2063  jecUncertaintyFile=jecUncFile,
2064  computeMETSignificance=computeMETSignificance,
2065  CHS=CHS,
2066  postfix=postfix,
2067  fixEE2017=fixEE2017,
2068  fixEE2017Params=fixEE2017Params,
2069  )
2070 
2071  #MET T1+Txy / Smear
2072  runMETCorrectionsAndUncertainties(process, metType=metType,
2073  correctionLevel=["T1","Txy"],
2074  computeUncertainties=False,
2075  produceIntermediateCorrections=True,
2076  addToPatDefaultSequence=False,
2077  jetCollectionUnskimmed=jetCollUnskimmed,
2078  electronCollection=electronColl,
2079  muonCollection=muonColl,
2080  tauCollection=tauColl,
2081  photonCollection=photonColl,
2082  pfCandCollection =pfCandColl,
2083  runOnData=isData,
2084  onMiniAOD=True,
2085  reapplyJEC=reapplyJEC,
2086  reclusterJets=reclusterJets,
2087  jetSelection=jetSelection,
2088  recoMetFromPFCs=recoMetFromPFCs,
2089  autoJetCleaning=jetCleaning,
2090  manualJetConfig=manualJetConfig,
2091  jetFlavor=jetFlavor,
2092  jetCorLabelUpToL3=jetCorLabelL3,
2093  jetCorLabelL3Res=jetCorLabelRes,
2094  jecUncertaintyFile=jecUncFile,
2095  computeMETSignificance=computeMETSignificance,
2096  CHS=CHS,
2097  postfix=postfix,
2098  fixEE2017=fixEE2017,
2099  fixEE2017Params=fixEE2017Params,
2100  )
2101  #MET T1+Smear + uncertainties
2102  runMETCorrectionsAndUncertainties(process, metType=metType,
2103  correctionLevel=["T1","Smear"],
2104  computeUncertainties=True,
2105  produceIntermediateCorrections=False,
2106  addToPatDefaultSequence=False,
2107  jetCollectionUnskimmed=jetCollUnskimmed,
2108  electronCollection=electronColl,
2109  muonCollection=muonColl,
2110  tauCollection=tauColl,
2111  photonCollection=photonColl,
2112  pfCandCollection =pfCandColl,
2113  runOnData=isData,
2114  onMiniAOD=True,
2115  reapplyJEC=reapplyJEC,
2116  reclusterJets=reclusterJets,
2117  jetSelection=jetSelection,
2118  recoMetFromPFCs=recoMetFromPFCs,
2119  autoJetCleaning=jetCleaning,
2120  manualJetConfig=manualJetConfig,
2121  jetFlavor=jetFlavor,
2122  jetCorLabelUpToL3=jetCorLabelL3,
2123  jetCorLabelL3Res=jetCorLabelRes,
2124  jecUncertaintyFile=jecUncFile,
2125  computeMETSignificance=computeMETSignificance,
2126  CHS=CHS,
2127  postfix=postfix,
2128  fixEE2017=fixEE2017,
2129  fixEE2017Params=fixEE2017Params,
2130  )

Referenced by corMETFromMuonAndEG.corMETFromMuonAndEG(), nano_cff.nanoAOD_recalibrateMETs(), nano_cff.nanoAOD_runMETfixEE2017(), and customizePuppiTune_cff.UpdatePuppiTuneV14().

Variable Documentation

◆ runMETCorrectionsAndUncertainties

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1927 of file runMETCorrectionsAndUncertainties.py.

runMETCorrectionsAndUncertainties.isValidInputTag
def isValidInputTag(input)
Definition: runMETCorrectionsAndUncertainties.py:10
runMETCorrectionsAndUncertainties
Definition: runMETCorrectionsAndUncertainties.py:1
runMETCorrectionsAndUncertainties.runMetCorAndUncForMiniAODProduction
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="")
Definition: runMETCorrectionsAndUncertainties.py:1933
runMETCorrectionsAndUncertainties.runMetCorAndUncFromMiniAOD
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="")
Definition: runMETCorrectionsAndUncertainties.py:2013