28 enableLogging(
"CLUE");
50 std::vector<const ldmx::EcalHit*> hits_;
54 Density(
float xx,
float yy) : x_(xx), y_(yy) {
58 delta_ = std::numeric_limits<float>::max();
59 z_delta_ = std::numeric_limits<float>::max();
72 T
dist(T x1, T y1, T x2, T y2);
75 T
dist(T x1, T y1, T z1, T x2, T y2, T z2);
76 std::vector<std::vector<const ldmx::EcalHit*>> createLayers(
77 const std::vector<const ldmx::EcalHit*>& hits);
78 float roundToDecimal(
float x,
int num_decimal_precision_digits);
79 std::vector<std::shared_ptr<Density>> setup(
80 const std::vector<const ldmx::EcalHit*>& hits);
85 std::vector<std::vector<const ldmx::EcalHit*>> clustering(
86 std::vector<std::shared_ptr<Density>>& densities,
bool connectingLayers,
89 std::vector<std::shared_ptr<Density>> setupForClue3D();
91 void convertToIntermediateClusters(
92 std::vector<std::vector<const ldmx::EcalHit*>>& clusters);
94 void cluster(
const std::vector<ldmx::EcalHit>& hits,
double dc,
double rc,
95 double deltac,
double deltao,
int nbrOfLayers,
98 std::vector<double> getCentroidDistances()
const {
99 return centroid_distances_;
102 int getNLoops()
const {
return clustering_loops_; }
104 int getInitialClusterNbr()
const {
return initial_cluster_nbr_; }
106 std::vector<IntermediateCluster> getClusters()
const {
107 return final_clusters_;
112 std::vector<IntermediateCluster> getFirstLayerCentroids()
const {
113 return first_layer_centroids_;
117 int clustering_loops_;
131 std::vector<double> layer_rho_c_;
132 std::vector<double> layer_delta_c_;
134 std::vector<double> radius_{
135 5.723387467629167, 5.190678018534044, 5.927290663506518,
136 6.182560329200212, 7.907549398117859, 8.606100542857211,
137 10.93381822596916, 12.043201938160239, 14.784548371508041,
138 16.102403056546482, 18.986402399412817, 20.224453740305716,
139 23.048820910305643, 24.11202594672678, 26.765135236851666,
140 27.78700483852502, 30.291794353801293, 31.409870873194464,
141 33.91006482486666, 35.173073672355926, 38.172422630271,
142 40.880288341493205, 44.696485719120005, 49.23802839743545,
143 53.789910813378675, 60.87843355562641, 66.32931132415688,
144 75.78117972604727, 86.04697356716805, 96.90360704034346};
146 std::vector<double> centroid_distances_;
147 IntermediateCluster event_centroid_;
149 std::vector<IntermediateCluster> first_layer_centroids_;
152 std::vector<std::vector<std::shared_ptr<Density>>> seeds_;
154 int initial_cluster_nbr_{-1};
155 std::vector<IntermediateCluster> final_clusters_;
156 std::vector<std::pair<double, double>> layer_centroid_separations_;