20 bool is_initialized =
false;
23 std::map<std::pair<int, int>,
int> reverse_id_map;
24 std::map<int, std::pair<int, int> > id_map;
27 std::map<int, std::pair<float, float> > positions;
30 std::map<std::pair<int, int>,
float> distances;
33 std::map<int, std::vector<int> > neighbors;
35 int GetID(
int cell_id,
int module_id) {
36 return reverse_id_map[std::make_pair(cell_id, module_id)];
38 float GetDist(
int id1,
int id2) {
39 return distances[std::make_pair(id1, id2)];
42 void AddTP(
int tid,
int cell_id,
int module_id,
float x,
float y);
43 void AddNeighbor(
int id1,
int id2);
44 bool CheckNeighbor(
int id1,
int id2);
145 std::vector<Hit> all_hits{};
146 std::vector<Cluster> all_clusters{};
149 float seed_thresh = 0;
150 float neighb_thresh = 0;
152 bool split_energy =
true;
154 bool use_towers =
false;
155 const int LAYER_MAX = 35;
156 const int LAYER_SHOWERMAX = 7;
157 const int LAYER_SEEDMIN = 3;
158 const int LAYER_SEEDMAX = 15;
159 const float MIN_TP_ENERGY = 0.5;
167 if (h.layer >= LAYER_MAX)
return;
168 auto p = std::make_pair(h.cell_id, h.module_id);
169 h.id = g->reverse_id_map[p];
170 all_hits.push_back(h);
172 std::vector<Cluster> GetClusters() {
return all_clusters; }
175 virtual void BuildClusters();
176 std::vector<Cluster> Build2dClustersLayer(std::vector<Hit> hits);
177 void Build2dClusters();
178 void Build3dClusters();