16 bool is_initialized_ =
false;
19 std::map<std::pair<int, int>,
int> reverse_id_map_;
20 std::map<int, std::pair<int, int> > id_map_;
23 std::map<int, std::pair<float, float> > positions_;
26 std::map<std::pair<int, int>,
float> distances_;
29 std::map<int, std::vector<int> > neighbors_;
31 int getId(
int cell_id,
int module_id) {
32 return reverse_id_map_[std::make_pair(cell_id, module_id)];
34 float getDist(
int id1,
int id2) {
35 return distances_[std::make_pair(id1, id2)];
38 void addTp(
int tid,
int cell_id,
int module_id,
float x,
float y);
39 void addNeighbor(
int id1,
int id2);
40 bool checkNeighbor(
int id1,
int id2);
139 std::vector<Hit> all_hits_{};
140 std::vector<Cluster> all_clusters_{};
143 float seed_thresh_ = 0;
144 float neighb_thresh_ = 0;
145 int n_neighbors_ = 1;
146 bool split_energy_ =
true;
148 bool use_towers_ =
false;
149 const int LAYER_MAX = 35;
150 const int LAYER_SHOWERMAX = 7;
151 const int LAYER_SEEDMIN = 3;
152 const int LAYER_SEEDMAX = 15;
153 const float MIN_TP_ENERGY = 0.5;
154 const int DEPTH_GOOD = 5;
161 if (h.layer_ >= LAYER_MAX)
return;
162 auto p = std::make_pair(h.cell_id_, h.module_id_);
163 h.id_ = g_->reverse_id_map_[p];
164 all_hits_.push_back(h);
166 std::vector<Cluster> getClusters() {
return all_clusters_; }
169 virtual void buildClusters();
170 std::vector<Cluster> build2dClustersLayer(std::vector<Hit> hits);
171 void build2dClusters();
172 void build3dClusters();