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

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

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

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

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

Variable Documentation

◆ runMETCorrectionsAndUncertainties

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1960 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:2046
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:1966