Skip to content

Commit

Permalink
Added searchUpToQuark param in vertexClustering function for calling …
Browse files Browse the repository at this point in the history
…RecoDecay::getParticleOrigin
  • Loading branch information
chchoi committed Nov 20, 2024
1 parent f0013a2 commit 8f6bdfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions PWGJE/Core/JetTaggingUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ bool isTaggedJetSV(T const jet, U const& /*prongs*/, float const& prongChi2PCAMi
* @return The number of vertices (clusters) in the jet.
*/
template <typename AnyCollision, typename AnalysisJet, typename AnyTracks, typename AnyParticles, typename AnyOriginalParticles>
int vertexClustering(AnyCollision const& collision, AnalysisJet const& jet, AnyTracks const&, AnyParticles const& particles, AnyOriginalParticles const&, std::unordered_map<std::string, std::vector<int>>& trkLabels, float vtxResParam = 0.01 /* 0.01cm = 100um */, float trackPtMin = 0.5)
int vertexClustering(AnyCollision const& collision, AnalysisJet const& jet, AnyTracks const&, AnyParticles const& particles, AnyOriginalParticles const&, std::unordered_map<std::string, std::vector<int>>& trkLabels, bool searchUpToQuark, float vtxResParam = 0.01 /* 0.01cm = 100um */, float trackPtMin = 0.5)
{
const auto& tracks = jet.template tracks_as<AnyTracks>();
const int n_trks = tracks.size();
Expand Down Expand Up @@ -791,7 +791,7 @@ int vertexClustering(AnyCollision const& collision, AnalysisJet const& jet, AnyT
else
{
const auto &particle = constituent.template mcParticle_as<AnyParticles>();
int orig = RecoDecay::getParticleOrigin(particles, particle, true);
int orig = RecoDecay::getParticleOrigin(particles, particle, searchUpToQuark);
trkLabels["trkOrigin"].push_back((orig > 0) ? orig :
(trkLabels["trkVtxIndex"][trkIdx] == 0) ? 3 : 4);
}
Expand Down
2 changes: 1 addition & 1 deletion PWGJE/Tasks/bjetTreeCreator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ struct BJetTreeCreator {

//+
TrackLabelMap trkLabels{{"trkVtxIndex", {}}, {"trkOrigin", {}}};
int nVertices = jettaggingutilities::vertexClustering(collision.template mcCollision_as<aod::JMcCollisions>(), analysisJet, allTracks, MCParticles, origParticles, trkLabels, vtxRes, trackPtMin);
int nVertices = jettaggingutilities::vertexClustering(collision.template mcCollision_as<aod::JMcCollisions>(), analysisJet, allTracks, MCParticles, origParticles, trkLabels, true, vtxRes, trackPtMin);
analyzeJetTrackInfoForGNN(collision, analysisJet, allTracks, origTracks, tracksIndices, jetFlavor, eventWeight, &trkLabels);

registry.fill(HIST("h2_jetMass_jetpT"), analysisJet.pt(), analysisJet.mass(), eventWeight);
Expand Down

0 comments on commit 8f6bdfa

Please sign in to comment.