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, campaign="", era="", 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 1966 of file runMETCorrectionsAndUncertainties.py.

References runMetCorAndUncFromMiniAOD().

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

1966  postfix=""):
1967 
1968  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1969 
1970  #MET flavors
1971  runMETCorrectionsAndUncertainties(process, metType=metType,
1972  correctionLevel=["T0","T1","T2","Smear","Txy"],
1973  computeUncertainties=False,
1974  produceIntermediateCorrections=True,
1975  addToPatDefaultSequence=False,
1976  jetCollectionUnskimmed=jetCollUnskimmed,
1977  photonCollection=photonColl,
1978  electronCollection=electronColl,
1979  muonCollection=muonColl,
1980  tauCollection=tauColl,
1981  pfCandCollection =pfCandColl,
1982  autoJetCleaning=jetCleaning,
1983  jecUncertaintyFile=jecUnFile,
1984  jetSelection=jetSelection,
1985  jetFlavor=jetFlavor,
1986  recoMetFromPFCs=recoMetFromPFCs,
1987  postfix=postfix
1988  )
1989 
1990  #MET T1 uncertainties
1991  runMETCorrectionsAndUncertainties(process, metType=metType,
1992  correctionLevel=["T1"],
1993  computeUncertainties=True,
1994  produceIntermediateCorrections=False,
1995  addToPatDefaultSequence=False,
1996  jetCollectionUnskimmed=jetCollUnskimmed,
1997  photonCollection=photonColl,
1998  electronCollection=electronColl,
1999  muonCollection=muonColl,
2000  tauCollection=tauColl,
2001  pfCandCollection =pfCandColl,
2002  autoJetCleaning=jetCleaning,
2003  jecUncertaintyFile=jecUnFile,
2004  jetSelection=jetSelection,
2005  jetFlavor=jetFlavor,
2006  recoMetFromPFCs=recoMetFromPFCs,
2007  postfix=postfix
2008  )
2009 
2010  #MET T1 Smeared JER uncertainties
2011  runMETCorrectionsAndUncertainties(process, metType=metType,
2012  correctionLevel=["T1","Smear"],
2013  computeUncertainties=True,
2014  produceIntermediateCorrections=False,
2015  addToPatDefaultSequence=False,
2016  jetCollectionUnskimmed=jetCollUnskimmed,
2017  photonCollection=photonColl,
2018  electronCollection=electronColl,
2019  muonCollection=muonColl,
2020  tauCollection=tauColl,
2021  pfCandCollection =pfCandColl,
2022  autoJetCleaning=jetCleaning,
2023  jecUncertaintyFile=jecUnFile,
2024  jetSelection=jetSelection,
2025  jetFlavor=jetFlavor,
2026  recoMetFromPFCs=recoMetFromPFCs,
2027  postfix=postfix,
2028  )
2029 
2030 
2031 
2032 
2033 # 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,
  campaign = "",
  era = "",
  postfix = "" 
)

Definition at line 2060 of file runMETCorrectionsAndUncertainties.py.

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

2060  postfix=""):
2061 
2062  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2063 
2064  #MET T1 uncertainties
2065  runMETCorrectionsAndUncertainties(process, metType=metType,
2066  correctionLevel=["T1"],
2067  computeUncertainties=True,
2068  produceIntermediateCorrections=False,
2069  addToPatDefaultSequence=False,
2070  jetCollectionUnskimmed=jetCollUnskimmed,
2071  electronCollection=electronColl,
2072  muonCollection=muonColl,
2073  tauCollection=tauColl,
2074  photonCollection=photonColl,
2075  pfCandCollection =pfCandColl,
2076  runOnData=isData,
2077  onMiniAOD=True,
2078  reapplyJEC=reapplyJEC,
2079  reclusterJets=reclusterJets,
2080  jetSelection=jetSelection,
2081  recoMetFromPFCs=recoMetFromPFCs,
2082  autoJetCleaning=jetCleaning,
2083  manualJetConfig=manualJetConfig,
2084  jetFlavor=jetFlavor,
2085  jetCorLabelUpToL3=jetCorLabelL3,
2086  jetCorLabelL3Res=jetCorLabelRes,
2087  jecUncertaintyFile=jecUncFile,
2088  computeMETSignificance=computeMETSignificance,
2089  CHS=CHS,
2090  postfix=postfix,
2091  fixEE2017=fixEE2017,
2092  fixEE2017Params=fixEE2017Params,
2093  extractDeepMETs=extractDeepMETs,
2094  campaign=campaign,
2095  era=era,
2096  )
2097 
2098  #MET T1+Txy / Smear
2099  runMETCorrectionsAndUncertainties(process, metType=metType,
2100  correctionLevel=["T1","Txy"],
2101  computeUncertainties=False,
2102  produceIntermediateCorrections=True,
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  campaign=campaign,
2129  era=era,
2130  )
2131  #MET T1+Smear + uncertainties
2132  runMETCorrectionsAndUncertainties(process, metType=metType,
2133  correctionLevel=["T1","Smear"],
2134  computeUncertainties=True,
2135  produceIntermediateCorrections=False,
2136  addToPatDefaultSequence=False,
2137  jetCollectionUnskimmed=jetCollUnskimmed,
2138  electronCollection=electronColl,
2139  muonCollection=muonColl,
2140  tauCollection=tauColl,
2141  photonCollection=photonColl,
2142  pfCandCollection =pfCandColl,
2143  runOnData=isData,
2144  onMiniAOD=True,
2145  reapplyJEC=reapplyJEC,
2146  reclusterJets=reclusterJets,
2147  jetSelection=jetSelection,
2148  recoMetFromPFCs=recoMetFromPFCs,
2149  autoJetCleaning=jetCleaning,
2150  manualJetConfig=manualJetConfig,
2151  jetFlavor=jetFlavor,
2152  jetCorLabelUpToL3=jetCorLabelL3,
2153  jetCorLabelL3Res=jetCorLabelRes,
2154  jecUncertaintyFile=jecUncFile,
2155  computeMETSignificance=computeMETSignificance,
2156  CHS=CHS,
2157  postfix=postfix,
2158  fixEE2017=fixEE2017,
2159  fixEE2017Params=fixEE2017Params,
2160  extractDeepMETs=extractDeepMETs,
2161  campaign=campaign,
2162  era=era,
2163  )

Variable Documentation

◆ runMETCorrectionsAndUncertainties

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1948 of file runMETCorrectionsAndUncertainties.py.