10#include <tracking/vxdHoughTracking/findlets/LimitedOnHitApplier.dcl.h>
11#include <tracking/trackFindingCDC/utilities/Functional.h>
12#include <tracking/trackFindingCDC/utilities/StringManipulation.h>
13#include <framework/core/ModuleParamList.templateDetails.h>
22 namespace vxdHoughTracking {
24 template <
class AHit,
class AFilter>
30 template <
class AHit,
class AFilter>
33 m_filter.exposeParameters(moduleParamList, prefix);
35 moduleParamList->
addParameter(TrackFindingCDC::prefixed(prefix,
"useNBestHits"),
m_useNHits,
"Only use the best N hits",
39 template <
class AHit,
class AFilter>
46 std::sort(childHits.begin(), childHits.end(), TrackFindingCDC::GreaterOf<TrackFindingCDC::GetWeight>());
47 childHits.erase(childHits.begin() +
m_useNHits, childHits.end());
51 template <
class AHit,
class AFilter>
The Module parameter list class.
void addProcessingSignalListener(ProcessingSignalListener *psl)
A mixin class to attach a weight to an object.
typename Super::Object Object
The object to filer.
int m_useNHits
Parameter how many objects should pass maximal.
void apply(const std::vector< TrackFindingCDC::WithWeight< const AHit * > > ¤tPath, std::vector< TrackFindingCDC::WithWeight< AHit * > > &childHits) override
Apply the filter to each pair of hits and current path and let only pass the best N hits.
TrackFindingCDC::Weight operator()(const Object &object) override
Copy the filter operator to this method.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) override
Expose the parameters of the subfindlet.
AFilter m_filter
Filter to decide on the hits.
LimitedOnHitApplier()
Constructor adding the findlet as a listener.
void apply(const std::vector< TrackFindingCDC::WithWeight< const AHit * > > ¤tPath, std::vector< TrackFindingCDC::WithWeight< AHit * > > &childHits) override
Apply the () operator to all pairs of hit and current path.
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.