1 #ifndef RecoLocalCalo_HGCalRecAlgos_HGCalImagingAlgo_h 2 #define RecoLocalCalo_HGCalRecAlgos_HGCalImagingAlgo_h 32 std::vector<size_t>
idx(v.size());
36 std::sort(
idx.begin(),
idx.end(),
37 [&
v](
size_t i1,
size_t i2) {
58 HGCalImagingAlgo(
const std::vector<double>& vecDeltas_in,
double kappa_in,
double ecut_in,
61 const std::vector<double>& dEdXweights_in,
62 const std::vector<double>& thicknessCorrection_in,
63 const std::vector<double>& fcPerMip_in,
65 const std::vector<double>& nonAgedNoises_in,
89 HGCalImagingAlgo(
const std::vector<double>& vecDeltas_in,
double kappa_in,
double ecut_in,
93 const std::vector<double>& dEdXweights_in,
94 const std::vector<double>& thicknessCorrection_in,
95 const std::vector<double>& fcPerMip_in,
97 const std::vector<double>& nonAgedNoises_in,
146 std::vector<KDNode>().
swap(it);
148 for(
unsigned int i = 0;
i <
minpos.size();
i++)
224 weight(0.), fraction(1.0), detid(id_in), rho(0.), delta(0.),
225 nearestHigher(-1), isBorder(
false), isHalo(
false),
226 clusterIndex(-1), sigmaNoise(sigmaNoise_in), thickness(thickness_in),
236 x(0.),y(0.),z(0.),isHalfCell(
false),
237 weight(0.), fraction(1.0), detid(), rho(0.), delta(0.),
238 nearestHigher(-1), isBorder(
false), isHalo(
false),
246 return (rho > rhs.
rho);
258 std::vector<size_t>
idx(v.size());
260 sort(
idx.begin(),
idx.end(),
261 [&
v](
size_t i1,
size_t i2) {
262 return v[i1].data.delta > v[i2].data.delta;
267 std::vector<std::vector<KDNode> >
points;
270 std::vector<std::array<float,2> >
minpos;
271 std::vector<std::array<float,2> >
maxpos;
276 const double dx = pt1.
x - pt2.
x;
277 const double dy = pt1.
y - pt2.
y;
278 return (dx*dx + dy*dy);
294 const std::vector<unsigned>&,
295 std::vector<std::vector<double> >&);
constexpr float energy() const
double calculateEnergyWithFraction(const std::vector< KDNode > &, const std::vector< double > &)
hgcal::RecHitTools rhtools_
math::XYZPoint calculatePositionWithFraction(const std::vector< KDNode > &, const std::vector< double > &)
std::vector< double > dEdXweights
reco::CaloCluster::AlgoId algoId
static const unsigned int maxlayer
double calculateLocalDensity(std::vector< KDNode > &, KDTree &, const unsigned int) const
std::vector< std::array< float, 2 > > minpos
void getEventSetup(const edm::EventSetup &es)
std::vector< double > vecDeltas
std::vector< std::vector< double > > thresholds
std::vector< std::array< float, 2 > > maxpos
math::XYZPoint Point
point in the space
std::vector< double > thicknessCorrection
std::vector< double > nonAgedNoises
double distance2(const Hexel &pt1, const Hexel &pt2) const
void swap(Association< C > &lhs, Association< C > &rhs)
HGCalImagingAlgo(const std::vector< double > &vecDeltas_in, double kappa_in, double ecut_in, reco::CaloCluster::AlgoId algoId_in, bool dependSensor_in, const std::vector< double > &dEdXweights_in, const std::vector< double > &thicknessCorrection_in, const std::vector< double > &fcPerMip_in, double fcPerEle_in, const std::vector< double > &nonAgedNoises_in, double noiseMip_in, VerbosityLevel the_verbosity=pERROR)
void shareEnergy(const std::vector< KDNode > &, const std::vector< unsigned > &, std::vector< std::vector< double > > &)
static const unsigned int lastLayerEE
double distance(const Hexel &pt1, const Hexel &pt2) const
static const unsigned int lastLayerFH
std::vector< size_t > sorted_indices(const std::vector< T > &v)
std::vector< reco::BasicCluster > getClusters(bool)
std::vector< unsigned > findLocalMaximaInCluster(const std::vector< KDNode > &)
const hgcal::RecHitTools * tools
std::vector< std::vector< KDNode > > points
XYZPointD XYZPoint
point in space with cartesian internal representation
HGCalImagingAlgo(const std::vector< double > &vecDeltas_in, double kappa_in, double ecut_in, double showerSigma, reco::CaloCluster::AlgoId algoId_in, bool dependSensor_in, const std::vector< double > &dEdXweights_in, const std::vector< double > &thicknessCorrection_in, const std::vector< double > &fcPerMip_in, double fcPerEle_in, const std::vector< double > &nonAgedNoises_in, double noiseMip_in, VerbosityLevel the_verbosity=pERROR)
std::vector< std::vector< double > > v_sigmaNoise
void setVerbosity(VerbosityLevel the_verbosity)
KDTreeLinkerAlgo< Hexel, 2 > KDTree
double calculateDistanceToHigher(std::vector< KDNode > &) const
static int position[264][3]
math::XYZPoint calculatePosition(std::vector< KDNode > &) const
bool operator>(const Hexel &rhs) const
virtual ~HGCalImagingAlgo()
std::vector< std::vector< std::vector< KDNode > > > layerClustersPerLayer
Hexel(const HGCRecHit &hit, DetId id_in, bool isHalf, float sigmaNoise_in, float thickness_in, const hgcal::RecHitTools *tools_in)
KDTreeNodeInfoT< Hexel, 2 > KDNode
std::vector< double > fcPerMip
void populate(const HGCRecHitCollection &hits)
std::vector< size_t > sort_by_delta(const std::vector< KDNode > &v) const
Power< A, B >::type pow(const A &a, const B &b)
std::vector< reco::BasicCluster > clusters_v
int findAndAssignClusters(std::vector< KDNode > &, KDTree &, double, KDTreeBox &, const unsigned int, std::vector< std::vector< KDNode > > &) const