Skip to content

Commit a04a1f4

Browse files
committed
select mothers by mother_first_as()
1 parent ef163dc commit a04a1f4

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

PWGDQ/Core/MCSignal.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,8 @@ bool MCSignal::CheckProng(int i, bool checkSources, const U& mcStack, const T& t
158158
/*for (auto& m : mcParticle.mothers_as<aod::McParticles_001>()) {
159159
LOGF(debug, "M2 %d %d", mcParticle.globalIndex(), m.globalIndex());
160160
}*/
161-
// currentMCParticle = currentMCParticle.template mothers_first_as<U>();
162161
if (currentMCParticle.has_mothers() && j < fProngs[i].fNGenerations - 1) {
163-
const auto& mothersSlice = currentMCParticle.template mothers_as<U>();
164-
for (auto& mother : mothersSlice) {
165-
currentMCParticle = mother;
166-
}
167-
// printf("changed to mother particle pdg = %i \n", currentMCParticle.pdgCode());
162+
currentMCParticle = currentMCParticle.template mothers_first_as<U>();
168163
// currentMCParticle = mcStack.iteratorAt(currentMCParticle.mothersIds()[0]);
169164
// currentMCParticle = currentMCParticle.template mother0_as<U>();
170165
}

0 commit comments

Comments
 (0)