Skip to content

Commit 01c540b

Browse files
[PWGDQ] Adding correct initialisation of V2ME for cumulants (AliceO2Group#10190)
1 parent 877fc19 commit 01c540b

File tree

1 file changed

+33
-23
lines changed

1 file changed

+33
-23
lines changed

PWGDQ/Core/VarManager.h

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,38 +1986,48 @@ void VarManager::FillTwoMixEventsFlowResoFactor(T const& hs_sp, T const& hs_ep,
19861986
}
19871987

19881988
template <typename T, typename T1, typename T2>
1989-
void VarManager::FillTwoMixEventsCumulants(T const& h_v22m, T const& h_v24m, T const& h_v22p, T const& h_v24p, T1 const& t1, T2 const& t2, float* values)
1989+
void VarManager::FillTwoMixEventsCumulants(T const& h_v22ev1, T const& h_v24ev1, T const& h_v22ev2, T const& h_v24ev2, T1 const& t1, T2 const& t2, float* values)
19901990
{
19911991
if (!values) {
19921992
values = fgValues;
19931993
}
1994-
float ptp, ptm, centp, centm;
1995-
if (t1.sign() < 0) {
1996-
ptm = t1.sign();
1997-
ptp = t2.sign();
1998-
centm = values[kTwoEvCentFT0C1];
1999-
centp = values[kTwoEvCentFT0C2];
2000-
} else {
2001-
ptm = t2.sign();
2002-
ptp = t1.sign();
2003-
centm = values[kTwoEvCentFT0C2];
2004-
centp = values[kTwoEvCentFT0C1];
2005-
}
20061994

2007-
if (centm >= 0.) {
2008-
int idx_v22m = h_v22m->FindBin(centm, ptm);
2009-
int idx_v24m = h_v24m->FindBin(centm, ptm);
1995+
int idx_v22ev1;
1996+
int idx_v24ev1;
1997+
int idx_v22ev2;
1998+
int idx_v24ev2;
1999+
2000+
if (values[kTwoEvCentFT0C1] >= 0.) {
2001+
if (t1.sign() < 0) {
2002+
2003+
idx_v22ev1 = h_v22ev1->FindBin(values[kTwoEvCentFT0C1], t1.pt());
2004+
idx_v24ev1 = h_v24ev1->FindBin(values[kTwoEvCentFT0C1], t1.pt());
2005+
values[kV22m] = h_v22ev1->GetBinContent(idx_v22ev1);
2006+
values[kV24m] = h_v24ev1->GetBinContent(idx_v24ev1);
2007+
2008+
} else {
20102009

2011-
values[kV22m] = h_v22m->GetBinContent(idx_v22m);
2012-
values[kV24m] = h_v24m->GetBinContent(idx_v24m);
2010+
idx_v22ev1 = h_v22ev2->FindBin(values[kTwoEvCentFT0C1], t1.pt());
2011+
idx_v24ev1 = h_v24ev2->FindBin(values[kTwoEvCentFT0C1], t1.pt());
2012+
values[kV22m] = h_v22ev2->GetBinContent(idx_v22ev1);
2013+
values[kV24m] = h_v24ev2->GetBinContent(idx_v24ev1);
2014+
}
20132015
}
2016+
if (values[kTwoEvCentFT0C2] >= 0.) {
2017+
if (t2.sign() < 0) {
20142018

2015-
if (centp >= 0.) {
2016-
int idx_v22p = h_v22p->FindBin(centp, ptp);
2017-
int idx_v24p = h_v24p->FindBin(centp, ptp);
2019+
idx_v22ev2 = h_v22ev1->FindBin(values[kTwoEvCentFT0C2], t2.pt());
2020+
idx_v24ev2 = h_v24ev1->FindBin(values[kTwoEvCentFT0C2], t2.pt());
2021+
values[kV22p] = h_v22ev1->GetBinContent(idx_v22ev2);
2022+
values[kV24p] = h_v24ev1->GetBinContent(idx_v24ev2);
20182023

2019-
values[kV22p] = h_v22p->GetBinContent(idx_v22p);
2020-
values[kV24p] = h_v24p->GetBinContent(idx_v24p);
2024+
} else {
2025+
2026+
idx_v22ev2 = h_v22ev2->FindBin(values[kTwoEvCentFT0C2], t2.pt());
2027+
idx_v24ev2 = h_v24ev2->FindBin(values[kTwoEvCentFT0C2], t2.pt());
2028+
values[kV22p] = h_v22ev2->GetBinContent(idx_v22ev2);
2029+
values[kV24p] = h_v24ev2->GetBinContent(idx_v24ev2);
2030+
}
20212031
}
20222032
}
20232033

0 commit comments

Comments
 (0)