You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
int8_t sgn = 0; // 1 if the expected mother is particle, -1 if antiparticle (w.r.t. pdgMother)
582
584
int indexMother = -1; // index of the final matched mother, if found
@@ -597,13 +599,18 @@ struct RecoDecay {
597
599
for (auto iPart : arrayIds[-stage]) { // check all the particles that were the mothers at the previous stage, o2-linter: disable=const-ref-in-for-loop (int elements)
598
600
auto particleMother = particlesMC.rawIteratorAt(iPart - particlesMC.offset());
599
601
if (particleMother.has_mothers()) {
600
-
for (auto iMother = particleMother.mothersIds().front(); iMother <= particleMother.mothersIds().back(); ++iMother) { // loop over the mother particles of the analysed particle
601
-
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
602
+
// If searchUpToQuark is false we only take the first mother (since decay products only have one mother)
603
+
auto lastMotherIdxToCheck = searchUpToQuark ? particleMother.mothersIds().back() : particleMother.mothersIds().front();
604
+
for (auto iMother = particleMother.mothersIds().front(); iMother <= lastMotherIdxToCheck; ++iMother) { // loop over the mother particles of the analysed particle
605
+
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
602
606
continue;
603
607
}
604
608
auto mother = particlesMC.rawIteratorAt(iMother - particlesMC.offset());
605
609
// Check mother's PDG code.
606
610
auto pdgParticleIMother = mother.pdgCode(); // PDG code of the mother
0 commit comments