Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ struct HfProducerCharmHadronsTrackFemtoDream {
doprocessMcXicToXiPiPi, doprocessMcXicToXiPiPiKf, doprocessMcXicToXiPiPiWithML, doprocessMcXicToXiPiPiWithMLKf, doprocessMcXicToXiPiPiGen};
const int nProcesses = std::accumulate(processes.begin(), processes.end(), 0);
const bool isSingleProcess = (nProcesses == 1);
const bool isMatchingGenRecPair = (nProcesses == 2 && ((doprocessMcDstarToD0PiGen && (doprocessMcDstarToD0Pi || doprocessMcDstarToD0PiWithML)) ||
(doprocessMcDplusToPiKPiGen && (doprocessMcDplusToPiKPi || doprocessMcDplusToPiKPiWithML))));
constexpr int GenRecProcessCount{2};
const bool isMatchingGenRecPair = (nProcesses == GenRecProcessCount && ((doprocessMcDstarToD0PiGen && (doprocessMcDstarToD0Pi || doprocessMcDstarToD0PiWithML)) ||
(doprocessMcDplusToPiKPiGen && (doprocessMcDplusToPiKPi || doprocessMcDplusToPiKPiWithML))));
if (!isSingleProcess && !isMatchingGenRecPair) {
LOGP(fatal, "Enable one process, or corresponding reconstructed and generated MC processes together.");
}
Expand Down Expand Up @@ -501,10 +502,11 @@ struct HfProducerCharmHadronsTrackFemtoDream {
template <typename T>
static bool hasPhiAncestor(T const& particles, typename T::iterator const& particle)
{
constexpr int MaxElementaryPdg{100};
std::vector<int64_t> pending;
std::vector<int64_t> visited{particle.globalIndex()};
if (particle.has_mothers()) {
for (const auto id : particle.mothersIds()) {
for (const auto& id : particle.mothersIds()) {
pending.push_back(id);
}
}
Expand All @@ -519,15 +521,15 @@ struct HfProducerCharmHadronsTrackFemtoDream {
visited.push_back(id);
const auto mother = particles.rawIteratorAt(id - particles.offset());
const int absPdg = std::abs(mother.pdgCode());
if (absPdg == 333) {
if (absPdg == o2::constants::physics::Pdg::kPhi) {
return true;
}
// Stop at the partonic boundary of the hadron decay chain.
if (absPdg <= 100 || RecoDecay::isDiquark(absPdg)) {
if (absPdg <= MaxElementaryPdg || RecoDecay::isDiquark(absPdg)) {
continue;
}
if (mother.has_mothers()) {
for (const auto parentId : mother.mothersIds()) {
for (const auto& parentId : mother.mothersIds()) {
pending.push_back(parentId);
}
}
Expand Down
Loading