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 Common/Tasks/qVectorsCorrection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
template <typename TrackType>
bool SelTrack(const TrackType track)
{
if (track.pt() < 0.15)

Check failure on line 136 in Common/Tasks/qVectorsCorrection.cxx

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.
return false;
if (!track.passedITSNCls())
return false;
Expand Down Expand Up @@ -270,12 +270,12 @@
int RefAInd = RefAId * 4 + cfgnTotalSystem * 4 * (nmode - 2) + 3;
int RefBInd = RefBId * 4 + cfgnTotalSystem * 4 * (nmode - 2) + 3;

if (vec.qvecAmp()[DetId] < 1e-8 || vec.qvecAmp()[RefAId] < 1e-8 || vec.qvecAmp()[RefBId] < 1e-8) {

Check failure on line 273 in Common/Tasks/qVectorsCorrection.cxx

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.
return;
}

if (nmode == 2) {

Check failure on line 277 in Common/Tasks/qVectorsCorrection.cxx

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.
for (int ishift = 1; ishift <= 10; ishift++) {

Check failure on line 278 in Common/Tasks/qVectorsCorrection.cxx

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.
histosQA.fill(HIST("histShiftV2"), vec.cent(), 2.0 * DetId + 0.5, ishift - 0.5, TMath::Sin(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[DetInd], vec.qvecRe()[DetInd]) / static_cast<float>(nmode)));
histosQA.fill(HIST("histShiftV2"), vec.cent(), 2.0 * DetId + 1.5, ishift - 0.5, TMath::Cos(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[DetInd], vec.qvecRe()[DetInd]) / static_cast<float>(nmode)));

Expand All @@ -285,8 +285,8 @@
histosQA.fill(HIST("histShiftV2"), vec.cent(), 2.0 * RefBId + 0.5, ishift - 0.5, TMath::Sin(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[RefBInd], vec.qvecRe()[RefBInd]) / static_cast<float>(nmode)));
histosQA.fill(HIST("histShiftV2"), vec.cent(), 2.0 * RefBId + 1.5, ishift - 0.5, TMath::Cos(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[RefBInd], vec.qvecRe()[RefBInd]) / static_cast<float>(nmode)));
}
} else if (nmode == 3) {

Check failure on line 288 in Common/Tasks/qVectorsCorrection.cxx

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.
for (int ishift = 1; ishift <= 10; ishift++) {

Check failure on line 289 in Common/Tasks/qVectorsCorrection.cxx

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.
histosQA.fill(HIST("histShiftV3"), vec.cent(), 2.0 * DetId + 0.5, ishift - 0.5, TMath::Sin(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[DetInd], vec.qvecRe()[DetInd]) / static_cast<float>(nmode)));
histosQA.fill(HIST("histShiftV3"), vec.cent(), 2.0 * DetId + 1.5, ishift - 0.5, TMath::Cos(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[DetInd], vec.qvecRe()[DetInd]) / static_cast<float>(nmode)));

Expand All @@ -296,8 +296,8 @@
histosQA.fill(HIST("histShiftV3"), vec.cent(), 2.0 * RefBId + 0.5, ishift - 0.5, TMath::Sin(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[RefBInd], vec.qvecRe()[RefBInd]) / static_cast<float>(nmode)));
histosQA.fill(HIST("histShiftV3"), vec.cent(), 2.0 * RefBId + 1.5, ishift - 0.5, TMath::Cos(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[RefBInd], vec.qvecRe()[RefBInd]) / static_cast<float>(nmode)));
}
} else if (nmode == 4) {

Check failure on line 299 in Common/Tasks/qVectorsCorrection.cxx

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.
for (int ishift = 1; ishift <= 10; ishift++) {

Check failure on line 300 in Common/Tasks/qVectorsCorrection.cxx

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.
histosQA.fill(HIST("histShiftV4"), vec.cent(), 2.0 * DetId + 0.5, ishift - 0.5, TMath::Sin(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[DetInd], vec.qvecRe()[DetInd]) / static_cast<float>(nmode)));
histosQA.fill(HIST("histShiftV4"), vec.cent(), 2.0 * DetId + 1.5, ishift - 0.5, TMath::Cos(ishift * static_cast<float>(nmode) * TMath::ATan2(vec.qvecIm()[DetInd], vec.qvecRe()[DetInd]) / static_cast<float>(nmode)));

Expand All @@ -321,7 +321,7 @@
return;
}

for (auto& trk : track) {

Check failure on line 324 in Common/Tasks/qVectorsCorrection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!SelTrack(trk)) {
continue;
}
Expand Down Expand Up @@ -379,7 +379,7 @@
int RefAInd = RefAId * 4 + cfgnTotalSystem * 4 * (nmode - 2);
int RefBInd = RefBId * 4 + cfgnTotalSystem * 4 * (nmode - 2);

for (auto& trk : track) {

Check failure on line 382 in Common/Tasks/qVectorsCorrection.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
if (!SelTrack(trk)) {
continue;
}
Expand Down Expand Up @@ -760,7 +760,7 @@
{
histosQA.fill(HIST("histCentFull"), qVec.cent());
if (cfgAddEvtSel) {
if (std::abs(qVec.posZ()) > 10. )
if (std::abs(qVec.posZ()) > 10.)
return;
switch (cfgEvtSel) {
case 0: // Sel8
Expand Down
Loading