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);
143 std::vector<Hit> all_hits_{};
144 std::vector<Cluster> all_clusters_{};
147 float seed_thresh_ = 0;
148 float neighb_thresh_ = 0;
149 int n_neighbors_ = 1;
150 bool split_energy_ =
true;
152 bool use_towers_ =
false;
153 const int LAYER_MAX = 35;
154 const int LAYER_SHOWERMAX = 7;
155 const int LAYER_SEEDMIN = 3;
156 const int LAYER_SEEDMAX = 15;
157 const float MIN_TP_ENERGY = 0.5;
158 const int DEPTH_GOOD = 5;
165 if (h.layer_ >= LAYER_MAX)
return;
166 auto p = std::make_pair(h.cell_id_, h.module_id_);
167 h.id_ = g_->reverse_id_map_[p];
168 all_hits_.push_back(h);
170 std::vector<Cluster> getClusters() {
return all_clusters_; }
173 virtual void buildClusters();
174 std::vector<Cluster> build2dClustersLayer(std::vector<Hit> hits);
175 void build2dClusters();
176 void build3dClusters();