1 #ifndef RecoLocalCalo_HGCalRecAlgos_HGCalImagingAlgo_h 2 #define RecoLocalCalo_HGCalRecAlgos_HGCalImagingAlgo_h 32 std::vector<size_t>
idx(v.size());
33 for (
size_t i = 0;
i !=
idx.size(); ++
i)
idx[
i] =
i;
36 std::sort(
idx.begin(),
idx.end(),
37 [&
v](
size_t i1,
size_t i2) {
return v[i1] > v[i2];});
152 x(0.),y(0.),z(0.),isHalfCell(isHalf),
153 weight(0.), fraction(1.0), detid(id_in), rho(0.), delta(0.),
154 nearestHigher(-1), isBorder(
false), isHalo(
false),
155 clusterIndex(-1), tools(tools_in)
166 x(0.),y(0.),z(0.),isHalfCell(
false),
167 weight(0.), fraction(1.0), detid(), rho(0.), delta(0.),
168 nearestHigher(-1), isBorder(
false), isHalo(
false),
173 return (rho > rhs.
rho);
186 std::vector<size_t>
idx(v.size());
187 for (
size_t i = 0;
i !=
idx.size(); ++
i)
idx[
i] =
i;
188 sort(
idx.begin(),
idx.end(),
189 [&
v](
size_t i1,
size_t i2) {
return v[i1].data.delta > v[i2].data.delta;});
198 const double dx = pt1.
x - pt2.
x;
199 const double dy = pt1.
y - pt2.
y;
200 return (dx*dx + dy*dy);
216 const std::vector<unsigned>&,
217 std::vector<std::vector<double> >&);
double calculateDistanceToHigher(std::vector< KDNode > &, KDTree &)
double calculateEnergyWithFraction(const std::vector< KDNode > &, const std::vector< double > &)
hgcal::RecHitTools rhtools_
std::vector< std::vector< KDNode > > current_v
math::XYZPoint calculatePositionWithFraction(const std::vector< KDNode > &, const std::vector< double > &)
double distance(const Hexel &pt1, const Hexel &pt2)
reco::CaloCluster::AlgoId algoId
static const unsigned int maxlayer
void getEventSetup(const edm::EventSetup &es)
double calculateLocalDensity(std::vector< KDNode > &, KDTree &)
math::XYZPoint Point
point in the space
void makeClusters(const HGCRecHitCollection &hits)
std::vector< size_t > sort_by_delta(const std::vector< KDNode > &v)
HGCalImagingAlgo(float delta_c_in, double kappa_in, double ecut_in, double showerSigma, reco::CaloCluster::AlgoId algoId_in, VerbosityLevel the_verbosity=pERROR)
void shareEnergy(const std::vector< KDNode > &, const std::vector< unsigned > &, std::vector< std::vector< double > > &)
unsigned int cluster_offset
std::vector< std::vector< Hexel > > points
std::vector< size_t > sorted_indices(const std::vector< T > &v)
HGCalImagingAlgo(float delta_c_in, double kappa_in, double ecut_in, reco::CaloCluster::AlgoId algoId_in, VerbosityLevel the_verbosity=pERROR)
std::vector< reco::BasicCluster > getClusters(bool)
std::vector< unsigned > findLocalMaximaInCluster(const std::vector< KDNode > &)
const hgcal::RecHitTools * tools
XYZPointD XYZPoint
point in space with cartesian internal representation
math::XYZPoint calculatePosition(std::vector< KDNode > &)
void setVerbosity(VerbosityLevel the_verbosity)
KDTreeLinkerAlgo< Hexel, 2 > KDTree
Hexel(const HGCRecHit &hit, DetId id_in, bool isHalf, const hgcal::RecHitTools *tools_in)
double distance2(const Hexel &pt1, const Hexel &pt2)
static int position[264][3]
bool operator>(const Hexel &rhs) const
virtual ~HGCalImagingAlgo()
int findAndAssignClusters(std::vector< KDNode > &, KDTree &, double, KDTreeBox &)
KDTreeNodeInfoT< Hexel, 2 > KDNode
Power< A, B >::type pow(const A &a, const B &b)
std::vector< reco::BasicCluster > clusters_v