14 #include "vdt/vdtMath.h" 18 using namespace hgcal;
34 rechitManager_ = std::make_unique<MultiVectorManager<HGCRecHit>>();
43 float energy = 0.f, energyHad = 0.f;
47 const auto&
id =
hit.first;
53 unsigned int rechitIndex =
hitIter->second;
54 float hitEnergy = rhmanager[rechitIndex].energy() *
fraction;
59 energyHad += hitEnergy;
62 float hadronicFraction = -1.f;
64 hadronicFraction = energyHad /
energy;
66 return hadronicFraction;
76 double totweight = 0.;
78 for (
const auto& ptr : clu.
clusters()) {
80 if (ptr->energy() < .01 * mcenergy)
83 const double weight = ptr->energy();
84 acc_x += ptr->x() *
weight;
85 acc_y += ptr->y() *
weight;
86 acc_z += ptr->z() *
weight;
102 for (
const auto& ptr : clu.
clusters()) {
103 acc += ptr->energy();
111 double& sigmaetaetal,
112 double& sigmaphiphil)
const {
127 for (
unsigned int ih = 0; ih < nhit; ++ih) {
137 unsigned int rechitIndex =
hitIter->second;
138 float hitEnergy = rhmanager[rechitIndex].energy();
141 double weight = hitEnergy;
143 double logweight = 0;
149 sigmaetaeta += deltaetaeta2 *
weight;
150 sigmaphiphi += deltaphiphi2 *
weight;
151 sigmaetaetal += deltaetaeta2 * logweight;
152 sigmaphiphil += deltaphiphi2 * logweight;
154 sumlogw += logweight;
167 sigmaetaetal /= sumlogw;
169 sigmaphiphil /= sumlogw;
const math::XYZPoint & position() const
cluster centroid position
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
std::vector< HGCRecHit > HGCRecHitCollection
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
Geom::Phi< T > phi() const
const edm::PtrVector< reco::BasicCluster > & clusters() const
U second(std::pair< T, U > const &p)
double energy() const
cluster energy
hitCont::const_iterator hitIter
XYZPointD XYZPoint
point in space with cartesian internal representation
static int position[264][3]