Skip to content
Closed
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
1 change: 0 additions & 1 deletion Common/Tasks/qaMuon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@
const auto& quadrant = quadrants[j];
AxisSpec xAxis = {20, 0, 200, "|x| (cm)"};
AxisSpec yAxis = {10, 0, 200, "|y| (cm)"};
for (int chamber = 0; chamber < 10; chamber++) {

Check failure on line 496 in Common/Tasks/qaMuon.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.
std::string histPath = std::string("Alignment/same-event/Residuals/MFT/") + quadrant + "/CH" + std::to_string(chamber + 1) + "/";
// Delta x at cluster
residualsHistos[j][chamber]["dx_vs_x"] = registryResiduals.add((histPath + "dx_vs_x").c_str(), "Cluster x residual vs. x", {HistType::kTH2F, {xAxis, dxAxis}});
Expand All @@ -511,11 +511,11 @@
}
}

for (size_t i = 0; i < 2; i++) {

Check failure on line 514 in Common/Tasks/qaMuon.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.
std::string topBottom = (i == 0) ? "top" : "bottom";
AxisSpec deAxis = {26, 0, 26, "DE index"};
AxisSpec phiAxis = {16, -180, 180, "#phi (degrees)"};
for (size_t j = 0; j < 2; j++) {

Check failure on line 518 in Common/Tasks/qaMuon.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.
std::string sign = (j == 0) ? "positive" : "negative";
for (int chamber = 0; chamber < 10; chamber++) {
std::string histPath = std::string("Alignment/same-event/Residuals/MFT/MFT_") + topBottom + "/" + sign + "/CH" + std::to_string(chamber + 1) + "/";
Expand Down Expand Up @@ -622,7 +622,6 @@
dcaHistosGlobalSubtractedMCHpCut[j][0]["DCA_x_vs_z"] = registryDCA.add((histPath + "DCA_x_vs_z").c_str(), std::format("scaled MFT DCA(x) - MCH DCA(x) - vs. z - {} for MCH p > cut", quadrant).c_str(), {HistType::kTH2F, {dcazAxis, dcaxMCHAxis}});
dcaHistosGlobalSubtractedMCHpCut[j][0]["DCA_y_vs_z"] = registryDCA.add((histPath + "DCA_y_vs_z").c_str(), std::format("scaled MFT DCA(y) - MCH DCA(y) - vs. z - {} for MCH p > cut", quadrant).c_str(), {HistType::kTH2F, {dcazAxis, dcayMCHAxis}});


histPath = std::string("Alignment/mixed-event/DCA/MFT/") + quadrant + "/";
dcaHistosMixedEvents[0][j][0]["DCA_x"] = registryDCA.add((histPath + "DCA_x").c_str(), std::format("DCA(x) - {}", quadrant).c_str(), {HistType::kTH1F, {dcaxMFTAxis}});
dcaHistosMixedEvents[0][j][1]["DCA_x"] = registryDCA.add((histPath + "DCA_x_pos").c_str(), std::format("DCA(x) - {} charge > 0", quadrant).c_str(), {HistType::kTH1F, {dcaxMFTAxis}});
Expand Down Expand Up @@ -1142,7 +1141,7 @@
}

if (!removeTrack) {
for (auto& param : track) {

Check failure on line 1144 in Common/Tasks/qaMuon.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.
param.setParameters(param.getSmoothParameters());
param.setCovariances(param.getSmoothCovariances());
}
Expand Down Expand Up @@ -2268,7 +2267,7 @@
}

// Loop over collisions
for (auto& [collisionId, fgValuesColltmp] : collisions) {

Check failure on line 2270 in Common/Tasks/qaMuon.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.

bool sameEvent = (fgValuesColltmp.bc == fgValuesColl.bc);
bool mixedEvent = IsMixedEvent(fgValuesColltmp, fgValuesColl);
Expand Down Expand Up @@ -2316,7 +2315,7 @@

int sign = (fgValuesMFTtmp.sign > 0) ? 1 : 2;

for (auto& [collisionId, fgValuesColltmp] : collisions) {

Check failure on line 2318 in Common/Tasks/qaMuon.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.

bool sameEvent = (fgValuesColltmp.bc == fgValuesColl.bc);
bool mixedEvent = IsMixedEvent(fgValuesColltmp, fgValuesColl);
Expand Down Expand Up @@ -2354,7 +2353,7 @@

// do collision loop and (again) propagation?
// propagation in principle already done in runMuonQA?
for (auto& [collisionId, fgValuesCollGlo] : collisions) {

Check failure on line 2356 in Common/Tasks/qaMuon.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.

bool sameEvent = (fgValuesCollGlo.bc == fgValuesColl.bc);
bool mixedEvent = IsMixedEvent(fgValuesCollGlo, fgValuesColl);
Expand Down Expand Up @@ -2404,7 +2403,7 @@

// Do extrapolation for muons to all reference planes
std::vector<VarTrack> mchTrackExtrap;
for (const double z : zRefPlane) {

Check failure on line 2406 in Common/Tasks/qaMuon.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.
VarTrack fgValues;
if (configRealign.fDoRealign) {
FillPropagation(mchrealigned, VarColl{}, fgValues, kToZ, z);
Expand Down Expand Up @@ -2440,7 +2439,7 @@

// Do extrapolation for MFTs to all reference planes
std::vector<VarTrack> mftTrackExtrap;
for (const double z : zRefPlane) {

Check failure on line 2442 in Common/Tasks/qaMuon.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.
VarTrack fgValues;
FillPropagation<0, 1>(mft, fgValuesCollMFT, mchTrackExtrap[1], fgValues, kToZ, z);
mftTrackExtrap.emplace_back(fgValues);
Expand Down Expand Up @@ -2606,7 +2605,7 @@
}

//// Second loop over global muon tracks
for (auto& [mchIndex, globalMuonsVector] : matchingCandidates) {

Check failure on line 2608 in Common/Tasks/qaMuon.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.

//// sort matching candidates in ascending order based on the matching chi2
auto compareChi2 = [&muons](uint64_t trackIndex1, uint64_t trackIndex2) -> bool {
Expand Down
Loading