File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments