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
23 changes: 16 additions & 7 deletions Core/include/Acts/TrackFinding/TrackSelector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,24 +304,33 @@ 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) {
pbutti marked this conversation as resolved.
Show resolved Hide resolved
os << " - " << min << " <= " << name << " < " << max << "\n";
};

pbutti marked this conversation as resolved.
Show resolved Hide resolved
// for printing cuts set up with `checkMin`
auto printMin = [&](const char* name, const auto& min) {
os << " - " << min << " <= " << name << "\n";
};

pbutti marked this conversation as resolved.
Show resolved Hide resolved
// 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);
pbutti marked this conversation as resolved.
Show resolved Hide resolved
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;
}

Expand Down
Loading