Skip to content

Commit 7e16669

Browse files
Check for the tertiary tracks (#7028)
1 parent bf4d57b commit 7e16669

1 file changed

Lines changed: 5 additions & 18 deletions

File tree

DPG/Tasks/AOTTrack/qaEfficiency.cxx

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -925,24 +925,11 @@ struct QaEfficiency {
925925
}
926926
bool isFinal(const o2::aod::McParticles::iterator& mcParticle)
927927
{
928-
// Example conditions to determine if a particle is final (tertiary)
929-
// Here, we assume that final state particles are those not originating from primary vertex
930-
// and not further decaying into other particles
931-
// Check if the particle has no daughters
932-
if (!mcParticle.has_daughters()) {
933-
934-
// Check if the particle is not a primary particle
935-
if (!mcParticle.isPhysicalPrimary()) {
936-
// Check if the particle is produced in a secondary decay
937-
if (mcParticle.getProcess() == 4) {
938-
// Get the mother particle's index and the mother particle itself
939-
auto mothers = mcParticle.mothers_as<o2::aod::McParticles>();
940-
for (const auto& mother : mothers) {
941-
// Check if the mother particle is not primary and produced in a weak decay
942-
if (!mother.isPhysicalPrimary() && mother.getProcess() == 4) {
943-
return true; // Consider it as a tertiary particle
944-
}
945-
}
928+
if (!mcParticle.has_daughters() && !mcParticle.isPhysicalPrimary() && mcParticle.getProcess() == 4) {
929+
auto mothers = mcParticle.mothers_as<o2::aod::McParticles>();
930+
for (const auto& mother : mothers) {
931+
if (!mother.isPhysicalPrimary() && mother.getProcess() == 4) {
932+
return true;
946933
}
947934
}
948935
}

0 commit comments

Comments
 (0)