7 std::vector<size_t>
idx(
v.size());
8 std::iota(std::begin(
idx), std::end(
idx), 0);
17 return (
a->x() -
to[0]) * (
a->x() -
to[0]) + (
a->y() -
to[1]) * (
a->y() -
to[1]);
23 unsigned int es_size =
es.size();
24 for (
unsigned int i = 0;
i < es_size; ++
i) {
27 float x = thecls[
es[
i]]->x();
28 float y = thecls[
es[
i]]->y();
29 float z = thecls[
es[
i]]->z();
52 std::vector<reco::HGCalMultiCluster> thePreClusters;
54 std::vector<KDTree> hit_kdtree(2 * (
maxlayer + 1));
55 for (
unsigned int i = 0;
i <= 2 *
maxlayer + 1; ++
i) {
59 std::vector<int> vused(
es.size(), 0);
60 unsigned int used = 0;
62 unsigned int es_size =
es.size();
63 for (
unsigned int i = 0;
i < es_size; ++
i) {
67 vused[
i] = (thecls[
es[
i]]->z() > 0) ? 1 : -1;
70 std::array<double, 3> from{{thecls[
es[
i]]->x(), thecls[
es[
i]]->y(), thecls[
es[
i]]->z()}};
72 unsigned int lastlayer = firstlayer +
maxlayer + 1;
73 for (
unsigned int j = firstlayer;
j < lastlayer; ++
j) {
78 std::array<double, 3>
to{{0., 0.,
zees[
j]}};
90 std::vector<ClusterRef>
found;
92 hit_kdtree[
j].search(search_box,
found);
94 for (
unsigned int k = 0;
k <
found.size();
k++) {
95 if (vused[
found[
k].ind] == 0 && distReal2(thecls[
es[
found[
k].ind]],
to) < radius2) {
108 thePreClusters.push_back(
temp);
109 auto &back = thePreClusters.back();
111 back.setEnergy(
clusterTools->getMultiClusterEnergy(back));
116 return thePreClusters;
121 to[0] = from[0] / from[2] *
to[2];
122 to[1] = from[1] / from[2] *
to[2];
std::vector< std::vector< KDNode > > points
std::vector< double > radii
void organizeByLayer(const reco::HGCalMultiCluster::ClusterCollection &)
std::vector< float > zees
constexpr std::array< uint8_t, layerIndexSize< TrackerTraits > > layer
std::vector< size_t > sorted_indices(const std::vector< T > &v)
Abs< T >::type abs(const T &t)
std::vector< std::array< float, 2 > > maxpos
std::vector< std::array< float, 2 > > minpos
void layerIntersection(std::array< double, 3 > &to, const std::array< double, 3 > &from) const
XYZPointD XYZPoint
point in space with cartesian internal representation
std::unique_ptr< hgcal::ClusterTools > clusterTools
hgcal::RecHitTools rhtools_
static int position[264][3]
std::vector< reco::HGCalMultiCluster > makeClusters(const reco::HGCalMultiCluster::ClusterCollection &)