9 #include <pxd/reconstruction/ClusterCandidate.h>
24 if (m_merged)
return m_merged->merge(cls);
27 if (pcls ==
this)
return this;
31 if (tmp ==
this)
return this;
42 if (pcls->
m_pixels.size() > m_pixels.size()) std::swap(m_pixels, pcls->
m_pixels);
43 m_pixels.insert(m_pixels.end(), pcls->
m_pixels.begin(), pcls->
m_pixels.end());
45 if (pcls->
m_pixels.capacity() > c_maxCapacity) {
46 pcls->
m_pixels.resize(c_defaultCapacity);
57 void ClusterCandidate::add(
const Pixel& pixel)
67 if (m_seed.getCharge() < charge) {
71 m_pixels.push_back(pixel);
Class representing a possible cluster during clustering of the PXD It supports merging of different c...
Pixel m_seed
Seed pixel of the cluster, i.e.
ClusterCandidate * m_merged
Pointer to the cluster this cluster was merged into.
float m_charge
Charge of the cluster.
std::vector< Pixel > m_pixels
List of all pixels in the cluster.
void add(const Pixel &pixel)
Add a Pixel to the current cluster.
Class to represent one pixel, used in clustering for fast access.
float getCharge() const
Return the Charge of the Pixel.
std::vector< std::vector< double > > merge(std::vector< std::vector< std::vector< double >>> toMerge)
merge { vector<double> a, vector<double> b} into {a, b}
Abstract base class for different kinds of events.