Skip to content

Commit

Permalink
Merge branch 'main' into improve-efficiency
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenswat authored Oct 10, 2024
2 parents c0f71b4 + 2f06dc9 commit 3a4d0c7
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 5 deletions.
4 changes: 2 additions & 2 deletions core/include/traccc/fitting/kalman_filter/kalman_actor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ struct kalman_actor : detray::actor {
// Change the charge of hypothesized particles when the sign of qop
// is changed (This rarely happens when qop is set with a poor seed
// resolution)
detail::correct_particle_hypothesis(stepping._ptc,
trk_state.filtered());
propagation.set_particle(detail::correct_particle_hypothesis(
stepping._ptc, propagation._stepping._bound_params));

// Update iterator
actor_state.next();
Expand Down
5 changes: 5 additions & 0 deletions core/include/traccc/seeding/detail/spacepoint_formation.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@

namespace traccc::details {

/// Function helping with checking a measurement obejct for spacepoint creation
///
/// @param[in] measurement The input measurement
TRACCC_HOST_DEVICE inline bool is_valid_measurement(const measurement& meas);

/// Function helping with filling/setting up a spacepoint object
///
/// @param[in] det The tracking geometry
Expand Down
8 changes: 8 additions & 0 deletions core/include/traccc/seeding/impl/spacepoint_formation.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@

namespace traccc::details {

TRACCC_HOST_DEVICE inline bool is_valid_measurement(const measurement& meas) {
// We use 2D (pixel) measurements only for spacepoint creation
if (meas.meas_dim == 2u) {
return true;
}
return false;
}

template <typename detector_t>
TRACCC_HOST_DEVICE inline spacepoint create_spacepoint(
const detector_t& det, const measurement& meas) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ spacepoint_formation_algorithm<detector_t>::operator()(

// Set up each spacepoint in the result container.
for (const auto& meas : measurements) {

result.push_back(details::create_spacepoint(det, meas));
if (details::is_valid_measurement(meas)) {
result.push_back(details::create_spacepoint(det, meas));
}
}

// Return the created container.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ TRACCC_HOST_DEVICE inline void form_spacepoints(
const auto& meas = measurements.at(globalIndex);

// Fill the spacepoint using the common function.
spacepoints.push_back(details::create_spacepoint(det, meas));
if (details::is_valid_measurement(meas)) {
spacepoints.push_back(details::create_spacepoint(det, meas));
}
}

} // namespace traccc::device

0 comments on commit 3a4d0c7

Please sign in to comment.