15 #include "vdt/vdtMath.h" 19 using namespace hgcal;
46 float energy=0.f, energyHad=0.f;
49 const auto&
id =
hit.first;
62 switch(
id.subdetId() ) {
75 <<
" Cluster contains hits that are not from HGCal! " << std::endl;
83 <<
" Cluster contains hits that are not from HGCal! " << std::endl;
88 fraction = energyHad/energy;
100 double totweight = 0.;
102 for(
const auto& ptr : clu.
clusters() ) {
104 if(ptr->energy()<.01*mcenergy)
continue;
106 const double weight = ptr->energy();
112 if (totweight != 0) {
127 for(
const auto& ptr : clu.
clusters() ) {
128 acc += ptr->energy();
147 for (
unsigned int ih=0; ih<nhit; ++ih) {
159 double logweight = 0;
165 sigmaetaeta += deltaetaeta2*
weight;
166 sigmaphiphi += deltaphiphi2 *
weight;
167 sigmaetaetal += deltaetaeta2* logweight;
168 sigmaphiphil += deltaphiphi2 * logweight;
170 sumlogw += logweight;
175 if (sumw<=0.)
return false;
183 sigmaetaetal /= sumlogw;
185 sigmaphiphil /= sumlogw;
constexpr float energy() const
const math::XYZPoint & position() const
cluster centroid position
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Geom::Phi< T > phi() const
std::vector< HGCRecHit >::const_iterator const_iterator
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
U second(std::pair< T, U > const &p)
const edm::PtrVector< reco::BasicCluster > & clusters() const
double energy() const
cluster energy
T const * product() const
XYZPointD XYZPoint
point in space with cartesian internal representation
iterator find(key_type k)
static int position[264][3]