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

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

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

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

References runMetCorAndUncFromMiniAOD().

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

1964  postfix=""):
1965 
1966  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1967 
1968  #MET flavors
1969  runMETCorrectionsAndUncertainties(process, metType=metType,
1970  correctionLevel=["T0","T1","T2","Smear","Txy"],
1971  computeUncertainties=False,
1972  produceIntermediateCorrections=True,
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 uncertainties
1989  runMETCorrectionsAndUncertainties(process, metType=metType,
1990  correctionLevel=["T1"],
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  #MET T1 Smeared JER uncertainties
2009  runMETCorrectionsAndUncertainties(process, metType=metType,
2010  correctionLevel=["T1","Smear"],
2011  computeUncertainties=True,
2012  produceIntermediateCorrections=False,
2013  addToPatDefaultSequence=False,
2014  jetCollectionUnskimmed=jetCollUnskimmed,
2015  photonCollection=photonColl,
2016  electronCollection=electronColl,
2017  muonCollection=muonColl,
2018  tauCollection=tauColl,
2019  pfCandCollection =pfCandColl,
2020  autoJetCleaning=jetCleaning,
2021  jecUncertaintyFile=jecUnFile,
2022  jetSelection=jetSelection,
2023  jetFlavor=jetFlavor,
2024  recoMetFromPFCs=recoMetFromPFCs,
2025  postfix=postfix,
2026  )
2027 
2028 
2029 
2030 
2031 # miniAOD reproduction ===========================

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

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

2056  postfix=""):
2057 
2058  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2059 
2060  #MET T1 uncertainties
2061  runMETCorrectionsAndUncertainties(process, metType=metType,
2062  correctionLevel=["T1"],
2063  computeUncertainties=True,
2064  produceIntermediateCorrections=False,
2065  addToPatDefaultSequence=False,
2066  jetCollectionUnskimmed=jetCollUnskimmed,
2067  electronCollection=electronColl,
2068  muonCollection=muonColl,
2069  tauCollection=tauColl,
2070  photonCollection=photonColl,
2071  pfCandCollection =pfCandColl,
2072  runOnData=isData,
2073  onMiniAOD=True,
2074  reapplyJEC=reapplyJEC,
2075  reclusterJets=reclusterJets,
2076  jetSelection=jetSelection,
2077  recoMetFromPFCs=recoMetFromPFCs,
2078  autoJetCleaning=jetCleaning,
2079  manualJetConfig=manualJetConfig,
2080  jetFlavor=jetFlavor,
2081  jetCorLabelUpToL3=jetCorLabelL3,
2082  jetCorLabelL3Res=jetCorLabelRes,
2083  jecUncertaintyFile=jecUncFile,
2084  computeMETSignificance=computeMETSignificance,
2085  CHS=CHS,
2086  postfix=postfix,
2087  fixEE2017=fixEE2017,
2088  fixEE2017Params=fixEE2017Params,
2089  extractDeepMETs=extractDeepMETs,
2090  )
2091 
2092  #MET T1+Txy / Smear
2093  runMETCorrectionsAndUncertainties(process, metType=metType,
2094  correctionLevel=["T1","Txy"],
2095  computeUncertainties=False,
2096  produceIntermediateCorrections=True,
2097  addToPatDefaultSequence=False,
2098  jetCollectionUnskimmed=jetCollUnskimmed,
2099  electronCollection=electronColl,
2100  muonCollection=muonColl,
2101  tauCollection=tauColl,
2102  photonCollection=photonColl,
2103  pfCandCollection =pfCandColl,
2104  runOnData=isData,
2105  onMiniAOD=True,
2106  reapplyJEC=reapplyJEC,
2107  reclusterJets=reclusterJets,
2108  jetSelection=jetSelection,
2109  recoMetFromPFCs=recoMetFromPFCs,
2110  autoJetCleaning=jetCleaning,
2111  manualJetConfig=manualJetConfig,
2112  jetFlavor=jetFlavor,
2113  jetCorLabelUpToL3=jetCorLabelL3,
2114  jetCorLabelL3Res=jetCorLabelRes,
2115  jecUncertaintyFile=jecUncFile,
2116  computeMETSignificance=computeMETSignificance,
2117  CHS=CHS,
2118  postfix=postfix,
2119  fixEE2017=fixEE2017,
2120  fixEE2017Params=fixEE2017Params,
2121  extractDeepMETs=extractDeepMETs,
2122  )
2123  #MET T1+Smear + uncertainties
2124  runMETCorrectionsAndUncertainties(process, metType=metType,
2125  correctionLevel=["T1","Smear"],
2126  computeUncertainties=True,
2127  produceIntermediateCorrections=False,
2128  addToPatDefaultSequence=False,
2129  jetCollectionUnskimmed=jetCollUnskimmed,
2130  electronCollection=electronColl,
2131  muonCollection=muonColl,
2132  tauCollection=tauColl,
2133  photonCollection=photonColl,
2134  pfCandCollection =pfCandColl,
2135  runOnData=isData,
2136  onMiniAOD=True,
2137  reapplyJEC=reapplyJEC,
2138  reclusterJets=reclusterJets,
2139  jetSelection=jetSelection,
2140  recoMetFromPFCs=recoMetFromPFCs,
2141  autoJetCleaning=jetCleaning,
2142  manualJetConfig=manualJetConfig,
2143  jetFlavor=jetFlavor,
2144  jetCorLabelUpToL3=jetCorLabelL3,
2145  jetCorLabelL3Res=jetCorLabelRes,
2146  jecUncertaintyFile=jecUncFile,
2147  computeMETSignificance=computeMETSignificance,
2148  CHS=CHS,
2149  postfix=postfix,
2150  fixEE2017=fixEE2017,
2151  fixEE2017Params=fixEE2017Params,
2152  extractDeepMETs=extractDeepMETs,
2153  )

Variable Documentation

◆ runMETCorrectionsAndUncertainties

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1946 of file runMETCorrectionsAndUncertainties.py.