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

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

References runMetCorAndUncFromMiniAOD().

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

2022  postfix=""):
2023 
2024  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2025 
2026  #MET flavors
2027  runMETCorrectionsAndUncertainties(process, metType=metType,
2028  correctionLevel=["T0","T1","T2","Smear","Txy"],
2029  computeUncertainties=False,
2030  produceIntermediateCorrections=True,
2031  addToPatDefaultSequence=False,
2032  jetCollectionUnskimmed=jetCollUnskimmed,
2033  photonCollection=photonColl,
2034  electronCollection=electronColl,
2035  muonCollection=muonColl,
2036  tauCollection=tauColl,
2037  pfCandCollection =pfCandColl,
2038  autoJetCleaning=jetCleaning,
2039  jecUncertaintyFile=jecUnFile,
2040  jetSelection=jetSelection,
2041  jetFlavor=jetFlavor,
2042  recoMetFromPFCs=recoMetFromPFCs,
2043  postfix=postfix
2044  )
2045 
2046  #MET T1 uncertainties
2047  runMETCorrectionsAndUncertainties(process, metType=metType,
2048  correctionLevel=["T1"],
2049  computeUncertainties=True,
2050  produceIntermediateCorrections=False,
2051  addToPatDefaultSequence=False,
2052  jetCollectionUnskimmed=jetCollUnskimmed,
2053  photonCollection=photonColl,
2054  electronCollection=electronColl,
2055  muonCollection=muonColl,
2056  tauCollection=tauColl,
2057  pfCandCollection =pfCandColl,
2058  autoJetCleaning=jetCleaning,
2059  jecUncertaintyFile=jecUnFile,
2060  jetSelection=jetSelection,
2061  jetFlavor=jetFlavor,
2062  recoMetFromPFCs=recoMetFromPFCs,
2063  postfix=postfix
2064  )
2065 
2066  #MET T1 Smeared JER uncertainties
2067  runMETCorrectionsAndUncertainties(process, metType=metType,
2068  correctionLevel=["T1","Smear"],
2069  computeUncertainties=True,
2070  produceIntermediateCorrections=False,
2071  addToPatDefaultSequence=False,
2072  jetCollectionUnskimmed=jetCollUnskimmed,
2073  photonCollection=photonColl,
2074  electronCollection=electronColl,
2075  muonCollection=muonColl,
2076  tauCollection=tauColl,
2077  pfCandCollection =pfCandColl,
2078  autoJetCleaning=jetCleaning,
2079  jecUncertaintyFile=jecUnFile,
2080  jetSelection=jetSelection,
2081  jetFlavor=jetFlavor,
2082  recoMetFromPFCs=recoMetFromPFCs,
2083  postfix=postfix,
2084  )
2085 
2086 
2087 
2088 
2089 # 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,
  extractDeepMETs = False,
  postfix = "" 
)

Definition at line 2114 of file runMETCorrectionsAndUncertainties.py.

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

2114  postfix=""):
2115 
2116  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2117 
2118  #MET T1 uncertainties
2119  runMETCorrectionsAndUncertainties(process, metType=metType,
2120  correctionLevel=["T1"],
2121  computeUncertainties=True,
2122  produceIntermediateCorrections=False,
2123  addToPatDefaultSequence=False,
2124  jetCollectionUnskimmed=jetCollUnskimmed,
2125  electronCollection=electronColl,
2126  muonCollection=muonColl,
2127  tauCollection=tauColl,
2128  photonCollection=photonColl,
2129  pfCandCollection =pfCandColl,
2130  runOnData=isData,
2131  onMiniAOD=True,
2132  reapplyJEC=reapplyJEC,
2133  reclusterJets=reclusterJets,
2134  jetSelection=jetSelection,
2135  recoMetFromPFCs=recoMetFromPFCs,
2136  autoJetCleaning=jetCleaning,
2137  manualJetConfig=manualJetConfig,
2138  jetFlavor=jetFlavor,
2139  jetCorLabelUpToL3=jetCorLabelL3,
2140  jetCorLabelL3Res=jetCorLabelRes,
2141  jecUncertaintyFile=jecUncFile,
2142  computeMETSignificance=computeMETSignificance,
2143  CHS=CHS,
2144  postfix=postfix,
2145  fixEE2017=fixEE2017,
2146  fixEE2017Params=fixEE2017Params,
2147  extractDeepMETs=extractDeepMETs,
2148  )
2149 
2150  #MET T1+Txy / Smear
2151  runMETCorrectionsAndUncertainties(process, metType=metType,
2152  correctionLevel=["T1","Txy"],
2153  computeUncertainties=False,
2154  produceIntermediateCorrections=True,
2155  addToPatDefaultSequence=False,
2156  jetCollectionUnskimmed=jetCollUnskimmed,
2157  electronCollection=electronColl,
2158  muonCollection=muonColl,
2159  tauCollection=tauColl,
2160  photonCollection=photonColl,
2161  pfCandCollection =pfCandColl,
2162  runOnData=isData,
2163  onMiniAOD=True,
2164  reapplyJEC=reapplyJEC,
2165  reclusterJets=reclusterJets,
2166  jetSelection=jetSelection,
2167  recoMetFromPFCs=recoMetFromPFCs,
2168  autoJetCleaning=jetCleaning,
2169  manualJetConfig=manualJetConfig,
2170  jetFlavor=jetFlavor,
2171  jetCorLabelUpToL3=jetCorLabelL3,
2172  jetCorLabelL3Res=jetCorLabelRes,
2173  jecUncertaintyFile=jecUncFile,
2174  computeMETSignificance=computeMETSignificance,
2175  CHS=CHS,
2176  postfix=postfix,
2177  fixEE2017=fixEE2017,
2178  fixEE2017Params=fixEE2017Params,
2179  extractDeepMETs=extractDeepMETs,
2180  )
2181  #MET T1+Smear + uncertainties
2182  runMETCorrectionsAndUncertainties(process, metType=metType,
2183  correctionLevel=["T1","Smear"],
2184  computeUncertainties=True,
2185  produceIntermediateCorrections=False,
2186  addToPatDefaultSequence=False,
2187  jetCollectionUnskimmed=jetCollUnskimmed,
2188  electronCollection=electronColl,
2189  muonCollection=muonColl,
2190  tauCollection=tauColl,
2191  photonCollection=photonColl,
2192  pfCandCollection =pfCandColl,
2193  runOnData=isData,
2194  onMiniAOD=True,
2195  reapplyJEC=reapplyJEC,
2196  reclusterJets=reclusterJets,
2197  jetSelection=jetSelection,
2198  recoMetFromPFCs=recoMetFromPFCs,
2199  autoJetCleaning=jetCleaning,
2200  manualJetConfig=manualJetConfig,
2201  jetFlavor=jetFlavor,
2202  jetCorLabelUpToL3=jetCorLabelL3,
2203  jetCorLabelL3Res=jetCorLabelRes,
2204  jecUncertaintyFile=jecUncFile,
2205  computeMETSignificance=computeMETSignificance,
2206  CHS=CHS,
2207  postfix=postfix,
2208  fixEE2017=fixEE2017,
2209  fixEE2017Params=fixEE2017Params,
2210  extractDeepMETs=extractDeepMETs,
2211  )

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 2004 of file runMETCorrectionsAndUncertainties.py.