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

feat: cut to the maximum value of delta z between SPs in seedFinder #1209

Merged
Merged
12 changes: 10 additions & 2 deletions Core/include/Acts/Seeding/Seedfinder.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ void Seedfinder<external_spacepoint_t, platform_t>::createSeedsForGroup(
if (deltaR > m_config.deltaRMaxTopSP) {
continue;
}
float deltaZ = topSP->z() - zM;
// ratio Z/R (forward angle) of space point duplet
float cotTheta = (topSP->z() - zM) / deltaR;
float cotTheta = deltaZ / deltaR;
if (std::fabs(cotTheta) > m_config.cotThetaMax) {
continue;
}
Expand All @@ -110,6 +111,9 @@ void Seedfinder<external_spacepoint_t, platform_t>::createSeedsForGroup(
zOrigin > m_config.collisionRegionMax) {
continue;
}
if (std::abs(deltaZ) > m_config.deltaZMax) {
continue;
}
// cut on the max curvature between top SP and interaction point
// first transform the space point coordinates into a frame such that the
// central space point SPm is in the origin of the frame and the x axis
Expand Down Expand Up @@ -168,8 +172,9 @@ void Seedfinder<external_spacepoint_t, platform_t>::createSeedsForGroup(
if (deltaR < m_config.deltaRMinBottomSP) {
continue;
}
float deltaZ = zM - bottomSP->z();
// ratio Z/R (forward angle) of space point duplet
float cotTheta = (zM - bottomSP->z()) / deltaR;
float cotTheta = deltaZ / deltaR;
if (std::fabs(cotTheta) > m_config.cotThetaMax) {
continue;
}
Expand All @@ -179,6 +184,9 @@ void Seedfinder<external_spacepoint_t, platform_t>::createSeedsForGroup(
zOrigin > m_config.collisionRegionMax) {
continue;
}
if (std::abs(deltaZ) > m_config.deltaZMax) {
continue;
}
// cut on the max curvature between bottom SP and interaction point
// first transform the space point coordinates into a frame such that the
// central space point SPm is in the origin of the frame and the x axis
Expand Down
4 changes: 4 additions & 0 deletions Core/include/Acts/Seeding/SeedfinderConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ struct SeedfinderConfig {
// parameters for forward seed confirmation
SeedConfirmationRange forwardSeedConfirmationRange;

// cut to the maximum value of delta z between SPs
float deltaZMax = std::numeric_limits<float>::max() * Acts::UnitConstants::mm;
LuisFelipeCoelho marked this conversation as resolved.
Show resolved Hide resolved

// non equidistant binning in z
std::vector<float> zBinEdges;

Expand Down Expand Up @@ -162,6 +165,7 @@ struct SeedfinderConfig {
config.rMax /= 1_mm;
config.rMin /= 1_mm;
config.bFieldInZ /= 1000. * 1_T;
config.deltaZMax /= 1_mm;

config.beamPos[0] /= 1_mm;
config.beamPos[1] /= 1_mm;
Expand Down
1 change: 1 addition & 0 deletions Examples/Python/src/TrackFinding.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ void addTrackFinding(Context& ctx) {
ACTS_PYTHON_MEMBER(nTrplPerSpBLimit);
ACTS_PYTHON_MEMBER(nAvgTrplPerSpBLimit);
ACTS_PYTHON_MEMBER(impactMax);
ACTS_PYTHON_MEMBER(deltaZMax);
ACTS_PYTHON_MEMBER(zBinEdges);
ACTS_PYTHON_MEMBER(enableCutsForSortedSP);
ACTS_PYTHON_MEMBER(zBinEdges);
Expand Down
1 change: 1 addition & 0 deletions Examples/Scripts/Python/itk_seeding.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ def runITkSeeding(field, csvInputDir, outputDir, s=None):
beamPos=acts.Vector2(0 * u.mm, 0 * u.mm),
impactMax=gridConfig.impactMax,
maxPtScattering=float("inf") * u.GeV,
deltaZMax=900 * u.mm,
zBinEdges=gridConfig.zBinEdges,
enableCutsForSortedSP=True, # enable cotTheta sorting in SeedFinder
rRangeMiddleSP=[
Expand Down