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

References runMetCorAndUncFromMiniAOD().

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

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

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

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

Variable Documentation

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1883 of file runMETCorrectionsAndUncertainties.py.