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);
83 void electronSeparation(std::vector<ldmx::EcalHit> hits);
88 std::vector<std::vector<const ldmx::EcalHit*>> clustering(
89 std::vector<std::shared_ptr<Density>>& densities,
bool connectingLayers,
92 std::vector<std::shared_ptr<Density>> setupForClue3D();
94 void convertToIntermediateClusters(
95 std::vector<std::vector<const ldmx::EcalHit*>>& clusters);
97 void cluster(
const std::vector<ldmx::EcalHit>& hits,
double dc,
double rc,
98 double deltac,
double deltao,
int nbrOfLayers,
101 std::vector<double> getCentroidDistances()
const {
102 return centroid_distances_;
105 int getNLoops()
const {
return clustering_loops_; }
107 int getInitialClusterNbr()
const {
return initial_cluster_nbr_; }
109 std::vector<IntermediateCluster> getClusters()
const {
110 return final_clusters_;
115 std::vector<IntermediateCluster> getFirstLayerCentroids()
const {
116 return first_layer_centroids_;
120 int clustering_loops_;
134 std::vector<double> layer_rho_c_;
135 std::vector<double> layer_delta_c_;
137 std::vector<double> radius_{
138 5.723387467629167, 5.190678018534044, 5.927290663506518,
139 6.182560329200212, 7.907549398117859, 8.606100542857211,
140 10.93381822596916, 12.043201938160239, 14.784548371508041,
141 16.102403056546482, 18.986402399412817, 20.224453740305716,
142 23.048820910305643, 24.11202594672678, 26.765135236851666,
143 27.78700483852502, 30.291794353801293, 31.409870873194464,
144 33.91006482486666, 35.173073672355926, 38.172422630271,
145 40.880288341493205, 44.696485719120005, 49.23802839743545,
146 53.789910813378675, 60.87843355562641, 66.32931132415688,
147 75.78117972604727, 86.04697356716805, 96.90360704034346};
149 std::vector<double> centroid_distances_;
150 IntermediateCluster event_centroid_;
152 std::vector<IntermediateCluster> first_layer_centroids_;
155 std::vector<std::vector<std::shared_ptr<Density>>> seeds_;
157 int initial_cluster_nbr_{-1};
158 std::vector<IntermediateCluster> final_clusters_;
159 std::vector<std::pair<double, double>> layer_centroid_separations_;