14 #include "vdt/vdtMath.h"
18 using namespace hgcal;
36 float energy = 0.f, energyHad = 0.f;
38 for (
const auto&
hit : hits) {
39 const auto&
id =
hit.first;
52 switch (
id.subdetId()) {
62 throw cms::Exception(
"HGCalClusterTools") <<
" Cluster contains hits that are not from HGCal! " << std::endl;
69 throw cms::Exception(
"HGCalClusterTools") <<
" Cluster contains hits that are not from HGCal! " << std::endl;
74 fraction = energyHad /
energy;
86 double totweight = 0.;
88 for (
const auto& ptr : clu.
clusters()) {
90 if (ptr->energy() < .01 * mcenergy)
93 const double weight = ptr->energy();
94 acc_x += ptr->x() *
weight;
95 acc_y += ptr->y() *
weight;
96 acc_z += ptr->z() *
weight;
112 for (
const auto& ptr : clu.
clusters()) {
113 acc += ptr->energy();
121 double& sigmaetaetal,
122 double& sigmaphiphil)
const {
136 for (
unsigned int ih = 0; ih < nhit; ++ih) {
147 double logweight = 0;
153 sigmaetaeta += deltaetaeta2 *
weight;
154 sigmaphiphi += deltaphiphi2 *
weight;
155 sigmaetaetal += deltaetaeta2 * logweight;
156 sigmaphiphil += deltaphiphi2 * logweight;
158 sumlogw += logweight;
171 sigmaetaetal /= sumlogw;
173 sigmaphiphil /= sumlogw;
constexpr float energy() const
const math::XYZPoint & position() const
cluster centroid position
static std::vector< std::string > checklist log
Geom::Phi< T > phi() const
bool getData(T &iHolder) const
U second(std::pair< T, U > const &p)
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
const edm::PtrVector< reco::BasicCluster > & clusters() const
bool get(ProductID const &oid, Handle< PROD > &result) const
double energy() const
cluster energy
XYZPointD XYZPoint
point in space with cartesian internal representation
iterator find(key_type k)
static int position[264][3]