Skip to content

Commit 476df3a

Browse files
authored
fix float absolute value: abs()-->fabs() (AliceO2Group#7937)
1 parent 406d763 commit 476df3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

PWGEM/Dilepton/Tasks/lmeeHFCocktail.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void doSingle(T& p, std::vector<std::shared_ptr<TH1>> hEta, std::vector<std::sha
7171
float cut_pt[3] = {0., 0., ptMin};
7272
float cut_eta[3] = {9999., 99999., etaMax};
7373
for (int i = 0; i < 3; i++) {
74-
if (pt[i] > cut_pt[i] && abs(eta[i]) < cut_eta[i]) {
74+
if (pt[i] > cut_pt[i] && fabs(eta[i]) < cut_eta[i]) {
7575
hEta[i]->Fill(eta[i], weight[i]);
7676
hPt[i]->Fill(pt[i], weight[i]);
7777
hPtEta[i]->Fill(pt[i], eta[i], weight[i]);
@@ -101,7 +101,7 @@ void doPair(T& p1, T& p2, std::vector<std::shared_ptr<TH1>> hMee, std::vector<st
101101
float cut_eta[3] = {9999., 99999., etaMax};
102102

103103
for (int i = 0; i < 3; i++) {
104-
if (pt1[i] > cut_pt[i] && pt2[i] > cut_pt[i] && abs(eta1[i]) < cut_eta[i] && abs(eta2[i]) < cut_eta[i]) {
104+
if (pt1[i] > cut_pt[i] && pt2[i] > cut_pt[i] && fabs(eta1[i]) < cut_eta[i] && fabs(eta2[i]) < cut_eta[i]) {
105105
hMee[i]->Fill(mass[i], weight[i]);
106106
hMeePtee[i]->Fill(mass[i], pt[i], weight[i]);
107107
}

0 commit comments

Comments
 (0)