 |
Belle II Software
release-05-01-25
|
12 #include <tracking/trackFindingCDC/findlets/base/Findlet.h>
14 #include <framework/core/ModuleParamList.h>
15 #include <tracking/trackFindingCDC/utilities/WeightedRelation.h>
16 #include <tracking/trackFindingCDC/utilities/StringManipulation.h>
28 namespace TrackFindingCDC {
43 template <
class ACollectorItem,
class ACollectionItem>
45 public Findlet<WeightedRelation<ACollectorItem, const ACollectionItem>> {
51 using Super = Findlet<WeightedRelation<ACollectorItem, const ACollectionItem>>;
63 void apply(std::vector<WeightedRelationItem>& weightedRelations)
override
66 return std::isnan(relationItem.getWeight()) or relationItem.getWeight() <
m_param_cutValue;
70 weightedRelations.erase(std::remove_if(weightedRelations.begin(),
71 weightedRelations.end(),
73 weightedRelations.end());
WeightedRelation< ACollectorItem, const ACollectionItem > WeightedRelationItem
Shortcut class name for a weighted relation between a collector item and a collection item.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the cut value to the module.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
Abstract base class for different kinds of events.
virtual void exposeParameters(ModuleParamList *moduleParamList __attribute__((unused)), const std::string &prefix __attribute__((unused)))
Forward prefixed parameters of this findlet to the module parameter list.
Weight m_param_cutValue
The cut value to use.
Findlet< WeightedRelation< ACollectorItem, const ACollectionItem > > Super
The parent class.
void apply(std::vector< WeightedRelationItem > &weightedRelations) override
Do the cut.
The Module parameter list class.
void setCutValue(Weight cutValue)
Function to set the cut value (mostly for tests).