Skip to content

Commit b49addb

Browse files
authored
[PWGLF] hStrangeCorrelation: Fix number of parameters in histogram filling (#16624)
1 parent 4785b6f commit b49addb

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

PWGLF/Tasks/Strangeness/hStrangeCorrelation.cxx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2803,12 +2803,17 @@ struct HStrangeCorrelation {
28032803
continue;
28042804
static_for<0, 7>([&](auto i) {
28052805
constexpr int Index = i.value;
2806-
if (i == IndexPion && mcParticle.pdgCode() > Neutral)
2806+
if (i == IndexPion && mcParticle.pdgCode() > Neutral) {
28072807
histos.fill(HIST("Generated/hPositive") + HIST(Particlenames[Index]), mcParticle.pt(), mcParticle.eta(), 1);
2808-
else if (i == IndexPion && mcParticle.pdgCode() < Neutral)
2808+
} else if (i == IndexPion && mcParticle.pdgCode() < Neutral) {
28092809
histos.fill(HIST("Generated/hNegative") + HIST(Particlenames[Index]), mcParticle.pt(), mcParticle.eta(), 1);
2810-
else if (mcParticle.pdgCode() == PdgCodes[i])
2811-
histos.fill(HIST("Generated/h") + HIST(Particlenames[Index]), mcParticle.pt(), mcParticle.eta(), 1);
2810+
} else if (mcParticle.pdgCode() == PdgCodes[i]) {
2811+
if (efficiencyFlags.applyEffAsFunctionOfMultAndPhi) {
2812+
histos.fill(HIST("Generated/h") + HIST(Particlenames[Index]), mcParticle.pt(), mcParticle.eta(), mcParticle.phi(), 1);
2813+
} else {
2814+
histos.fill(HIST("Generated/h") + HIST(Particlenames[Index]), mcParticle.pt(), mcParticle.eta(), 1);
2815+
}
2816+
}
28122817
});
28132818
}
28142819
if (collisions.size() < 1)

0 commit comments

Comments
 (0)