Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Track selector printouts to be in line with actual cuts #3815

Merged
merged 9 commits into from
Nov 12, 2024
38 changes: 23 additions & 15 deletions Core/include/Acts/TrackFinding/TrackSelector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,24 +304,32 @@ inline TrackSelector::Config& TrackSelector::Config::pt(double min,

inline std::ostream& operator<<(std::ostream& os,
const TrackSelector::Config& cuts) {
auto print = [&](const char* name, const auto& min, const auto& max) {
// for printing cuts set up with `within`
auto printMinMax = [&](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";
};
pbutti marked this conversation as resolved.
Show resolved Hide resolved

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);
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";

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);
printMax("nSharedHits", cuts.maxSharedHits);
printMax("chi2", cuts.maxChi2);
printMin("nMeasurements", cuts.minMeasurements);
return os;
}

Expand Down
Loading