From 79a43414a5383624cd41fe1cf1964e9917b8d7ef Mon Sep 17 00:00:00 2001 From: ddobrigk Date: Mon, 12 Aug 2024 18:58:35 +0200 Subject: [PATCH 1/2] ALICE 3: fix cascade indexing bug --- ALICE3/TableProducer/OTF/onTheFlyTracker.cxx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx b/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx index 1b5682daad4..eec73cd05e3 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx @@ -568,6 +568,8 @@ struct OnTheFlyTracker { float dNdEta = 0.f; // Charged particle multiplicity to use in the efficiency evaluation void process(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles) { + int lastTrackIndex = tracksParCov.lastIndex(); //bookkeep the last added track + tracksAlice3.clear(); ghostTracksAlice3.clear(); bcData.clear(); @@ -752,9 +754,9 @@ struct OnTheFlyTracker { // n-1: proton from lambda // n-2: pion from lambda // n-3: pion from xi - thisCascade.positiveId = tracksAlice3.size() - 1; - thisCascade.negativeId = tracksAlice3.size() - 2; - thisCascade.bachelorId = tracksAlice3.size() - 3; + thisCascade.positiveId = lastTrackIndex + tracksAlice3.size() - 1; + thisCascade.negativeId = lastTrackIndex + tracksAlice3.size() - 2; + thisCascade.bachelorId = lastTrackIndex + tracksAlice3.size() - 3; // use DCA fitters int nCand = 0; @@ -896,7 +898,7 @@ struct OnTheFlyTracker { } // add cascade track - thisCascade.cascadeTrackId = tracksAlice3.size(); // this is the next index to be filled -> should be it + thisCascade.cascadeTrackId = lastTrackIndex + tracksAlice3.size(); // this is the next index to be filled -> should be it tracksAlice3.push_back(TrackAlice3{cascadeTrack, mcParticle.globalIndex(), t, 100.f * 1e-3, false, false, 1}); if (doXiQA) { From 9a0aaa085a965c1b45a2daddd1aac87204fcaefc Mon Sep 17 00:00:00 2001 From: ALICE Builder Date: Mon, 12 Aug 2024 19:02:47 +0200 Subject: [PATCH 2/2] Please consider the following formatting changes (#324) --- ALICE3/TableProducer/OTF/onTheFlyTracker.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx b/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx index eec73cd05e3..0995756edf5 100644 --- a/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx +++ b/ALICE3/TableProducer/OTF/onTheFlyTracker.cxx @@ -568,7 +568,7 @@ struct OnTheFlyTracker { float dNdEta = 0.f; // Charged particle multiplicity to use in the efficiency evaluation void process(aod::McCollision const& mcCollision, aod::McParticles const& mcParticles) { - int lastTrackIndex = tracksParCov.lastIndex(); //bookkeep the last added track + int lastTrackIndex = tracksParCov.lastIndex(); // bookkeep the last added track tracksAlice3.clear(); ghostTracksAlice3.clear();