|
|
Go to the documentation of this file.
14 #include "vdt/vdtMath.h"
18 using namespace hgcal;
36 float energy = 0.f, energyHad = 0.f;
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;
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;
const edm::PtrVector< reco::BasicCluster > & clusters() const
constexpr float energy() const
U second(std::pair< T, U > const &p)
XYZPointD XYZPoint
point in space with cartesian internal representation
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
static int position[264][3]
const math::XYZPoint & position() const
cluster centroid position
bool getData(T &iHolder) const
iterator find(key_type k)
double energy() const
cluster energy
Geom::Phi< T > phi() const