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,
90 HGCalImagingAlgo(
const std::vector<double>& vecDeltas_in,
double kappa_in,
double ecut_in,
94 const std::vector<double>& dEdXweights_in,
95 const std::vector<double>& thicknessCorrection_in,
96 const std::vector<double>& fcPerMip_in,
98 const std::vector<double>& nonAgedNoises_in,
149 std::vector<KDNode>().
swap(it);
151 for(
unsigned int i = 0;
i <
minpos.size();
i++)
232 weight(0.), fraction(1.0), detid(id_in), rho(0.), delta(0.),
233 nearestHigher(-1), isBorder(
false), isHalo(
false),
234 clusterIndex(-1), sigmaNoise(sigmaNoise_in), thickness(thickness_in),
244 x(0.),y(0.),z(0.),isHalfCell(
false),
245 weight(0.), fraction(1.0), detid(), rho(0.), delta(0.),
246 nearestHigher(-1), isBorder(
false), isHalo(
false),
254 return (rho > rhs.
rho);
267 std::vector<size_t>
idx(v.size());
269 sort(
idx.begin(),
idx.end(),
270 [&
v](
size_t i1,
size_t i2) {
271 return v[i1].data.delta > v[i2].data.delta;
276 std::vector<std::vector<KDNode> >
points;
279 std::vector<std::array<float,2> >
minpos;
280 std::vector<std::array<float,2> >
maxpos;
285 const double dx = pt1.
x - pt2.
x;
286 const double dy = pt1.
y - pt2.
y;
287 return (dx*dx + dy*dy);
303 const std::vector<unsigned>&,
304 std::vector<std::vector<double> >&);
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)
std::vector< double > dEdXweights
reco::CaloCluster::AlgoId algoId
double calculateDistanceToHigher(std::vector< KDNode > &)
static const unsigned int maxlayer
std::vector< std::array< float, 2 > > minpos
void getEventSetup(const edm::EventSetup &es)
static const unsigned int maxNumberOfWafersPerLayer
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
void swap(Association< C > &lhs, Association< C > &rhs)
std::vector< size_t > sort_by_delta(const std::vector< KDNode > &v)
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
static const unsigned int lastLayerFH
unsigned int cluster_offset
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 > &)
double calculateLocalDensity(std::vector< KDNode > &, KDTree &, const unsigned int)
const hgcal::RecHitTools * tools
int findAndAssignClusters(std::vector< KDNode > &, KDTree &, double, KDTreeBox &, const unsigned int)
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)
math::XYZPoint calculatePosition(std::vector< KDNode > &)
std::vector< std::vector< double > > v_sigmaNoise
void setVerbosity(VerbosityLevel the_verbosity)
KDTreeLinkerAlgo< Hexel, 2 > KDTree
double distance2(const Hexel &pt1, const Hexel &pt2)
static int position[264][3]
bool operator>(const Hexel &rhs) const
virtual ~HGCalImagingAlgo()
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)
Power< A, B >::type pow(const A &a, const B &b)
std::vector< reco::BasicCluster > clusters_v