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
2 changes: 1 addition & 1 deletion Common/Tasks/qaMuon.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
// Derived version of mch::Track class that handles the associated clusters as internal objects and deletes them in the destructor
class TrackRealigned : public mch::Track
{
public:
public:
TrackRealigned() = default;
~TrackRealigned()
{
Expand Down Expand Up @@ -505,7 +505,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 508 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 @@ -523,13 +523,13 @@
}
}

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

Check failure on line 526 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 530 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 532 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 @@ -1111,7 +1111,7 @@
}

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

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

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

Check failure on line 2194 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 @@ -2239,7 +2239,7 @@

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

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

Check failure on line 2242 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 @@ -2275,7 +2275,7 @@

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

Check failure on line 2278 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 @@ -2311,7 +2311,7 @@

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

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

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

Check failure on line 2478 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