Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions Common/Core/RecoDecay.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#include <cmath> // std::abs, std::sqrt
#include <cstddef> // std::size_t
#include <cstdint> // intX_t
#include <numeric> // std::iota
#include <tuple> // std::apply
#include <type_traits> // std::decay_t
#include <utility> // std::move
#include <numeric> // std::iota
#include <vector> // std::vector

/// Base class for calculating properties of reconstructed decays
Expand Down Expand Up @@ -592,16 +592,15 @@ struct RecoDecay {
}
} else if (particle.mothersIds().front() > particle.mothersIds().back()) {
if (particle.mothersIds().back() != 0) {
motherIdsOrdered.push_back(particle.mothersIds().back());
motherIdsOrdered.push_back(particle.mothersIds().back());
}
motherIdsOrdered.push_back(particle.mothersIds().front());
motherIdsOrdered.push_back(particle.mothersIds().front());
}
} else if (particle.mothersIds().size() == 1) {
motherIdsOrdered.push_back(particle.mothersIds().front());
}
}
}

}

/// Finds the mother of an MC particle by looking for the expected PDG code in the mother chain.
/// \tparam acceptFlavourOscillation switch to accept decays where the mother oscillated (e.g. B0 -> B0bar)
Expand Down Expand Up @@ -1118,8 +1117,8 @@ struct RecoDecay {
}

getOrderedMotherIds(particleMother, motherIdsOrdered, searchUpToQuark);
for (auto const& iMother : motherIdsOrdered) { // loop over the mother particles of the analysed particle
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
for (auto const& iMother : motherIdsOrdered) { // loop over the mother particles of the analysed particle
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
continue;
}
auto mother = particlesMC.rawIteratorAt(iMother - particlesMC.offset());
Expand Down Expand Up @@ -1210,8 +1209,8 @@ struct RecoDecay {
std::vector<int64_t> motherIdsOrdered{};
getOrderedMotherIds(particleMother, motherIdsOrdered, searchUpToQuark);

for (auto const& iMother : motherIdsOrdered) { // loop over the mother particles of the analysed particle
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
for (auto const& iMother : motherIdsOrdered) { // loop over the mother particles of the analysed particle
if (std::find(arrayIdsStage.begin(), arrayIdsStage.end(), iMother) != arrayIdsStage.end()) { // if a mother is still present in the vector, do not check it again
continue;
}
auto mother = particlesMC.rawIteratorAt(iMother - particlesMC.offset());
Expand Down
Loading
Loading