Clustering module.
More...
#include <Clusterizend.h>
Clustering module.
Definition at line 71 of file Clusterizend.h.
◆ Clusterizend()
To set custom clustering parameters.
Definition at line 85 of file Clusterizend.h.
85: m_clustererParams(parameters) {}
◆ clearHoughSpaceRow()
Method to delete a omega row for the cluster deletion in deletePeakSurroundings method.
Definition at line 163 of file Clusterizend.cc.
164{
165 for (
c3index phiIdx = bounds.phiLowerBound; phiIdx < bounds.phiUpperBound; ++phiIdx) {
167 (*m_houghSpace)[bounds.omega][phiIdxMod][bounds.cot] = 0;
168 }
169}
ClustererParameters m_clustererParams
The struct holding the cluster parameters.
c3array::index c3index
index of Hough space 3D array
◆ createCluster()
Creates the surrounding cluster (fixed shape) around the section peak index.
Definition at line 84 of file Clusterizend.cc.
85{
86 c3index omegaPeak = peakCell[0];
89
92
95
96 c3index omegaUpperRight = omegaPeak - 1;
97 c3index omegaLowerLeft = omegaPeak + 1;
98
99
100 SimpleCluster fixedCluster;
102 fixedCluster.
appendCell({omegaPeak, phiLeft, cotPeak});
103 fixedCluster.
appendCell({omegaPeak, phiRight, cotPeak});
104 if (cotLower >= 0) {
105 fixedCluster.
appendCell({omegaPeak, phiPeak, cotLower});
106 }
108 fixedCluster.
appendCell({omegaPeak, phiPeak, cotUpper});
109 }
110 if (omegaUpperRight >= 0) {
111 fixedCluster.
appendCell({omegaUpperRight, phiRight, cotPeak});
112 }
114 fixedCluster.
appendCell({omegaLowerLeft, phiLeft, cotPeak});
115 }
116 return fixedCluster;
117}
void appendCell(const cell_index &newClusterCell)
Add a track-space cell to the cluster.
◆ deletePeakSurroundings()
void deletePeakSurroundings |
( |
const cell_index & | peakCell | ) |
|
|
private |
Deletes the surroundings of such a cluster.
Definition at line 120 of file Clusterizend.cc.
121{
122 c3index omegaPeak = peakCell[0];
124
127
129 for (
c3index omegaIdx = omegaLowerBound; omegaIdx < omegaUpperBound; ++omegaIdx) {
130 c3index phiCell = phiPeak + omegaPeak - omegaIdx;
131 c3index relativePhi = phiCell - phiPeak;
132
133 if (relativePhi > 0) {
137 omegaIdx,
138 cotIdx
139 };
141 } else if (relativePhi < 0) {
145 omegaIdx,
146 cotIdx
147 };
149 } else {
153 omegaIdx,
154 cotIdx
155 };
157 }
158 }
159 }
160}
void clearHoughSpaceRow(const DeletionBounds &bounds)
Method to delete a omega row for the cluster deletion in deletePeakSurroundings method.
Struct containing the deletion bounds of a omega row.
◆ getSectionBounds()
std::array< c3index, 2 > getSectionBounds |
( |
const unsigned short | quadrant, |
|
|
const unsigned | section ) |
|
private |
Get the phi bounds of one quadrant section.
Definition at line 34 of file Clusterizend.cc.
35{
38 c3index sectionSize = quadrantSize / 4;
39
40 c3index quadrantStart = quadrant * quadrantSize + quadrantOffset;
41 c3index sectionStart = quadrantStart + section * sectionSize;
42 c3index sectionEnd = sectionStart + sectionSize;
43
44 return {sectionStart, sectionEnd};
45}
◆ getSectionPeak()
std::pair< cell_index, unsigned int > getSectionPeak |
( |
const std::array< c3index, 2 > & | sectionBounds | ) |
|
|
private |
Returns the global section peak index and weight.
Definition at line 65 of file Clusterizend.cc.
66{
67 unsigned int peakValue = 0;
70 for (
c3index phiIdx = sectionBounds[0]; phiIdx < sectionBounds[1]; ++phiIdx) {
73 if ((*
m_houghSpace)[omegaIdx][phiIdxMod][cotIdx] > peakValue) {
74 peakValue = (*m_houghSpace)[omegaIdx][phiIdxMod][cotIdx];
75 peakCell = {omegaIdx, phiIdxMod, cotIdx};
76 }
77 }
78 }
79 }
80 return {peakCell, peakValue};
81}
c3array * m_houghSpace
Pointer to the Hough space.
std::array< c3index, 3 > cell_index
The cell index of one Hough space bin.
◆ iterateOverSection()
void iterateOverSection |
( |
const std::array< c3index, 2 > & | sectionBounds, |
|
|
std::vector< SimpleCluster > & | candidateClusters ) |
|
private |
Iterate m_clustererParams.iterations times over one section.
Definition at line 48 of file Clusterizend.cc.
49{
52
53 if (peakWeight < 10) {
54 break;
55 }
59 candidateClusters.push_back(newCluster);
61 }
62}
SimpleCluster createCluster(const cell_index &peakCell)
Creates the surrounding cluster (fixed shape) around the section peak index.
std::pair< cell_index, unsigned int > getSectionPeak(const std::array< c3index, 2 > §ionBounds)
Returns the global section peak index and weight.
void deletePeakSurroundings(const cell_index &peakCell)
Deletes the surroundings of such a cluster.
void setPeakCell(const cell_index &peakCell)
Set the peak index (found as the section peak) of the cluster.
void setPeakWeight(const unsigned int peakWeight)
Set the weight of the peak cluster cell.
◆ makeClusters()
Create all the clusters in the Hough space.
Definition at line 19 of file Clusterizend.cc.
20{
21 std::vector<SimpleCluster> candidateClusters;
23 for (unsigned short quadrant = 0; quadrant < 4; ++quadrant) {
24 for (unsigned short section = 0; section < 4; ++section) {
28 }
29 }
30 return candidateClusters;
31}
std::array< c3index, 2 > getSectionBounds(const unsigned short quadrant, const unsigned section)
Get the phi bounds of one quadrant section.
void iterateOverSection(const std::array< c3index, 2 > §ionBounds, std::vector< SimpleCluster > &candidateClusters)
Iterate m_clustererParams.iterations times over one section.
boost::multi_array< unsigned short, 3 > c3array
The Hough space is a 3D array (omega, phi, cot)
◆ setNewPlane()
void setNewPlane |
( |
c3array & | houghSpace | ) |
|
|
inline |
Set a new Hough space for clustering and track finding.
Definition at line 88 of file Clusterizend.h.
88{ m_houghSpace = &houghSpace; }
◆ m_clustererParams
The struct holding the cluster parameters.
Definition at line 106 of file Clusterizend.h.
◆ m_houghSpace
The documentation for this class was generated from the following files: