22 enableLogging(
"CLUE");
44 std::vector<const ldmx::EcalHit*> hits_;
48 Density(
float xx,
float yy) : x_(xx), y_(yy) {
52 delta_ = std::numeric_limits<float>::max();
53 z_delta_ = std::numeric_limits<float>::max();
66 T
dist(T x1, T y1, T x2, T y2);
69 T
dist(T x1, T y1, T z1, T x2, T y2, T z2);
70 std::vector<std::vector<const ldmx::EcalHit*>> createLayers(
71 const std::vector<const ldmx::EcalHit*>& hits);
72 float roundToDecimal(
float x,
int num_decimal_precision_digits);
73 std::vector<std::shared_ptr<Density>> setup(
74 const std::vector<const ldmx::EcalHit*>& hits);
77 void electronSeparation(std::vector<ldmx::EcalHit> hits);
82 std::vector<std::vector<const ldmx::EcalHit*>> clustering(
83 std::vector<std::shared_ptr<Density>>& densities,
bool connectingLayers,
86 std::vector<std::shared_ptr<Density>> setupForClue3D();
88 void convertToIntermediateClusters(
89 std::vector<std::vector<const ldmx::EcalHit*>>& clusters);
91 void cluster(
const std::vector<ldmx::EcalHit>& hits,
double dc,
double rc,
92 double deltac,
double deltao,
int nbrOfLayers,
95 std::vector<double> getCentroidDistances()
const {
96 return centroid_distances_;
99 int getNLoops()
const {
return clustering_loops_; }
101 int getInitialClusterNbr()
const {
return initial_cluster_nbr_; }
103 std::vector<IntermediateCluster> getClusters()
const {
104 return final_clusters_;
109 std::vector<IntermediateCluster> getFirstLayerCentroids()
const {
110 return first_layer_centroids_;
114 int clustering_loops_;
128 std::vector<double> layer_rho_c_;
129 std::vector<double> layer_delta_c_;
131 std::vector<double> radius_{
132 5.723387467629167, 5.190678018534044, 5.927290663506518,
133 6.182560329200212, 7.907549398117859, 8.606100542857211,
134 10.93381822596916, 12.043201938160239, 14.784548371508041,
135 16.102403056546482, 18.986402399412817, 20.224453740305716,
136 23.048820910305643, 24.11202594672678, 26.765135236851666,
137 27.78700483852502, 30.291794353801293, 31.409870873194464,
138 33.91006482486666, 35.173073672355926, 38.172422630271,
139 40.880288341493205, 44.696485719120005, 49.23802839743545,
140 53.789910813378675, 60.87843355562641, 66.32931132415688,
141 75.78117972604727, 86.04697356716805, 96.90360704034346};
143 std::vector<double> centroid_distances_;
146 std::vector<IntermediateCluster> first_layer_centroids_;
149 std::vector<std::vector<std::shared_ptr<Density>>> seeds_;
151 int initial_cluster_nbr_{-1};
152 std::vector<IntermediateCluster> final_clusters_;
153 std::vector<std::pair<double, double>> layer_centroid_separations_;