Skip to content

Commit

Permalink
feat: cut to the maximum value of delta z between SPs in seedFinder (#…
Browse files Browse the repository at this point in the history
…1209)

This PR adds a cut to the maximum value of delta z between SPs in seedFinder. By default the cut is not applied since `deltaZMax` is set to `numeric_limits<float>::max()` 

This cut will be used for the strip SPs in the ITk implementation but not for the pixel SPs
  • Loading branch information
LuisFelipeCoelho committed Mar 30, 2022
1 parent 9953615 commit 6ae8a95
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
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 @@ -171,8 +175,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 @@ -182,6 +187,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
5 changes: 5 additions & 0 deletions Core/include/Acts/Seeding/SeedfinderConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ 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>::infinity() * Acts::UnitConstants::mm;

// enable cut on the compatibility between interaction point and SPs
bool interactionPointCut = false;

Expand Down Expand Up @@ -165,6 +169,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(interactionPointCut);
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,
interactionPointCut=True,
zBinEdges=gridConfig.zBinEdges,
enableCutsForSortedSP=True, # enable cotTheta sorting in SeedFinder
Expand Down

0 comments on commit 6ae8a95

Please sign in to comment.