7 std::vector<Gep::Cluster>
 
   13   std::vector<unsigned int> seenSeedCells;
 
   14   for (
auto const& cell_itr : *caloCellsMap) {
 
   17     if (!
isSeedCell(cell_itr.second, seenSeedCells)) 
continue;
 
   20         std::vector<Gep::GepCaloCell> cluster_cells = 
clusterFromCells(cell_itr.second, caloCellsMap, seenSeedCells);
 
   27   std::sort(
clusters.begin(), 
clusters.end(),[](
const auto &
c1, 
const auto &
c2) {return c1.et() > c2.et();});
 
   35   if (
cell.isBadCell()) 
return false;
 
   36   if (
cell.sigma < m_seed_threshold) 
return false;
 
   37   if (!isNewCell(
cell.id, seenSeedCells)) 
return false;
 
   38   if (!isInAllowedSampling(
cell.sampling, m_disallowed_seed_samplings)) 
return false;
 
   46   for (
unsigned int i = 0; 
i < list_of_samplings.size(); ++
i) {
 
   47     if (list_of_samplings[
i] == sampling) 
return false;
 
   55   for (
unsigned int i = 0; 
i < seenCells.size(); ++
i) {
 
   56         if (
id == seenCells[
i]) 
return false;
 
   63 std::vector<Gep::GepCaloCell>
 
   65                       const pGepCellMap& caloCellsMap, std::vector<unsigned int> &seenSeedCells)
 const {
 
   67   std::vector<Gep::GepCaloCell> v_clusterCells;
 
   69   std::vector<Gep::GepCaloCell> cellsNextLayer, cellsThisLayer;
 
   70   std::vector<unsigned int> seenCells;
 
   73   v_clusterCells.push_back(seed);
 
   74   cellsNextLayer.push_back(seed);
 
   75   seenCells.push_back(seed.id);
 
   76   seenSeedCells.push_back(seed.id);
 
   80   while (!cellsNextLayer.empty() && i_shell <= m_max_shells) {
 
   82         cellsThisLayer.swap(cellsNextLayer);
 
   83         cellsNextLayer.clear();
 
   87         for (
unsigned int i_cell = 0; i_cell < cellsThisLayer.size(); ++i_cell) {
 
   90                 for (
unsigned int i_neighbour = 0; i_neighbour < (cellsThisLayer[i_cell]).neighbours.size(); ++i_neighbour) {
 
   93             auto const& nghbr_itr = caloCellsMap->find((cellsThisLayer[i_cell]).neighbours[i_neighbour]);
 
   94             if (nghbr_itr == caloCellsMap->end()) 
continue;
 
  102                         if (neighbour.
sigma < m_clustering_threshold) 
continue;
 
  105                         if (!isNewCell(neighbour.
id, seenCells)) 
continue;
 
  108                         if (!isInAllowedSampling(neighbour.
sampling, m_disallowed_clustering_samplings)) 
continue;
 
  110                         seenCells.push_back(neighbour.
id);
 
  111                         cellsNextLayer.push_back(neighbour);
 
  112                         v_clusterCells.push_back(neighbour);
 
  115                         if (neighbour.
sigma > m_seed_threshold) seenSeedCells.push_back(neighbour.
id);
 
  118         cellsThisLayer.clear();
 
  121   return v_clusterCells;
 
  128   std::vector<unsigned int> v_cellIDs;
 
  130   TLorentzVector tlv_cluster;
 
  131   for (
unsigned int i_cell = 0; i_cell < 
cells.size(); ++i_cell) {
 
  137     v_cellIDs.push_back(
cells[i_cell].
id);
 
  142   cluster.
cell_id = std::move(v_cellIDs);
 
  143   cluster.
setEtEtaPhi(tlv_cluster.Et(), tlv_cluster.Eta(), tlv_cluster.Phi());