10#include <tracking/trackFindingCDC/findlets/base/Findlet.h>
12#include <tracking/trackFindingCDC/eventdata/segments/CDCWireHitCluster.h>
13#include <tracking/trackFindingCDC/eventdata/hits/CDCWireHit.h>
15#include <tracking/trackFindingCDC/ca/Clusterizer.h>
17#include <tracking/trackFindingCDC/filters/base/RelationFilterUtil.h>
19#include <tracking/trackFindingCDC/utilities/WeightedRelation.h>
30 namespace TrackFindingCDC {
33 template <
class AWireHitRelationFilter>
49 return "Breaks bigger wire hit super cluster into smaller wire hit clusters";
59 void apply(
const std::vector<CDCWireHitCluster>& inputSuperClusters,
60 std::vector<CDCWireHitCluster>& outputClusters)
final {
63 B2ASSERT(
"Expect the clusters to be sorted", std::is_sorted(superCluster.begin(),
67 const std::vector<CDCWireHit*>& wireHitPtrs = superCluster;
72 const std::size_t nClustersBefore = outputClusters.size();
74 const std::size_t nClustersAfter = outputClusters.size();
77 int iSuperCluster = superCluster.getISuperCluster();
78 for (std::size_t iCluster = nClustersBefore; iCluster < nClustersAfter; ++iCluster) {
80 cluster.setISuperCluster(iSuperCluster);
81 std::sort(cluster.begin(), cluster.end());
The Module parameter list class.
An aggregation of CDCWireHits.
Refines the clustering of wire hits from super clusters to clustexrs.
std::vector< WeightedRelation< CDCWireHit > > m_wireHitRelations
Memory for the wire hit neighborhood in a super cluster.
AWireHitRelationFilter m_wireHitRelationFilter
Wire hit neighborhood relation filter.
std::string getDescription() final
Short description of the findlet.
void exposeParameters(ModuleParamList *moduleParamList, const std::string &prefix) final
Expose the parameters to a module.
ClusterRefiner()
Constructor adding the filter as a subordinary processing signal listener.
Clusterizer< CDCWireHit, CDCWireHitCluster > m_wireHitClusterizer
Instance of the hit cluster generator.
void apply(const std::vector< CDCWireHitCluster > &inputSuperClusters, std::vector< CDCWireHitCluster > &outputClusters) final
Main algorithm applying the cluster refinement.
Implementation of the clustering Clusters elements of a given collection using the relations presente...
void addProcessingSignalListener(ProcessingSignalListener *psl)
Register a processing signal listener to be notified.
Interface for a minimal algorithm part that wants to expose some parameters to a module.
Abstract base class for different kinds of events.
static void appendUsing(ARelationFilter &relationFilter, const std::vector< AObject * > &froms, const std::vector< AObject * > &tos, std::vector< WeightedRelation< AObject > > &weightedRelations, unsigned int maximumNumberOfRelations=std::numeric_limits< unsigned int >::max())
Appends relations between elements in the given AItems using the ARelationFilter.