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, extractDeepMETs=False, postfix="")
 

Variables

 runMETCorrectionsAndUncertainties
 

Function Documentation

◆ isValidInputTag()

def runMETCorrectionsAndUncertainties.isValidInputTag (   input)

Definition at line 11 of file runMETCorrectionsAndUncertainties.py.

11 def isValidInputTag(input):
12  input_str = input
13  if isinstance(input, cms.InputTag):
14  input_str = input.value()
15  if input is None or input_str == '""':
16  return False
17  else:
18  return True
19 
20 

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

1967 def runMetCorAndUncForMiniAODProduction(process, metType="PF",
1968  jetCollUnskimmed="patJets",
1969  photonColl="selectedPatPhotons",
1970  electronColl="selectedPatElectrons",
1971  muonColl="selectedPatMuons",
1972  tauColl="selectedPatTaus",
1973  pfCandColl = "particleFlow",
1974  jetCleaning="LepClean",
1975  jetSelection="pt>15 && abs(eta)<9.9", jecUnFile="",
1976  jetFlavor="AK4PFchs",
1977  recoMetFromPFCs=False,
1978  postfix=""):
1979 
1980  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1981 
1982  #MET flavors
1983  runMETCorrectionsAndUncertainties(process, metType=metType,
1984  correctionLevel=["T0","T1","T2","Smear","Txy"],
1985  computeUncertainties=False,
1986  produceIntermediateCorrections=True,
1987  addToPatDefaultSequence=False,
1988  jetCollectionUnskimmed=jetCollUnskimmed,
1989  photonCollection=photonColl,
1990  electronCollection=electronColl,
1991  muonCollection=muonColl,
1992  tauCollection=tauColl,
1993  pfCandCollection =pfCandColl,
1994  autoJetCleaning=jetCleaning,
1995  jecUncertaintyFile=jecUnFile,
1996  jetSelection=jetSelection,
1997  jetFlavor=jetFlavor,
1998  recoMetFromPFCs=recoMetFromPFCs,
1999  postfix=postfix
2000  )
2001 
2002  #MET T1 uncertainties
2003  runMETCorrectionsAndUncertainties(process, metType=metType,
2004  correctionLevel=["T1"],
2005  computeUncertainties=True,
2006  produceIntermediateCorrections=False,
2007  addToPatDefaultSequence=False,
2008  jetCollectionUnskimmed=jetCollUnskimmed,
2009  photonCollection=photonColl,
2010  electronCollection=electronColl,
2011  muonCollection=muonColl,
2012  tauCollection=tauColl,
2013  pfCandCollection =pfCandColl,
2014  autoJetCleaning=jetCleaning,
2015  jecUncertaintyFile=jecUnFile,
2016  jetSelection=jetSelection,
2017  jetFlavor=jetFlavor,
2018  recoMetFromPFCs=recoMetFromPFCs,
2019  postfix=postfix
2020  )
2021 
2022  #MET T1 Smeared JER uncertainties
2023  runMETCorrectionsAndUncertainties(process, metType=metType,
2024  correctionLevel=["T1","Smear"],
2025  computeUncertainties=True,
2026  produceIntermediateCorrections=False,
2027  addToPatDefaultSequence=False,
2028  jetCollectionUnskimmed=jetCollUnskimmed,
2029  photonCollection=photonColl,
2030  electronCollection=electronColl,
2031  muonCollection=muonColl,
2032  tauCollection=tauColl,
2033  pfCandCollection =pfCandColl,
2034  autoJetCleaning=jetCleaning,
2035  jecUncertaintyFile=jecUnFile,
2036  jetSelection=jetSelection,
2037  jetFlavor=jetFlavor,
2038  recoMetFromPFCs=recoMetFromPFCs,
2039  postfix=postfix,
2040  )
2041 
2042 
2043 
2044 
2045 # miniAOD reproduction ===========================
2046 

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,
  extractDeepMETs = False,
  postfix = "" 
)

Definition at line 2047 of file runMETCorrectionsAndUncertainties.py.

2047 def runMetCorAndUncFromMiniAOD(process, metType="PF",
2048  jetCollUnskimmed="slimmedJets",
2049  photonColl="slimmedPhotons",
2050  electronColl="slimmedElectrons",
2051  muonColl="slimmedMuons",
2052  tauColl="slimmedTaus",
2053  pfCandColl = "packedPFCandidates",
2054  jetFlavor="AK4PFchs",
2055  jetCleaning="LepClean",
2056  isData=False,
2057  manualJetConfig=False,
2058  reclusterJets=None,
2059  jetSelection="pt>15 && abs(eta)<9.9",
2060  recoMetFromPFCs=None,
2061  jetCorLabelL3="ak4PFCHSL1FastL2L3Corrector",
2062  jetCorLabelRes="ak4PFCHSL1FastL2L3ResidualCorrector",
2063 
2064  CHS=False,
2065  reapplyJEC=True,
2066  jecUncFile="",
2067  computeMETSignificance=True,
2068  fixEE2017=False,
2069  fixEE2017Params=None,
2070  extractDeepMETs=False,
2071  postfix=""):
2072 
2073  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2074 
2075  #MET T1 uncertainties
2076  runMETCorrectionsAndUncertainties(process, metType=metType,
2077  correctionLevel=["T1"],
2078  computeUncertainties=True,
2079  produceIntermediateCorrections=False,
2080  addToPatDefaultSequence=False,
2081  jetCollectionUnskimmed=jetCollUnskimmed,
2082  electronCollection=electronColl,
2083  muonCollection=muonColl,
2084  tauCollection=tauColl,
2085  photonCollection=photonColl,
2086  pfCandCollection =pfCandColl,
2087  runOnData=isData,
2088  onMiniAOD=True,
2089  reapplyJEC=reapplyJEC,
2090  reclusterJets=reclusterJets,
2091  jetSelection=jetSelection,
2092  recoMetFromPFCs=recoMetFromPFCs,
2093  autoJetCleaning=jetCleaning,
2094  manualJetConfig=manualJetConfig,
2095  jetFlavor=jetFlavor,
2096  jetCorLabelUpToL3=jetCorLabelL3,
2097  jetCorLabelL3Res=jetCorLabelRes,
2098  jecUncertaintyFile=jecUncFile,
2099  computeMETSignificance=computeMETSignificance,
2100  CHS=CHS,
2101  postfix=postfix,
2102  fixEE2017=fixEE2017,
2103  fixEE2017Params=fixEE2017Params,
2104  extractDeepMETs=extractDeepMETs,
2105  )
2106 
2107  #MET T1+Txy / Smear
2108  runMETCorrectionsAndUncertainties(process, metType=metType,
2109  correctionLevel=["T1","Txy"],
2110  computeUncertainties=False,
2111  produceIntermediateCorrections=True,
2112  addToPatDefaultSequence=False,
2113  jetCollectionUnskimmed=jetCollUnskimmed,
2114  electronCollection=electronColl,
2115  muonCollection=muonColl,
2116  tauCollection=tauColl,
2117  photonCollection=photonColl,
2118  pfCandCollection =pfCandColl,
2119  runOnData=isData,
2120  onMiniAOD=True,
2121  reapplyJEC=reapplyJEC,
2122  reclusterJets=reclusterJets,
2123  jetSelection=jetSelection,
2124  recoMetFromPFCs=recoMetFromPFCs,
2125  autoJetCleaning=jetCleaning,
2126  manualJetConfig=manualJetConfig,
2127  jetFlavor=jetFlavor,
2128  jetCorLabelUpToL3=jetCorLabelL3,
2129  jetCorLabelL3Res=jetCorLabelRes,
2130  jecUncertaintyFile=jecUncFile,
2131  computeMETSignificance=computeMETSignificance,
2132  CHS=CHS,
2133  postfix=postfix,
2134  fixEE2017=fixEE2017,
2135  fixEE2017Params=fixEE2017Params,
2136  extractDeepMETs=extractDeepMETs,
2137  )
2138  #MET T1+Smear + uncertainties
2139  runMETCorrectionsAndUncertainties(process, metType=metType,
2140  correctionLevel=["T1","Smear"],
2141  computeUncertainties=True,
2142  produceIntermediateCorrections=False,
2143  addToPatDefaultSequence=False,
2144  jetCollectionUnskimmed=jetCollUnskimmed,
2145  electronCollection=electronColl,
2146  muonCollection=muonColl,
2147  tauCollection=tauColl,
2148  photonCollection=photonColl,
2149  pfCandCollection =pfCandColl,
2150  runOnData=isData,
2151  onMiniAOD=True,
2152  reapplyJEC=reapplyJEC,
2153  reclusterJets=reclusterJets,
2154  jetSelection=jetSelection,
2155  recoMetFromPFCs=recoMetFromPFCs,
2156  autoJetCleaning=jetCleaning,
2157  manualJetConfig=manualJetConfig,
2158  jetFlavor=jetFlavor,
2159  jetCorLabelUpToL3=jetCorLabelL3,
2160  jetCorLabelL3Res=jetCorLabelRes,
2161  jecUncertaintyFile=jecUncFile,
2162  computeMETSignificance=computeMETSignificance,
2163  CHS=CHS,
2164  postfix=postfix,
2165  fixEE2017=fixEE2017,
2166  fixEE2017Params=fixEE2017Params,
2167  extractDeepMETs=extractDeepMETs,
2168  )

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

Variable Documentation

◆ runMETCorrectionsAndUncertainties

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1961 of file runMETCorrectionsAndUncertainties.py.

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, extractDeepMETs=False, postfix="")
Definition: runMETCorrectionsAndUncertainties.py:2047
runMETCorrectionsAndUncertainties.isValidInputTag
def isValidInputTag(input)
Definition: runMETCorrectionsAndUncertainties.py:11
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:1967