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

refactor: Shrink z range with deltaZMax in Orthogonal seeding #2673

Merged
merged 7 commits into from
Dec 7, 2023
31 changes: 19 additions & 12 deletions Core/include/Acts/Seeding/SeedFinderOrthogonal.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ auto SeedFinderOrthogonal<external_spacepoint_t>::validTupleOrthoRangeLH(
res[DimPhi].shrinkMin(pL - m_config.deltaPhiMax);
res[DimPhi].shrinkMax(pL + m_config.deltaPhiMax);

/*
* Cut: Ensure that z-distance between SPs is within max and min values.
*/
LuisFelipeCoelho marked this conversation as resolved.
Show resolved Hide resolved
res[DimZ].shrinkMin(zL - m_config.deltaZMax);
res[DimZ].shrinkMax(zL + m_config.deltaZMax);

return res;
}

Expand All @@ -93,6 +99,7 @@ auto SeedFinderOrthogonal<external_spacepoint_t>::validTupleOrthoRangeHL(
const internal_sp_t &high) const -> typename tree_t::range_t {
float pM = high.phi();
float rM = high.radius();
float zM = high.z();

typename tree_t::range_t res;

Expand Down Expand Up @@ -129,20 +136,26 @@ auto SeedFinderOrthogonal<external_spacepoint_t>::validTupleOrthoRangeHL(
*/
float fracR = res[DimR].min() / rM;

float zMin = (high.z() - m_config.collisionRegionMin) * fracR +
m_config.collisionRegionMin;
float zMax = (high.z() - m_config.collisionRegionMax) * fracR +
m_config.collisionRegionMax;
float zMin =
(zM - m_config.collisionRegionMin) * fracR + m_config.collisionRegionMin;
float zMax =
(zM - m_config.collisionRegionMax) * fracR + m_config.collisionRegionMax;

res[DimZ].shrinkMin(std::min(zMin, high.z()));
res[DimZ].shrinkMax(std::max(zMax, high.z()));
res[DimZ].shrinkMin(std::min(zMin, zM));
res[DimZ].shrinkMax(std::max(zMax, zM));

/*
* Cut: Shrink the φ range, such that Δφ_min ≤ φ - φ_H ≤ Δφ_max
*/
res[DimPhi].shrinkMin(pM - m_config.deltaPhiMax);
res[DimPhi].shrinkMax(pM + m_config.deltaPhiMax);

/*
* Cut: Ensure that z-distance between SPs is within max and min values.
*/
LuisFelipeCoelho marked this conversation as resolved.
Show resolved Hide resolved
res[DimZ].shrinkMin(zM - m_config.deltaZMax);
res[DimZ].shrinkMax(zM + m_config.deltaZMax);

return res;
}

Expand Down Expand Up @@ -219,12 +232,6 @@ bool SeedFinderOrthogonal<external_spacepoint_t>::validTuple(
if (std::fabs(cotTheta) > m_config.cotThetaMax) {
return false;
}
/*
* Cut: Ensure that z-distance between SPs is within max and min values.
*/
if (std::abs(deltaZ) > m_config.deltaZMax) {
return false;
}

return true;
}
Expand Down
Loading