Skip to content

Commit fc21b73

Browse files
committed
Revert loop logic
1 parent 3ddb5d0 commit fc21b73

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

PWGLF/Tasks/Strangeness/phiStrangeCorrelation.cxx

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -998,35 +998,35 @@ struct PhiStrangenessCorrelation {
998998

999999
std::vector<MiniParticle>* currentAssocParticles[] = {&k0sParticles, &pionParticles};
10001000

1001-
static_for<0, assocParticleLabels.size() - 1>([&](auto i_idx) {
1002-
constexpr unsigned int i = i_idx.value;
1001+
for (const auto& phiParticle : phiParticles) {
1002+
static_for<0, assocParticleLabels.size() - 1>([&](auto i_idx) {
1003+
constexpr unsigned int i = i_idx.value;
10031004

1004-
for (const auto& phiParticle : phiParticles) {
10051005
for (const auto& assocParticle : *(currentAssocParticles[i])) {
10061006
histos.fill(HIST("phi") + HIST(assocParticleLabels[i]) + HIST("/h5Phi") + HIST(assocParticleLabels[i]) + HIST("ClosureMCGen"),
10071007
multiplicity, phiParticle.pt, assocParticle.pt,
10081008
phiParticle.y - assocParticle.y,
10091009
getDeltaPhi(phiParticle.phi, assocParticle.phi));
10101010
}
1011-
}
1012-
});
1011+
});
1012+
}
10131013

10141014
for (const auto& pastEvent : eventBuffer[multBin]) {
10151015
const std::vector<MiniParticle>* pastAssocParticles[] = {&pastEvent.k0sParticles, &pastEvent.pionParticles};
10161016

1017-
static_for<0, assocParticleLabels.size() - 1>([&](auto i_idx) {
1018-
constexpr unsigned int i = i_idx.value;
1017+
// Loop over past events in the same multiplicity bin and fill histograms with all combinations of current phi particles and past associated particles
1018+
for (const auto& phiParticle : phiParticles) {
1019+
static_for<0, assocParticleLabels.size() - 1>([&](auto i_idx) {
1020+
constexpr unsigned int i = i_idx.value;
10191021

1020-
// Loop over past events in the same multiplicity bin and fill histograms with all combinations of current phi particles and past associated particles
1021-
for (const auto& phiParticle : phiParticles) {
10221022
for (const auto& assocParticle : *(pastAssocParticles[i])) {
10231023
histos.fill(HIST("phi") + HIST(assocParticleLabels[i]) + HIST("/h5Phi") + HIST(assocParticleLabels[i]) + HIST("ClosureMCGenME"),
10241024
multiplicity, phiParticle.pt, assocParticle.pt,
10251025
phiParticle.y - assocParticle.y,
10261026
getDeltaPhi(phiParticle.phi, assocParticle.phi));
10271027
}
1028-
}
1029-
});
1028+
});
1029+
}
10301030
}
10311031

10321032
MiniEvent currentEvent;

0 commit comments

Comments
 (0)