Skip to content

Commit

Permalink
Removed jet reclustering in miniAOD for GenHFHadronMatcher. Neutrinos…
Browse files Browse the repository at this point in the history
… exluded from jets in AOD.
  • Loading branch information
Nazar Bartosik committed Sep 2, 2015
1 parent 5d92ffd commit 7894f25
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions PhysicsTools/JetMCAlgos/test/matchGenHFHadrons.py
Expand Up @@ -26,7 +26,7 @@
## configure message logger
process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cerr.threshold = 'INFO'
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
process.MessageLogger.cerr.FwkReport.reportEvery = 100

## define input
if options.runOnAOD:
Expand Down Expand Up @@ -58,31 +58,31 @@
input = cms.untracked.int32(1000)
)

# Setting input particle collections to be used by the tools
# Setting input particle/jet collections to be used by the tools
genParticleCollection = ''
genJetInputParticleCollection = ''
genJetCollection = 'ak4GenJetsCustom'

if options.runOnAOD:
genParticleCollection = 'genParticles'
genJetInputParticleCollection = 'genParticlesForJets'
## producing a subset of genParticles to be used for jet clustering in AOD
from RecoJets.Configuration.GenJetParticles_cff import genParticlesForJets
process.genParticlesForJets = genParticlesForJets.clone()
## producing a subset of genParticles to be used for jet reclustering
from RecoJets.Configuration.GenJetParticles_cff import genParticlesForJetsNoNu
process.genParticlesForJetsCustom = genParticlesForJetsNoNu.clone(
src = genParticleCollection
)
# Producing own jets for testing purposes
from RecoJets.JetProducers.ak4GenJets_cfi import ak4GenJets
process.ak4GenJetsCustom = ak4GenJets.clone(
src = 'genParticlesForJetsCustom',
rParam = cms.double(0.4),
jetAlgorithm = cms.string("AntiKt")
)
else:
genParticleCollection = 'prunedGenParticles'
genJetInputParticleCollection = 'packedGenParticles'
genJetCollection = 'slimmedGenJets'

# Supplies PDG ID to real name resolution of MC particles
process.load("SimGeneral.HepPDTESSource.pythiapdt_cfi")

# Producing own jets for testing purposes
from RecoJets.JetProducers.ak4GenJets_cfi import ak4GenJets
process.ak4GenJetsCustom = ak4GenJets.clone(
src = genJetInputParticleCollection,
rParam = cms.double(0.4),
jetAlgorithm = cms.string("AntiKt")
)

# Ghost particle collection used for Hadron-Jet association
# MUST use proper input particle collection
from PhysicsTools.JetMCAlgos.HadronAndPartonSelector_cfi import selectedHadronsAndPartons
Expand All @@ -99,7 +99,6 @@
jets = genJetCollection,
)


# Plugin for analysing B hadrons
# MUST use the same particle collection as in selectedHadronsAndPartons
from PhysicsTools.JetMCAlgos.GenHFHadronMatcher_cff import matchGenBHadron
Expand Down

0 comments on commit 7894f25

Please sign in to comment.