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);
61 unsigned int es_size =
es.size();
62 for (
unsigned int i = 0;
i < es_size; ++
i) {
66 vused[
i] = (thecls[
es[
i]]->z() > 0) ? 1 : -1;
68 std::array<double, 3> from{{thecls[
es[
i]]->x(), thecls[
es[
i]]->y(), thecls[
es[
i]]->z()}};
70 unsigned int lastlayer = firstlayer +
maxlayer + 1;
71 for (
unsigned int j = firstlayer;
j < lastlayer; ++
j) {
76 std::array<double, 3>
to{{0., 0.,
zees[
j]}};
88 std::vector<ClusterRef>
found;
90 hit_kdtree[
j].search(search_box,
found);
92 for (
unsigned int k = 0;
k <
found.size();
k++) {
93 if (vused[
found[
k].ind] == 0 && distReal2(thecls[
es[
found[
k].ind]],
to) < radius2) {
105 thePreClusters.push_back(
temp);
106 auto &back = thePreClusters.back();
108 back.setEnergy(
clusterTools->getMultiClusterEnergy(back));
113 return thePreClusters;
118 to[0] = from[0] / from[2] *
to[2];
119 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
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 &)