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 seenSeedCells.push_back(
seed.id);
75
76 int i_shell = 1;
77
78 while (!cellsNextLayer.empty() && i_shell <=
m_max_shells) {
79
80 cellsThisLayer.swap(cellsNextLayer);
81 cellsNextLayer.clear();
82 ++i_shell;
83
84
85 for (unsigned int i_cell = 0; i_cell < cellsThisLayer.size(); ++i_cell) {
86
87
88 for (unsigned int i_neighbour = 0; i_neighbour < (cellsThisLayer[i_cell]).neighbours.size(); ++i_neighbour) {
89
90
91 auto const& nghbr_itr = caloCellsMap->find((cellsThisLayer[i_cell]).neighbours[i_neighbour]);
92 if (nghbr_itr == caloCellsMap->end()) continue;
93
94 Gep::GepCaloCell neighbour = nghbr_itr->second;
95
96
98
99
101
102
104
105
107
108 seenCells.push_back(neighbour.
id);
109 cellsNextLayer.push_back(neighbour);
110 v_clusterCells.push_back(neighbour);
111
112
114 }
115 }
116 cellsThisLayer.clear();
117 }
118
119 return v_clusterCells;
120}
bool isNewCell(unsigned int id, const std::vector< unsigned int > &seenCells) const
const std::vector< int > m_disallowed_clustering_samplings
bool isInAllowedSampling(int sampling, const std::vector< int > &list_of_samplings) const
const float m_clustering_threshold
const float m_seed_threshold