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

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

9 def isValidInputTag(input):
10  input_str = input
11  if isinstance(input, cms.InputTag):
12  input_str = input.value()
13  if input is None or input_str == '""':
14  return False
15  else:
16  return True
17 
18 
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 1912 of file runMETCorrectionsAndUncertainties.py.

References runMetCorAndUncFromMiniAOD().

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

1912  postfix=""):
1913 
1914  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1915 
1916  #MET flavors
1917  runMETCorrectionsAndUncertainties(process, metType=metType,
1918  correctionLevel=["T0","T1","T2","Smear","Txy"],
1919  computeUncertainties=False,
1920  produceIntermediateCorrections=True,
1921  addToPatDefaultSequence=False,
1922  jetCollectionUnskimmed=jetCollUnskimmed,
1923  photonCollection=photonColl,
1924  electronCollection=electronColl,
1925  muonCollection=muonColl,
1926  tauCollection=tauColl,
1927  pfCandCollection =pfCandColl,
1928  autoJetCleaning=jetCleaning,
1929  jecUncertaintyFile=jecUnFile,
1930  jetSelection=jetSelection,
1931  jetFlavor=jetFlavor,
1932  recoMetFromPFCs=recoMetFromPFCs,
1933  postfix=postfix
1934  )
1935 
1936  #MET T1 uncertainties
1937  runMETCorrectionsAndUncertainties(process, metType=metType,
1938  correctionLevel=["T1"],
1939  computeUncertainties=True,
1940  produceIntermediateCorrections=False,
1941  addToPatDefaultSequence=False,
1942  jetCollectionUnskimmed=jetCollUnskimmed,
1943  photonCollection=photonColl,
1944  electronCollection=electronColl,
1945  muonCollection=muonColl,
1946  tauCollection=tauColl,
1947  pfCandCollection =pfCandColl,
1948  autoJetCleaning=jetCleaning,
1949  jecUncertaintyFile=jecUnFile,
1950  jetSelection=jetSelection,
1951  jetFlavor=jetFlavor,
1952  recoMetFromPFCs=recoMetFromPFCs,
1953  postfix=postfix
1954  )
1955 
1956  #MET T1 Smeared JER uncertainties
1957  runMETCorrectionsAndUncertainties(process, metType=metType,
1958  correctionLevel=["T1","Smear"],
1959  computeUncertainties=True,
1960  produceIntermediateCorrections=False,
1961  addToPatDefaultSequence=False,
1962  jetCollectionUnskimmed=jetCollUnskimmed,
1963  photonCollection=photonColl,
1964  electronCollection=electronColl,
1965  muonCollection=muonColl,
1966  tauCollection=tauColl,
1967  pfCandCollection =pfCandColl,
1968  autoJetCleaning=jetCleaning,
1969  jecUncertaintyFile=jecUnFile,
1970  jetSelection=jetSelection,
1971  jetFlavor=jetFlavor,
1972  recoMetFromPFCs=recoMetFromPFCs,
1973  postfix=postfix,
1974  )
1975 
1976 
1977 
1978 
1979 # 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 2003 of file runMETCorrectionsAndUncertainties.py.

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

2003  postfix=""):
2004 
2005  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
2006 
2007  #MET T1 uncertainties
2008  runMETCorrectionsAndUncertainties(process, metType=metType,
2009  correctionLevel=["T1"],
2010  computeUncertainties=True,
2011  produceIntermediateCorrections=False,
2012  addToPatDefaultSequence=False,
2013  jetCollectionUnskimmed=jetCollUnskimmed,
2014  electronCollection=electronColl,
2015  muonCollection=muonColl,
2016  tauCollection=tauColl,
2017  photonCollection=photonColl,
2018  pfCandCollection =pfCandColl,
2019  runOnData=isData,
2020  onMiniAOD=True,
2021  reapplyJEC=reapplyJEC,
2022  reclusterJets=reclusterJets,
2023  jetSelection=jetSelection,
2024  recoMetFromPFCs=recoMetFromPFCs,
2025  autoJetCleaning=jetCleaning,
2026  manualJetConfig=manualJetConfig,
2027  jetFlavor=jetFlavor,
2028  jetCorLabelUpToL3=jetCorLabelL3,
2029  jetCorLabelL3Res=jetCorLabelRes,
2030  jecUncertaintyFile=jecUncFile,
2031  computeMETSignificance=computeMETSignificance,
2032  CHS=CHS,
2033  postfix=postfix,
2034  fixEE2017=fixEE2017,
2035  fixEE2017Params=fixEE2017Params,
2036  )
2037 
2038  #MET T1+Txy / Smear
2039  runMETCorrectionsAndUncertainties(process, metType=metType,
2040  correctionLevel=["T1","Txy"],
2041  computeUncertainties=False,
2042  produceIntermediateCorrections=True,
2043  addToPatDefaultSequence=False,
2044  jetCollectionUnskimmed=jetCollUnskimmed,
2045  electronCollection=electronColl,
2046  muonCollection=muonColl,
2047  tauCollection=tauColl,
2048  photonCollection=photonColl,
2049  pfCandCollection =pfCandColl,
2050  runOnData=isData,
2051  onMiniAOD=True,
2052  reapplyJEC=reapplyJEC,
2053  reclusterJets=reclusterJets,
2054  jetSelection=jetSelection,
2055  recoMetFromPFCs=recoMetFromPFCs,
2056  autoJetCleaning=jetCleaning,
2057  manualJetConfig=manualJetConfig,
2058  jetFlavor=jetFlavor,
2059  jetCorLabelUpToL3=jetCorLabelL3,
2060  jetCorLabelL3Res=jetCorLabelRes,
2061  jecUncertaintyFile=jecUncFile,
2062  computeMETSignificance=computeMETSignificance,
2063  CHS=CHS,
2064  postfix=postfix,
2065  fixEE2017=fixEE2017,
2066  fixEE2017Params=fixEE2017Params,
2067  )
2068  #MET T1+Smear + uncertainties
2069  runMETCorrectionsAndUncertainties(process, metType=metType,
2070  correctionLevel=["T1","Smear"],
2071  computeUncertainties=True,
2072  produceIntermediateCorrections=False,
2073  addToPatDefaultSequence=False,
2074  jetCollectionUnskimmed=jetCollUnskimmed,
2075  electronCollection=electronColl,
2076  muonCollection=muonColl,
2077  tauCollection=tauColl,
2078  photonCollection=photonColl,
2079  pfCandCollection =pfCandColl,
2080  runOnData=isData,
2081  onMiniAOD=True,
2082  reapplyJEC=reapplyJEC,
2083  reclusterJets=reclusterJets,
2084  jetSelection=jetSelection,
2085  recoMetFromPFCs=recoMetFromPFCs,
2086  autoJetCleaning=jetCleaning,
2087  manualJetConfig=manualJetConfig,
2088  jetFlavor=jetFlavor,
2089  jetCorLabelUpToL3=jetCorLabelL3,
2090  jetCorLabelL3Res=jetCorLabelRes,
2091  jecUncertaintyFile=jecUncFile,
2092  computeMETSignificance=computeMETSignificance,
2093  CHS=CHS,
2094  postfix=postfix,
2095  fixEE2017=fixEE2017,
2096  fixEE2017Params=fixEE2017Params,
2097  )

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1894 of file runMETCorrectionsAndUncertainties.py.