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
8 changes: 4 additions & 4 deletions 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 @@ -204,9 +204,9 @@
histosQA.add(Form("histQvecRefAFinalV%d", cfgnMods->at(i)), "", {HistType::kTH3F, {axisQvec, axisQvec, axisCent}});
histosQA.add(Form("histQvecRefBFinalV%d", cfgnMods->at(i)), "", {HistType::kTH3F, {axisQvec, axisQvec, axisCent}});

if (cfgShiftCorPrep) {
histosQA.add(Form("histShiftV%d", cfgnMods->at(i)), "", {HistType::kTProfile3D, {axisCent, axisBasis, axisShift}});
}
if (cfgShiftCorPrep) {
histosQA.add(Form("histShiftV%d", cfgnMods->at(i)), "", {HistType::kTProfile3D, {axisCent, axisBasis, axisShift}});
}

if (cfgQAOccupancyStudy) {
histosQA.add(Form("histQvecOccFinalV%d", cfgnMods->at(i)), "", {HistType::kTHnSparseF, {axisQvecF, axisQvecF, axisCent, axisOccupancy}});
Expand Down Expand Up @@ -268,8 +268,8 @@
int RefAInd = RefAId * 4 + cfgnTotalSystem * 4 * (nmode - 2) + 3;
int RefBInd = RefBId * 4 + cfgnTotalSystem * 4 * (nmode - 2) + 3;

if (nmode == 2) {

Check failure on line 271 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 272 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 @@ -279,8 +279,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 282 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 283 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 @@ -290,8 +290,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 293 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 294 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 @@ -311,12 +311,12 @@
int RefAInd = RefAId + cfgnTotalSystem * (nmode - 2);
int RefBInd = RefBId + cfgnTotalSystem * (nmode - 2);

for (auto& trk : track) {

Check failure on line 314 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;
}

if (std::abs(trk.eta()) > 0.8) {

Check failure on line 319 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.
continue;
}
if (nmode == 2) {
Expand Down Expand Up @@ -369,7 +369,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 372 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 @@ -728,7 +728,7 @@
for (uint i = 0; i < cfgnMods->size(); i++) {
fillHistosShiftCor(qVec, cfgnMods->at(i));
}
}
}

for (uint i = 0; i < cfgnMods->size(); i++) {
fillHistosQvec(qVec, cfgnMods->at(i));
Expand Down
Loading