Skip to content

Commit

Permalink
fix: add default value to ReadOnly in ScoreBasedAmbiguityResolution (#…
Browse files Browse the repository at this point in the history
…3418)

In the ScoreBasedAmbiguityResolution There is a template parameter "ReadOnly" which didn't have a default parameter. 
This cause issues if there is no optional cuts implemented.  

This PR is a fix for that.

Thank You

Ragansu Chakkappai
  • Loading branch information
Ragansu authored Jul 19, 2024
1 parent acfe809 commit d493563
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class ScoreBasedAmbiguityResolution {
/// good enough, based on some criteria. Users are free to add their own cuts
/// with the help of this struct.
template <typename track_container_t, typename traj_t,
template <typename> class holder_t, bool ReadOnly>
template <typename> class holder_t, bool ReadOnly = true>
struct OptionalCuts {
using OptionalFilter =
std::function<bool(const Acts::TrackProxy<track_container_t, traj_t,
Expand Down Expand Up @@ -162,7 +162,7 @@ class ScoreBasedAmbiguityResolution {
/// @param optionalCuts is the user defined optional cuts to be applied.
/// @return a vector of scores for each track
template <typename track_container_t, typename traj_t,
template <typename> class holder_t, bool ReadOnly>
template <typename> class holder_t, bool ReadOnly = true>
std::vector<double> simpleScore(
const TrackContainer<track_container_t, traj_t, holder_t>& tracks,
const std::vector<std::vector<TrackFeatures>>& trackFeaturesVectors,
Expand All @@ -176,7 +176,7 @@ class ScoreBasedAmbiguityResolution {
/// @param optionalCuts is the user defined optional cuts to be applied.
/// @return a vector of scores for each track
template <typename track_container_t, typename traj_t,
template <typename> class holder_t, bool ReadOnly>
template <typename> class holder_t, bool ReadOnly = true>
std::vector<double> ambiguityScore(
const TrackContainer<track_container_t, traj_t, holder_t>& tracks,
const std::vector<std::vector<TrackFeatures>>& trackFeaturesVectors,
Expand Down Expand Up @@ -206,7 +206,7 @@ class ScoreBasedAmbiguityResolution {
/// @param optionalCuts is the optional cuts to be applied
/// @return a vector of IDs of the tracks we want to keep
template <typename track_container_t, typename traj_t,
template <typename> class holder_t, bool ReadOnly>
template <typename> class holder_t, bool ReadOnly = true>
std::vector<int> solveAmbiguity(
const TrackContainer<track_container_t, traj_t, holder_t>& tracks,
const std::vector<std::vector<MeasurementInfo>>& measurementsPerTrack,
Expand Down

0 comments on commit d493563

Please sign in to comment.