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, 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 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 ===========================
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,
  postfix = "" 
)

Definition at line 2057 of file runMETCorrectionsAndUncertainties.py.

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

2057  postfix=""):
2058 
2059  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2060 
2061  #MET T1 uncertainties
2062  runMETCorrectionsAndUncertainties(process, metType=metType,
2063  correctionLevel=["T1"],
2064  computeUncertainties=True,
2065  produceIntermediateCorrections=False,
2066  addToPatDefaultSequence=False,
2067  jetCollectionUnskimmed=jetCollUnskimmed,
2068  electronCollection=electronColl,
2069  muonCollection=muonColl,
2070  tauCollection=tauColl,
2071  photonCollection=photonColl,
2072  pfCandCollection =pfCandColl,
2073  runOnData=isData,
2074  onMiniAOD=True,
2075  reapplyJEC=reapplyJEC,
2076  reclusterJets=reclusterJets,
2077  jetSelection=jetSelection,
2078  recoMetFromPFCs=recoMetFromPFCs,
2079  autoJetCleaning=jetCleaning,
2080  manualJetConfig=manualJetConfig,
2081  jetFlavor=jetFlavor,
2082  jetCorLabelUpToL3=jetCorLabelL3,
2083  jetCorLabelL3Res=jetCorLabelRes,
2084  jecUncertaintyFile=jecUncFile,
2085  computeMETSignificance=computeMETSignificance,
2086  CHS=CHS,
2087  postfix=postfix,
2088  fixEE2017=fixEE2017,
2089  fixEE2017Params=fixEE2017Params,
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  )
2122  #MET T1+Smear + uncertainties
2123  runMETCorrectionsAndUncertainties(process, metType=metType,
2124  correctionLevel=["T1","Smear"],
2125  computeUncertainties=True,
2126  produceIntermediateCorrections=False,
2127  addToPatDefaultSequence=False,
2128  jetCollectionUnskimmed=jetCollUnskimmed,
2129  electronCollection=electronColl,
2130  muonCollection=muonColl,
2131  tauCollection=tauColl,
2132  photonCollection=photonColl,
2133  pfCandCollection =pfCandColl,
2134  runOnData=isData,
2135  onMiniAOD=True,
2136  reapplyJEC=reapplyJEC,
2137  reclusterJets=reclusterJets,
2138  jetSelection=jetSelection,
2139  recoMetFromPFCs=recoMetFromPFCs,
2140  autoJetCleaning=jetCleaning,
2141  manualJetConfig=manualJetConfig,
2142  jetFlavor=jetFlavor,
2143  jetCorLabelUpToL3=jetCorLabelL3,
2144  jetCorLabelL3Res=jetCorLabelRes,
2145  jecUncertaintyFile=jecUncFile,
2146  computeMETSignificance=computeMETSignificance,
2147  CHS=CHS,
2148  postfix=postfix,
2149  fixEE2017=fixEE2017,
2150  fixEE2017Params=fixEE2017Params,
2151  )

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1948 of file runMETCorrectionsAndUncertainties.py.