Skip to content

Commit 381a984

Browse files
choich08365Changhwan Choialibuild
authored
[PWGJE] Removed collisionId criteria for processMcTrackLabelsWithCollisionAssociator in derivedDataProducer.cxx (#16070)
Co-authored-by: Changhwan Choi <changhwan.choi@cern.ch> Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent b6b9a12 commit 381a984

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

PWGJE/Core/JetTaggingUtilities.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -990,12 +990,16 @@ int vertexClustering(AnyCollision const& collision, AnalysisJet const& jet, AnyT
990990
int trkIdx = 0;
991991
for (auto const& constituent : jet.template tracks_as<AnyTracks>()) {
992992
if (!constituent.has_mcParticle() || !constituent.template mcParticle_as<AnyParticles>().isPhysicalPrimary() || constituent.pt() < trackPtMin) {
993-
trkLabels["trkOrigin"].push_back(0);
993+
trkLabels["trkOrigin"].push_back(0); // fake track, non-physical primary track
994994
} else {
995995
const auto& particle = constituent.template mcParticle_as<AnyParticles>();
996-
int orig = RecoDecay::getParticleOrigin(particles, particle, searchUpToQuark);
997-
trkLabels["trkOrigin"].push_back((orig > 0) ? orig : (trkLabels["trkVtxIndex"][trkIdx] == 0) ? 3
998-
: 4);
996+
if (particle.mcCollisionId() != collision.globalIndex()) {
997+
trkLabels["trkOrigin"].push_back(0); // mismatched coll track
998+
} else {
999+
int orig = RecoDecay::getParticleOrigin(particles, particle, searchUpToQuark);
1000+
trkLabels["trkOrigin"].push_back((orig != RecoDecay::OriginType::None) ? static_cast<int>(orig) : (trkLabels["trkVtxIndex"][trkIdx] == 0) ? 3
1001+
: 4); // 1: charm, 2: beauty, 3: primary, 4: other secondary
1002+
}
9991003
}
10001004

10011005
trkIdx++;

PWGJE/TableProducer/derivedDataProducer.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ struct JetDerivedDataProducerTask {
582582
auto collisionTrackIndices = assocCollisions.sliceBy(preslices.perCollisionTrackIndices, collision.globalIndex());
583583
for (auto const& collisionTrackIndex : collisionTrackIndices) {
584584
auto track = collisionTrackIndex.track_as<soa::Join<aod::Tracks, aod::McTrackLabels>>();
585-
if (track.collisionId() == collision.globalIndex() && track.has_mcParticle()) {
585+
if (track.has_mcParticle()) {
586586
products.jMcTracksLabelTable(track.mcParticleId());
587587
} else {
588588
products.jMcTracksLabelTable(-1);

0 commit comments

Comments
 (0)