Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing JetTags names to be backcompatible
- Loading branch information
anovak10
committed
Nov 29, 2018
1 parent
462aaa7
commit a59c602
Showing
8 changed files
with
90 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
|
||
import FWCore.ParameterSet.Config as cms | ||
from PhysicsTools.PatAlgos.tools.helpers import getPatAlgosToolsTask | ||
|
||
from FWCore.ParameterSet.VarParsing import VarParsing | ||
options = VarParsing('analysis') | ||
options.inputFiles = '/store/mc/RunIIFall17MiniAOD/ZprimeToWWToWlepWhad_narrow_M-3000_TuneCP5_13TeV-madgraph/MINIAODSIM/94X_mc2017_realistic_v10-v1/20000/3E25D208-8205-E811-8858-3417EBE64426.root' | ||
options.maxEvents = -1 | ||
options.parseArguments() | ||
|
||
process = cms.Process("PATtest") | ||
|
||
## MessageLogger | ||
process.load("FWCore.MessageLogger.MessageLogger_cfi") | ||
process.MessageLogger.cerr.FwkReport.reportEvery = 100 | ||
|
||
|
||
## Options and Output Report | ||
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) ) | ||
|
||
## Source | ||
process.source = cms.Source("PoolSource", | ||
fileNames=cms.untracked.vstring(options.inputFiles) | ||
) | ||
## Maximal Number of Events | ||
process.maxEvents = cms.untracked.PSet(input=cms.untracked.int32(options.maxEvents)) | ||
|
||
## Geometry and Detector Conditions (needed for a few patTuple production steps) | ||
process.load("Configuration.Geometry.GeometryRecoDB_cff") | ||
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff") | ||
from Configuration.AlCa.GlobalTag import GlobalTag | ||
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_mc') | ||
process.load("Configuration.StandardSequences.MagneticField_cff") | ||
|
||
## Output Module Configuration (expects a path 'p') | ||
from PhysicsTools.PatAlgos.patEventContent_cff import patEventContentNoCleaning | ||
process.out = cms.OutputModule("PoolOutputModule", | ||
fileName = cms.untracked.string('patTuple.root'), | ||
## save only events passing the full path | ||
#SelectEvents = cms.untracked.PSet( SelectEvents = cms.vstring('p') ), | ||
## save PAT output; you need a '*' to unpack the list of commands | ||
## 'patEventContent' | ||
outputCommands = cms.untracked.vstring('drop *', *patEventContentNoCleaning ) | ||
) | ||
|
||
patAlgosToolsTask = getPatAlgosToolsTask(process) | ||
process.outpath = cms.EndPath(process.out, patAlgosToolsTask) | ||
|
||
## and add them to the event content | ||
from PhysicsTools.PatAlgos.tools.jetTools import updateJetCollection | ||
from RecoBTag.MXNet.pfDeepBoostedJet_cff import _pfDeepBoostedJetTagsAll as pfDeepBoostedJetTagsAll | ||
|
||
updateJetCollection( | ||
process, | ||
jetSource = cms.InputTag('slimmedJetsAK8'), | ||
pvSource = cms.InputTag('offlineSlimmedPrimaryVertices'), | ||
svSource = cms.InputTag('slimmedSecondaryVertices'), | ||
rParam = 0.8, | ||
jetCorrections = ('AK8PFPuppi', cms.vstring(['L2Relative', 'L3Absolute']), 'None'), | ||
btagDiscriminators = pfDeepBoostedJetTagsAll | ||
) | ||
|
||
from Configuration.EventContent.EventContent_cff import MINIAODSIMEventContent | ||
process.out.outputCommands.append('keep *_slimmedJetsAK8*_*_*') | ||
process.out.outputCommands.append('keep *_offlineSlimmedPrimaryVertices*_*_*') | ||
process.out.outputCommands.append('keep *_slimmedSecondaryVertices*_*_*') | ||
process.out.outputCommands.append('keep *_selectedPatJets*_*_*') | ||
process.out.outputCommands.append('keep *_selectedUpdatedPatJets*_*_*') | ||
process.out.outputCommands.append('keep *_updatedPatJets*_*_*') | ||
|
||
process.out.fileName = 'test_deep_boosted_jet_MINIAODSIM.root' | ||
|
||
# ## | ||
# process.options.wantSummary = False ## (to suppress the long output at the end of the job) | ||
# process.add_(cms.Service("InitRootHandlers", DebugLevel =cms.untracked.int32(3))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
RecoBTag/TensorFlow/python/pfMassIndependentDeepDoubleXJetTags_cff.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters