Skip to content

Commit

Permalink
Fix ParticleNet running on AOD inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
hqucms authored Apr 8, 2020
1 parent 5fe1910 commit fcc6974
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions PhysicsTools/PatAlgos/python/tools/jetTools.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,11 +676,13 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou
# case 1: running over jets whose daughters are PackedCandidates (only via updateJetCollection for now)
puppi_value_map = ""
vertex_associator = ""
fix_daughters = ('slimmed' in jetSource.value().lower()) # when adding ParticleNet to slimmedJetsAK8 in the MiniAOD step
elif pfCandidates.value() == 'particleFlow':
raise ValueError("Running pfDeepBoostedJetTagInfos with reco::PFCandidates is currently not supported.")
# case 2: running on new jet collection whose daughters are PFCandidates (e.g., cluster jets in RECO/AOD)
puppi_value_map = "puppi"
vertex_associator = "primaryVertexAssociation:original"
# fix_daughters = False
# puppi_value_map = "puppi"
# vertex_associator = "primaryVertexAssociation:original"
else:
raise ValueError("Invalid pfCandidates collection: %s." % pfCandidates.value())
addToProcessAndTask(btagPrefix+btagInfo+labelName+postfix,
Expand All @@ -689,6 +691,7 @@ def setupBTagging(process, jetSource, pfCandidates, explicitJTA, pvSource, svSou
vertices = pvSource,
secondary_vertices = svSource,
pf_candidates = pfCandidates,
fix_daughters = fix_daughters,
puppi_value_map = puppi_value_map,
vertex_associator = vertex_associator,
),
Expand Down

0 comments on commit fcc6974

Please sign in to comment.