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

References runMetCorAndUncFromMiniAOD().

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

2002  postfix=""):
2003 
2004  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2005 
2006  #MET flavors
2007  runMETCorrectionsAndUncertainties(process, metType=metType,
2008  correctionLevel=["T0","T1","T2","Smear","Txy"],
2009  computeUncertainties=False,
2010  produceIntermediateCorrections=True,
2011  addToPatDefaultSequence=False,
2012  jetCollectionUnskimmed=jetCollUnskimmed,
2013  photonCollection=photonColl,
2014  electronCollection=electronColl,
2015  muonCollection=muonColl,
2016  tauCollection=tauColl,
2017  pfCandCollection =pfCandColl,
2018  autoJetCleaning=jetCleaning,
2019  jecUncertaintyFile=jecUnFile,
2020  jetSelection=jetSelection,
2021  jetFlavor=jetFlavor,
2022  recoMetFromPFCs=recoMetFromPFCs,
2023  postfix=postfix
2024  )
2025 
2026  #MET T1 uncertainties
2027  runMETCorrectionsAndUncertainties(process, metType=metType,
2028  correctionLevel=["T1"],
2029  computeUncertainties=True,
2030  produceIntermediateCorrections=False,
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 Smeared JER uncertainties
2047  runMETCorrectionsAndUncertainties(process, metType=metType,
2048  correctionLevel=["T1","Smear"],
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 
2067 
2068 
2069 # 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 2094 of file runMETCorrectionsAndUncertainties.py.

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

2094  postfix=""):
2095 
2096  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2097 
2098  #MET T1 uncertainties
2099  runMETCorrectionsAndUncertainties(process, metType=metType,
2100  correctionLevel=["T1"],
2101  computeUncertainties=True,
2102  produceIntermediateCorrections=False,
2103  addToPatDefaultSequence=False,
2104  jetCollectionUnskimmed=jetCollUnskimmed,
2105  electronCollection=electronColl,
2106  muonCollection=muonColl,
2107  tauCollection=tauColl,
2108  photonCollection=photonColl,
2109  pfCandCollection =pfCandColl,
2110  runOnData=isData,
2111  onMiniAOD=True,
2112  reapplyJEC=reapplyJEC,
2113  reclusterJets=reclusterJets,
2114  jetSelection=jetSelection,
2115  recoMetFromPFCs=recoMetFromPFCs,
2116  autoJetCleaning=jetCleaning,
2117  manualJetConfig=manualJetConfig,
2118  jetFlavor=jetFlavor,
2119  jetCorLabelUpToL3=jetCorLabelL3,
2120  jetCorLabelL3Res=jetCorLabelRes,
2121  jecUncertaintyFile=jecUncFile,
2122  computeMETSignificance=computeMETSignificance,
2123  CHS=CHS,
2124  postfix=postfix,
2125  fixEE2017=fixEE2017,
2126  fixEE2017Params=fixEE2017Params,
2127  extractDeepMETs=extractDeepMETs,
2128  )
2129 
2130  #MET T1+Txy / Smear
2131  runMETCorrectionsAndUncertainties(process, metType=metType,
2132  correctionLevel=["T1","Txy"],
2133  computeUncertainties=False,
2134  produceIntermediateCorrections=True,
2135  addToPatDefaultSequence=False,
2136  jetCollectionUnskimmed=jetCollUnskimmed,
2137  electronCollection=electronColl,
2138  muonCollection=muonColl,
2139  tauCollection=tauColl,
2140  photonCollection=photonColl,
2141  pfCandCollection =pfCandColl,
2142  runOnData=isData,
2143  onMiniAOD=True,
2144  reapplyJEC=reapplyJEC,
2145  reclusterJets=reclusterJets,
2146  jetSelection=jetSelection,
2147  recoMetFromPFCs=recoMetFromPFCs,
2148  autoJetCleaning=jetCleaning,
2149  manualJetConfig=manualJetConfig,
2150  jetFlavor=jetFlavor,
2151  jetCorLabelUpToL3=jetCorLabelL3,
2152  jetCorLabelL3Res=jetCorLabelRes,
2153  jecUncertaintyFile=jecUncFile,
2154  computeMETSignificance=computeMETSignificance,
2155  CHS=CHS,
2156  postfix=postfix,
2157  fixEE2017=fixEE2017,
2158  fixEE2017Params=fixEE2017Params,
2159  extractDeepMETs=extractDeepMETs,
2160  )
2161  #MET T1+Smear + uncertainties
2162  runMETCorrectionsAndUncertainties(process, metType=metType,
2163  correctionLevel=["T1","Smear"],
2164  computeUncertainties=True,
2165  produceIntermediateCorrections=False,
2166  addToPatDefaultSequence=False,
2167  jetCollectionUnskimmed=jetCollUnskimmed,
2168  electronCollection=electronColl,
2169  muonCollection=muonColl,
2170  tauCollection=tauColl,
2171  photonCollection=photonColl,
2172  pfCandCollection =pfCandColl,
2173  runOnData=isData,
2174  onMiniAOD=True,
2175  reapplyJEC=reapplyJEC,
2176  reclusterJets=reclusterJets,
2177  jetSelection=jetSelection,
2178  recoMetFromPFCs=recoMetFromPFCs,
2179  autoJetCleaning=jetCleaning,
2180  manualJetConfig=manualJetConfig,
2181  jetFlavor=jetFlavor,
2182  jetCorLabelUpToL3=jetCorLabelL3,
2183  jetCorLabelL3Res=jetCorLabelRes,
2184  jecUncertaintyFile=jecUncFile,
2185  computeMETSignificance=computeMETSignificance,
2186  CHS=CHS,
2187  postfix=postfix,
2188  fixEE2017=fixEE2017,
2189  fixEE2017Params=fixEE2017Params,
2190  extractDeepMETs=extractDeepMETs,
2191  )

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1984 of file runMETCorrectionsAndUncertainties.py.