Beispiel #1
0
def nanoHRT_customizeCommon(process, runOnMC):
    setupCustomizedAK8(process, runOnMC=runOnMC)
    # fix genParticles: keep first gen decay product for all top/W/Z/H
    process.finalGenParticles.select.append('keep+ (abs(pdgId) == 6 || abs(pdgId) == 23 || abs(pdgId) == 24 || abs(pdgId) == 25)')
    # update MET w/ JEC
    from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMetCorAndUncFromMiniAOD
    runMetCorAndUncFromMiniAOD(process, isData=not runOnMC)
    return process
Beispiel #2
0
def nanoHRT_customizeCommon(process, runOnMC):
    setupCustomizedAK4(process, runOnMC=runOnMC)
    setupCustomizedAK8(process, runOnMC=runOnMC)
    setupCA15(process, runOnMC=runOnMC)
    setupHOTVR(process, runOnMC=runOnMC)
    # update MET w/ JEC
    from PhysicsTools.PatUtils.tools.runMETCorrectionsAndUncertainties import runMetCorAndUncFromMiniAOD
    runMetCorAndUncFromMiniAOD(process, isData=not runOnMC)
    return process
Beispiel #3
0
def nanoHRT_customizeCommon(process, runOnMC):
    setupCustomizedAK4(process, runOnMC=runOnMC)
    setupCustomizedAK8(process, runOnMC=runOnMC)
    # setupCA15(process, runOnMC=runOnMC)
    # setupHOTVR(process, runOnMC=runOnMC)
    # fix genParticles: keep first gen decay product for all top/W/Z/H
    process.finalGenParticles.select.append(
        'keep+ (abs(pdgId) == 6 || abs(pdgId) == 23 || abs(pdgId) == 24 || abs(pdgId) == 25)'
    )
    return process
    process.nanoPath = cms.Path(process.nanoSequenceMC)
    from PhysicsTools.NanoAOD.nano_cff import nanoAOD_customizeMC
    process = nanoAOD_customizeMC(process)
else:
    # for data:
    process.GlobalTag.globaltag = GlobalTag(process.GlobalTag,
                                            '94X_dataRun2_v4',
                                            '')  # use v10 for new JEC
    process.nanoPath = cms.Path(process.nanoSequence)
    from PhysicsTools.NanoAOD.nano_cff import nanoAOD_customizeData
    process = nanoAOD_customizeData(process)

from PhysicsTools.NanoHRT.ak8_cff import setupCustomizedAK8
from PhysicsTools.NanoHRT.ca15_cff import setupCA15
from PhysicsTools.NanoHRT.hotvr_cff import setupHOTVR
setupCustomizedAK8(process, runOnMC=runOnMC, path='nanoPath')
setupCA15(process, runOnMC=runOnMC, path='nanoPath')
setupHOTVR(process, runOnMC=runOnMC, path='nanoPath')

from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask
patTask = getPatAlgosToolsTask(process)

process.out = cms.OutputModule(
    "NanoAODOutputModule",
    fileName=cms.untracked.string('nano.root'),
    outputCommands=process.NanoAODEDMEventContent.outputCommands,
    compressionLevel=cms.untracked.int32(9),
    compressionAlgorithm=cms.untracked.string("LZMA"),
)
process.end = cms.EndPath(process.out, patTask)