10#include <tracking/trackFindingCDC/findlets/base/Findlet.h>
12#include <tracking/trackFindingCDC/numerics/Weight.h>
14#include <tracking/trackFindingCDC/utilities/WeightedRelation.h>
15#include <tracking/trackFindingCDC/utilities/Algorithms.h>
26 class ModuleParamList;
27 namespace TrackFindingCDC {
44 template <
class ACollectorItem,
class ACollectionItem,
class AFilter>
46 public Findlet<WeightedRelation<ACollectorItem, const ACollectionItem>> {
64 m_filter.exposeParameters(moduleParamList, prefix);
68 void apply(std::vector<WeightedRelationItem>& weightedRelations)
override
71 const Weight weight =
m_filter(weightedRelation);
72 weightedRelation.setWeight(weight);
76 return std::isnan(item.getWeight());
80 erase_remove_if(weightedRelations, weightIsNan);
82 std::sort(weightedRelations.begin(), weightedRelations.end());
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Selector to remove all weighted relations, where a definable Filter gives NaN as a result.
void apply(std::vector< WeightedRelationItem > &weightedRelations) override
Main function of the class: calculate the filter result and remove all relations, where the filter re...
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the filter.
AFilter m_filter
The filter to use.
FilterSelector()
Add the chosen filter as a process signal listener.
Interface for a minimal algorithm part that wants to expose some parameters to a module.
virtual void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix)
Forward prefixed parameters of this findlet to the module parameter list.
Type for two related objects with a weight.
Abstract base class for different kinds of events.