Skip to content

Commit c5fff20

Browse files
committed
Avoid magic number issue
1 parent 5d23d41 commit c5fff20

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

PWGCF/JCorran/Tasks/jFlucEfficiencyTask.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ struct JFlucEfficiencyTask {
4949
170.0, 180.0, 190.0, 200.0, 210.0, 220.0, 230.0, 240.0, 250.0, 260.0,
5050
270.0, 280.0, 290.0, 300.0};
5151

52+
constexpr double kChargeThreshold = 3.0; // PDG charge units: 3 = |e|
53+
5254
// Update the axisPt configuration with proper vector initialization
5355
ConfigurableAxis axisPt{"axisPt", std::vector<double>(PttJacek.begin(), PttJacek.end()), "pT axis"};
5456

@@ -274,7 +276,7 @@ struct JFlucEfficiencyTask {
274276
if (p != nullptr) {
275277
charge = p->Charge();
276278
}
277-
return std::abs(charge) >= 3.;
279+
return std::abs(charge) >= kChargeThreshold;
278280
}
279281
// Track selection
280282
template <typename TrackType>

0 commit comments

Comments
 (0)