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

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

14 def isValidInputTag(input):
15  input_str = input
16  if isinstance(input, cms.InputTag):
17  input_str = input.value()
18  if input is None or input_str == '""':
19  return False
20  else:
21  return True
22 
23 # class to manage the (re-)calculation of MET, its corrections, and its uncertainties

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

References runMetCorAndUncFromMiniAOD().

Referenced by miniAOD_tools.miniAOD_customizeCommon().

1869  postfix=""):
1870 
1871  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1872 
1873  #MET flavors
1874  runMETCorrectionsAndUncertainties(process, metType=metType,
1875  correctionLevel=["T0","T1","T2","Smear","Txy"],
1876  computeUncertainties=False,
1877  produceIntermediateCorrections=True,
1878  addToPatDefaultSequence=False,
1879  jetCollectionUnskimmed=jetCollUnskimmed,
1880  photonCollection=photonColl,
1881  electronCollection=electronColl,
1882  muonCollection=muonColl,
1883  tauCollection=tauColl,
1884  pfCandCollection =pfCandColl,
1885  autoJetCleaning=jetCleaning,
1886  jecUncertaintyFile=jecUnFile,
1887  jetSelection=jetSelection,
1888  jetFlavor=jetFlavor,
1889  recoMetFromPFCs=recoMetFromPFCs,
1890  postfix=postfix
1891  )
1892 
1893  #MET T1 uncertainties
1894  runMETCorrectionsAndUncertainties(process, metType=metType,
1895  correctionLevel=["T1"],
1896  computeUncertainties=True,
1897  produceIntermediateCorrections=False,
1898  addToPatDefaultSequence=False,
1899  jetCollectionUnskimmed=jetCollUnskimmed,
1900  photonCollection=photonColl,
1901  electronCollection=electronColl,
1902  muonCollection=muonColl,
1903  tauCollection=tauColl,
1904  pfCandCollection =pfCandColl,
1905  autoJetCleaning=jetCleaning,
1906  jecUncertaintyFile=jecUnFile,
1907  jetSelection=jetSelection,
1908  jetFlavor=jetFlavor,
1909  recoMetFromPFCs=recoMetFromPFCs,
1910  postfix=postfix
1911  )
1912 
1913  #MET T1 Smeared JER uncertainties
1914  runMETCorrectionsAndUncertainties(process, metType=metType,
1915  correctionLevel=["T1","Smear"],
1916  computeUncertainties=True,
1917  produceIntermediateCorrections=False,
1918  addToPatDefaultSequence=False,
1919  jetCollectionUnskimmed=jetCollUnskimmed,
1920  photonCollection=photonColl,
1921  electronCollection=electronColl,
1922  muonCollection=muonColl,
1923  tauCollection=tauColl,
1924  pfCandCollection =pfCandColl,
1925  autoJetCleaning=jetCleaning,
1926  jecUncertaintyFile=jecUnFile,
1927  jetSelection=jetSelection,
1928  jetFlavor=jetFlavor,
1929  recoMetFromPFCs=recoMetFromPFCs,
1930  postfix=postfix,
1931  )
1932 
1933 
1934 
1935 
1936 # 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 1963 of file runMETCorrectionsAndUncertainties.py.

Referenced by runMetCorAndUncForMiniAODProduction().

1963  postfix=""):
1964 
1965  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1966 
1967  #MET T1 uncertainties
1968  runMETCorrectionsAndUncertainties(process, metType=metType,
1969  correctionLevel=["T1"],
1970  computeUncertainties=True,
1971  produceIntermediateCorrections=False,
1972  addToPatDefaultSequence=False,
1973  jetCollectionUnskimmed=jetCollUnskimmed,
1974  electronCollection=electronColl,
1975  muonCollection=muonColl,
1976  tauCollection=tauColl,
1977  photonCollection=photonColl,
1978  pfCandCollection =pfCandColl,
1979  runOnData=isData,
1980  onMiniAOD=True,
1981  reapplyJEC=reapplyJEC,
1982  reclusterJets=reclusterJets,
1983  jetSelection=jetSelection,
1984  recoMetFromPFCs=recoMetFromPFCs,
1985  autoJetCleaning=jetCleaning,
1986  manualJetConfig=manualJetConfig,
1987  jetFlavor=jetFlavor,
1988  jetCorLabelUpToL3=jetCorLabelL3,
1989  jetCorLabelL3Res=jetCorLabelRes,
1990  jecUncertaintyFile=jecUncFile,
1991  computeMETSignificance=computeMETSignificance,
1992  CHS=CHS,
1993  postfix=postfix,
1994  fixEE2017=fixEE2017,
1995  fixEE2017Params=fixEE2017Params,
1996  extractDeepMETs=extractDeepMETs,
1997  campaign=campaign,
1998  era=era,
1999  )
2000 
2001  #MET T1+Txy / Smear
2002  runMETCorrectionsAndUncertainties(process, metType=metType,
2003  correctionLevel=["T1","Txy"],
2004  computeUncertainties=False,
2005  produceIntermediateCorrections=True,
2006  addToPatDefaultSequence=False,
2007  jetCollectionUnskimmed=jetCollUnskimmed,
2008  electronCollection=electronColl,
2009  muonCollection=muonColl,
2010  tauCollection=tauColl,
2011  photonCollection=photonColl,
2012  pfCandCollection =pfCandColl,
2013  runOnData=isData,
2014  onMiniAOD=True,
2015  reapplyJEC=reapplyJEC,
2016  reclusterJets=reclusterJets,
2017  jetSelection=jetSelection,
2018  recoMetFromPFCs=recoMetFromPFCs,
2019  autoJetCleaning=jetCleaning,
2020  manualJetConfig=manualJetConfig,
2021  jetFlavor=jetFlavor,
2022  jetCorLabelUpToL3=jetCorLabelL3,
2023  jetCorLabelL3Res=jetCorLabelRes,
2024  jecUncertaintyFile=jecUncFile,
2025  computeMETSignificance=computeMETSignificance,
2026  CHS=CHS,
2027  postfix=postfix,
2028  fixEE2017=fixEE2017,
2029  fixEE2017Params=fixEE2017Params,
2030  extractDeepMETs=extractDeepMETs,
2031  campaign=campaign,
2032  era=era,
2033  )
2034  #MET T1+Smear + uncertainties
2035  runMETCorrectionsAndUncertainties(process, metType=metType,
2036  correctionLevel=["T1","Smear"],
2037  computeUncertainties=True,
2038  produceIntermediateCorrections=False,
2039  addToPatDefaultSequence=False,
2040  jetCollectionUnskimmed=jetCollUnskimmed,
2041  electronCollection=electronColl,
2042  muonCollection=muonColl,
2043  tauCollection=tauColl,
2044  photonCollection=photonColl,
2045  pfCandCollection =pfCandColl,
2046  runOnData=isData,
2047  onMiniAOD=True,
2048  reapplyJEC=reapplyJEC,
2049  reclusterJets=reclusterJets,
2050  jetSelection=jetSelection,
2051  recoMetFromPFCs=recoMetFromPFCs,
2052  autoJetCleaning=jetCleaning,
2053  manualJetConfig=manualJetConfig,
2054  jetFlavor=jetFlavor,
2055  jetCorLabelUpToL3=jetCorLabelL3,
2056  jetCorLabelL3Res=jetCorLabelRes,
2057  jecUncertaintyFile=jecUncFile,
2058  computeMETSignificance=computeMETSignificance,
2059  CHS=CHS,
2060  postfix=postfix,
2061  fixEE2017=fixEE2017,
2062  fixEE2017Params=fixEE2017Params,
2063  extractDeepMETs=extractDeepMETs,
2064  campaign=campaign,
2065  era=era,
2066  )

Variable Documentation

◆ runMETCorrectionsAndUncertainties

runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties

Definition at line 1851 of file runMETCorrectionsAndUncertainties.py.