Skip to content

Commit c1a6897

Browse files
committed
Use PDF for impact parameter weight
This commit uses the PDF of a half-Gaussian distribution to determine the weight of the impact factor in the track finding. This changes makes it so that weights are strictly positive and negates the "cut-off" effect caused by the confirmation weight.
1 parent e393122 commit c1a6897

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

core/include/traccc/definitions/common.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ using unit = detray::unit<scalar_t>;
2121
template <typename scalar_t>
2222
using constant = detray::constant<scalar_t>;
2323

24+
namespace constants {
25+
constexpr scalar sqrt_pi = 1.772453851f;
26+
}
27+
2428
// epsilon for float variables
2529
constexpr scalar float_epsilon = 1e-5f;
2630

core/include/traccc/seeding/detail/seeding_config.hpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ struct seedfilter_config {
192192
// the impact parameters (d0) is multiplied by this factor and subtracted
193193
// from weight
194194
float impactWeightFactor = 1.f;
195+
// assumed variance of the half-Gaussian distribution of the impact
196+
// parameter $d_0$ in mm
197+
float impactSigma = 5.f;
195198
// seed weight increased by this value if a compatible seed has been found.
196199
float compatSeedWeight = 200.f;
197200
// minimum distance between compatible seeds to be considered for weight
@@ -211,7 +214,7 @@ struct seedfilter_config {
211214
float good_spB_min_weight = 380.f;
212215

213216
// seed cut
214-
float seed_min_weight = 200.f;
217+
float seed_min_weight = 400.f;
215218
float spB_min_radius = 43.f * unit<float>::mm;
216219
};
217220

device/common/include/traccc/seeding/device/impl/find_triplets.ipp

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,25 @@ inline void find_triplets(
112112
spM, lb, lt, config, iSinTheta2, scatteringInRegion2, curvature,
113113
impact_parameter)) {
114114

115+
// Compute the weight attributed by the impact factor as the PDF of
116+
// a half-Gaussian distribution.
117+
scalar impactParameterProb =
118+
constant<scalar>::sqrt2 /
119+
(filter_config.impactSigma * constants::sqrt_pi) *
120+
math::exp(-(impact_parameter * impact_parameter) /
121+
(2.f * filter_config.impactSigma *
122+
filter_config.impactSigma));
123+
124+
scalar weight =
125+
impactParameterProb * filter_config.impactWeightFactor;
126+
115127
// Add triplet to jagged vector
116128
triplets.at(posTriplets++) = device_triplet(
117-
{spB_idx, spM_idx, spT_idx, globalIndex, curvature,
118-
-impact_parameter * filter_config.impactWeightFactor,
119-
lb.Zo()});
120-
}
129+
weight,
130+
lb.Zo()
131+
});
121132
}
122133
}
134+
}
123135

124136
} // namespace traccc::device

0 commit comments

Comments
 (0)