63 {
64
65 std::vector<Gep::GepCaloCell> v_clusterCells;
66
67 std::vector<Gep::GepCaloCell> cellsNextLayer, cellsThisLayer;
68 std::vector<unsigned int> seenCells;
69
70
71 v_clusterCells.push_back(seed);
72 cellsNextLayer.push_back(seed);
73 seenCells.push_back(
seed.id);
74
75 int i_shell = 1;
76
77 while (!cellsNextLayer.empty() && i_shell <=
m_max_shells) {
78
79 cellsThisLayer = cellsNextLayer;
80 cellsNextLayer.clear();
81 ++i_shell;
82
83
84 for (unsigned int i_cell = 0; i_cell < cellsThisLayer.size(); ++i_cell) {
85
86
87 for (unsigned int i_neighbour = 0; i_neighbour < (cellsThisLayer[i_cell]).neighbours.size(); ++i_neighbour) {
88
89
90 auto const& nghbr_itr = caloCellsMap->find((cellsThisLayer[i_cell]).neighbours[i_neighbour]);
91 if (nghbr_itr == caloCellsMap->end()) continue;
92
93 Gep::GepCaloCell neighbour = nghbr_itr->second;
94
95
97
98
100
101
103
104
106
107 seenCells.push_back(neighbour.
id);
108 cellsNextLayer.push_back(neighbour);
109 v_clusterCells.push_back(std::move(neighbour));
110 }
111 }
112 cellsThisLayer.clear();
113 }
114
115 return v_clusterCells;
116}
float m_clustering_threshold
std::vector< int > m_allowed_clustering_samplings
bool isNewCell(unsigned int id, const std::vector< unsigned int > &seenCells) const
bool isInAllowedSampling(int sampling, const std::vector< int > &list_of_samplings) const