From b655eb8235a8dde54d90000bdff1c61aa4d1a1d1 Mon Sep 17 00:00:00 2001 From: upasanasharma31 <84681984+upasanasharma31@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:26:12 +0530 Subject: [PATCH 1/4] Update qaEfficiency.cxx Tertiary tracks --- DPG/Tasks/AOTTrack/qaEfficiency.cxx | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaEfficiency.cxx b/DPG/Tasks/AOTTrack/qaEfficiency.cxx index 0fee8840eee..7097fc638cc 100644 --- a/DPG/Tasks/AOTTrack/qaEfficiency.cxx +++ b/DPG/Tasks/AOTTrack/qaEfficiency.cxx @@ -925,28 +925,15 @@ struct QaEfficiency { } bool isFinal(const o2::aod::McParticles::iterator& mcParticle) { - // Example conditions to determine if a particle is final (tertiary) - // Here, we assume that final state particles are those not originating from primary vertex - // and not further decaying into other particles - // Check if the particle has no daughters - if (!mcParticle.has_daughters()) { - - // Check if the particle is not a primary particle - if (!mcParticle.isPhysicalPrimary()) { - // Check if the particle is produced in a secondary decay - if (mcParticle.getProcess() == 4) { - // Get the mother particle's index and the mother particle itself - auto mothers = mcParticle.mothers_as(); - for (const auto& mother : mothers) { - // Check if the mother particle is not primary and produced in a weak decay - if (!mother.isPhysicalPrimary() && mother.getProcess() == 4) { - return true; // Consider it as a tertiary particle - } - } - } + if (!mcParticle.has_daughters() && !mcParticle.isPhysicalPrimary() && mcParticle.getProcess() == 4) { + auto mothers = mcParticle.mothers_as(); + for (const auto& mother : mothers) { + if (!mother.isPhysicalPrimary() && mother.getProcess() == 4) { + return true; } } - return false; // Otherwise, not considered a tertiary particle + } + return false; // Otherwise, not considered a tertiary particle } template void fillMCTrackHistograms(const TrackCandidatesMC::iterator& track, const bool doMakeHistograms) From 3a1ca1e04b3e3e866246dd7954dfb9795fa37618 Mon Sep 17 00:00:00 2001 From: upasanasharma31 <84681984+upasanasharma31@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:32:44 +0530 Subject: [PATCH 2/4] Update qaEfficiency.cxx --- DPG/Tasks/AOTTrack/qaEfficiency.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/DPG/Tasks/AOTTrack/qaEfficiency.cxx b/DPG/Tasks/AOTTrack/qaEfficiency.cxx index 7097fc638cc..8cb088c619c 100644 --- a/DPG/Tasks/AOTTrack/qaEfficiency.cxx +++ b/DPG/Tasks/AOTTrack/qaEfficiency.cxx @@ -926,14 +926,14 @@ struct QaEfficiency { bool isFinal(const o2::aod::McParticles::iterator& mcParticle) { if (!mcParticle.has_daughters() && !mcParticle.isPhysicalPrimary() && mcParticle.getProcess() == 4) { - auto mothers = mcParticle.mothers_as(); - for (const auto& mother : mothers) { - if (!mother.isPhysicalPrimary() && mother.getProcess() == 4) { - return true; + auto mothers = mcParticle.mothers_as(); + for (const auto& mother : mothers) { + if (!mother.isPhysicalPrimary() && mother.getProcess() == 4) { + return true; } } } - return false; // Otherwise, not considered a tertiary particle + return false; // Otherwise, not considered a tertiary particle } template void fillMCTrackHistograms(const TrackCandidatesMC::iterator& track, const bool doMakeHistograms) From b262b6da652028aae8aea960e6355be0c2af8066 Mon Sep 17 00:00:00 2001 From: upasanasharma31 <84681984+upasanasharma31@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:37:49 +0530 Subject: [PATCH 3/4] Update qaEfficiency.cxx --- DPG/Tasks/AOTTrack/qaEfficiency.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DPG/Tasks/AOTTrack/qaEfficiency.cxx b/DPG/Tasks/AOTTrack/qaEfficiency.cxx index 8cb088c619c..cd1302f545e 100644 --- a/DPG/Tasks/AOTTrack/qaEfficiency.cxx +++ b/DPG/Tasks/AOTTrack/qaEfficiency.cxx @@ -930,9 +930,9 @@ struct QaEfficiency { for (const auto& mother : mothers) { if (!mother.isPhysicalPrimary() && mother.getProcess() == 4) { return true; + } } } - } return false; // Otherwise, not considered a tertiary particle } template From 5ee38fa75f53e0f2a0358829c85b0d986cb637dd Mon Sep 17 00:00:00 2001 From: upasanasharma31 <84681984+upasanasharma31@users.noreply.github.com> Date: Mon, 29 Jul 2024 14:39:21 +0530 Subject: [PATCH 4/4] Update qaEfficiency.cxx --- DPG/Tasks/AOTTrack/qaEfficiency.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DPG/Tasks/AOTTrack/qaEfficiency.cxx b/DPG/Tasks/AOTTrack/qaEfficiency.cxx index cd1302f545e..b0eda12ebd4 100644 --- a/DPG/Tasks/AOTTrack/qaEfficiency.cxx +++ b/DPG/Tasks/AOTTrack/qaEfficiency.cxx @@ -933,7 +933,7 @@ struct QaEfficiency { } } } - return false; // Otherwise, not considered a tertiary particle + return false; // Otherwise, not considered a tertiary particle } template void fillMCTrackHistograms(const TrackCandidatesMC::iterator& track, const bool doMakeHistograms)