4 #include <calobase/RawCluster.h>
5 #include <calobase/RawClusterContainer.h>
6 #include <calobase/RawClusterDefs.h>
7 #include <calobase/RawClusterv1.h>
8 #include <calobase/RawTower.h>
9 #include <calobase/RawTowerContainer.h>
10 #include <calobase/RawTowerDefs.h>
11 #include <calobase/RawTowerGeom.h>
12 #include <calobase/RawTowerGeomContainer.h>
46 std::sort(input_towers.begin(), input_towers.end(), &
towerECompare);
47 std::vector<towersStrct> cluster_towers;
49 while (!input_towers.empty())
51 cluster_towers.clear();
53 if (input_towers.at(0).tower_E >
_seed_e)
58 cluster->
addTower(input_towers.at(0).twr->get_id(), input_towers.at(0).tower_E);
60 cluster_towers.push_back(input_towers.at(0));
62 input_towers.erase(input_towers.begin());
63 for (
int tit = 0; tit < (int) cluster_towers.size(); tit++)
66 int iEtaTwr = cluster_towers.at(tit).tower_iEta;
67 int iPhiTwr = cluster_towers.at(tit).tower_iPhi;
68 for (
int ait = 0; ait < (int) input_towers.size(); ait++)
70 int iEtaTwrAgg = input_towers.at(ait).tower_iEta;
71 int iPhiTwrAgg = input_towers.at(ait).tower_iPhi;
84 int deltaEta =
std::abs(iEtaTwrAgg - iEtaTwr);
85 int deltaPhi =
std::abs(iPhiTwrAgg - iPhiTwr);
87 if ((deltaEta + deltaPhi) == 1)
90 if (input_towers.at(ait).tower_E >= (cluster_towers.at(tit).tower_E +
_agg_e))
continue;
91 cluster->
addTower(input_towers.at(ait).twr->get_id(), input_towers.at(ait).tower_E);
93 cluster_towers.push_back(input_towers.at(ait));
94 input_towers.erase(input_towers.begin() + ait);
102 input_towers.clear();