29 enableLogging(
"CLUE");
51 std::vector<const ldmx::EcalHit*> hits_;
55 Density(
float xx,
float yy) : x_(xx), y_(yy) {
59 delta_ = std::numeric_limits<float>::max();
60 z_delta_ = std::numeric_limits<float>::max();
73 T
dist(T x1, T y1, T x2, T y2);
76 T
dist(T x1, T y1, T z1, T x2, T y2, T z2);
77 std::vector<std::vector<const ldmx::EcalHit*>> createLayers(
78 const std::vector<const ldmx::EcalHit*>& hits);
79 float roundToDecimal(
float x,
int num_decimal_precision_digits);
80 std::vector<std::shared_ptr<Density>> setup(
81 const std::vector<const ldmx::EcalHit*>& hits);
84 void electronSeparation(std::vector<ldmx::EcalHit> hits);
89 std::vector<std::vector<const ldmx::EcalHit*>> clustering(
90 std::vector<std::shared_ptr<Density>>& densities,
bool connectingLayers,
93 std::vector<std::shared_ptr<Density>> setupForClue3D();
95 void convertToIntermediateClusters(
96 std::vector<std::vector<const ldmx::EcalHit*>>& clusters);
98 void cluster(
const std::vector<ldmx::EcalHit>& hits,
double dc,
double rc,
99 double deltac,
double deltao,
int nbrOfLayers,
102 std::vector<double> getCentroidDistances()
const {
103 return centroid_distances_;
106 int getNLoops()
const {
return clustering_loops_; }
108 int getInitialClusterNbr()
const {
return initial_cluster_nbr_; }
110 std::vector<IntermediateCluster> getClusters()
const {
111 return final_clusters_;
116 std::vector<IntermediateCluster> getFirstLayerCentroids()
const {
117 return first_layer_centroids_;
121 int clustering_loops_;
135 std::vector<double> layer_rho_c_;
136 std::vector<double> layer_delta_c_;
138 std::vector<double> radius_{
139 5.723387467629167, 5.190678018534044, 5.927290663506518,
140 6.182560329200212, 7.907549398117859, 8.606100542857211,
141 10.93381822596916, 12.043201938160239, 14.784548371508041,
142 16.102403056546482, 18.986402399412817, 20.224453740305716,
143 23.048820910305643, 24.11202594672678, 26.765135236851666,
144 27.78700483852502, 30.291794353801293, 31.409870873194464,
145 33.91006482486666, 35.173073672355926, 38.172422630271,
146 40.880288341493205, 44.696485719120005, 49.23802839743545,
147 53.789910813378675, 60.87843355562641, 66.32931132415688,
148 75.78117972604727, 86.04697356716805, 96.90360704034346};
150 std::vector<double> centroid_distances_;
153 std::vector<IntermediateCluster> first_layer_centroids_;
156 std::vector<std::vector<std::shared_ptr<Density>>> seeds_;
158 int initial_cluster_nbr_{-1};
159 std::vector<IntermediateCluster> final_clusters_;
160 std::vector<std::pair<double, double>> layer_centroid_separations_;