1 #ifndef RecoLocalCalo_HGCalRecProducers_HGCalImagingAlgo_h 2 #define RecoLocalCalo_HGCalRecProducers_HGCalImagingAlgo_h 42 kappa_(ps.getParameter<double>(
"kappa")),
43 ecut_(ps.getParameter<double>(
"ecut")),
48 fcPerMip_(ps.getParameter<
std::vector<double> >(
"fcPerMip")),
49 fcPerEle_(ps.getParameter<double>(
"fcPerEle")),
67 std::vector<reco::BasicCluster>
getClusters(
bool)
override;
76 std::vector<KDNode>().
swap(it);
78 for(
unsigned int i = 0;
i <
minpos_.size();
i++)
90 iDesc.
add<std::vector<double>>(
"thresholdW0", {
95 iDesc.
add<std::vector<double>>(
"positionDeltaRho_c", {
100 iDesc.
add<std::vector<double>>(
"deltac", {
105 iDesc.
add<
bool>(
"dependSensor",
true);
106 iDesc.
add<
double>(
"ecut", 3.0);
107 iDesc.
add<
double>(
"kappa", 9.0);
109 iDesc.
add<std::vector<double>>(
"dEdXweights",{});
110 iDesc.
add<std::vector<double>>(
"thicknessCorrection",{});
111 iDesc.
add<std::vector<double>>(
"fcPerMip",{});
112 iDesc.
add<
double>(
"fcPerEle",0.0);
114 descNestedNoises.
add<std::vector<double> >(
"values", {});
117 descNestedNoiseMIP.
add<
double>(
"value", 0 );
181 weight(0.), fraction(1.0), detid(id_in), rho(0.), delta(0.),
182 nearestHigher(-1), isBorder(
false), isHalo(
false),
183 clusterIndex(-1), sigmaNoise(sigmaNoise_in), thickness(thickness_in),
193 x(0.),y(0.),z(0.),isHalfCell(
false),
194 weight(0.), fraction(1.0), detid(), rho(0.), delta(0.),
195 nearestHigher(-1), isBorder(
false), isHalo(
false),
203 return (rho > rhs.
rho);
215 std::vector<size_t>
idx(v.size());
218 [&
v](
size_t i1,
size_t i2) {
219 return v[i1].data.delta > v[i2].data.delta;
233 const double dx = pt1.
x - pt2.
x;
234 const double dy = pt1.
y - pt2.
y;
235 return (dx*dx + dy*dy);
246 void setDensity(
const std::vector<KDNode> &nd);
254 const std::vector<unsigned>&,
255 std::vector<std::vector<double> >&);
constexpr float energy() const
double calculateEnergyWithFraction(const std::vector< KDNode > &, const std::vector< double > &)
math::XYZPoint calculatePositionWithFraction(const std::vector< KDNode > &, const std::vector< double > &)
double calculateLocalDensity(std::vector< KDNode > &, KDTree &, const unsigned int) const
ParameterDescriptionBase * addUntracked(U const &iLabel, T const &value)
std::vector< std::vector< double > > thresholds_
std::map< DetId, float > Density
math::XYZPoint Point
point in the space
std::vector< reco::BasicCluster > getClusters(bool) override
std::vector< double > positionDeltaRho_c_
double distance2(const Hexel &pt1, const Hexel &pt2) const
std::vector< double > thresholdW0_
void swap(Association< C > &lhs, Association< C > &rhs)
void makeClusters() override
hgcal_clustering::Density Density
void shareEnergy(const std::vector< KDNode > &, const std::vector< unsigned > &, std::vector< std::vector< double > > &)
double distance(const Hexel &pt1, const Hexel &pt2) const
std::vector< reco::BasicCluster > clusters_v_
std::vector< std::vector< KDNode > > points_
std::vector< double > vecDeltas_
std::vector< double > dEdXweights_
std::vector< std::vector< double > > sigmaNoise_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
std::vector< std::vector< std::vector< KDNode > > > layerClustersPerLayer_
void setDensity(const std::vector< KDNode > &nd)
std::vector< unsigned > findLocalMaximaInCluster(const std::vector< KDNode > &)
Density getDensity() override
std::vector< std::array< float, 2 > > minpos_
void populate(const HGCRecHitCollection &hits) override
const hgcal::RecHitTools * tools
~HGCalImagingAlgo() override
std::vector< double > thicknessCorrection_
static void fillPSetDescription(edm::ParameterSetDescription &iDesc)
XYZPointD XYZPoint
point in space with cartesian internal representation
std::vector< double > fcPerMip_
std::vector< double > nonAgedNoises_
static const unsigned int maxlayer
HGCalImagingAlgo(const edm::ParameterSet &ps)
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
std::vector< std::array< float, 2 > > maxpos_
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< size_t > sort_by_delta(const std::vector< KDNode > &v) const
int findAndAssignClusters(std::vector< KDNode > &, KDTree &, double, KDTreeBox &, const unsigned int, std::vector< std::vector< KDNode > > &) const