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
2 changes: 1 addition & 1 deletion PWGLF/Utils/inelGt.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
ParticlesEtaAndCharge.resize(nParticles);

auto etaChargeConditionFunc = [](EtaCharge elem) {
return ((std::abs(elem.eta) < 1.0) && (std::abs(elem.charge) > 0.001));

Check failure on line 73 in PWGLF/Utils/inelGt.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
};

if (std::count_if(ParticlesEtaAndCharge.begin(), ParticlesEtaAndCharge.end(), etaChargeConditionFunc) > nChToSatisfySelection) {
Expand Down Expand Up @@ -114,7 +114,7 @@
continue;
}
// is charged
if (abs(p->Charge()) == 0) {
if (std::abs(p->Charge()) == 0) {
continue;
}
// in acceptance
Expand Down Expand Up @@ -142,10 +142,10 @@
}
// is neutral
if (requireNeutral) {
if (std::abs(p->Charge()) > 1e-3)

Check failure on line 145 in PWGLF/Utils/inelGt.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
} else {
if (std::abs(p->Charge()) <= 1e-3)

Check failure on line 148 in PWGLF/Utils/inelGt.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
continue;
}
// in acceptance
Expand Down
Loading