CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Functions | Variables
runMETCorrectionsAndUncertainties Namespace Reference

Classes

class  RunMETCorrectionsAndUncertainties
 

Functions

def isValidInputTag
 
def runMetCorAndUncForMiniAODProduction
 
def runMetCorAndUncFromMiniAOD
 

Variables

tuple runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
 

Function Documentation

def runMETCorrectionsAndUncertainties.isValidInputTag (   input)
def runMETCorrectionsAndUncertainties.runMetCorAndUncForMiniAODProduction (   process,
  metType = "PF",
  jetCollUnskimmed = "patJets",
  jetColl = "selectedPatJets",
  photonColl = "selectedPatPhotons",
  electronColl = "selectedPatElectrons",
  muonColl = "selectedPatMuons",
  tauColl = "selectedPatTaus",
  pfCandColl = "particleFlow",
  jetCleaning = "LepClean",
  jecUnFile = "CondFormats/JetMETObjects/data/Summer15_50nsV5_DATA_UncertaintySources_AK4PFchs.txt",
  recomputeMET = False,
  postfix = "" 
)

Definition at line 1400 of file runMETCorrectionsAndUncertainties.py.

References runMetCorAndUncFromMiniAOD().

Referenced by miniAOD_tools.miniAOD_customizeCommon().

1401  postfix=""):
1402 
1403  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1404 
1405  #MET flavors
1406  runMETCorrectionsAndUncertainties(process, metType="PF",
1407  correctionLevel=["T0","T1","T2","Smear","Txy"],
1408  computeUncertainties=False,
1409  produceIntermediateCorrections=True,
1410  addToPatDefaultSequence=False,
1411  jetCollectionUnskimmed=jetCollUnskimmed,
1412  jetCollection=jetColl,
1413  photonCollection=photonColl,
1414  electronCollection=electronColl,
1415  muonCollection=muonColl,
1416  tauCollection=tauColl,
1417  pfCandCollection =pfCandColl,
1418  autoJetCleaning=jetCleaning,
1419  jecUncertaintyFile=jecUnFile,
1420  recoMetFromPFCs=recomputeMET,
1421  postfix=postfix
1422  )
1423 
1424  #MET T1 uncertainties
1425  runMETCorrectionsAndUncertainties(process, metType="PF",
1426  correctionLevel=["T1"],
1427  computeUncertainties=True,
1428  produceIntermediateCorrections=False,
1429  addToPatDefaultSequence=False,
1430  jetCollectionUnskimmed=jetCollUnskimmed,
1431  jetCollection=jetColl,
1432  photonCollection=photonColl,
1433  electronCollection=electronColl,
1434  muonCollection=muonColl,
1435  tauCollection=tauColl,
1436  pfCandCollection =pfCandColl,
1437  autoJetCleaning=jetCleaning,
1438  jecUncertaintyFile=jecUnFile,
1439  recoMetFromPFCs=recomputeMET,
1440  postfix=postfix
1441  )
1442 
1443  #MET T1 Smeared JER uncertainties
1444  runMETCorrectionsAndUncertainties(process, metType="PF",
1445  correctionLevel=["T1","Smear"],
1446  computeUncertainties=True,
1447  produceIntermediateCorrections=False,
1448  addToPatDefaultSequence=False,
1449  jetCollectionUnskimmed=jetCollUnskimmed,
1450  jetCollection=jetColl,
1451  photonCollection=photonColl,
1452  electronCollection=electronColl,
1453  muonCollection=muonColl,
1454  tauCollection=tauColl,
1455  pfCandCollection =pfCandColl,
1456  autoJetCleaning=jetCleaning,
1457  jecUncertaintyFile=jecUnFile,
1458  recoMetFromPFCs=recomputeMET,
1459  postfix=postfix,
1460  )
1461 
1462 
1463 
1464 
# miniAOD reproduction ===========================
def runMETCorrectionsAndUncertainties.runMetCorAndUncFromMiniAOD (   process,
  metType = "PF",
  jetCollUnskimmed = "patJets",
  jetColl = "selectedPatJets",
  photonColl = "slimmedPhotons",
  electronColl = "slimmedElectrons",
  muonColl = "slimmedMuons",
  tauColl = "slimmedTaus",
  pfCandColl = "packedPFCandidates",
  jetFlav = "AK4PFchs",
  jetCleaning = "LepClean",
  isData = False,
  jetConfig = False,
  jetCorLabelL3 = cms.InputTag('ak4PFCHSL1FastL2L3Corrector'),
  jetCorLabelRes = cms.InputTag('ak4PFCHSL1FastL2L3ResidualCorrector'),
  jecUncFile = "CondFormats/JetMETObjects/data/Summer15_50nsV5_DATA_UncertaintySources_AK4PFchs.txt",
  postfix = "" 
)

Definition at line 1480 of file runMETCorrectionsAndUncertainties.py.

Referenced by runMetCorAndUncForMiniAODProduction().

1481  postfix=""):
1482 
1483  runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()
1484 
1485  #MET T1 uncertainties
1486  runMETCorrectionsAndUncertainties(process, metType="PF",
1487  correctionLevel=["T1"],
1488  computeUncertainties=True,
1489  produceIntermediateCorrections=False,
1490  addToPatDefaultSequence=False,
1491  jetCollection=jetColl,
1492  electronCollection=electronColl,
1493  muonCollection=muonColl,
1494  tauCollection=tauColl,
1495  photonCollection=photonColl,
1496  pfCandCollection =pfCandColl,
1497  runOnData=isData,
1498  onMiniAOD=True,
1499  autoJetCleaning=jetCleaning,
1500  manualJetConfig=jetConfig,
1501  jetFlavor=jetFlav,
1502  jetCorLabelUpToL3=jetCorLabelL3,
1503  jetCorLabelL3Res=jetCorLabelRes,
1504  jecUncertaintyFile=jecUncFile,
1505  postfix=postfix,
1506  )
1507 
1508  #MET T1+Txy
1509  runMETCorrectionsAndUncertainties(process, metType="PF",
1510  correctionLevel=["T1","Txy"],
1511  computeUncertainties=False,
1512  produceIntermediateCorrections=True,
1513  addToPatDefaultSequence=False,
1514  jetCollection=jetColl,
1515  electronCollection=electronColl,
1516  muonCollection=muonColl,
1517  tauCollection=tauColl,
1518  photonCollection=photonColl,
1519  pfCandCollection =pfCandColl,
1520  runOnData=isData,
1521  onMiniAOD=True,
1522  autoJetCleaning=jetCleaning,
1523  manualJetConfig=jetConfig,
1524  jetFlavor=jetFlav,
1525  jetCorLabelUpToL3=jetCorLabelL3,
1526  jetCorLabelL3Res=jetCorLabelRes,
1527  jecUncertaintyFile=jecUncFile,
1528  postfix=postfix,
1529  )

Variable Documentation

tuple runMETCorrectionsAndUncertainties.runMETCorrectionsAndUncertainties = RunMETCorrectionsAndUncertainties()

Definition at line 1383 of file runMETCorrectionsAndUncertainties.py.