From 762155bc3f265aa1517cb89abf14a9fe73f8917e Mon Sep 17 00:00:00 2001 From: pbutti Date: Tue, 5 Nov 2024 16:10:37 +0100 Subject: [PATCH 1/8] Fix Track selector printouts to be in line with actual cuts --- .../Acts/TrackFinding/TrackSelector.hpp | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Core/include/Acts/TrackFinding/TrackSelector.hpp b/Core/include/Acts/TrackFinding/TrackSelector.hpp index 459ab996857..1ce989df36a 100644 --- a/Core/include/Acts/TrackFinding/TrackSelector.hpp +++ b/Core/include/Acts/TrackFinding/TrackSelector.hpp @@ -304,10 +304,21 @@ inline TrackSelector::Config& TrackSelector::Config::pt(double min, inline std::ostream& operator<<(std::ostream& os, const TrackSelector::Config& cuts) { + // for printing cuts set up with `within` auto print = [&](const char* name, const auto& min, const auto& max) { os << " - " << min << " <= " << name << " < " << max << "\n"; }; + // for printing cuts set up with `checkMin` + auto printMin = [&](const char* name, const auto& min) { + os << " - " << min << " <= " << name << "\n"; + }; + + // for printing cuts set up with `checkMax` + auto printMax = [&](const char* name, const auto& max) { + os << " - " << name << " <= " << max << "\n"; + }; + print("loc0", cuts.loc0Min, cuts.loc0Max); print("loc1", cuts.loc1Min, cuts.loc1Max); print("time", cuts.timeMin, cuts.timeMax); @@ -315,13 +326,13 @@ inline std::ostream& operator<<(std::ostream& os, print("eta", cuts.etaMin, cuts.etaMax); print("absEta", cuts.absEtaMin, cuts.absEtaMax); print("pt", cuts.ptMin, cuts.ptMax); - print("nHoles", 0, cuts.maxHoles); - print("nOutliers", 0, cuts.maxOutliers); - print("nHoles + nOutliers", 0, cuts.maxHolesAndOutliers); - print("nSharedHits", 0, cuts.maxSharedHits); - print("chi2", 0.0, cuts.maxChi2); - os << " - " << cuts.minMeasurements << " <= nMeasurements\n"; - + printMax("nHoles", cuts.maxHoles); + printMax("nOutliers", cuts.maxOutliers); + printMax("nHoles + nOutliers", cuts.maxHolesAndOutliers); + printMax("nSharedHits", cuts.maxSharedHits); + printMax("chi2", cuts.maxChi2); + printMin("nMeasurements", cuts.minMeasurements); + return os; } From b9d16eb277f120419d98e189331e7b93e5294d39 Mon Sep 17 00:00:00 2001 From: Pierfrancesco Butti Date: Tue, 5 Nov 2024 16:16:43 +0100 Subject: [PATCH 2/8] Update TrackSelector.hpp --- Core/include/Acts/TrackFinding/TrackSelector.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/include/Acts/TrackFinding/TrackSelector.hpp b/Core/include/Acts/TrackFinding/TrackSelector.hpp index 1ce989df36a..fb2e5f612a3 100644 --- a/Core/include/Acts/TrackFinding/TrackSelector.hpp +++ b/Core/include/Acts/TrackFinding/TrackSelector.hpp @@ -318,7 +318,6 @@ inline std::ostream& operator<<(std::ostream& os, auto printMax = [&](const char* name, const auto& max) { os << " - " << name << " <= " << max << "\n"; }; - print("loc0", cuts.loc0Min, cuts.loc0Max); print("loc1", cuts.loc1Min, cuts.loc1Max); print("time", cuts.timeMin, cuts.timeMax); From ea326e2e898225dae55d8c9f984f2b40adb95052 Mon Sep 17 00:00:00 2001 From: Pierfrancesco Butti Date: Tue, 5 Nov 2024 16:16:59 +0100 Subject: [PATCH 3/8] Update TrackSelector.hpp --- Core/include/Acts/TrackFinding/TrackSelector.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/include/Acts/TrackFinding/TrackSelector.hpp b/Core/include/Acts/TrackFinding/TrackSelector.hpp index fb2e5f612a3..a9e6b0a03be 100644 --- a/Core/include/Acts/TrackFinding/TrackSelector.hpp +++ b/Core/include/Acts/TrackFinding/TrackSelector.hpp @@ -331,7 +331,6 @@ inline std::ostream& operator<<(std::ostream& os, printMax("nSharedHits", cuts.maxSharedHits); printMax("chi2", cuts.maxChi2); printMin("nMeasurements", cuts.minMeasurements); - return os; } From 9aabebff2f636c599e43a926da8f53f332a22d2b Mon Sep 17 00:00:00 2001 From: Pierfrancesco Butti Date: Tue, 5 Nov 2024 17:16:39 +0100 Subject: [PATCH 4/8] Update Core/include/Acts/TrackFinding/TrackSelector.hpp Co-authored-by: Andreas Stefl --- Core/include/Acts/TrackFinding/TrackSelector.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/include/Acts/TrackFinding/TrackSelector.hpp b/Core/include/Acts/TrackFinding/TrackSelector.hpp index a9e6b0a03be..0ad25876032 100644 --- a/Core/include/Acts/TrackFinding/TrackSelector.hpp +++ b/Core/include/Acts/TrackFinding/TrackSelector.hpp @@ -308,7 +308,6 @@ inline std::ostream& operator<<(std::ostream& os, auto print = [&](const char* name, const auto& min, const auto& max) { os << " - " << min << " <= " << name << " < " << max << "\n"; }; - // for printing cuts set up with `checkMin` auto printMin = [&](const char* name, const auto& min) { os << " - " << min << " <= " << name << "\n"; From 3f251666ff56121b1c0f2825a2a3fc2c174f922e Mon Sep 17 00:00:00 2001 From: Pierfrancesco Butti Date: Tue, 5 Nov 2024 17:16:49 +0100 Subject: [PATCH 5/8] Update Core/include/Acts/TrackFinding/TrackSelector.hpp Co-authored-by: Andreas Stefl --- Core/include/Acts/TrackFinding/TrackSelector.hpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Core/include/Acts/TrackFinding/TrackSelector.hpp b/Core/include/Acts/TrackFinding/TrackSelector.hpp index 0ad25876032..2dc72ca5f81 100644 --- a/Core/include/Acts/TrackFinding/TrackSelector.hpp +++ b/Core/include/Acts/TrackFinding/TrackSelector.hpp @@ -312,7 +312,6 @@ inline std::ostream& operator<<(std::ostream& os, auto printMin = [&](const char* name, const auto& min) { os << " - " << min << " <= " << name << "\n"; }; - // for printing cuts set up with `checkMax` auto printMax = [&](const char* name, const auto& max) { os << " - " << name << " <= " << max << "\n"; From 7a3a863853f29819f744012fa1e330fd7b11aac9 Mon Sep 17 00:00:00 2001 From: Pierfrancesco Butti Date: Tue, 5 Nov 2024 17:16:55 +0100 Subject: [PATCH 6/8] Update Core/include/Acts/TrackFinding/TrackSelector.hpp Co-authored-by: Andreas Stefl --- Core/include/Acts/TrackFinding/TrackSelector.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/include/Acts/TrackFinding/TrackSelector.hpp b/Core/include/Acts/TrackFinding/TrackSelector.hpp index 2dc72ca5f81..c42c386c204 100644 --- a/Core/include/Acts/TrackFinding/TrackSelector.hpp +++ b/Core/include/Acts/TrackFinding/TrackSelector.hpp @@ -305,7 +305,7 @@ inline TrackSelector::Config& TrackSelector::Config::pt(double min, inline std::ostream& operator<<(std::ostream& os, const TrackSelector::Config& cuts) { // for printing cuts set up with `within` - auto print = [&](const char* name, const auto& min, const auto& max) { + auto printMinMax = [&](const char* name, const auto& min, const auto& max) { os << " - " << min << " <= " << name << " < " << max << "\n"; }; // for printing cuts set up with `checkMin` From 6bae694cc5dda1d2efaae193a7f5971815c2fd20 Mon Sep 17 00:00:00 2001 From: Pierfrancesco Butti Date: Tue, 5 Nov 2024 17:16:59 +0100 Subject: [PATCH 7/8] Update Core/include/Acts/TrackFinding/TrackSelector.hpp Co-authored-by: Andreas Stefl --- Core/include/Acts/TrackFinding/TrackSelector.hpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Core/include/Acts/TrackFinding/TrackSelector.hpp b/Core/include/Acts/TrackFinding/TrackSelector.hpp index c42c386c204..e891270d594 100644 --- a/Core/include/Acts/TrackFinding/TrackSelector.hpp +++ b/Core/include/Acts/TrackFinding/TrackSelector.hpp @@ -316,13 +316,13 @@ inline std::ostream& operator<<(std::ostream& os, auto printMax = [&](const char* name, const auto& max) { os << " - " << name << " <= " << max << "\n"; }; - print("loc0", cuts.loc0Min, cuts.loc0Max); - print("loc1", cuts.loc1Min, cuts.loc1Max); - print("time", cuts.timeMin, cuts.timeMax); - print("phi", cuts.phiMin, cuts.phiMax); - print("eta", cuts.etaMin, cuts.etaMax); - print("absEta", cuts.absEtaMin, cuts.absEtaMax); - print("pt", cuts.ptMin, cuts.ptMax); + printMinMax("loc0", cuts.loc0Min, cuts.loc0Max); + printMinMax("loc1", cuts.loc1Min, cuts.loc1Max); + printMinMax("time", cuts.timeMin, cuts.timeMax); + printMinMax("phi", cuts.phiMin, cuts.phiMax); + printMinMax("eta", cuts.etaMin, cuts.etaMax); + printMinMax("absEta", cuts.absEtaMin, cuts.absEtaMax); + printMinMax("pt", cuts.ptMin, cuts.ptMax); printMax("nHoles", cuts.maxHoles); printMax("nOutliers", cuts.maxOutliers); printMax("nHoles + nOutliers", cuts.maxHolesAndOutliers); From 6d21c0a2f8f7dcd24a66705ec25e923d8d0cf864 Mon Sep 17 00:00:00 2001 From: Pierfrancesco Butti Date: Tue, 5 Nov 2024 17:17:05 +0100 Subject: [PATCH 8/8] Update Core/include/Acts/TrackFinding/TrackSelector.hpp Co-authored-by: Andreas Stefl --- Core/include/Acts/TrackFinding/TrackSelector.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/include/Acts/TrackFinding/TrackSelector.hpp b/Core/include/Acts/TrackFinding/TrackSelector.hpp index e891270d594..5a2cf53df27 100644 --- a/Core/include/Acts/TrackFinding/TrackSelector.hpp +++ b/Core/include/Acts/TrackFinding/TrackSelector.hpp @@ -316,6 +316,7 @@ inline std::ostream& operator<<(std::ostream& os, auto printMax = [&](const char* name, const auto& max) { os << " - " << name << " <= " << max << "\n"; }; + printMinMax("loc0", cuts.loc0Min, cuts.loc0Max); printMinMax("loc1", cuts.loc1Min, cuts.loc1Max); printMinMax("time", cuts.timeMin, cuts.timeMax);