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
3 changes: 2 additions & 1 deletion Common/Tasks/qaMuon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,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 492 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 @@ -507,13 +507,13 @@
}
}

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

Check failure on line 510 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 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 sign = (j == 0) ? "positive" : "negative";
for (int chamber = 0; chamber < 10; chamber++) {

Check failure on line 516 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/MFT_") + topBottom + "/" + sign + "/CH" + std::to_string(chamber + 1) + "/";
// Delta x and y at cluster
residualsHistosPerDE[i][j][chamber]["dx_vs_de"] = registryResidualsMFT.add((histPath + "dx_vs_de").c_str(), "Cluster x residual vs. DE index", {HistType::kTH2F, {deAxis, dxAxis}});
Expand Down Expand Up @@ -1092,7 +1092,7 @@
}

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

Check failure on line 1095 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 @@ -2172,7 +2172,7 @@
}

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

Check failure on line 2175 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 @@ -2220,7 +2220,7 @@

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

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

Check failure on line 2223 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 @@ -2256,7 +2256,7 @@

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

Check failure on line 2259 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 @@ -2292,7 +2292,7 @@

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

Check failure on line 2295 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 @@ -2456,7 +2456,7 @@
}

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

Check failure on line 2459 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 Expand Up @@ -3479,4 +3479,5 @@
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<muonQa>(cfgc)};
}
}

Check failure on line 3483 in Common/Tasks/qaMuon.cxx

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
Loading