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: configurable weight factor for longitudinal impact parameter in seed weight #1632

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Core/include/Acts/Seeding/SeedFilter.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ void SeedFilter<external_spacepoint_t>::filterSeeds_2SpFixed(
}

// term on the weight that depends on the value of zOrigin
weight += -std::abs(zOrigin) + m_cfg.compatSeedWeight;
weight += -(std::abs(zOrigin) * m_cfg.zOriginWeightFactor) +
m_cfg.compatSeedWeight;

// skip a bad quality seed if any of its constituents has a weight larger
// than the seed weight
Expand Down
7 changes: 5 additions & 2 deletions Core/include/Acts/Seeding/SeedFilterConfig.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ struct SeedFilterConfig {
// the allowed delta between two inverted seed radii for them to be considered
// compatible.
float deltaInvHelixDiameter = 0.00003 * 1. / Acts::UnitConstants::mm;
// the impact parameters (d0) is multiplied by this factor and subtracted from
// weight
// the transverse impact parameters (d0) is multiplied by this factor and
// subtracted from weight
float impactWeightFactor = 1.;
// the logitudinal impact parameters (z0) is multiplied by this factor and
// subtracted from weight
float zOriginWeightFactor = 1.;
// seed weight increased by this value if a compatible seed has been found.
float compatSeedWeight = 200.;
// minimum distance between compatible seeds to be considered for weight boost
Expand Down
2 changes: 2 additions & 0 deletions Examples/Python/python/acts/examples/itk.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ def itkSeedingAlgConfig(inputSpacePointsType):
seedConfMaxZOrigin=150.0 * u.mm,
minImpactSeedConf=1.0 * u.mm,
)
zOriginWeightFactor = 1
compatSeedWeight = 100
curvatureSortingInFilter = True
phiMin = 0
Expand Down Expand Up @@ -487,6 +488,7 @@ def itkSeedingAlgConfig(inputSpacePointsType):
)
seedFilterConfigArg = SeedFilterConfigArg(
impactWeightFactor=impactWeightFactor,
zOriginWeightFactor=zOriginWeightFactor,
compatSeedWeight=compatSeedWeight,
compatSeedLimit=compatSeedLimit,
numSeedIncrement=numSeedIncrement,
Expand Down
5 changes: 4 additions & 1 deletion Examples/Python/python/acts/examples/reconstruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
"SeedFilterConfig",
[
"impactWeightFactor",
"zOriginWeightFactor",
"compatSeedWeight",
"compatSeedLimit",
"numSeedIncrement",
Expand All @@ -76,7 +77,7 @@
"useDeltaRorTopRadius",
"deltaRMin",
],
defaults=[None] * 11,
defaults=[None] * 12,
)

SpacePointGridConfigArg = namedtuple(
Expand Down Expand Up @@ -364,6 +365,7 @@ def addSeeding(
else seedFilterConfigArg.deltaRMin
),
impactWeightFactor=seedFilterConfigArg.impactWeightFactor,
zOriginWeightFactor=seedFilterConfigArg.zOriginWeightFactor,
compatSeedWeight=seedFilterConfigArg.compatSeedWeight,
compatSeedLimit=seedFilterConfigArg.compatSeedLimit,
numSeedIncrement=seedFilterConfigArg.numSeedIncrement,
Expand Down Expand Up @@ -486,6 +488,7 @@ def addSeeding(
else seedFilterConfigArg.deltaRMin
),
impactWeightFactor=seedFilterConfigArg.impactWeightFactor,
zOriginWeightFactor=seedFilterConfigArg.zOriginWeightFactor,
compatSeedWeight=seedFilterConfigArg.compatSeedWeight,
compatSeedLimit=seedFilterConfigArg.compatSeedLimit,
numSeedIncrement=seedFilterConfigArg.numSeedIncrement,
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 @@ -43,6 +43,7 @@ void addTrackFinding(Context& ctx) {
ACTS_PYTHON_STRUCT_BEGIN(c, Config);
ACTS_PYTHON_MEMBER(deltaInvHelixDiameter);
ACTS_PYTHON_MEMBER(impactWeightFactor);
ACTS_PYTHON_MEMBER(zOriginWeightFactor);
ACTS_PYTHON_MEMBER(compatSeedWeight);
ACTS_PYTHON_MEMBER(deltaRMin);
ACTS_PYTHON_MEMBER(maxSeedsPerSpM);
Expand Down
4 changes: 0 additions & 4 deletions docs/core/seeding.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,6 @@ likely to stem from a particle than another seed using the same middle SP with
smaller impact parameters. The number of compatible seeds ($N_t$) is used to increase the weight, as a higher number of measurements
will lead to higher quality tracks. Finally, the weight can also be affected by optional detector-specific cuts.

:::{note}
The $z_0$ term in the weight is not yet fully configurable, but this will change soon.
:::

The {func}`SeedFilter::filterSeeds_2SpFixed` function also includes a configurable {class}`Acts::SeedConfirmationRangeConfig` seed confirmation step that, when enabled,
classifies higher quality seeds as "quality confined" seeds if they fall within a predefined range of parameters ($d_0$, $z_0$ and $N_t$) that also
depends on the region of the detector (i.e., forward or central region). If the seed is not
Expand Down