Skip to content

Commit 099afbb

Browse files
committed
Fix o2linter warnings on magic numbers
1 parent 9f32210 commit 099afbb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

PWGUD/Tasks/FwdMuonsUPC.cxx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ const int kReqMatchMIDTracks = 2;
176176
const int kReqMatchMFTTracks = 2;
177177
const int kMaxChi2MFTMatch = 30;
178178
const float kMaxZDCTime = 2.;
179+
const int k2Tracks = 2;
180+
const int k4Tracks = 4;
179181

180182
struct FwdMuonsUPC {
181183

@@ -403,7 +405,7 @@ struct FwdMuonsUPC {
403405
}
404406

405407
// select events with exactly 2 forward tracks
406-
if (cand.numContrib() != 2) {
408+
if (cand.numContrib() != k2Tracks) {
407409
return;
408410
}
409411

@@ -731,7 +733,7 @@ struct FwdMuonsUPC {
731733

732734
// loop over the candidates
733735
for (const auto& item : tracksPerCand) {
734-
if (item.second.size() != 2) {
736+
if (item.second.size() != k2Tracks) {
735737
LOGF(debug, "number track = %d", item.second.size());
736738
continue;
737739
}
@@ -768,7 +770,7 @@ struct FwdMuonsUPC {
768770

769771
// loop over the candidates
770772
for (const auto& item : tracksPerCand) {
771-
if (item.second.size() != 2) {
773+
if (item.second.size() != k2Tracks) {
772774
LOGF(debug, "mc parts = %d", item.second.size());
773775
for (const auto id : item.second) {
774776
auto p = McParts.iteratorAt(id);
@@ -802,7 +804,7 @@ struct FwdMuonsUPC {
802804

803805
// loop over the candidates
804806
for (const auto& item : tracksPerCandAll) {
805-
if (item.second.size() != 4) {
807+
if (item.second.size() != k4Tracks) {
806808
LOGF(debug, "number track (reco + gen) = %d", item.second.size());
807809
continue;
808810
}

0 commit comments

Comments
 (0)